VISA session to an instrument handle

I tried to aquire data from TEKTDS 220. I use "set condition" to "aqu
status",
then "read waveform" subVIs. So there is a problem: I need to connect the
"VISA
session" to "instrument handle", but it doesn't work. Could you please tell
me
how to connect these two type of wires?
Thanks a lot!

It looks like you're trying to mix the tktds2x0 IVI driver with the tktds2xx LabVIEW native driver. The IVI driver has an "instrument handle" which is an IVI session, and the LabVIEW driver has a "VISA session". The two wires are not compatible. You should either use just the IVI driver or just the LabVIEW driver.

Similar Messages

  • 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

  • VISA Session BeginWrite Waits

    Based on the VB.NET SimpleAsynchronousReadWrite example, I'm able to perform BeginRead for my VISA session (TCP/LAN instrument, VXI-11). As expected, BeginRead returns immediately and then my callback gets called when the instrument responds or when a timeout error occurs. I'm even able to use the session Terminate method to abort the operation using the IAsyncResult returned by BeginRead.
    But calling BeginWrite doesn't return immediately. It waits for the operation to finish or time out. My callback does get called and the operation does execute and complete properly but the overall behavior isn't async. What is going on?
    I'm using Measurement Studio 2013 for Visual Studio 2010, NET Framework 4.

    For VXI-11, a VISA session BeginWrite turns into a RPC device_write request to the instrument's core port. The instrument is supposed to respond with a device_write reply. You can see these packets using a protocol analyzer like Wireshark. What should happen is BeginWrite should wait asynchronously (return immediately) for the device_write reply, allowing the host to perform other processing (Windows GUI etc). During this time, I should also be able to use the VISA session Terminate function to cancel the pending write (host sends RPC device_abort request to instrument's abort port).
    For VISA async reads, BeginRead ends up sending a RPC packet device_read request then asynchronously waits for the instrument to send a device_read reply. Unlike BeginWrite, BeginRead does return immediately allowing the host PC to do other things. If the instrument fails to send the device_read reply, VISA correctly waits in the background and allows my application code to send VISA terminate (correctly sends packet to abort port) or terminates on its own due to a timeout.
    So it appears BeginWrite doesn't implement the correct async behavior for the initial RPC device_write request but instead synchronously waits for the device_write reply. I would like BeginWrite to have the same behavior as BeginRead.

  • Get ivi instrument handle from NISE Session

    In TestStand I begin my sequence with an niSE Open Session.vi and I then pass this NISE session reference around to other VI which use the niSE Connect and Disconnect VI's to connect/disconnect routes specified in MAX.  This works perfectly for me.  How do I convert this NISE session reference into an instrument handle for specific IVI devices in this NISE Session?  I want to be able to use the "ni Switch Get Relay Position.vi".  I tried using the "ni Get IVI device session.vi" but i get an error that says VI was stopped at IUseDCO.  What does this mean?  Is it possible to do what I'm asking?
    Thanks
    I'm using TestStand 3.5 and Labview 8.2
    Attachments:
    error.JPG ‏25 KB

    Hi Chad,
    The problem with the find route.vi is it just tells me if the path is available or not.  It doesn’t tell me what state the relay is in.  When using SPDT relays this is a problem.
    I’m using a 2570 card set for SPDT operation.  So if I do a find route after a reset on “Com->NO” and “Com->NC” both return path available.  I understand this because I have not made a connection call to either one.  If I make a call to connect “Com->NC” the relay changes states.   The connection then returns a path exists.  My problem comes when it comes time to disconnect.  Since it is a SPDT I have to first disconnect “Com->NC” then make a call to connect “Com->NO” (which is very annoying).  If someone just calls disconnect and I try to read the path availability both return path available again and the relay has changed state.  How do I know for sure which pole the common is connected to?
    If I open Switch Soft Front Panel it shows exactly what position the relay is in.  How do I get this info to labview?  This is why I was trying to get the instrument handle to the underlying IVI session so that I can look at individual relays instead of paths between endpoints.
    I hope this makes sense.  I know I can’t be the first one to have this problem, so if anyone has another solution I would appreciate any help.
    Thanks    

  • What is the best way to open close and pass instrument handles from labview in teststand parallel model?

    I have a number of test systems that use a parallel model with labview. We have a good number of instruments(PXI).
    What is the prefered method for open,closing and passing instrument handles in teststand using labview? 
    Solved!
    Go to Solution.

    Hi,
    No, Below is a bit from the Session Manager Help
    Currently, Session Manager supports the following instrument session types:
    IVI Sessions—Use an IVI session to obtain the C-based instance handle for an IVI logical or virtual instrument name. NI Session Manager does not support IVI-COM drivers at this time. When IVI-COM drivers are available, you can use an IVI session to obtain an ActiveX interface reference to an IVI-COM driver.
    VXIplug&play Sessions—Use a VXIplug&play session to obtain a C-based instance handle for a VXIplug&play logical or virtual instrument name. Configure VXIplug&play names in the <VXIplug&play directory>\<Platform directory>\NISessionMgr.ini file.
    VISA Sessions—Use a VISA instrument session to obtain a C-based viSession handle to a VISA resource or logical name. Configure VISA logical names in the <VXIplug&play directory>\<Platform directory>\NISessionMgr.ini file.
    Custom Sessions—Use a custom session to create a data container object that shares ActiveX objects you create or other data between software components you write. Use the Attach and Get methods to attach data to and retrieve data from a session. A custom session does not initialize, close, or own an instrument handle. The data you share with a custom session does not have to be instrumentation related. You can create a custom session with any name you request.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Testing an instrument handle

    Labview 8.0, TestStand 3.5,
    Is it possible to test an instrument handle in Labview to see if it is valid and not generate any kind of error if it isnt?
    I want to close an instrument handle if it exists. This will generate a run-time error if the handle does not exist.

    Hello tadk,
    You can run VISA Find Resources and look at the resulting list of interfaces.  You can use this list to verify of an interface is valid.  If I specific error is being generated, you can create a sub-vi to clear that error, and thus ignore that particular error.
    I am not sure what your end goal is, but there is another discussion forum that discusses getting a Session ID by using a Call Library Function Node.  You might want to check this forum out.
    I hope this helps!
    Regards,
    Angela
    Applications Engineer

  • 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

  • IVI instrument handle data type and palette?

    Hi Folks,
      I'm programming a LabVIEW VI that uses the NI-Scope VIs to talk to a USB-5133. Everything seems to work well, but after calling NI-SCOPE Initialize, I have an 'insturment handle' that needs to be routed to all other NI-SCOPE calls. I'd like to bundle the 'instrument handle' into a cluster to reduce the number of shift registers in the VI, rather than route the handle through its own shift register and as a separate wire everywhere. Can you tell me the data type of 'instrument handle', and where in the palettes to find one, so I can drop it into a cluster?
    Thanks! 

    Hey rogersct,
    The data type for this instrument handle would be an "IVI session of class niScope".  The easiest way to place a constant of this type on your block diagram would be to right-click on the instrument handle output terminal of niScope Initialize.vi and select Create >> Constant.  This should give you a constant of the appropriate data type that you can use to initialize your cluster.
    You can also create a IVI session control from the front panel under I/O >> IVI Logical Name.  You would then need to right-click on the control and select: Select IVI Class >> IviScope >> niScope.  I always use the first method however as it is the quickest.  This should be what you need but if you have any questions please don't hesitate to ask.  Thanks for posting and have a great day!
    -John 
    John Passiak

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

  • Save in a variable an instrument handle out

    Hello,
    I wanna create a sequence in teststand using labview step. the problem is the VI of my labview step has a function with instrument handle in and instrument handle out. How can I store those instrument handle out in a variable to be able to use that variable as the input of an instrument handle in in another VI and if it's possible wich kind of variable should i use in both labView and teststand.
    Thanks in advance for your answer
    Christelle

    You can use the Session Manager. There's an example (in 3.1 anyway), in the SessionMgr\Lv\LVDMM.seq.

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

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

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

Maybe you are looking for

  • What is the difference between component(Y, Pb, Pr) and component(R,G,B)?

    [I previously posted this question in another thread as hadn't realised how to post new question] Q. What is the difference between component (Y, Pb, Pr) and component (R,G,B) ? I'd previously thought I was reasonably savvy on all things HD, but when

  • Itunes download error message

    I recently tried to download Itunes for my computer its a windows 8 64-bit. I downloaded Itunes twice and it won't open at all, anytime I try to open it, there is a message that says "Apple Application Support was not found. Apple Application Support

  • Typing problem occurring as soon as I delete something in a composing email

    This problem has been bugging me for sometime now and I'm sick to death of it. I'm running Mac Mail 8.1 and the problem only seems to appear when I compose an email in Mac Mail and no other application. I'm using a USB keyboard. When I write an email

  • Attributes select-options in form view.

    How to make UI form view context attributes multiple selection ? Ex: Employee Id attributes. I need provide this employee id like select-options in form view. Thanks, kaaviya

  • Harddrive problem?

    my iMac (24 inch, the first of the metal cased imacs, 10.5.newest update) crashed yesterday (beachball, everything frozen) and i had to hold the power button to restart it. When it came back with was just stuck at the gray screen with the little spin