What is the best way to close a communication session with the FP Server?

Looking at NI's FieldPoint Demobox.vi example, the session is closed by wiring the FP Refnum out from the FP Create Tag vi for the AI module to the FP Close vi. Is there any difference if the FP Refnum out from any or all of the other FP Create Tags were wired to FP Close vi/vi's? Could the FP Refnum out from the FP Open vi be wired to the FP Close vi? What is the best way to do this?
Also, as I'm new to FP and I'm conscious that I might swamp this forum with dumb questions, are the any sources of good FP code examples and/or discussions on coding techniques out there beyond the handful of NI's examples?
Thanks again,
Niel.

Niel,
The FP Open.vi provides a FP Refnum in the form of a data cluster. The cluster contains two elements; a server refnum and a tag refnum. Coming out of the FP Open, only the server refnum has a value, the tag refnum is created when the FP Create Tag.vi is processed. Thus all FP refnums in a process have the same server refnum but different tag refnums. The FP Close.vi uses the server refnum to close the server and ignores the tag refnum so it does not matter which particular refnum was used to close the server. The thing to be careful of is if you close on refnum, you close all refnums. At this point, any reads/writes/advises will result in error 32804 (Invalid IA handle specified).
Also, please swamp this forum with questions. I am in the process of reviewin
g the documentation and examples we provide and having a beginner asking questions that do not appear to be covered in our materials gives me an idea of what we are missing. I would ask that you upgrade to FieldPoint Explorer 2.0.4 and use the online help for LabVIEW since that has had some of my modifications added to it (program flow outlines, vi descriptions & use cases).
Regards, Aaron

