LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switching from GPIB to Serial

I am new to labview and I have a Labview program that currently uses a GPIB card as the form of communication. What i need to do is switch it to use the serial port as the form of communication. Can i just switch the resource name or is it more in depth than that.
0 Kudos
Message 1 of 4
(2,561 Views)
Use Visa configure serial port VIs to configure the com port. Visa read and write VIs are the same for serial or GPIB communication.

You may have to check for hardware issues like cables etc., GPIB cable is different from a serial cable.

You can see examples that ship with LabVIEW for serial communication.
0 Kudos
Message 2 of 4
(2,561 Views)
The current program is not using VISA at all, as far as I can tell. So could i just change the resource name to ASRL1::INSTR from GPIG::1::INSTR??
0 Kudos
Message 3 of 4
(2,561 Views)
It's got to be using VISA if there's a resource name. As far as just changing the name, that may or may not work. Its probably a good idea to add a config serial port function to the driver just to make sure that the baud rate, etc, is set correctly. You may also have to add a termination character to the strings that VISA Write sends. This can also be done with a modified VISA Configure Serial Port by adding Serial Settings:Serial End Mode for Writes to the property node inside the function. Most serial instruments require a termination character (i.e. CR or LF).The instrument manual should tell you. There are a bunch of instrument drivers available that are designed for both serial and gpib. One that I use is the HP34970A. You can look to that one
as an example.
0 Kudos
Message 4 of 4
(2,561 Views)