LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I store real time data separately for each channel, and display on front panel for particular channel?

Hello,

 

I have single device with four different channels. I am receiving raw for all the channel through TCP/IP. I decode raw data, and I got channel number and cluster  (cluster contain three decimal values).

I have one class(Instrument) for single device, and four class(Channel) for each channel of device. One Channel class is dedicated to particular channel of device. 

 

which element do I need to use as container? 3D array, waveform chart, or anything else...


I want the functionality on front panel like below.

I have listbox. Listbox contain 4 different channel.  If user select channel 1, then waveform chart should display all the data of channel 1.  If user select the channel 2, then waveform chart should display all the data of channel 2 (remove the data of channel 1).

 

 

0 Kudos
Message 1 of 6
(3,434 Views)

A few options.

 

1.  Tab control.  4 different waveform charts one on each tab.  You can hide the tab control if you want if something else is supposed to change which is shown.

2.  4 different waveform charts all on same spot.  Use property nodes to hide 3 and make visible the one you want to show.

3.  1 waveform chart with all 4 plots.  Use property nodes to hide 3 plots and make visible the one plot you want to show.  Of course legend shows all 4, so you may not want the legend to show.

Message 2 of 6
(3,417 Views)

What about

 

  1. 1 waveform chart, 1 plot. Use the List box to choose which class/object you plot. I do not know anything about OO, so not sure if this is possible, but something analogous to using the listbox as the index in index array, or as the selector for a case structure.

mcduff

Message 3 of 6
(3,408 Views)

@mcduff wrote:

What about

 

  1. 1 waveform chart, 1 plot. Use the List box to choose which class/object you plot. I do not know anything about OO, so not sure if this is possible, but something analogous to using the listbox as the index in index array, or as the selector for a case structure.

mcduff


But waveform charts have histories, and they'd get jumbled between the channels as you write the different channel data at different times.  So you'd need to clear the history and rewrite the entire history.

 

I'd say forget about all I said before.  Just use a waveform graph.  Store the history for each channel in a shift register, and just write the  data for the selected channel to the graph.

Message 4 of 6
(3,380 Views)

Thank you   for direction. I would like to store the data inside the Channel class, and load the data on waveform chart w.r.t selection of channel (selected channel in list box).

Is it any element available in LabVIEW, which is work like shift register, and keep as private member of class?

Do you think below step will work? It just my idea. 

1) create array of cluster as private member of Channel Class.

2) on arrival of real time data, update the array using class method,

3) generate the notifier or User event for selected Channel only (selected channel; inside list box).

4) on received end of notifier or event update the Graph.

 

 

 

0 Kudos
Message 5 of 6
(3,369 Views)

Thank you   for direction. I would like to store the data inside the Channel class, and load the data on waveform chart w.r.t selection of channel (selected channel in list box).

Is it any element available in LabVIEW, which is work like shift register, and keep as private member of class?

Do you think below step will work? It just my idea. 

1) create array of cluster as private member of Channel Class.

2) on arrival of real time data, update the array using class method,

3) generate the notifier or User event with new value for selected channel; inside list box.

4) on received end of notifier or event update the waveform chart.

 

 

 

0 Kudos
Message 6 of 6
(3,368 Views)