NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to execute the conditon one after the other

hi,

 

I would like to know the solution to execute conditons one after the another

 

Ex..

 

Set local Variable a = "XXX"

{

   .....

    .......

    ............

}

 

Set local Variable a = "YYY"

{

   .....

    .......

    ............

}

 

Set local Variable a = "ZZZ"

{

   .....

    .......

    ............

}

 

How to execute all the 3 conditions using same local varibale (with different values) should execute in order  i.e. one after the other. Please let me know.

 

thanks,

chethan

0 Kudos
Message 1 of 3
(3,020 Views)

Hey chethan,

 

Not quite sure I follow what you are going for here.

 

You can just use 3 statement steps and for each step just set your variable with an expression in each.

 

Or in a single expression you can separate each expression with a comma.  They will then execute sequentially.

 

For instance:

 

Locals.a = "XXX", Locals.a = "YYY", Locals.a = "ZZZ"

 

I don't understand your brackets and .... in the example of your post.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(3,017 Views)

Assuming you want to execute different steps...

 

Use statement step type - locals.a= xxx

step 1

step 2 

step 3....

 

Use statement step - locals.a=yyy

step4

step 5

step 6..

 

Use statement step - locals.a = zzz

step 7

step 8

step 9

 

However if your step is common then you can do this :

Create a array a[3] -- fill with xxx, yyy and zzz in that order

 

Use for each ( iterate over array a)   ( refer examples of how to use for each )

{

step 1

step 2 

step 3....

 

}

Message 3 of 3
(3,000 Views)