Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial read and write

    Hi ......... i am working on SMD2 driver which help to rotate the stepper motor.......rs232 cable is used to perform communication between PC and SMD2 hardware ..........In labview8.6 by using VISA ........parity bit , baud rate etc.. are send to hardware .....Hard ware is get operated on some commands  .........By using visa write in which string of commands is written get sended  to hardware  and fromVISA read response is coming ........but my problem is that VISA read shows an error-1073807339  and refer that TIME OUT EXPIRED BEFORE OPERATION COMPLETED .............plz help me and tell  me why this error is coming ...by changing timeout on VISA serial i also try to solve this problem but this thing doesn't help me ..........
0 Kudos
Message 1 of 3
(3,420 Views)

As far ai I understand you can write (because your hardware reacts on you commands), but you can't read (you get a timeout error).

Are you sure your hardware is outputting somithing to be read? Maybe you're trying to read the wrong number of characters? If you expect to read 10 chars, but your device outputs only 4 chars, you're getting a timeout.

Regards

0 Kudos
Message 2 of 3
(3,411 Views)

You could have the wrong com settings, you could have the wrong type of serial cable (there are two basic types), you could be sending the wrong command, etc. Countless possibilities. I would suggest you do your basic com checks with a program such as Hyperterminal before you try any code of your own. At the very least, you can get support from the instrument vendor when you first use Hyperterminal.

 

Some basics to understand - you can only set the com settings of the pc and a wrong cable will be the same thing as no cable. There is no error generated when you have no cable connected and you will not have any errors if you have the wrong type of cable.

0 Kudos
Message 3 of 3
(3,403 Views)