02-22-2016 04:31 AM
Hi
can we use for loop to execute the code.
How channel names can be assigned to variable?
Call ChnConcat("[2]/[2]","[1]/[2]")
Call ChnConcat("[2]/[6]","[1]/[2]")
Call ChnConcat("[2]/[10]","[1]/[2]")
Call ChnConcat("[2]/[14]","[1]/[2]")
Call ChnConcat("[2]/[18]","[1]/[2]")
Solved! Go to Solution.
02-23-2016 05:54 AM
Hi sajessh,
try to use concatenate strings in the expression:
for i = 2 to 18 step 4
Call ChnConcat("[2]/[" & i & "]" ,"[1]/[2]")
Next
This should work.
02-23-2016 04:44 PM
Hi sajeesh,
I prefer to use channel objects rather than channel string references, like this:
Set Groups = Data.Root.ChannelGroups Set ToChannel = Groups(1).Channels(2) jMax = Groups(2).Count FOR j = 2 TO jMax Step 4 Set FromChannel = Groups(2).Channels(j) Call ChnConcat(FromChannel, ToChannel) NEXT ' j
Brad Turpin
DIAdem Product Support Engineer
National Instuments
02-23-2016 10:05 PM
Hi..
Thanks a lot....it works..fine