07-21-2016 11:58 AM
Uperbound*
07-22-2016 09:30 AM
hey,
you could do something like this:
dim group
dim channel
for each group in Data.Root.ChannelGroups
for each channel in group.Channels
Call Area.DisplayObj.Curves2D.Add("[1]/Time",group.Name&"/"&channel.name)
next
next
07-22-2016 09:47 AM
That did not work, I would prefer to just have a wild card for the number in the for section. like for i = 1 to -1 or something like that.
07-25-2016 08:17 AM
for i = 1 to Data.Root.ChannelGroups.Count
07-25-2016 08:28 AM
Thank you , I tried:
For i = 1 to GroupCount and that seems to be working.
08-08-2016 06:41 AM
Is there any way to make these channels wild card?
For i = 1 To GroupCount
Call Area.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B1COH0")
Call Area3.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B1THC0")
Call Area3a.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B1NOx0"
Like B1NOx* or &B1Nox&
I have analyzers in different positions, so they would not always be in position 0.
Thank you in advance.
08-08-2016 01:39 PM
Hi REX,
You can use the "*" symbol anywhere in the channel path to allow wildcard matching. DIAdem will display the first channel it finds that satisfies your wildcarded channel path.
Call Area.DisplayObj.Curves2D.Add("[1]/Timesec","*/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B1COH*")
Call Area3.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B*THC*")
Call Area3a.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/*B1NOx*"
This feature was not always in DIAdem, so if you have a particularly old DIAdem version you will not be able to use wildcard characters (* or ?) in the channel path.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-09-2016 06:02 AM
We use 2014 version, and it does not seem to work, is there a particular version we would need?
Thank you.
08-09-2016 11:12 AM
Hi REX,
I'm sorry, the wildcarding I described only works directly in a REPORT layout. I didn't notice that your script had an "Area" parent object, which means you're wanting to do this in VIEW. In this case, you'll need to apply the wildcards in two steps: first find the channel, then assign that channel to the VIEW Area graph:
Set Channel1 = Data.GetChannel("*/U_FREXG")
Set Channel2 = Data.GetChannel("["&i&"]/B1COH*")
Set Channel3 = Data.GetChannel("["&i&"]/B*THC*")
Set Channel4 = Data.GetChannel("["&i&"]/*B1NOx*")
Call Area1.DisplayObj.Curves2D.Add("[1]/Timesec", Channel1.GetReference(eRefTypeIndexName))
Call Area2.DisplayObj.Curves2D.Add("[1]/Timesec", Channel2.GetReference(eRefTypeIndexName))
Call Area3.DisplayObj.Curves2D.Add("[1]/Timesec", Channel3.GetReference(eRefTypeIndexName))
Call Area4.DisplayObj.Curves2D.Add("[1]/Timesec", Channel4.GetReference(eRefTypeIndexName))
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-09-2016 12:41 PM
Thank you, I appreciate your help.