LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication

Of course does it give you an error! you tell it to read 1024 byre but your device only rdd we turns 1 byte and there is no termination character on which the read could detect that the message is finished!

 

Use at least Serial,writeln() on the Arduno side, but what I wrote before still applies, That only solves the problem from your device to the PC. The communication from your PC to your device is still unsynchromized.

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 14
(181 Views)

But everything seems to work fine in putty and coolterm

0 Kudos
Message 12 of 14
(173 Views)

Those are terminal programs and work a little bit different. You wouldn’t want to talk with a Spectrum Analyzer with putty, would you?

 

You could program a terminal like application in LabVIEW but it would be a lot more unreliable to do “real” instrument control, than using proper command termination so that both sides reliably know when the other side has finished talking. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 14
(170 Views)

@ms6 wrote:

But everything seems to work fine in putty and coolterm


But now you are trying to program what YOU do with the terminal.  This gets into how I see programming: you have to slow down your brain and figure out what it does and force the computer to that.  You send your command and then you sit there and wait for the response and you know when the response is complete.  How do you know it completed?  This is why you need a proper messaging protocol to make it obvious when a message is complete.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 14
(138 Views)