LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

??? ALARM??? -no connection between rs232 and PC when using serialread.vi

i send you my code and whats happening when there is no connection with my RS232.the program execution doesnt stop but there is no data flow from the RS232.how to detect that there is no connection.
Download All
0 Kudos
Message 1 of 3
(2,837 Views)
There is not much execution control in the code; the initialization might be done prior or after the write, and you do a read without knowing how many bytes there really is at the port. Use dat flow to ensure that things execute in the correct order, and use the bytes at port to check whether the 7 byte reply has been received, do not read and decode before bytes at port reports that there is 7 bytes available...
Message 2 of 3
(2,837 Views)
One of the big problems with the old serial VIs is that they don't have error in/error out connections so you have to carefully watch your dataflow and as Mads points out, you have none. You can easily add error in/error out controls to your own copies of the old serial functions or use VISA for serial communication.
0 Kudos
Message 3 of 3
(2,837 Views)