Remotely closing VISA sessions??​?

I have a network with three computers running LabView 6.1 The master computer collects data via fieldpoint ethernet devices and serial devices. If the master should go down (power loss, software freeze ect.) one of the slave computers takes over. The problem I am having is closing the VISA session origially opened be the master (which is now down). The new master can never talk to the serial devices because of VISA session errors. How can I remotely close a VISA session????????????

I haven't worked with the fieldpoint ethernet devices,
but other ethernet devices either:
a) accepted a reboot command (with a password protection) - the reboot would clear VISA sessions.
or
b) could set a timeout on ethernet connections - ie, detect that the modem disconnected, close the VISA sessions.
Check to see if those options are available.
Les Hammer

Similar Messages

  • Do we still need to close VISA sessions?

    I know it sounds like a silly question but do we?
    Back in my early days (LabVIEW 5.1) I used to have a set of favorite VI's for my instruments that opened a VISA session, performed a task (like taking a measurement), then closed the VISA session. I used these a lot as I could drop them in and throw a program together without having to worry about wiring the VISA sessions. Fact this speed of test development really sold our company on LabVIEW...
    Well later on I was having an issue with a larger program crashing. After spending some time on the phone with a NI Engineer troubleshooting he told me that the constant opening and closing VISA sessions was not a good idea and could be the cause of my issues. So I rewrote the program opening a VISA session once for each instrument and closing it at the end. This cured the crashing and forced me to abandon my library of drop-in VI's that had served me so well for so long, totally changing the way I was writing my programs.
    Now fast forward to a couple years ago when my company made the jump from Labview 5.1 to 8.0 (that was a big step) now we are at LabVIEW 2009
    Among the many other changes from 5.1 to 8.0 most notably VISA had changed, I/O wire types, VISA Open was gone, VISA Close was deprecated, all my old programs have the (old) tag on the VISA blocks... AND there was a Automatically close VISA sessions in the advanced options
    The fact that VISA Close was deprecated kind of leads me to believe that we are being guided to used the auto-close option. It certainly makes programming faster not having to drag the VISA wires out and close them... But often I still do just out of habit.  
    This also has me wondering if we even still have to open a VISA session and wire it all the way through?
    So take a look at the attached overly simplified examples and explain what is the "best method"?
    Attachments:
    VISA.png ‏64 KB

    When the option is checked, VISA sessions are only closed automatically when your VI stops running.  My understanding, based on this, is that your two auto-close VISA examples are identical.  The session is opened the first time a resource is used and remains open until it is explicitly closed or until your VI stops running (if the automatically close VISA sessions option is checked).  If you don't automatically close VISA sessions and you do not close them explicitly, they will stay open even when your VI is not executing, which means they will open faster when you restart your code but will not be available to other applications.  Of course, exiting LabVIEW closes all VISA sessions.

  • Closing Identical VISA Sessions

    I have several sub VI's using VISA in my latest build.  By default they all use the same VISA session, but the user has the option to switch one or more sub VI's to a different device (different VISA session).
    In my "Panel Close" event, I currently have it wired such that each sub VI's VISA session is closed separately.  It occurred to me that this may cause problems in the (normal) case that one or more sub VI's is using the same session; however, my main VI is somewhat of a mess, and it will be a couple days before I can actually test this.
    Will it cause errors, program crashing, etc. for me to give a Close command on a VISA session that isn't open any more?

    PeterHeckert wrote:
    Much easier to do than closing at exit.
    But you really should be closing them when you are done with them.  If you try to close something that isn't open, it is not an issue.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Open VISA sessions (including duplicates​)

    I would like to obtain a list of open visa sessions. I found this knowledge base article which should work, however when opening duplicate sessions (e.g. "COM6 (1)") the list contains empty entries or multiple COM1 references.
    Please try the attached vi to see the effect; on my system the visa resource name control shows COM1 & COM2 (default system ports), COM6 & COM12 (2 USB-serial converters) and LPT1 (system parallel port) at start up.
    This is shown after opening "COM6" (3x) > opening "COM12" (4x) > opening "COM1" (1x) > closing "COM12" and "COM12 (1)"
    Maybe there is a way to read the contents of the drop down menu of the VISA resource control which contains all the information and is also updated automatically.
    Any help is greatly appreciated, regards W@Work
    Note: I'm using LabVIEW 2009 (32-bit) on Windows XP
    Attachments:
    open visa sessions.vi ‏28 KB

    Thank you very much for your response,
    First I'll explain the duplication: the "VISA open" VI allows for opening a duplicate session (which refers to the same port). I want to use this so I can have a separate session for writing and reading which can be locked and unlocked separately. The example I attached to my original post opens duplicate sessions when you (try to) open the same port ("COM1" for example) multiple times. 
    Could you please try the example again selecting "COM1" as "VISA resource name", then click "Open" two times. Now you should see "COM1" and "COM1 (1)" in both lists. On my system clicking "Close" (while "COM1" is still selected) removes "COM1 (1)" from the "open sessions found" list while it should remove "COM1".
    MAX lists ports 1, 2, 6 & 12 that I mentioned in my original post. When running the example this list does not change (no "COM1 (1)" for example) so I think this is just a list of physical ports, not the open VISA sessions. 
    I think you forgot to attach the image but I guess this is the printscreen you're asking for:

  • Why Open VISA Session?

    In the driver here, the VISA Open sub-VI states that it "must be called first" when using the device. There is a similar sub-VI for closing the session.
    How true is this?
    I can open and run a different sub-VI (such as Write Single) with no immediately obvious problems, just by specifying the correct device in the VISA Session field. Are errors or performance hits building up in the background?
    My problem is that the KS 3988 will be called on in sub VI's within sub VI's within sub VI's (relative to the main program). I'm not clear on where, exactly, I should be putting that VISA Open panel. This is especially confusing if the "dup VISA session" needs to be wired into every use of the Write Single sub-VI.

    Here is a picture of the VI which actually calls the KS 3988.
    My problem is that this thing is just the sub VI of a VI which is itself the sub VI of a VI that is running in a frame. The top-level VI that contains the frames has four such frames.
    Now, those top three VI's all read out of the black Admin sub VI, and the bottom can both read from it and write to it. Currently, all programs use the same KS 3988 via VISA, but that needs to be something we can change on the fly.
    So, where does the Open sub VI go? Do I need to include, in the frame-containing VI, something like this?
    Message Edited by DJDDA on 07-31-2008 04:10 PM
    Attachments:
    convertfix.jpg ‏17 KB
    convertvi1.jpg ‏26 KB
    convertvicontext.jpg ‏66 KB

  • Error in using TCPIP/Inst​r class to open a VISA session

    I use the TCPIP/Instr class session to open a VISA session to Agilent 86140B Optical spectrum Analyser and I get an Error - VISA open in Appln.vi.Help me to fix this problem.
    I am able to access the instrument on LAN through a Telnet session.
    Vijayalakshmi.
    Attachments:
    OSA_Close.vi ‏28 KB
    OSA_Reset.vi ‏27 KB
    OSA_Initialize.vi ‏63 KB

    Thanx for the reply.The instrument is VXI-11 compliant.The error I am getting is Instrument timeout -1073807339 (BFFF0015) and I am using LabVIEW on Linux.
    I have another problem.I am able to see the instrument using a Telnet session but not using http//192.168.10.2 on a web browser.It is giving an error that the host may be down and try some time later.

  • Visa session problem

    Hello,
    I am quite new to LabView. I have to control a Nikon microscope TE2000E with a RS-232. Before writing the program I have opened a VISA session with MAX (basic I/O) to check that I can communicate with the microscope. But when I type a command (e.g. [r][S][P][R][CR], [r]=status request, SPR = function, CR=delimiter) the microscope send an error. I think that this is because I don't write the question in the correct format. Does anybody know the correct format for sending commands?
    Thanks in advance
    Raimon

    Raimon wrote:
    Hello,
    I am quite new to LabView. I have to control a Nikon microscope TE2000E with a RS-232. Before writing the program I have opened a VISA session with MAX (basic I/O) to check that I can communicate with the microscope. But when I type a command (e.g. [r][S][P][R][CR], [r]=status request, SPR = function, CR=delimiter) the microscope send an error. I think that this is because I don't write the question in the correct format. Does anybody know the correct format for sending commands?
    Thanks in advance
    Raimon
    Hi Raimon
    I am in a similar situation, new to labview and I have to set up a system to control the TE2000E via Labview. I was wondering if you had any luck getting things going, and if you could pass along any words of wisdom or sample vi's.
    Thanks very much,
    Jason

  • Your Remote Desktop Services Session Has Ended - Occurs when running in background

    Our remote desktop users are having an issues with the RD session ending whenever we are running it in the background. Namely the session will run as long as the computer is idle or I am actively working in RD. Within 4 minutes of leaving RD and working
    in another application, I receive the message: Your Remote Desktop Services Session Has Ended

    You are posting in the wrong forum.  Post in the RDS forum  for help with the RDS product.
    ¯\_(ツ)_/¯
    Direct link:
    https://social.technet.microsoft.com/Forums/en-us/home?forum=winserverTS%2CwinRDc&filter=alltypes&sort=lastpostdesc
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How work the Visa session?

    I'm working with the Visa session. When I receive from an external processor the hex value 0X0A then suddenly aboard the reading instruction. When I want to receive the value 0XAA0A55 then I receive only 0XAA0A. Why?

    Hi
    defuflo is right. The read ends due to the termination character. If you do binary serial transfer you have to do the following:
    You have to set the "Termination Character Enable" property to false. In LV 6.0.2 use a property node which input comes from the "duplicate VISA resource name" output of the "VISA configure serial port", in LV 6.1 it is a parameter to that function.
    Second use a property node to set the "Serial Settingserial End Mode For Reads" to "None".
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Closing ITS Sessions

    Hi,
    We migrated our ISR services to Integrated ITS. ISR has a main service QISR from which we can call the required services. The new service is opened in a new window. All the services called from QISR are custom services. These custom services have their own HTML templates and Java Script (JS).
    Earlier on Standalone ITS if we choose "Quit" from the main QISR, along with the main QISR session all the sessions of the subsequent services gets closed.
    This is not happening in Integrated ITS. If I quit the main QISR service, only the main QISR session gets closed. All the sessions of subsequent services still hang around. (I can see them in SM04)
    These custom services doesnt have the "Quit" option within them. How to close these sessions on closing their browser window? Can we use the onunload event..?
    I saw the thread [Close ITS-Session|Close ITS-Session] but couldnt be able to close it using JS or by different means.
    Can somebody post the JS code? or any other ideas on closing the sessions?
    Thanks,
    Ravikanth
    Edited by: Ravikanth Tunuguntla on Jan 25, 2009 3:30 PM

    Any ideas please?
    Regards,
    Ravikanth

  • Driver visa session looping issue

    Hi,
    This is the first time I've ever setup a loop with a visa driver session in it. I am attempting to collect an array of flux data. The array indexes correspond to physical (x,y)  locations on the item i'm measureing the flux of. This is why i need the data to be read in as a 5x7 array of flux. The 5x 7 matrix is collected 3 times (at 3 different z heights). However, I can't figure out why I am getting three 6x7 matrices instead of a 5x7. I can't tell if it is my shift register setup, where my visa session is implemented, etc. I just can't figure it out.
    Could someone look at my attached code ( it's pretty simple, just 3 nested for loops with the visa session inside, and that data is fed out to 3 matrices, which is then stripped down further which can be ignored) 
    Thank you very much,
    chelsea
    Solved!
    Go to Solution.
    Attachments:
    visa loop test1.vi ‏31 KB

    First of all, I don't see a point in any of those sequence structures.  All they are doing is creating clutter.
    Secondly, why are you appending the second to last results to the whole results?  That is where your extra index is coming from.  Get rid of that shift register and the Build Array.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Why is it that directory server and IAS will not install through a remote Terminal Services session??

     

    Hi,
    I think this can be done in Unix, using telnet, you may log into the
    system and install it.
    Regards
    Raj
    Mozkill Williams wrote:
    why is it that directory server and IAS will not install through a
    remote Terminal Services session??
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Remote handle in session

              Hi
              We are using weblogic 7.0 sp2. We have clustured environment. 3 instances in one
              cluster.
              We have application deployed on one clluster and ejbs' deployed on another cluster.
              Our weblogic xml has session replication tag set for inmemory replication.
              Now in war we are looking up session bean and storing its remote handle in session,
              it gives class cast exception. I have reead we should not store remote object
              of entity in session but is it also true for stateless session bean.
              Do u think if i remove session beans remote from session this should be solved,
              if this is the reasion i m getting classcast can someone tell me why ?
              Thanks a lot
              Pranav
              

    Hi,
    If it's necessary to keep the state of the bean for the next time, keep the ejb's handle. Otherwise, I think it's better to keep the home handle.(to avoid the bean time out issues.) If state is not needed then u can can make it a stateless, right?
    Also please ensure that not more than on client is using the same insatnce of stateful session bean
    concurrently. Synchronize the code appropriately
    [email protected]

  • Opening multiple visa sessions

    I'm having problems with opening multiple VISA sessions for communicating with 4 HP-34401A multimeters in LabVIEW 6.1. If you have a little bit of time, please take a look at what I have here to see if I'm doing something wrong.
    Thanks
    Attachments:
    HP34401_Test.vi ‏108 KB

    I have made a look at your VI. I don't have the driver for the instrument I couldn't go into the subVIs and its documentation and I could not change it for you.
    1. You initialise only 2 of the 4 meters. Initialize all meters.
    2. In sequence 0 you close the session to the meter. In the next loop iteration it will not measure as you intended. Delete the "VISA Close" function.
    3. The stop button would cause the while loop to exit. But your handling is a little bit complicated. Do following:
    Delete the "not" and case where the stop terminal is connected. Wire the stop terminal directly to the termination terminal of the while loop. With the context menu set it to "stop if True". Wire the VISA sessions to the right border of the while loop and connect t
    hem to the "VISA Close" function.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Open VISA Session

    Hi to all,
    I'm newbie with Labview 8.5, I'm viewing some example to connect serial port with VISA blocks. I see that these examples use a VISA Resource Name control to define the resource (example selecting COM1) but after they don't use Visa Open block to open a VISA session with the device, but they use directly the sequence "VISA write - VISA read - VISA Close" blocks. Why don't they use VISA open session to open a session with device?
    I read in help that VISA Resource Name contains some informations on resource and it maintains VISA session also, instead VISA session is a unique identifier, I think that when I create new Visa Resource name Control, Labview automatically open a session with this resource, so it isn't necessary to use VISA Open block to create the session, isn't it?
    best regards

    It's not correct to say that just dropping a resource control itself on the front panel or diagram opens a session. The resource is automatically opened when calling VISA function (i.e. a write or a read), if the resource was not explicitly opened with the VISA Open function. You can see this yourself. Put just a resource control on the block diagram, select the resource and run the VI. Click the arrow on the control and look at the resources. Now, wire a VISA Write to the control, run the VI, and look at the resources. You will now see a little icon next to the resource you selected. This indicates that the resource is open. The automatic opening of a resource was a change made to VISA several years ago and you will still see the VISA Open in instrument drivers. It's not a bad idea to always use the VISA Open function. For serial, you would put it before the VISA Configure Serial Port.
    Attachments:
    Open Resource.PNG ‏4 KB

Maybe you are looking for

  • Function  module to get pernt by passinf objid and otype

    Hi, Help me to find any function module to get pernr by using objid and otype.or table name from which we can get pernr by passing objid and otype. thanks, satish.

  • FI: Postings" is not allowed (ORD 50036237)

    To process business transaction 'FI: Postings', you first have to change the status of object 'ORD 50036237' to allow the transaction 'FI: Postings'. This gives you an overview of the system and user statuses that affect the transaction. A transactio

  • Change of Domain Name causes loss of podcasts - help please

    Hi all For the past 16 months i've posted monthly podcasts on iTunes. Last month I changed the domain name of the website they were pinged from and (I assume because of this) my podcasts are no longer on iTunes. What's the best way to get my podcasts

  • How to configure OSTS to propagate user identity from OAM to OSB Service?

    I have a 11.1.1.7 OAM environment and I need to protect applications and web services deployed in different domains with OAM. I have already configured the applications security but I am having problems with the web services. The issue is that I do n

  • Have to create logical measure column - Help need

    Hi Gurus, I have a situation like this below. A service request may have activity subtype as breakfix, startup etc. A service request may have only one breakfix or breakfix with additional subtypes like startup etc. Ex: Service Request # Activity sub