LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i select groups of data for show in graphs


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!

0 Kudos
Message 1 of 5
(2,454 Views)

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

 


0 Kudos
Message 2 of 5
(2,442 Views)

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.


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 3 of 5
(2,408 Views)

right I think it was 8 bits per value ... sooo uploading a fixed vi

 


0 Kudos
Message 4 of 5
(2,404 Views)

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,

Omar I.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,390 Views)