LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically adding signals in graph

Hi, 

 

I am creating an application which is going to acquire signals from user specified number of channels and going to display on user specified display type (Graph or Dial). I am going to create(by making visible) as many dials as user defined and going to display the signal.

 

But for Graph display, we have only one graph at the same time it should display the user defined number of signals. Suggest me how to add signals in the graph programatically.

 

Thanks

0 Kudos
Message 1 of 5
(2,736 Views)
Just use an array and feed the array of signals to the graph. See the examples that ship with LabVIEW on how to use graphs.
0 Kudos
Message 2 of 5
(2,720 Views)

Thank you. still I am not getting the point.

 

I have attached a simple vi to make my question clear. It consists of table with fields as signals and display. both are user configurable. the signals may be from physical channels.

 

how to write a generic code such a way that, if the user configures only one signal with graph display, then it should display one signal. if the user configures 10 signals with graph display, then it should display 10 signals.

 

Expecting suggestions .........Thanks 

 

 

 

0 Kudos
Message 3 of 5
(2,672 Views)

Ugh. You're using Express VIs... Ugh.

 

Well, in this case it's a bit more work. There's more than one way to do this, but I would suggest using the technique used in the "Select Signals" example that ships with LabVIEW. Open the Example Finder (Help -> Find Examples). Change to the search tab and enter "select" in the search field. The example should be the first one there. In this example an array of Booleans is used to select which signals to graph. You can accomplish the same thing by generating the array of Booleans from your table. All you need to do is compare the text to the word "Graph", as in the following:

 

0 Kudos
Message 4 of 5
(2,658 Views)
And I would recomend that you drop the Express VIs and use the lower level functions. If you are acquiring signals with a DAQ board, then you can easily add/remove channels in a physical channel control and no matter what, you always get a 1D array of waveforms. This is much simpler to manipulate than the stupid dynamic data type. Once you get beyond the simplest sort of task, you really don't gain anything by using Express VIs and you often end up doing more work.
0 Kudos
Message 5 of 5
(2,651 Views)