Similar Messages

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

  • What is the best way to "upgrade" a powerbook g4 with a powerpc chip?  it seems that many things don't work or aren't supported these days.  can't update my iphone, download video, etc.  can i get the latest software?  thanks.Ask your question.

    what is the best way to "upgrade" a powerbook g4 with a powerpc chip?  it seems that many things are not supported these days.  can't download software, update my iphone, download video, etc.  can i get the latest software?  thanks for the help!

    Mac OS X 10.5 Leopard installation system requirements
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753).
    If you can't obtain a retail install DVD from Apple, look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
    MB427Z/A  Leopard 10.5.1 install DVD
    MB576Z/A  Leopard 10.5.4 install DVD
    MB021Z/A  Leopard 10.5.6 install DVD (single user)
    MB022Z/A  Leopard 10.5.6 install DVD (5-user family pack)
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
    The DVD should look like this
    Caution - Leopard does not support classic mode. So, if you currently open OS 9 apps in classic mode, you won't be able to do this if you upgrade to Leopard.
     Cheers, Tom

  • What is the best way to get dirty my hand with office 365

    what is the best way to get dirty my hand with office 365
    Anil MCC 2011,ITIL V3,MCSA 2003,MCTS 2010, My Blog : http://messagingschool.wordpress.com

    Hi,
    Just create an evaluation tenate and get your hands Dirty! Or if you are a partner to Microsoft, you can register yourself at
    http://portal.fasttrack.office.com and then you can create sites from there. If you need tenant with data, use
    http://microsoftcie.com and create a tenant, then you will have your own contoso to play with! :) 
    Regards
    Henrik A. Halmstrand
    sharepointrevealed.com
    getspconfig.codeplex.com
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.

  • What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?

    What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?
    Thanks for any help

    Hi Donavan,
    There are two options for zeroing with the NI-9237.  You can perform offset nulling and shunt calibration with a strain task, or if you use custom excitation you can use software compensation.
    See the Bridge Balancing, Offset Nulling section in  the Load, Force, and Torque Measurements tutorial. Take a measurement before the strain is applied and subtract this from all subsequent measurements.  See the above tutorial to consider the tradeoff in accuracy between these two options.
    Hope this helps,
    Jennifer O.
    Applications Engineer
    National Instruments

  • What is the best way to reconcile gl account postings with pay results ?

    Hi experts
    what is the best way to reconcile gl account postings with pay results ?
    is it running wage type reporter ?
    or is there any otehr way .. i have variances in wtr n gl posting for a few employees.
    Regards

    Hi,
    Match Payroll Journal (PC00_M40_LJN - Payroll Journal ) with Wage type Report.(PC00_M99_CWTR - Wage Type Reporter )
    Finally verify the Posting amount (PCP0) with Payroll Journal....(PC00_M40_LJN - Payroll Journal )
    This should solve your issue...
    Regards,
    Veeram

  • HT4436 What is the best way to set up business accounts with multiple ipads?

    What is the best way to set up business accounts with multiple ipads?

    Here are three different methods >
    How to use multiple iPods, iPads, or iPhones with one computer, http://support.apple.com/kb/HT1495
    This article > iOS: How to transfer or sync content to your computer, http://support.apple.com/kb/HT1296
    suggests using contacts groups.
    When syncing contacts, you can choose to sync all of your contacts or only selected groups.
    You can select a group of contacts to which all new contacts created on your iOS device will be added.
    You can set up groups in the Address Book application.
    If you are all going to use the same iTunes apps library, turn off "Automatically sync new apps" in the apps tab just below the list of apps.  Then you won't get new apps on your device unless you select them.

  • What's the best way to create/stitch panorama photos with Aperture?

    What's the best way to create/stitch panorama photos with Aperture?
    Many thanks
    Best

    There is no way to do this with Aperture. This thread
    https://discussions.apple.com/thread/3714693?start=0&tstart=0
    has some suggestions.

  • What is the best way to hookup my airport extreme with my time capsule ?

    what is the best way to hookup my airport extreme with my time capsule ?

    It sounds like you have the AirPort Extreme configured as the "main" router on your network.
    If that is the case, connect an Ethernet cable from one of the LAN <-> ports on the AirPort Extreme to the WAN "O" port on the Time Capsule
    Power up the Time Capsule
    Connect another spare Ethernet cable from your Mac to one of the LAN <-> ports on the Time Capsule
    Open Macintosh HD > Applications  > Utilities > AirPort Utility
    Click on the Time Capsule, then click Manual Setup
    Click the Wireless tab below the row of icons and make sure that the setting for Wireless Mode = Off
    Click the Internet icon, the click the Internet tab
    Insure that the setting for Connect Using = Ethernet
    Insure that the setting for Connection Sharing = Off (Bridge Mode)
    Click the Update button at the lower right of the window and wait a full minute for the Time Capsule to restart
    Then power cycle the entire network by powering everything off....order of power down does not matter
    Wait a minute
    Power up the modem first, and let it run a few minutes by itself
    Power up the AirPort Extreme next and let it run a full minute
    Power up the Time Capsule next and let it run a full minute
    Keep starting devices one at a time about a minute apart until the entire network is back up
    You will need to reset the backup path from your Mac to the Time Capsule to get backups going again
    Open System Preference (gear icon on the dock)
    Open Time Machine
    Click Select Disk
    Click the Time Capsule to highlight it
    Click Use for Backups or Use Disk and backups should begin again in a few minutes
    If you do not want to leave the Mac connected to the Time Capsule by Ethernet, remove the Ethernet cable from the Mac to the Time Capsule, then log on to the AirPort Extreme wireless network

  • What is the best way to control a mac mini with iphone 4s , prefer blue tooth

    Hi
    what is the best way to control a mac mini with iphone 4s , prefer blue tooth, or I can use the syncing cable as well. but no wifi.
    Basically to lanch an app and load a preset for that app.
    Thank you

    As V.K. noted, check out NetRestore's documentation http://www.bombich.com/software/docs/netrestore/English/index.html or visit the fourms at http://forums.bombich.com/

  • Best way to close a Runtime.exec() process and how to handle closing it?

    I have multiple Runtime.exec() Processes running and am wondering what the best way it is to close them and take care of closing the resources. I see that Process.destroy() seems to be the way to terminate the Process - is finalize() the best way to close anything in that Process?
    Thanks

    I was involved with your other thread, so I think I know what you are trying to do.
    All Dr's answers are correct.
    Now you have a program A written by you that does Runtime.exec() of multiple instances
    of another program B written by you. You want A to somehow tell B to exit.
    You must use some kind of Inter Process Communication. If this is the only interraction
    between the two programs I can suggest two options. If you anticipate more
    interraction, you may want to look at other means (RMI, for instance, which was proposed
    by EJP in the other thread for starting B, is also useful in exchanging info).
    Solution 1:
    Start a thread in B and read stdin. A will write to stdin a command, such as QUIT.
    When B reads it, it does System.exit().
    Solution 2:
    Start a SocketServer in B that accepts connections on a separate thread.
    When A wants B to exit, it connects to it and writes a command such as QUIT.
    When B reads it, it does System.exit().
    You may note that QUIT is not the only command you can send from A to B, in case you will need more.
    Edited by: baftos on Nov 5, 2007 2:15 PM

  • What's he best way to include Adobe PDFs on my blog?

    What's he best way to include Adobe PDFs on my blog?
    I create worksheets as a teacher and would like to share them from my blog. Currently I am linking to Scribd etc to share PDFs. If I upload the worksheets as an image is there a way to adjust the size/resolution of the PDF for easier viewing? 
    Thanks!

    PDFs are just files. Can you upload files to your blog space? If yes, just upload the PDFs then, in a blog entry, provide the web link (URL) for each file (PDF).
    Or, place the PDFs into your free acrobat.com "files" storage (5GB free). You have one as you have an Adobe ID (needed to make your post here eh).
    https://cloud.acrobat.com/
    You can have acrobat.com provide a "share" link to the PDF. Place that into a blog entry.
    Or - same idea as above (use a "file share" service) -- Microsoft's OneDrive, Adobe's Creative Cloud, Google drive, DropBox, others ...
    Be well...

  • What is a best way to write SQL ?

    Sample Case
    drop table t;
    drop table b;
    create table t ( a varchar2(4), b number, c varchar2(1));
    insert into t values ('A00', 10, 'R');
    insert into t values ('A01', 11, 'R');
    insert into t values ('A02', 12, 'R');
    insert into t values ('A03', 13, 'R');
    insert into t values ('A00', 10, 'P');
    insert into t values ('A01', 11, 'P');
    insert into t values ('A02', 12, 'P');
    insert into t values ('A03', 13, 'P');
    commit;
    create table b ( j varchar(4), k varchar2(1), l varchar2(5), m number(3), n varchar2(5), o number(3));
    insert into b values ('A00', 'P', 'FIXED', 100, 'FLOAT', 60);
    insert into b values ('A01', 'P', 'FIXED', 101, 'FIXED', 30);
    insert into b values ('A02', 'R', 'FLOAT', 45, 'FLOAT', 72);
    insert into b values ('A03', 'R', 'FIXED', 55, 'FLOAT', 53);
    commit;
    10:19:13 SQL> select * from t;
    A B C
    A00 10 R
    A01 11 R
    A02 12 R
    A03 13 R
    A00 10 P
    A01 11 P
    A02 12 P
    A03 13 P
    8 rows selected.
    10:19:19 SQL> select * from b;
    J K L M N O
    A00 P FIXED 100 FLOAT 60
    A01 P FIXED 101 FIXED 30
    A02 R FLOAT 45 FLOAT 72
    A03 R FIXED 55 FLOAT 53
    1/     In table t each reference having 2 records one with P another is with R
    2/     In table b each refrence merged into single record and there are many records which are not existing in table t
    3/      both t and j tables can be joined using a = j
    4/     If from table t for a reference indicator is 'P' then if have to pick up l and m columns, if it is 'R' then I have to pick up n and o columns
    5/     I want output in following format
    A00     P     FIXED          100
    A00     R     FLOAT          60
    A01     P     FIXED          101
    A01     R     FIXED          30
    A02     P     FLOAT          72
    A02     R     FLOAT          45
    A03     P     FLOAT          53
    A03     R     FIXED          55
    6/     Above example is a sample ouput, In above example I have picked up only l,m,n,o columns, but in real example there are many columns ( around 40 ) to be selected. ( using "case when" may not be practical )
    Kindly suggest me what is a best way to write SQL ?
    thanks & regards
    pjp

    Is this?
    select b.j,t.c as k,decode(t.c,'P',l,n) as l,decode(t.c,'P',m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 45
    A02 R FLOAT 72
    A03 P FIXED 55
    A03 R FLOAT 53
    8 rows selected.
    or is this?
    select b.j,t.c as k,decode(t.c,b.k,l,n) as l,decode(t.c,b.k,m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 72
    A02 R FLOAT 45
    A03 P FLOAT 53
    A03 R FIXED 55
    8 rows selected.

  • I'm running firefox 35.01 on macpro OS 10.7.5 what is th best way to do ftp?

    I'm running firefox 35.01 on macpro OS 10.7.5 what is th best way to do ftp?

    Do you mean '''F'''ile '''T'''ransfer '''P'''rotocol (FTP) ?
    Please give more details.

  • Although we have iPhones and iPads, this is our first mac pc and we wanted to know the best way to set up multiple users with parental contro;s

    although we have iphones and ipads, this is our first imac and we wanted to know the best ways to set up multiple users with parental controls

    I'm assuming you have the lastet OSX version 10.9 "Mavericks." Here are some useful links from Apple I think will help:
    http://support.apple.com/kb/PH14414
    http://support.apple.com/kb/PH14099
    http://support.apple.com/kb/PH14280
    and a video:
    http://support.apple.com/kb/VI28
    I suspect you have a newer iMac than the pre-2006 models this forum covers (the forum labels are unbelieveably vague). If you can confirm that yours is newer than 2005, I can ask the Hosts to move you the the forum for current iMacs, which gets many more views.

Maybe you are looking for

  • Dealing with DB table-entries in ABAP OO

    Hi everybody, in ABAP-Reports (normally) we have deal a lot with DB table entries. Is there a "state of the art" for doing this with ABAP OO? An easy example: Asuming I want to select table  entries into an internal table from BUT000.And than I want

  • Since installing Photoshop CC I can't access Camera Raw from the program Bridge.

    Since installing Photoshop CC I can't access Camera Raw from the program Bridge.  When I try, I get a message that says, "Camera Raw editing is not enabled. Camera Raw editing requires that a qualifying product has been launched at least once to enab

  • No of HU in a HU

    I have a Handling unit that has 2 handling units inside . I want to know if there is a code OR an FM to give us the lowest and the highest Handling unit . For example 1 handling unit ---> 2 handling units (pallets) - > 4 packets (MATERIALS) . Thank y

  • Issues compiling pam_krb5-1.3-rc7 on Solaris 10

    I'm unable to properly configure pam_krb5-1.3-rc7 on Solaris 10 machine. I have the following as configure option: ./configure with-krb5=/krb5/usr/kerberos with-gnu-ld I've been able to verify that my tools are GNU based but I still get an error and

  • Tiffs from camera not displaying preview

    My Panasonic DMC-FZ3 camera takes each photo as both a tiff and a jpeg (it uses the jpeg for display on its built-in lcd). The Finder and Apple apps are having a problem with the tiffs (the jpegs are fine). The finder does not display a preview, and