04-11-2007 05:37 AM
04-11-2007 07:00 AM
Typically this application (the reader side) will work like this:
Initialize port
Until (done reading or error){
check bytes at port
if bytes at port >0 then read bytes and add to plot (buffer or shift register can be used to store data if desired)
if error, handle error/
}
close port.
This pseudocode is in no way as elegant at the labview source but my LV is not avaliable right now.
Paul
04-11-2007 07:04 AM
Also if you have to send larger amounts of data I would consider replacing the serial communication with ethernet and use tcp/ip or data sockets. there are examples in the example browser. The code is almost the same.
Writer = open port, wait for reader to be ready, send data (write) until done, close port
Reader = open port (listen) until done real data at port, close port.
It is that simple. All the complex information is encapsulated into visa, datasockets or the tcp code.
Paul
04-11-2007 08:02 AM
04-11-2007 09:26 AM
04-11-2007 09:28 AM