04-13-2020 11:14 AM
Hi all, I'm making a two thermocouple display including individual gauge display and a 24 hour running chart. When I send X and Y data to express XY graph it is only displaying data for the first array input.
Input channel is Dev1/ai0,Dev1/ai1 and the waveform data (analog, multiple channel, 1D waveform SAMPLES) is being extracted by Get Waveform Components (Y), converted to double precision float, then build array (2 deep). Time is being sent as military time with decimal minutes. Time is sent to ex XY graph as X and two channel temperature is Y.
Thoughts on solution?
Solved! Go to Solution.
04-13-2020 11:25 AM - edited 04-13-2020 11:30 AM
All we see is a picture and a subVI icon that seems to do some of the work. Why is X a 1D array and Y a 2D array?
We cannot help unless you attach code, but this all seems overly complicated the way you are doing all this. Why is there a completely useless shift register (You never use the history output!)? Why do you use dynamic data and express VIs to make an xy graph? Why do you wire default indices to "index array"? Why do your wires go in all directions? 15 seconds is a long time for a loop rate. Why can't your subVI index out the two waveforms (fewer connectors, less clutter!)?
04-13-2020 11:38 AM
Here is code, I cleaned it up a bit. Thanks for the input so far! I'm hoping to add actions for high/low temperature thresholds but am just working on displaying data for now.
04-13-2020 12:10 PM - edited 04-13-2020 12:14 PM
How many points per waveform do you get per iteration?
What's the logic of adding minutes and hours as numbers and creating an array with that sum twice? Seems redundant.
Are the points spaced equally in time? Wouldn't a chart be more reasonable?
04-13-2020 12:17 PM
As you noticed earlier I'm only taking samples once every 15 seconds. My goal in the chart is to display the two temperatures aquired over past 24 hours (from 0 to 24). Points are spaced equally over time. I initially expected to do a waveform chart, but ran into issues defining the time scale over 24 hours. Suggestions to accomplish this?
I appreciate your input.
04-13-2020 12:24 PM
Well, use a chart with a time axis in time format and a dt of 15 seconds. No need for waveforms. Can't you get plain numerics from the analog input.
04-13-2020 12:31 PM
Under DAQmx one of the options is Multiple Channels > Multiple Samples > 2D DBL. I guess I couple send this right to a waveform chart and define timescale? I'll give that a try.
04-13-2020 12:55 PM
Why not multiple channels one sample each? You only want one point per 15 seconds, right?
04-13-2020 01:44 PM - edited 04-13-2020 01:59 PM
ALso note that you can customize the digital displays of the chart to show up as gauges. No need for all these extra controls.
( Make sure to correctly set the output size of "array to cluster")
04-13-2020 01:58 PM
Thanks much for the example code - it really helped me understand what you're saying! 👍