11-05-2013 12:34 PM
Good morning, my problem is that I have made the connection to serial visa in labview, but i dont know how display groups of bits in graph, in serial signal I'm sending four sensors, the signals are in order, first is temperature with a group of 8 bits, then with 8 bits after pressure, etc, the problem is not as multiplex so to speak or determine each data to its respective graphics, I have suggested using counters or bitmask in the data but not how to do it, someone who can help me? annex vi if someone find any errors in logic, thank you!
11-05-2013 01:23 PM
Hello Mark,
The issue I see is that you're reading all bytes availible at your serial port.
And than you convert them to one single decimal number which you pass on to your 5 controls ( 4 charts and 1 thermomenter like control ).
What you need to do is read your serial output one value at a time, decode it and pass it to the appropriate control.
I'm sending a VI that shows what I mean.
I have assumed that once the connection is established data over the serial port will start with 8 bits of temperature, followed by 8 bits of pressure than 8 bits of humidity and 8 bits of altitude.
And the cycle repeats.
However you should look at any documentation describing any handshaking etc needed for your protocol to work.
The device you're connecting to COM1 needs to know when to start and stop transmitting.
Maciej
11-06-2013 05:35 AM
mark_ayp wrote:the signals are in order, first is temperature with a group of 8 bits, then with 8 bits after pressure, etc
Wait. BITS or BYTES? Each character in the string is a byte (8 bits). Please clearify the protocol.
11-06-2013 05:51 AM
right I think it was 8 bits per value ... sooo uploading a fixed vi
11-06-2013 05:14 PM
Hello mark_ayp,
I share an example where you can define advanced features in serial communication, just like buffe size, termination character...
Also you can find this example in example finder en labview as Advanced serial write and read.vi
http://zone.ni.com/devzone/cda/epd/p/id/2665
Hope this information helps you.
Regards,