Using NI-VISA (in LabVIEW)
Examples of VXI programs written in LabVIEW using NI-VISA are in the examples\instr\visa directory.
The first VI you should call in your program is VISA Open. This VI opens a communication channel with an instrument. This communication channel is known as a session and is used throughout the rest of your VISA program to keep the unique communication and attribute settings of that instrument. You need to call the VISA Open VI for each instrument you want to communicate with. Once the sessions are open, you can set up any asynchronous event handlers that your program may need, and then perform your accesses to your instruments. When you are done, call the VISA Close VI on each session and event object.
You can use the Simple Error Handler VI to perform error checking and display errors when they occur.