From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display two signals from arrays in different speed

I would like to display two different signals in the same chart. Until now I displayed one signal by calling the values of an array in a specific frequency to simulate a real time signal like it could be acquired from a DAQ. So the chart displays a running signal. In addition I would like to display onther signal out of an array that contains the thresholds for the running signal. The whole threshold-signal should be displayed instantaniously, so I can observe the running signal compared to the whole threshold-signal. I already tried to use the merge signal and bundle functions but it didn't work at all. It seems like there is also a problem with die dimension of the arrays, because by calling single values out of the running signal array it is 1D and the threshold signal array, which should display completely, is a 2D array.

 

I would be happy to read your ideas about that.

 

Attached is a picture of what I've got so far and what I want to achieve.

 

Signal.PNG

0 Kudos
Message 1 of 14
(4,118 Views)

I don't think you can use a chart for what you want because charts just take one value at a time and keep a history of them, so I don't think there's really a good way to graph a lot of values at once onto a chart like you want to for your threshold signal. You should probably use an xy graph or a waveform graph. If your samples are all taken at uniform time intervals then use a waveform graph, if the timing is not uniform then use an xy graph.

 

Here, I tried doing a little example (attached) of how you might put the two signals together for both an xy graph or a waveform graph. I think my examples are probably pretty inefficient because they build a new array every loop iteration, but I'm not sure of a better way to do it. You might try tinkering around with them and see if you can figure out something better.

 

--Hope

0 Kudos
Message 2 of 14
(4,085 Views)

Thank you prettypwnie,

 

I tried your solutions but it seems like they dont work in my case. The source of both signals (Thresholds and Running) are arrays. The Threshold array has lets say 100 values that define the signal I want to display immediately. The running signal array only contains 1 value that is updated every second and defines the trend of the signal. I think the threshold array could also be converted into a cluster if needed. neither a Waveform Graph nor a XY Graph are able to display the signals after I bundling them. I always get broken wires.

 

Right now I would also be statisfied with displaying the threshold signal in the same speed like the running signal but even that doesn't work. Displaying both signals on their own works but bundle them always leads to a broken wire to a graph.

 

I am sorry if I am up a blind alley, LabVIEW is pretty new to me.

0 Kudos
Message 3 of 14
(4,050 Views)
Can you post the code of what you tried so I can see what doesn't work about it?
0 Kudos
Message 4 of 14
(4,042 Views)

For example this should display both signals, threshold and running, at the same time. It is no problem to display them own their own like this with a waveform chart, but when I bundle them nothing works.

 

Bundle.PNG

0 Kudos
Message 5 of 14
(4,040 Views)

Using a waveform graph instead of a XY graph leads to a not broken wire but the graph doesnt display anything. Its like It is displaying only one point and not the history I think.

0 Kudos
Message 6 of 14
(4,037 Views)

The Nugget "Sporatic Wavefrom..." by Crossrulz found here.

 

That may be helpful.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 14
(4,022 Views)
My example shows all the points on both a waveform and an xy graph so I'm not sure what you're doing wrong when you try to incorporate it into your code. My only guess right now is maybe one of your tunnels is auto-indexing that shouldn't be and maybe that's why you're only getting one point. But that's just a guess. If you post your code I can help more.
0 Kudos
Message 8 of 14
(4,017 Views)

I posted the code of what I tried after reviewig your examples above

0 Kudos
Message 9 of 14
(4,000 Views)

Here is another try to display at least one running signal in a Waveform graph. The Graph is not showing a signal. The X and Y Axis are autoautoadjusting but no graph is displayed.

 

thres2.PNG

0 Kudos
Message 10 of 14
(3,994 Views)