LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can any one give me some examples of using NI-visa

I am using a USB device with labview. I have configured the device for using it. I just want to know how to communicate with it. It just gives some voltage signals out and I need to display it in the graph. Can anyone tell me how to do it or provide me some examples on VISA communication. Thanks.
0 Kudos
Message 1 of 8
(3,070 Views)
Probably duplicate of this.
0 Kudos
Message 2 of 8
(3,069 Views)
thats not the same intention now. i am almost done with the configuring the device. I just want to have some examples of building VI for it. Thanks.

0 Kudos
Message 3 of 8
(3,065 Views)
Hi,

There are several examples available for using NI-VISA in LabVIEW. Just go to Help>>Find Examples. Using Browse by Task, choose Hardware Input and Output>>VISA. There are several different examples but the main idea is the same no matter what type of device you are connecting too. There is also a USB Instrument Control Tutorial that you might find helpful.

Regards
Krista S.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 8
(3,035 Views)
Exactly what Krista said...
 
Most of my VISA interfaced vi's were created with the base of one of the example vi's given by National Instruments...once you get the basic handle of serial communication, it is very simple to make an elaborate program that can utilize any signal coming through.
 
Regards,
0 Kudos
Message 5 of 8
(3,030 Views)
Ya I tried looking at it but I am not understanding what each component does in the block diagram and the front panel. Can i find the descrition for it so it will be easy for me to read and understood. Thanks.
0 Kudos
Message 6 of 8
(3,016 Views)

Turn on context help and hover over each item you're not sure of.  Click on detailed help for more information.  Smiley Wink

0 Kudos
Message 7 of 8
(3,008 Views)
Hey,
 
The VISA functions can seem a bit intimidating at first, but once you understand the properties that go into each one you can fully understand how simple they really are.
 
First and foremost, you have to Configure a Port which sets the VISA Resource Name, parity, stop bits, data bits, etc.
 
Next you have VISA write and read.  VISA Write usually comes prior to VISA read unless your instrument continuously releases a signal that needs to be interpreted.  Check a manual or booklet that came with your instrument for Write commands to the instrument and which termination character is used to communicate effectively.
 
Most of the time you use the Bytes at Port function to determine the length of the message going between computer/instrument so there is no cut off of the message or extra wait for the message to be received when it's not even there.
 
Last but not least, you have to close the communication bridge.  This is done by using VISA close and completely shuts down the link between computer and instrument if you want to go ahead and set up another connection.
 
Hopefully this helps you with your process Smiley Very Happy,
 
Regards,
 
0 Kudos
Message 8 of 8
(2,985 Views)