12-01-2014 04:45 PM
Hi All,
I'm looking for a reference design for serial (RS-232) binary communication using VISA. I'm using LabVIEW 2014 Professional. The data that will be sent can be of any numeric value (including the termination character 0x0a) and will vary in length (4 to 20+ bytes). I'm very aware that I cannot rely on the termination character to indicate the end of a message. I was looking at either a) using a byte count or b) toggling some of the RS-232 lines. Does anyone have a good reference design I could use? Thanks!
12-01-2014 05:50 PM
@josramir64 wrote:
Hi All,
I'm looking for a reference design for serial (RS-232) binary communication using VISA. I'm using LabVIEW 2014 Professional. The data that will be sent can be of any numeric value (including the termination character 0x0a) and will vary in length (4 to 20+ bytes). I'm very aware that I cannot rely on the termination character to indicate the end of a message. I was looking at either a) using a byte count or b) toggling some of the RS-232 lines. Does anyone have a good reference design I could use? Thanks!
You can use a header. Then you will know where your data starts.
I'd stay away from toggling physical lines unless you are absolutely sure that the ports and the cable(s) have all lines present.
If you just stream the data, there is a chance something gets out of sync and you'll never be able to recover.