Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

examples on RS232 communications using handshaking

I am trying to use one computer to talk to another computer using RS232, and let the second computer to control my instrument and also feedback to the first computer the status.
0 Kudos
Message 1 of 5
(3,648 Views)
What OS and programming language are you using? If the second computer has two serial ports, you should be able to easily write a program to gather the instrument data and then send it to the first computer via RS232. If you give me some specifics, I can point you to some examples.
0 Kudos
Message 2 of 5
(3,648 Views)
one computer is using MS2000, the second one is using NT. and I am using Labwindows/CVI(5.5). actually I've get the first computer send the second computer instructions, and get the second computer control the instrument according to the instructions, and feed back to the first one. but seems I have some problems with timing, it works sometimes but not always.

Regards
0 Kudos
Message 3 of 5
(3,648 Views)
Hello-

Try using VISA for the programming. The viInstallHandler function can be used to install a callback function to run when an end-of-string character is received through the serial bus. The VISA Programmer's Reference can give more details on how to do this.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,648 Views)
While timing shouldn't be a major design element, it often is. Have you tried using NI-Spy to debug your reads/writes (assuming you're using VISA). NI-Spy is a valuable tool for determining what is going on 'under the hood'.
0 Kudos
Message 5 of 5
(3,648 Views)