Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

What are the differences between VISA and the old serial calls in regard to device communication?

Recently, I had to communicate with a piece of equipment, (a Yokogawa UM-330 Green Series Digital indicator). The device was configured to communicate using RS-485 protocol. I purchased a RS-485 to RS-232 converter in order to communicate with the device via COM 1 on my PC. When I attempted communication in Max, using VISA read and write commands, I could not get the device to communicate. I even attempted writing a stand-alone VI to establish communication. Still, no-dice. Finally, I resorted to using the old serial call VIs. This made the device jump up and say hello. What I really would like to know is, has anyone experienced problems like this when
attempting to communicate via seral with other devices using VISA, and if they have, what are the reasons for these problems? Is the problem specific to devices using RS-485? Or is the problem more device-specific?
0 Kudos
Message 1 of 6
(4,871 Views)
We have been using serial devices for more than ten years (proprietary acquisition cards and third party devices) using a variety of languages (BASIC, CVI, LabView...). I always found that the main problem are correct configuration of the serial port and cabling: once these items are correct, it's easy to obtain some reply from your devices (maybe not so easy to obtain the CORRECT reply or to interpret it...).
I've used both old style VIs (vith LV 5) and VISA with success on the same devices: still I am a little confused about VISA. Maybe would be better some explanatory document by NI about VISA and serial communication.

Anyway, my approach is at present: don't bother about control panel and/or MAX configuration of the port: open the device and configure i
t as you need at the beginning of your application.

Next use simple VISA Write and VISA Read VIs.
Be sure to set the correct timeout: some devices are extremely long in replying (for example: an Infratek wattmeter takes as long as 45 seconds to send measures if you ask to it an harmonic analysis...!).


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(4,871 Views)
I am experiencing the same problem. I have a program that works on one computer but not on another identical computer. However the old serial call works fine on both computers. I suspect it has to do with the windows kernel but have not been able to fix it yet.
0 Kudos
Message 3 of 6
(4,871 Views)
A lot of problems seem to come from the VISA configuration itself. NI VISA seems to run into difficulties with some serial controllers and with non-NI gpib cards. Here, we have some machines with HPIB cards (HP's version of GPIB) and I have to load HP VISA to get the cards to work. MAX and LabVIEW VISA drivers do not recognize the HP VISA and the NI VISA does not recognize the HP card. With HP VISA loaded, LabVIEW does not recognize the serial ports through the VISA drivers. All versions of VISA must match.

So, I use the VISA drivers appropriate to whatever card is in the computer, VISA to talk through the GPIB (using "standard" naming practice: GPIB0::19::INSTR) and use the old serial drivers for serial port work.

Rob
0 Kudos
Message 4 of 6
(4,871 Views)
Do you have some sample code (pref. Visual Basic)? I can talk to an instrument via rs-232 using Measurement & Automation Explorer, but get an error when I use viOpen.
0 Kudos
Message 5 of 6
(4,871 Views)
We experienced a different problem recently. An old executable, using the old NI serial calls, would not communicate with a new version of the transducer. One was rs232 only, the other was 232 and 485. When I created a new application with VISA, both transducers work fine. I don't understand, but never argue with success
0 Kudos
Message 6 of 6
(4,871 Views)