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

Similar Messages

  • 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

  • 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

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

  • Open VISA Session Monitor.vi

    This is a vi that is located in \vi.lib\Utility\visa.llb. Did anybody ever had it worked? I started 2 VISA sessions on test equipment (a power meter connected to USB and a signal generator connected to a gpib-usb) and the number of open sessions indicated 0 when there was clearly 2 open sessions.
    Ben64

    Vincent90 wrote:
    Hi Ben,
    Can you specify your error ? Did you try to send commands to your instruments when you think that your session is open ?
    BR,
    Vincent
    There is no error generated, the open VISA sessions just doesn't show up and the Open Sessions.vi return an empty array of references. The issue seems to be with this vi but we can't look at the diagram since it is password protected.
    I was running continuous acquisitions and the VISA resource name controls was showing 2 open sessions (the small computers icon beside the resource name).
    Ben64

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

  • How can multiple vis share input from a DAQ simutaneously

    How can multiple vis share data input from a DAQ simutaneously?
    Recently I am building a EMG measurement platform and somehow DAQ data need to be shared by several vis at the same  time.
    Are there any ideas?

    If you may need to add/delete tasks that will need th edata you may want to consider a publich/subscribe pattern. Basically your DAQ task will post a message to a single queue. The process listening on this queue (message broker) will determine if there are other processes registered to receive this message. When a device registers for a message it provides a queue to receive it on. The message broker will then post the message to all interested processes. The nice thing about this pattern is that you have dedicated code to handle broadcasting the message and it is very easy at run time to change the number of processes that get the message. The DAQ task will always send the message and will not care how many processes are listening.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

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

  • Best practice for multiple VIs talking to same PXI

    I am looking for a reccomended practice for my use case, which I feel has to be what a lot of people do/need.
    I have a NI-SCOPE PXI device, but this applies to most instruments on some level.  I have multiple VIs that do simple things, such as one VI that changes the horizontal settings, one VI that changes trigger settings, one VI that reads the current trace from the scope.  How can I have multiple VIs talk to the same instrument, some of them might even be called at the same time.
    Some more specifics about my use case is that I am calling these VIs from a web service, and the trace VI is called very frequently and streamed to the user (via the web service).  
    I was thinking of implementing a VI that would give me the VISA connection for the instrument and a semephore.  I would then have the VI doing the work aquire the semephore, make the instrument calls and then release the semephore.  Are there better or different ways?  Maybe something I am over looking with the semephore implementation?

    Typically for this sort of thing I would have a device handler VI which contains your VIs for talking to the instrument. This VI acts like a 'server' and does your device communications and then you can send commands to the device handler VI (e.g. via a queue/event) and it will return the result.
    I would implement this as a state machine (normally using queues) - states for initialising the device, a state for each action you want to perform and a close/shutdown state when your application finishes.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Multiple View sessions, same PC?

    View 6.0.1, Client 3.3.0
    Can I have multiple View sessions from the same PC? In other words
    Launch the Horizon View client, login, and access a desktop
    Launch the Horizon View client again, login as a different user, and access a different desktop
    Repeat until I have many session open at once
    The reason I ask is we are migrating from Exchange to Gmail. Google provides a utility called GAMME that in a larger environment can be run from multiple machines with each machine migrating one portion of the alphabet. Rather than using 10 physical machines I would rather use 10 View desktops. This will work slick if from my real PC I can access all 10 view desktops. I will be using a different login account to access each desktop.

    Have not tried yet. I did not want to go through the time setting up a separate non-persistent desktop pool if I could not login to more than one desktop at the same time. Now that I know it will work, I will run with it. Thanks for the help

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

  • What is the best approach to converting LV7.1 tags to LV2012 shared variables in multiple VIs?

    What is the best approach to upgrading from LV7.1/DSC tags to LV2012/DSC shared variables, in multiple VIs running on multiple platforms? Our system is composed of  about 5 PCs running Windows 2000/LV7.1 Runtime, plus a PLC, and a main controller running XP/SP3/LV2012. About 3 of the PCs publish sensor information via tags across the LAN to the main controller. Only the main controller is currently being upgraded. Rudimentary questions:
    1. Will the other PCs running the 7.1 RTE (with tags) be able to communicate with the main controller running 2012 (shared variables)?
    2. Is it necessary to convert from tags to shared variables, or will the deprecated legacy tag VIs from LV7.1 work in LV2012?
    3. Will all the main controller VIs need to be incorporated into a project in order to use shared variables?
    4. Is the only way to do this is to find all tag items and replace them with shared variable items?
    Thanks in advance with any information and advice!
    lb
    Solved!
    Go to Solution.

    Hi lb,
    We're glad to hear you're upgrading, but because there was a fundamental change in architecture since version 7.1, there will likely be some portions that require a rewrite. 
    The RTE needs to match the version of DSC your using.  Also, the tag architecture used in 7.1 is not compatible with the shared variable approach used in 2012.  Please see the KnowledgeBase article Do I Need to Upgrade My DSC Runtime Version After Upgrading the LabVIEW DSC Module?
    You will also need to convert from tags to shared variables.  The change from tags to shared variables took place in the transition to LabVIEW 8.  The KnowledgeBase Migrating from LabVIEW DSC 7.1 to 8.0 gives the process for changing from tags to shared variables. 
    Hope this gets you headed in the right direction.  Let us know if you have more questions.
    Thanks,
    Dave C.
    Applications Engineer
    National Instruments

  • 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

  • Similar to multiple x sessions

    I know that on linux you can initiate multiple x sessions so that when you connect to the computer using VNC and use the mouse and keyboard without interfering with what the user on the computer does.
    Is there some way to start a new session on the mac and do that same thing?

    TL;DR version - not really.
    Long winded version...
    Much of the apple magic in making X11 work within the Cocoa on top of Aqua on top of Quartz/OpenGL/QuickTime stack makes this really hard to do.
    Have you looked over Xnest - it's really powerful and can act as a server and a client. If remote boxes are ssh into the mac and using the multiple displays set up under Xnest your local display would be cluttered but one mac could support many remote machines with X11 services.
    See these links for some good reading on the subject:
    [Fun with Xnest HowTo|http://box.matto.nl/xnest.html]
    [X11 for Mac OS X|http://www.scl.utah.edu/computers/mac/help/x11>
    The only time I've seen this actually deployed, xnest was ditched after a few days of pain. Instead, a beefy Mac Pro with RAM/CPU to spare was set up with VMWare fusion and a virtual machine per user with linux/freeBSD installed. Then X11 could roam there free of "the dictator" known as Quartz Compositor.

Maybe you are looking for

  • Not all iPhoto albums showing up in iTunes iPod options

    Not sure when exactly this happened but I guess with the installation of iTunes 6.04. Some of the albums I've created in in iPhoto do not show up in the iTunes iPod options. I first noticed when trying to view photos on my iPod that images that had b

  • 10.7 Server - Remove RAID 0 ?

    Hi, I recently upgraded my Mac Mini SL server to Lion server ... after having some troubles I reinstalled it. I configured the drives (2x500GB) to be in a raid array (mirror). Is it possible to remove the raid easily? i was thinking of: - Superduper

  • HOw to improve insert/update/select  for nested table.

    Hi All, I think this is my second thread for nested table. i just want to know what are the different ways available to improve the insert/update/select operation on Nested table. Thanks in advance.

  • Messaging Server 3.6 fails to start even though the Administration Server says "Success"

    Messaging Server 3.6 fails to start even though the Administration Server says "Success". There are no entries in the log to help explain what has happened. <P> Any failure to start Messaging Server via Administration should be analyzed by starting t

  • Using and Filling Metadata

    I'm really into using the Metadata fields to the max, but don't have a great understanding of some of the IPTC fields, as well as a lot of the other fields. I can easily understand things such as Image Location, etc, etc, but am looking for better un