Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication, serial read time out problem

Hi there. I am a newbie in these functions of labview. 

 

I am in need of communicating a USB device via labview. The company provided all the commands that I need to communicate with the device. I only need to send and read through the USB port I guess?

 

However, when I test with NI MAX, I noticed that I can write but I can not read. Once I ask NI MAX to read anything from the port, it will report timeout error. see attached figure 1.

 

Also I noticed something skeptical in the attribute option, see figure 2?

 

Thanks for the help, pretty urgent for me now.

Download All
0 Kudos
Message 1 of 4
(3,856 Views)
To send a carriage return, you need to type a \r.

The attribute is only valid for NI serial devices.
0 Kudos
Message 2 of 4
(3,847 Views)

Hi Dennis:

 

you helped a lot. After I changed <CR> to \r, at least I got the correct return in NI MAX. However, the timeout error still exists. 

 

Also I tried to use basic serial read and write to perform reading and writing, it will also report error.

 

see the attachemnet

0 Kudos
Message 3 of 4
(3,843 Views)

hmm, problem solved. Thanks Dennis. I think I just didnt pay too much attention to the baud rate data bits and these parameters. Now it is solved by using the default ones. 

0 Kudos
Message 4 of 4
(3,841 Views)