LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph only showing one plot

Solved!
Go to solution

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?

 

0 Kudos
Message 1 of 10
(4,150 Views)

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!)?

0 Kudos
Message 2 of 10
(4,140 Views)

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.

Download All
0 Kudos
Message 3 of 10
(4,131 Views)

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?

0 Kudos
Message 4 of 10
(4,116 Views)

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.

0 Kudos
Message 5 of 10
(4,111 Views)

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.

0 Kudos
Message 6 of 10
(4,108 Views)

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.

0 Kudos
Message 7 of 10
(4,106 Views)

Why not multiple channels one sample each? You only want one point per 15 seconds, right?

0 Kudos
Message 8 of 10
(4,098 Views)
Solution
Accepted by topic author Triplett

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")

 

 

0 Kudos
Message 9 of 10
(4,088 Views)

Thanks much for the example code - it really helped me understand what you're saying! 👍

0 Kudos
Message 10 of 10
(4,083 Views)