LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting Array of clusters

Solved!
Go to solution

I am trying to graph data from an array of clusters. It is a 1D array with N clusters of 3 elements. Attached is a minimal working example.

Each case structure denotes channels 1,2,3,4,9 which creates a cluster of 3 elements. And this is iterated over N=5 times as shown in the Master For loop. I need the data generated from each case structures to be appended to the plot. Whereas now with my code, it is appending data collectively from all case structures 5 times; which is wrong.

 

Each channel data (containing 3 elements) should be plot over 5 iterations, and since there are 5 channels with 3 elements in each channel the total # of plots should be 15. How can I plot them in a single graph ( later I will add boolean logic to hide/show each channel data because 15 line plots in single graph is a lot)

2019-04-01_19-48-22.png

NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
0 Kudos
Message 1 of 5
(3,661 Views)
Solution
Accepted by topic author asukumari

 

Correct me if I am wrong. 

 

You have 5 channels with 3 signals in each channel. You acquire 5 times, so in the graph You want to see 15 graphs: channel1.signal1, channel1.signal2, channel1.signal3, channel2.signal1, ...

 

You can do it using shift registers and in-place-element in Your secondary loop.

 

Colect dataColect dataPrepare graphPrepare graphInterfaceInterface

Message 2 of 5
(3,620 Views)

@asukumari wrote:

( later I will add boolean logic to hide/show each channel data because 15 line plots in single graph is a lot)


Simply put all data in the plot, and let the plot show\hide them. Either from your code, or let the user select the visible plots...

0 Kudos
Message 3 of 5
(3,618 Views)
Ok I think that's the way to implement it then. Thank you!
NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
0 Kudos
Message 4 of 5
(3,582 Views)
This really is such an awesome code! Thanks!
NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
0 Kudos
Message 5 of 5
(3,582 Views)