Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send string commands to a serial intrument

Hello,
 
Ok, I have two different serial connected systems that I need to send string type commands to (eg " start<Enter> "). I also need to receive information back.
 
Both of these devices don't have LabVIEW hardware drivers. Am I suppose to be using the VISA read, write, close commands for such an operation? The one device will be sending back binary data, each recording is suppose to be 18 bytes. If I want to receive 100 readings, would I simply tell it to receive 1800 bytes? Do I need to use the VISA Configure Serial Port everytime I wish to start using the instrument?
 
Pretty much I need to know how to set things up so that I can send commands to the instruments such as in a dos command line. I really hope this is a simple solution that I am just not quite understanding yet. Thanks.
 
Nick
0 Kudos
Message 1 of 2
(3,228 Views)

Hey Nick,

VISA is one way to talk to instruments through serial communication.  Have you been able to communicate to the instrument in any way through the port? i.e. hyperterminal, max, etc.

You only have to configure the serial port one time and that could be done leading into your write/read commands or outside of a loop.  You can make a loop for 100 iterations and a reading of 18 bytes in each loop.

Attached is a very simple VI that should help get you started with your instrument communication using VISA.

Good luck!



Message Edited by Steve.Briggs on 01-22-2008 03:24 PM
0 Kudos
Message 2 of 2
(3,213 Views)