LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

count dynamic signals

Hi,
 
I am using a DAQ Express VI to get back 6 AI and display them on a scope. The max number of signals on the scope is 4 and the user selects which ones are displayed.
 
Using the Automatic plot legend on the chart function is fine except when there are less than 4 signals and the legends for the final plots gets a bit random.
To work round this I was going to set the number of plots function input. To do this I want to count the number of plots on the dynamic data line into the scope. Any suggestions on how to do this?
Otherwise I could count sum of the outputs from the users boolean selector panel but I can't work out how to do this either!!!
 
Cheers,
Dan
0 Kudos
Message 1 of 4
(3,207 Views)
You could connect an array size function to the DDT signal line and you can get the number of plots in that DDT signal
0 Kudos
Message 2 of 4
(3,201 Views)

Thanks, knew there would be an easy way to count the array somwhere.

That works. but when I have the Plot Number set to 1 the Legend seems to default to 4 plot names. Not a major problem but looks a bit untidy, any ideas?

Thanks,

Daniel

0 Kudos
Message 3 of 4
(3,195 Views)


Daniel

Although it is possible to edit a variety of plot attributes, including whether the Legend is shown, you cannot resize the legend according to how many plots are being shown. You can tweak it slightly so that it does not display a plot name and that the legend displays a blank 'mini plot'. I have made these changes to the posted VI and reattached.

Hope this is of some use!

Best wishes

Rob


Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 4 of 4
(3,180 Views)