ChnDiv

I'm putting the loop For to replace 1,2,3,..., but has the misfortune to call ChnDiv with the arguments.

Can you show me how to replace 1,2,3,... by variable based on the ChnDiv?

Thank you

Alexander.

Call ChnDiv ("[1] /In rpm", "[1] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",1,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[2] /In rpm", "[2] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",2,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[3] /In RPM", "[3] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",3,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[4] /In RPM", "[4] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",4,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[5] /In RPM", "[5] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",5,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[6] /In RPM", "[6] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",6,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Call ChnDiv ("[7] /In RPM", "[7] / Out rpm","/ Ratio") '... Y, Y1, E
Call ChnMove("[34]/Ratio",7,27) '... SourceChn, TargetGroupIndex, TargetChnIndex

Hi Alexander,.

Here's a way to do it:

FOR i = 1 to 7

NewChannel = ChnDiv ("[" & I & "] /In rpm", "[" & I & "] / Out rpm", "/ Ratio")

Call ChnMove (NewChannel, i, 27)

NEXT

Brad Turpin

Tiara Product Support Engineer
National Instruments

Tags: NI Software

Similar Questions

Maybe you are looking for