Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI works only when NOT including "VISA Configure Serial Port (Instr).vi"

I have been integration of many devices through USB and have started communication on all of them with the VI

"VISA Configure Serial Port (Instr).vi." Then I use "VISA Open Function" .. send commands "VISA Close Function" and I'm done. I am basically copying the example VI "Simple Serial.vi." That worked until I recently included a RIGOL waveform generator. This had an IVI driver which I installed. With this device, serial communication only works if I do NOT use "VISA Configure Serial Port (Instr).vi." and just skip straight to "VISA Open Function." This is actually very nice because with all of my other devices, I had to go to the hardware manager, figure out which device was on which COM port, then go into "VISA Configure Serial Port (Instr).vi." and set all the baud rates correctly and asign each device to the appropriate COM port. With the RIGOL device there is no COM port, you just select the device by name from the pulldown menu of available resources. Also, I never set the baud rate anywhere. How does the computer know which baud rate to use? Why can't I use "VISA Configure Serial Port (Instr).vi." wth this device? How do I set up the other devices to work like this one?

0 Kudos
Message 1 of 4
(4,211 Views)
An IVI reference is not quite the same as the VISA reference even though IVI uses VISA under the hood.

When using any number of native LabVIEW drivers, the driver detects whether the reference is a serial port or not. Simplest thing in the world. The IVI driver may or may not be configuring the serial port. It mayi simply be using the configuration in MAX. You could look at the code.

p.s. It would be a good idea to stop referring to your.connections as USB or at least be more precise. USBTMC and USB RAW are significantly different and neither require any serial port configuration.
0 Kudos
Message 2 of 4
(4,208 Views)

How do I look at the code? How do I set up my other instruments like this one? Do I have to create an IVI driver? Is that something I can do with Labview?

0 Kudos
Message 3 of 4
(4,193 Views)

If you have CVI, then you can open the driver with that. Otherwise, just use any text editor to view the c source code.

 

Look at the 34401 driver that comes with LabVIEW. That shows how you can use a property node to determine the interface type and call the serial configuration. I would not recomend that you depend on the settings in MAX for the configuation but explicitly set them with theVI - just like you are doing now and like the 34401 driver does. I don't believe IVI really has a method of providing the configuration when you call the initialize function so it has to depend on the system settings.

0 Kudos
Message 4 of 4
(4,174 Views)