Hi all,
I want to make a VI to read temperature data packages from a serial port. The data is sent from a monitor automatically in a fixed period, so the VI is only required to read data from the serial port.
I have made a VI, which can show the number of bytes at serial port and read all the data once a button is pressed. The problem is that the number of bytes at serial port is always zero no matter how long I have wait before reading. Consequently, no data is read.
Could anyone help me? Thanks a lot!
More information:
1. This VI can work properly when I send data from a virtual serial port created by VSPD software.
2. The serial port seems right in Windows Device Manager. What's more, other software can read data successfully (but I need to process data in LabVIEW).
3. NI-VISA is installed and serial port is configured properly. No error occurs during operation except no data received.
4. My PC is connecting to the monitor via a standard RS-232 interface directly, and no USB-to-RS232 adapter is used.
5. I have study the signal by an oscilloscope and find it is right. (Other software's working properly can also demonstrate this.)
The button is activated only once although it may be pressed for a while.
The while-loop do nothing when button is unpressed.
Other software can receive data.