double session VISA?

I have a VISA session (for example a session series on COM1)

How can I programmatically determine if the session is open?

(I see on the screen as an icon appears when a session is opened. What is the representation of this?)

-I want to be able to open a Session, if it is not already open, or use the existing session if it is (no duplicates).

... by the way this table in a comparison to the inside of a loop with a conditional stop and the output Boolean value gives me exactly what I want without opening a new session of VISA! Genius.

Thanks Dominic

Tags: NI Software

Similar Questions

  • open session visa

    What is the best practice?

    Start the program

    -open session visa

    -do stuff

    -Close session visa

    end program

    OR

    Start the program

    -REPEAT

    -do stuff

    -open session visa

    -do stuff

    -Close session visa

    -do stuff

    -REPEAT END

    end program

    And don't forget that you don't have to do either. With NI-VISA, opening is optional for quite a few years. A session will be automatically created when you use any VISA. You can also set it to this VISA is automatically closed. It is definable tools > Option > environment.

    That being said, it open and close are probably a compatibility issue. I don't know if the implementation of another company of the VISA works the same.

  • Cannot open session VISA Hameg HM8112-3

    Hello

    I have a Hameg multimeter connected to my computer via GPIB.  Windows can detect the port and says it's working properly.  However when I open OR MAX it detects the port but are unable to communicate with the instrument.  He says that he was not able to successfully open a VISA session to the device.  When I click on "VISA Open Test Panel", it gives the following error:

    Error opening resource:
    ASRL10::INSTR

    VISA: (Hex 0xBFFF0011) insufficient location information or the device or resource is not present in the system.

    I downloaded the drivers for the Hameg but I guess I'm missing something.  Anyone encountered this before with a GPIB connection?

    Thanks for your time.

    April


  • Visa timeout error-1073807339 reading

    Hi all

    I'm doing a command autoscale on a DSO-A4034A Agilent (Keysight) connected by ethernet.

    But for some reason, I get a time-out error. When cheking to find system errors.

    I have set up the session visa in 'MAX' and use the name of the session of the instrument of the call in the VI.

    I founded these screws on the Agilent instrument driver. and I can do all the other stuff I have to do without errors. EMPLOYMENT INSURANCE. the installation type measures Aqusition read data and so on without error.

    The error is caused by reading order just after the ": SYSTEM: ERR?" command under the request of error VI.

    I have updated the firmware of the scope and upgrated 15.0.1 VISA but so far without success.

    There is no problem when I turn the "climax of the performance"...

    Is there someone who can give me some advice about where to look this anomaly? Any help would be gratefully recived.

    / Best regards Rasmus

    Rasmus.Olesen wrote:

    There is no problem when I turn the "climax of the performance"...

    Crying just "timing issue."  Add a little wait between ordering autoscale and error checking.  It is likely that the oscilloscope does not resemble incoming orders when he assures the autoscale.  If you wait for it to do the job.

  • VISA read where you don't know the number of bytes?

    I work with a VISA resource via the USB port that reads in the results of printf (% lu % TSP %d)) of a microcontroller. These results are as ASCII numbers, their length in bytes is unknown. Numbers * should * be not more than 3 digits, but I can't know that for sure. Reading VISA won't let me the number of bytes unwired, so should I join just a high constant let him? Or is there a better way?

    1. do you have the microcontroller send a character to end of line (0xA on the ASCII table) at the end of the printf.

    2. turn the stop of the session VISA character and the value it is 0xA.  You may need to perform this task via the VISA property node.

    3. playback VISA to read more bytes than you tell never expect to get.  VISA playback will stop reading when it detects the termination character (End Of Line).

  • Visa "restart".

    Hello

    I wrote a RESP VI an EXE for PowerSupply PL303.-p control. It is connected to the host through the USB acts as a serial an interface, that's why I use VISA for read and write operations. I work with LabView 2010 professional development system, Windows 7.

    Normally the VI works as follows:

    -l' power is turned on, then the VI is launched

    -the VI detects the device and it controls

    -l' user turns off the device, the VI brings an error and stops. It must be closed.

    -to 'reconnect' the unit, the user must turn on the device, restart the VI and continue the work after the VI has located the device.

    The user ask me if it is possible to switch turned off-turned on the device while the VI is still running and reconnect the device without stop the VI.

    I tried to simulate this location through terminal VISA of up here again, I have to close the terminal (current VISA session) and open a new one.

    Is it possible to close a session VISA deactivation (e.g. breakdown) and restart a new?

    Someone trying to do such a thing, or it is not possible in principle?

    Best regartds and thanks in advance

    First of all, you should take a look at the Guide of Style of LabVIEW. To be frank, your code is a mess. Son is going everywhere, elbows, stuff above the other elements and the local variables used throughout. This is just to name a few items that can be cleaned. Secondly, why do you have two entries for the name of the resource? You use actually two different devices? This code is a state machine as I suggested. In addition, using serial communication? You had already mentioned USB. If you only use USB there is no reason to call the init series.

    Here's something more in line with what I was talking about.

    You can also watch the State JKI machine for a more robust state machine framewaork.

  • Get visa error 1073807194 after the power of the instrument cycle

    Hello and thanks in advance,

    I connect to an instrument via VISA with the port and IP address of the device. Normally, this works well, but if the loss of instrument (and camp) power during execution of the VI, LabView must be restarted for the VI to work again. (It's all labview, not only my VI). Error code: 1073807194 | VI_ERROR_CONN_LOST | The connection of the given session has been lost. None of these instabilities occur when only one connection is disrupted and restored. It is still a valuable resource for VISA. Can I solve this problem by disabling the port or plug and if so, how? I wish to insert a code to check if the connection is blocked and if so, erase it.

    I'm under LV 8.6 on Windows XP using measurement and automation to assign the resource VISA by manual selection of the socket. The VI is attached.

    This thread is useful, but the links are dead: http://forums.ni.com/t5/LabVIEW/visa-write-connection-has-been-lost/m-p/342028.

    Thank you very much!

    When you quit LabVIEW, and restart, LabVIEW automatically close all Sessions VISA.  Try to use the function of re-closing VISA close the existing session and open a new one.

  • Visa read byte at the port

    My visa to read, I feed in the bytes in the property node port as input for the number of bytes to read (it's 4 bytes).  However, the output of the read visa give only 2 bytes.  It seems that a few bytes have been lost during the read operation?  Why is this?  It is an easy to see what is in the buffer of the serial port?  Thank you!

    Yik

    You likely the session VISA set to end readings when he sees a stop character and VISA reading is to see the stop character, and ending the reading, regardless of the number of bytes you told to read. If you want that it explicitly read that much then you must disable the option "Activate the stop character" in VISA set up a Serial Port.

  • VISA makes about LV freeze

    Hello

    I use VISA read & write to interface a USB converter to FTDI FT232BL series. The FTDI driver created a virtual COM port.

    Everything worked fine with a few weeks with 8.51 LabVIEW 8.0 and 8.2. But all of a sudden my VI froze when I ran my stop code.

    Fortunately, I was able to track it down to close VISA, with poster simply he is running (using the symbol of a yellow bulb), but never ends. I can close the other windows of LV except the Project Explorer and the VI running at a higher level. Red Abort-button is clickable, but shows no effect.

    Open the VISA Session Monitor VI in the labview\vi.lib\Utility\visa.llb shows no VISA public sessions.

    When I kill LabVIEW by using the task manager of Windows, a different process LabVIEW.exe stays there (it says that I don't have the right to stop him) and a new LabVIEW session hangs at the time.

    I activated "sessions VISA narrow auto ' but it does not seem to make a difference

    Someone is experiencing similar difficulties?

    I tried VISA 4.3 and 4.4 with LabVIEW 8.51 on Win2000. Also, it comes as an .exe built on another PC and use also to a different GUI with the same interface hardware screws (those with VISA opportunity open/r/w/close)...

    concerning

    Marco

    He points to a blockage in the version of the dll FTDI.

    What version do you use? Have you checked for an update on the FTDI web?

  • LabVIEWIOControl not always spent in VI.

    Hi all

    I use a FileGlobal in TestStand to keep a table of LabVIEWIOControls of all agrees them I accede to my request of series. I pass the variable to a particular VI (Communication.vi) several times throughout my test sequence, but some of the time VISA resource name is not passed in and a _unnamedTask «»< (0)"="" appears="" in="" the="" vi for="" the="" visa="" resource="" name="" control="" on="" the="" front="" panel="" instead="" of="" the="" comport="" name (i.e.="">

    Of course VI errors if it doesn't have a VISA reference and reports

    "VISA: (Hex 0xBFFF000E) the given reference of session or the object is not valid.

    -1073807346; User-defined error code. »

    However, in debug mode, when the face before poster and is the resource reference VISA without name I can if necessary select comport on the menu drop down and the VI works.

    I am tracking the FileGlobal in the window settings step TestStand and it has the correct value, and the variable is related to the VI and passed through the connector pane. How did lose the Compote value from time to time? Looks like it works for the first few VI, (it usually fires on the second or third instance of VI, but not always), but once the value continues to have spent, he's stuck like this until I complete the sequence.

    The test sequence is not new, but this error is new and in the wake of the upgrade me to TestStand 3.5 to 4.1.

    Thanks for the tips. I put .seq and vi if necessary.

    Andrew

    However, he did not participate in this thread, Congrats to Bryan Heslop, ESF for the New Mexico to help us identify the problem.

    The fundamental problem was mismanagement of resources VISA session. Using sensors in the window spy in TestStand and LabVIEW, Bryan helped us refine the question at a particular stage in TestStand, which called a VI that would close the VISA session. We had not noticed this because TestStand held the value in a fileglobal and it was not clear that the session had ended.

    Oddly enough, this same bad management of the VISA resource was / is not a problem of TestStand 3.5 apparently more lenient. There must be a difference in sessions VISA 4.1 handles how that makes it a hard failure. I was always interested to understand the difference, if someone has a preview on this.

    Thank you

    Andrew

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • Exe com port error

    Hello

    I am writing a program to take com ports for the main program.  Com ports are actually USB devices and I want them to be able to choose different ports if happen them to change because of the USB.  So I wrote the program to complete a ring of menu with the names of the available com ports.  Everything works well as a vi, but when I built it in the property node exe throws errors.  I run the exe file on the same computer as my vi for testing.

    #-1073807246

    Property node (arg 1) in comports.vi of choice.

    Is the property node: property: Interface: Interface of Information Description

    Use this as a VI he puts the names similar to what you would see in windows Device Manager.  The case of fake puts just the words "not used".  The entry is an array of references to Visa for COM1 - COM10.

    Any ideas on why it breaks in an EXE?

    It sounds like a session VISA is still open in LabVIEW and your exe cannot access. Try to run the exe with closed LabVIEW or see here.

  • HP 6050 has GPIB control

    I tried to write LabVIEW code to connect with an HP 6050 A electronic load. Unfortunately, the GPIB is not listed in the drop-down list Session VISA. I tried to use a USB-GPIB and the on-board. I also use the library provided by OR control the instrument. A screenshot of the problem that occurs with USB to GPIB and card direct GPIB to Instrument is attached. I tried the GPIB-USB on a different instrument and has been ranked the GPIB. Any suggestions on how to fix it, would be appreciated.

    I can see on your screen capture MAX that it has not been detected using the USB-GPIB controller. If the HP is on and GPIB cable hanging on what happens when you select 'Search tools' in MAX?  You can monitor the communication by using OR spy.

  • Example code to read an ER3000 continuousy pressure

    I working on a program to control an ER3000 and am tring to use a waveform chart to keep up the pressure. Also, I want to be able to use the current pressure to calculate the rate of Exchange to a new setting of pressure because the ships that we are in charge cannot take quick pressure changes. Does anyone have the sample code specifically for the reading of the pressure on tescoms ER3000.

    Tim,

    Taking a brief look at the llb linked above it seems as if the "fully ER Command.vi, this is what you want. This vi is read/write vi. But it runs only once. Therefore, there is not a surprise that you have a program that reads and writes to the ER3000. To "read the continuous pressure" you want to make your own vi that has the part 'read' of the 'fully ER Command.vi loop within a certain time. If find you examples in labview for VISA it should help you get started.

    Don't forget that if you want to always read the Session VISA will be 'locked '. Which means that you can't write while he performs a continuous reading of the session VISA. You can either programmatically explain this or (if RS232) you can install a sniffer that can interrogate another COM port WITHOUT interfering with your current session of VISA to the device permanently.

    Hope that it becomes at least to get started in the right direction.

    Best regards

    -chazzzmd

  • Serial via NIMAX okay but not through LabView

    I'm trying to communicate with a device via the serial port.  In MAX, I have configured the port (28800, 8, N-2, RTS/CTS).  In the test Panel, I can send a request for identification (ID? \r) and get an answer.  If I try this through a LabView VI, where I open a session VISA, set the COM port settings, and then try the request ID, I don't get a response.

    I have also noticed that if I try the query ID in MAX, but use a USB-serial adapter, I get no response.

    I don't know I'm missing a few simple nuace serial communication.  Any thoughts?

    Thank you.

    In LabVIEW, my guess is that you do not correctly send the \r. To do this, you must have the control/constant string defined for '-' code display. If you had posted your code, it would have helped to see if this or something else is wrong. Have you tried one of the sample programs before you try to write your own?

    I've never had a problem with an USB-RS232 adapter. The new port is actually in MAX and you can use Hyperterminal with it?

Maybe you are looking for

  • Comes to emails of ' *' Apple?

    I am wary of an invoice of * - to cancel an invoice and obtain a refund for storage icloud - which I did not know I used wonder my card number, account number and name of the mother. This seems to be the kind of thing that would be a con man, right?

  • Slow download speed after downgrading to Windows 7 64 bit

    Hi all! I'm new here! My first laptop is a Toshiba Satellite since 2003. Since then, I got one couple of others.Now I bought a new: Satellite P70-A-11V, a portable professional high-end computer, which came with Windows 8, which I upgraded to 8.1. Un

  • How to use wireless in Satellite L305-S5968

    I recently bought a Toshiba Satellite L305-S5968 and I have never used or been able to put in place a wireless PC.Exactly how I can use this PC to be wireless so I can connect for free to the local library. My wireless card is: Realtek RTL8187B Wirel

  • my iphone keeps restarting randomly 5s

    HI, so my iphone 5s just started rebooting randomly. wouod screen turns blue, then turn off and restart. I've also updated my phone to ios 9.1 last night. I got my phone taken far sunce August and I just returned it yesterday but this thing restart j

  • Printer HP 2512 has stopped working

    Original title: 2512 hp printer I have a printer of hp 2512 during vacation Bible School, it ceased its print job, but not print kept looking at it has been replaced by hp to a 2510-2512, so what I'm doing and I can't find the disc that came with the