Good use VISA

I'm still kind of new with LabVIEW, and I fell on the functions of opening and closing VISA (they were hidden under the Advanced tab so I never saw them before).

My question is if I'm supposed to be using the functions of opening and closing VISA when I do gpib drivers for hardware that I use.  For example: attached is a simple code that will set up my Keithley 181 and a measurement (really just for demonstration purposes).  I've highlighted the functions of opening and closing, I've never really used before and normally if I wanted to write the same code I would have just skipped them and went directly to the entry VISA (which still works).  I didn't know all the problems with the drivers, I did, although I have not used these functions in the past, but maybe there's a chance that some unexpected results can occur, I'm not really sure.

Thank you!

Once upon a time, the use of the Open VISA was necessary. A session has not created unless you call it explicitly. Then the VISA got a little smarter and if a VISA function is called, if the session does not already exist, it is created automatically. Calling the Visa Open is therefore Optional a bit even though I still prefer to use in my code. With the VISA close, there is a setting (Tools > Options > environment) which will automatically close VISA sessions when you leave the highest level, but especially with the series VI, I prefer to have more control.

Tags: NI Software

Similar Questions

  • potential problems with executable files using VISA

    Hi, I have a LV 2012 SP1 source code developed under Windows 7. The source code uses VISA for serial communication. I built from this source code executables that work without problems on a PC with Windows 7.
    Now I use Windows 8 and build the executables from the same source code, I have used before. However, when you use the new executables (under Windows 8) on the same PC with Windows 7 as before, I get an error in the communication of VISA.

    The error is: property node (arg 1) in .vi VISA set up a Serial Port (Instr)

    Once again: 1. executables built under Windows 7 work on a PC under Windows 7

    2. executables built under Windows 8 will not work on a Windows 7 PC (error VISA)

    the source code is the same

    Suggestions, which could be at the origin of this are most welcome.

    An EXE that uses the VISA must be the VISA installed runtime.  It is like not having not drivers for your program.  Create a Setup program using the similar project about how you made an EXE file.  Include the exe in the installation program and under additional installers choose the software that is required by the EXE.  This will usually include the runtime LabVIEW and VISA.  From 2013 the additional installers will try to predict the software needed by the EXE.

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

  • urgent request: how to read the value of a register using VISA read?

    Hello world

    This is a very urgent investigation. can someone help me please? Thank you very much!!

    I wrote a few commands in several registers using VISA write. now, I want to read the value of a different register.

    But the bytes returned are just the commands, I wrote before and a few other commands that I don't know what they are for.

    This is the format of the command, and I enclose the sheet... I want to read the value of register (0 * 41)

    .

    Ravens, if you have something more than me, do not so much it at all =)

    The command you have posted has several components:

    The gray area of the transport layer uses for a checksum

    several bits set to 0.

    a single bit to define if it's a read/write operation

    a byte to identify the register of interests.

    two bytes for the data.

    With what you have provided, there are only three things we need to worry:

    (1) set the R/W bit to 0 to mean we're reading rather than write.

    (2) set the second byte 0 x 41 to focus on the register of interests.

    (3) with a reading, I can't imagine the last issue of two bytes.  They probably ignored.  The documentation you provided does nothing to explain this.  The most logical thing I can think is that these two bits contain the data, you go to the registry if you set the R/W bit to 1.

    There are two parts to this communication.  The first part is an entry VISA to send this control unit.  It is likely that you will need to complete the message.  You will need to know how to do this.

    The device must respond with the message that you mentioned in the original post.  Crows is right.  He's coming back as a string.  You can use the subset of string to separate the components defined by the standard.  You can use these components to determine if the data is legitimate and then do what you want with the data.

  • can I use visa.vi to rs232 db25 port?

    can I use visa.vi to rs232 db25 port? because where the use of rs232 to the parallel port (db25).

    and also any vi to read the data of the series.

    IM new in labview I just learn the tutorial to youtube.

    If not can someone give me an idea how or can give me an example vi.

    TNX...

    Your front panel can be... catchy (and frankly annoying), but your VI does not make much sense. If you want that your 'start' code when the user presses a façade 'Start' button, then you have to sit and wait for the user to press start, doesn't depend on the user to press Start before you run your VI.

    In addition, you have:

    • Wired the value that configures 'Port' at the entrance to "Activate the tank of termination" of the VISA. Why? You should know whether it should be enabled based on what you're trying to talk. The unit will stop his messages with a specific character? If so, a real thread of this entry and a value of thread at the end tank entry matches the value ASCII of the nature of the instrument used to put an end to his messages.
    • Wired a zero for the number of bytes Read VISA. Why? This means that you do not read anything by definition.
    • Do you need to wait a certain amount of time after sending the order before data are available?
    • Do you need to terminate the order that you send with something?
    • You currently have the set loop in place as an infinite loop. This means that the only way to stop your VI is using the button abandon in the toolbar. IT OF BAD. Provide a stop button on your façade to allow your VI finish properly.

    See attached mod as a better starting point.

  • want to use visa read only when the pieces is in port

    Hi all

    I do a lot of serial data communications and visa read doesn't have an undo feature.  Heres so the question.  If I'm in the middle of the read visa, set up the picture picture and block, and I press the stop button, I have to wait for the visa reading for timeout, in this case 2 seconds, before I can move to the next step in the shutdown sequence.  Now, I know, there is a way to use the events of specefic bus, but I have yet to find a good example.  Any help or advice for a workarond for that matter?

    Thank you

    Matt


  • I have currently 3.6.17...I can not download version 10 - I can't afford to upgrade my memory on the computer. Any other good use of browsers?

    Now, the browser is slow... I would like to find something that looks like this. I don't understand why Firefox 3.6 should be changed. Everyone can afford new computers

    As has been shown above, 10 Firefox would certainly go well with 1 GB of RAM, or even less.

    When you perform the upgrade, you use update internal Firefox, or you download the file directly from www.getfirefox.com? I try to disable the antivirus temporarily, then download again once, run the installer, then re-enable your anti-virus. You should be all good to go then!

  • I need to read barcode using visa OR and store it in file .text

    Hi all

    I need to read to Barcdode using communications series (OR visa) and store it in .txt) file...

    (I have attached series vi read file... here I can able to read codes to bars, but quickly it goes to zero...)

    Hello

    have you checked on the examples of series communication delivered with Labview?

    In addition, if you want to send the data to the port of reliable succession, I suggest to use a cleaner approach - pack your data of barcode in a significant data structure. The data structure would look like AUT like this: 1. start of data (described at the beginning of the data packet), 2. data bar code, 1B. end of data (described at the end of the data packet) and 4. checksum of data (apply only 1 a or 1 b, whatever you prefer). If you plan to add additional information to your package of data later, this would be really easy to change. This way you can also check if the data got lost during the transfer, notify the user.

    You can take a look at how to read this data package here (set up a loop of producer-consumer, although not necessary):

    https://decibel.NI.com/content/blogs/kl3m3n/2014/10/17/serial-data-send-with-CRC-cyclic-redundancy-c...

    Best regards

    K

  • How to use VISA on cRio 9074

    Hello

    I have a 336 Lakeshore temperature regulator that is able to communicate through ethernet with my hostpc. But now I want to use it with my Palm of cRio system 9074 Ehternet (cRio 9074 has a double ethernet controller).

    In MAX, a VISA system with the IP and the thermostat decision there, but I can't add it to the cRio-system. Is it possible to install it there or is there another possible to work with my Palm of controller the Ethernet of my cRio system

    For more information, my cRio system is connected with a crossover to the host pc cable and the shore of the Lake is connected with a cable ethernet for cRIo-system.

    Please help me

    Problem is solved. Just added a VISA VI read to the project of the Rio System.

    But it does not hollow MAX

  • How to use visa write in loop for

    Hello

    I'm developing a measurement with labview system. I need to write the entry within the loop and then out of the loop he supposed to read the voltage level of the analog input pin. But the problem is, out of loop is 1 table D, so when I put the entry visa within the loop, exit loop wire VISA is also table 1 d. Please help me. Should I supposed to do?

    Change of your loops of connections to register and you don't build a table or errors or resources from visa.

    /Y

  • Writing terminal COM data to graph using Visa

    Hi all.

    This is my first post so try not to tear me to shreads for my lack of knowledge!

    Well, my basic project idea is to have an arduino read a signal in labview in series using the XBee. So far, I'm able to get current values of the chart in by numerical values, but I can't seem to actually be able to GRAPH it. I have an example VI that I 'borrowed' from another source... my field of labview knowledge is so small. My goal is to actually chart an ECG signal fairly quickly so that theres a complete waveform that appears for the chart. In fact, I started learning the basics of this February. If it can be done, can someone give me directions? Something will help you!

    On the side of the arduino, it is the code. The last 'delay' determines the sampling rate. I read the ECG/EMG of sampling signal must adhere to the theory of Nyquist sampling. Frequency maximum EMG is around 500 Hz (filter before low pass of the ADC is set to cut 500 Hz), the sample should be at least twice the maximum frequency - at least 1000 Hz.

    int potPin = 0;    Select the entry for the potentiometer pin
    int val = 0;       variable to store the value from the probe

    void setup()
    {
    Serial.begin(9600) (9600);    Opens the serial port, establishes the rate of 9600 bps data
    }

    void loop() {}
    Val = analogRead (potPin); read the value of the voltage divider
    Serial.println (Val);
    Delay (1);
    }

  • Difficulty communicating with a GPIB instrument using VISA

    Hi all

    I am trying to create a Subvi allowing communication between a computer and a spectrometer to MS260i. This is an old spectrometer and can only be interfaced via GPIB or RS232. I chose to use a GPIB-USB-HS adapter to connect it to the computer. The following parameters in the NOT-MAX I would easily send commands to the spectrometer when you use the Communicator of NOR-488. 2. I have also attached a picture of a wavelength successfully query.

    However, I am unable to do a Subvi with the same settings. For example, the following VI

    Returns the following error

    Is there something that I forget? I also noticed that even if I saved the GPIB interface properties, these do come up not by default when you use the Communicator of NOR-488. 2. Indeed, I have to manually configure EOS settings every time that I reopen it tool.

    Any help would be greatly appreciated.

    Did you do a right-click on the control of the chain and select ' \'Codes display? If you do not, the stop character is not sent.

  • How to calculate heart rate in a simple way using visa series

    I am new to Labview, it's my mini project title "PC based ECG monitoring. I have this mini album, part hardware circuit ECG and DAQ (MPLAB) who will be using Labview for graphical user interface. My problem is, I made the graph for the ecg monitoring, and I need to calculate the heart rate and to detect bradycardia and tachycardia. for bradycardia is more or equal to 100bpm and tachycardia is less than 60 BPM.  for the diasease 2, when it is either a bradycardia or tachycardia, the alarm lights.  I also have a problem to make the detection of peaks and mark all the peak maximum and minimum and put the location of the peak. Thank you. Here I set my vi.

    This is the complete...
    Thank you very much..

  • How to change dynamically using visa without stopping the program of baud rate?

    Hello, is there a way I can change the speed of read/write VISA on the fly?

    Please let me know.

    Thank you


  • Should I use Visa 5.0 if I do a labview 2009 executable?

    We want to make an installer for an executable created in Labview 2009. I installed LV 2010, but I opened the project (which has been done in 2009 LV) in 2009 from LV.

    DURATION VISA 5.0 is the only option for the VISA duration under the "additional installers".

    Will this work with an executable file LV 2009?

    The Readme for VISA indicates what versions of LabVIEW, it supports. Haven't you read? NI-VISA 5.0 supports versions of LabVIEW 8.5 front, so it does not work with 2009.

Maybe you are looking for