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

Similar Messages

  • GPIB Vi's vs. opening a VISA session

    Hi,
    I'm currently trying to develop a simple set of drivers for a GPIB device that we have (Stanford Research Systems SR430). I have used the Developer Zone and the guidelines and templates given there. Those templates all open a VISA session to establish communications with the instrument. I have noticed, however, that some of the GPIB vi's can perform the same functions (reading and writing) using just the address of the device rather than creating a VISA session. Is there any difference to these two methods and if so, which is recommended and why?
    Thank you very much,
    April

    VISA is much preferred. For one thing, VISA works for not only GPIB instruments but also for serial, vxi, and TCP/IP instruments. It is fairly easy to write a single driver that accomodates more than one interface. I've had to do this several times as we have instruments that were sometimes purchased with one or another interface. Another advantage to VISA is that it supports resource sharing and locking. Multiple applications can open the same resource and locking permits the applications to share the resource in a "graceful" manner.

  • 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.

  • Multiple VISA sessions & diagram clutter

    I am writing automated test sequences that use multiple VISA sessions
    (multiple test instruments) and many sub VIs. Is there any way to
    reduce the diagram clutter from the error cluster & visa session wiring
    (i.e. hide them, or use some kind of global reference)?
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    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

  • How to open multiple Forms sessions

    How do I open multiple sessions of Oracle Forms on the same Client machine. Right now if I have a Forms session open, when I open a new browser session and type in the URL it takes me back to the Oracle Forms session which I have open. I am running Forms 6i on 9iAS on a Solaris machine. Thanks in advance for any suggestions.

    Rajesh,
    Your question will be answered rightly in the Oracle - Forms discussion formums.
    Thanks,
    Bala.

  • How to open multiple vis at a time

    I'm having one main vi. In that my own menu is running.By clicking the menu i want to open and run different vis at a time.But i can to able run only one at a time.Anybody help me please.Its like opening many child windows from MDIwindow in VB

    Too many VIs missing to make a good example of the ones you sent, however I have made an example for you; download the attached llb file and open the main.vi in it...run it and you will see two VIs pop up, they are the "children" which produce data. Move the sliders in the child windows and you will see the values reflected on the front panel of main...
    Use the type of global shown in the example, it's called a functional global...Rebuild it to hold whatever data you want to share among the VIs. Using functional globals are much better than using ordinary globals (as described in the text I referred you to in the first answer).
    A few comments about the example; here the fundtional global just holds the last value, it does not buffer the valu
    es. If you wanted to ensure that what was displayed on the panel of main.vi you would e.g. make the global a a circular buffer.
    Controlling where on the screen the children pops up would be preferable; in that case you would read the position of main prior to opening the children...and set the position of the children so that they fit nicely at one of the sides of the main window...
    Here the children monitor the front panel of main.vi and close if that panel is no longer open...a more general approach would be e.g. to use notification and perhaps also rendevouz to synchronize the exit...
    Mads
    MTO
    Attachments:
    MultipleVIsMonitoredbyMain.llb ‏104 KB

  • 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

  • Open visa sessions for controllin​g external dlls

    I need to open a VISA session to pass a session reference into a call library fucntion that calls the vendors instrument functions.  I currently see no way to do this using the call library or visa open function.  Does anybody know how to proceed when you have a non NI instrument that has a dll wiht it that you need to control over USB serially? 

    Mike,
    First thanks for your help but I have been in both those docs before.  My issue is that I have an instrument vendor that has a dll with functions like this:
    ViStatus _VI_FUNC Instr_autoConnectToFirst(ViPSession vi)
      return(Instr_autoConnectToAll(vi,1,NULL));
    that is written using some of the variables in the VISA library...
    When I go to look up what datatypes these variables are in the VISA specifications so I can hopefully create inpuits on a call library function in Labview,  I get descriptions like this:
    Type ViStatus
    This is the operational return status. It returns either a completion code or an error code as follows.
    Completion Codes
    Description
    VI_SUCCESS
    Attribute value set successfully.
    VI_WARN_NSUP_ATTR_STATE
    Although the specified attribute state is valid, it is not supported by this implementation.
    Error Codes
    Description
    VI_ERROR_INV_SESSION
    VI_ERROR_INV_OBJECT
    The given session or object reference is invalid (both are the same value).
    VI_ERROR_NSUP_ATTR
    The specified attribute is not defined by the referenced session, event, or find list.
    VI_ERROR_NSUP_ATTR_STATE
    The specified state of the attribute is not valid, or is not supported as defined by the session, event, or find list.
    VI_ERROR_ATTR_READONLY
    The specified attribute is read-only.
    VI_ERROR_RSRC_LOCKED
    Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.
     I do not see how I get the IO defined for passing and returning data to these external library calls.
    Any ideas???

  • Multiple user sessions for ADF application

    Hi All,
    We have a ADF application with 3-4 pages starting with a login screen.
    Assume we have two users, user1 and user2. In same system but different browser windows, when both users are logging in, only user2 's session is active. Though user1 logged in first and is able to perform transactions, the moment user2 logs in, user1's session is being over-written by user2 (user1's window now displays user2's information). I have observed the URL of user1 window which now changes to user2's URL (_adf.ctrl-state parameter of user2 is displayed in user1 browser)
    How do we overcome this?? We have a requirement to be able to open multiple user sessions.
    We are using JDeveloper 11.1.2.3.0 and browsers being used are IE 8, IE9 and chrome.
    Thanks,
    Deepti

    Hi,
    Continuation to my above question
    I am using these two statements in my code..
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    HttpSession httpSession = (HttpSession)ectx.getSession(true);
    On any event in Window1, I gues it is getting the context and session of window2(this being the latest)..
    Shouldnt it return the context and session of the current window instead of the latest window???
    This problem is well explained here
    internet explorer 8 - How to avoid session sharing provided by IE8 programmatically in Java EE application? - Stack Over…
    I want to know.. what is the best way to handle this in ADF... We are using managed beans with request scope and using HttpSession to store few values like user Id.

  • How to open multiple forms through differnt responsiblity

    I have a 11.5.10.2 system on Linux red hat.
    Business pepole want to open multiple forms through different responsiblities from multiple web brower sessions.
    However when I opened 2 IE brower sessions, log into responsiblity and open one oracle form in one IE session and log into another responsiblity through second IE session. The first opened form disappear and replaced by the second oracle form opened from another IE session. That means only one Oracle form can be open at the same time for this case.
    The current walkaround solution is to open 2 browser sessions using 2 different browsers ( one is IE another is Firefox) to fix this issue. Apparently this is not a good solution.
    Can you please give me some suggestion to fix this issue?

    Thank you very much for the information.
    The note mention:
    The new forms launcher does not support opening multiple forms applets for the same database across different responsibilities. Opening a form in another responsibility will cause any forms currently open to close. This behaviour is standard.
    However it is possible to enable users to open multiple forms sessions for the same database for the same responsibility when using MS Internet Explorer as the client browser. This is made possible with Patch 3293241. This patch is included in Oracle Applications release 11.5.10 as standard.
    My current system is 11.5.10.2. I verified that patch 3293241 has been applied. I have no problem to open mutiple forms with in SINGLE web brower session, within same responsibility. I am aware that you can not open multiple forms through SINGLE web brower session through multiple responsiblity. What I tried to do is to open mutiple forms through multiple web browers sessions. Open one brower session, log into system and open a form, then open another web brower session, log into the sytem and open a form through different responsiblity. The system does not allow me to open multiple forms through multiple web brower sessions. Only the latest form can be displayed. Is this standard design for 11.5.10?
    Can Form Servlet architecture solve this limitation?
    Actually afterI changed some form funcation paramter in Oracle Application Developer responsiblity, I can open 2 form session from 2 different responsiblities through 2 web brower sessions. I can open one form session as Application Developer and another form session through another responsiblity. Then I can switch to other responsiblity through Application Developer responsiblity to open forms.
    Is there any other way I can open multiple form sessions to the same database through multiple web brower sessions?
    Thanks a lot for your help
    Edited by: wcxtao on Nov 3, 2008 9:47 AM
    Edited by: wcxtao on Nov 3, 2008 9:57 AM
    Edited by: wcxtao on Nov 3, 2008 10:08 AM

  • 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

  • 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.

  • How are VISA sessions managed by executables?

    I have noticed that VISA sessions opened in the development environment (Labview version 6.0.2) do not show up in the VISA I/O reference control of compiled executables and visa versa. I assume that each EXE has its own memory space for open VISA sessions. Is it possible to get separate EXE's and the development environment to use the same VISA memory space so that all applications and uncompiled VI's show the same open VISA sessions?

    This answer, while correct, doesn't address the issue of some VISA classes and how Labview addresses open VISA sessions. It is quite correct concerning the listing of available resources, that is not the nature of my problem. The heart of the matter is the Open VISA sessions and how they are returned by the "Open VISA sessions.vi" vi in the vi.lib utilities. Also, the VISA reference control does, as you say, display currently available resources (for some classes), but it also displays currently open sessions below a dividing line for those resources not usually displayed.
    The best example of this is for the TCP/IP class. Resources of this class are not displayed unless a session for them has been opened.
    I have written and compiled an executable tha
    t opens a VISA session for a TCP/IP resource. After opening it, the session is displayed in the executable's VISA resource control below a dividing line that separates it from the available serial and GPIB resources. If, however, I have an uncompiled VI with a VISA control open in the development environment at the same time, the open session is not displayed in that VI's resource control. If I run the compiled executable as an uncompiled VI in the development environment along with other VI's containing VISA resource controls, the open TCP/IP session is displayed in all VI's. The same holds true for the "Open VI sessions.vi". Sessions opened by compiled VI's are not returned by this subVI when it is run from outside the executable.
    As I stated before, it appears the executable creates its own separate memory space for listing open VISA sessions.
    I would like to create a small executable that logs in to TCP/IP resources and makes those sessions available to other VI's that ar
    e either uncompiled and running in the devel environment, or are running as separate executables.
    Thanks for your comments
    Steve

  • Q: what does this VISA session name means?

    I'm using GPIB reading data from two oscilliscopes. When I probe the VISA
    session, I found they are like "GPIB::2 27". I know GPIB::2 means GPIB
    address 2. what does this 27 means?
    thanks!

    This is just an initial guess. Can you look at your application and see if my conjecture could be true?
    I think if you open duplicate VISA sessions to a device (e.g., "GPIB::2"), we append a number to the duplicate sessions. So, perhaps you've opened (with VISA Open and the "duplicate session" input set to TRUE) "GPIB::2" 27 times. (Note that we're talking about LV 6i or later.)
    Normally, you never need more than one session to a single GPIB device, so "duplicate session" should almost always be FALSE.
    If that doesn't apply, then please explain more about what you are doing. Are you using VISA calls yourself, or are you using an instrument driver? Is the instrument driver written in LabVIEW, or does it wrap around a DLL?
    If you were u
    sing "duplicate session" set to TRUE, I'd like to know about why you think (or thought) you needed to set it.
    I hope this helps.

  • 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:

Maybe you are looking for

  • Sender File Content Conversion Complexity

    It is again time to dip into the well of knowledge that is SDN. I have a question about sender file content conversion.   It appears that I can only create simple XML structures with it, but I'm hoping someone here can help. Lets says I have a file w

  • Firefox sync disables itself

    I have a firefox sync account, however every time I go to the Tools --> Options --> Sync tab nothing is there but the "Set Up Firefox Sync" option. I have reset this multiple times on multiple PCs (and received the "Device Connected" message with the

  • Employee Discount without 2 year Contract

    I came to Verizon from ATT, where I had Costco Employee discount.I came to Verizon with my paid phones, signed up on Share plan and same employee discount to apply. After 2 months they removed employee discount because I'm not on 2 years contract. I

  • MC Office on Parallels

    I have installed Parallels 6 and Windows 7 on my MacBook Pro running Snow Leopard. I am having trouble loading MS Office 2007. I purchased a downloadable copy. But when I try to download it using IE in my Windows environment, it asks me to select a l

  • Joining an existing network as a client

    I've had an Airport Express for about 3 years...recently needed to reconfigure because of upgrade to my Belkin wireless router security. I need the steps to join an existing network as a client, including providing the WPA password. I've been through