LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Data In [Unit A,B,C,or D] -> Store Data in file (and array) -> Display Data in [Unit A,B,C,or D]

I have a system with an Arduino microcontroller that displays thermocouple temperature (in degF, degC, R, or K) depending on the desire of the local user. Currently, the microcontroller broadcasts to a monitor computer a string of ([temperature]: [temperature unit]: [time s]) which is to be parsed, written to a file (probably kept in a cluster array as well?), and displayed to the user on a time graph.

 

If I want the monitor to be able to quickly change the displayed graph from one temperature value to another (degF, degC, R, or K) what is the best way to get the best response time?

 

My instinct says to always convert the input temperature to the most commonly used unit (degC) log it, and then convert the display for the monitor when they want a different unit, but idk if there's a better way since the relationships between each unit is constant.

0 Kudos
Message 1 of 3
(2,508 Views)

I would just have the user select which units they want and convert to that unit.  If they change units, convert all of the data in your graph (or clear the chart).  I would just store the units with the measurement in the log file (ie no temperature conversion).  So just convert for display purposes.


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

A fairly crude but perhaps effective alternative might be to change the multiplier and offset for the Y-scale based on the display choice. This only works if you can get all of your data in the same units though, so you'd want to be careful either to always acquire in one unit, or to record in one unit after conversion, and display the recorded/processed (not directly live) data.


GCentral
0 Kudos
Message 3 of 3
(2,442 Views)