NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically modify PassFail DataSource

Solved!
Go to solution

Hello,

 

I add programmatically a PassFail Step to a TestStand sequence (4.0), but I don’t find the way to modify programmatically the parameters 'DataSource'.

 

If someone can help me, by advance thank you.

 

Romuald

0 Kudos
Message 1 of 5
(3,643 Views)

Step.DataSource = False  or Step.DataSource = True.  Put this in the pre or post expression.

 

Is there something specifically that you want to set it to?

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

I’m a beginner with testStand, maybe I 'm not in the good way.

 

I parse a file with testStand for create a new testStand sequence. I add to the new sequence a new step for compare the read value to an expected value.

 

I don’t find the way to programmatically modify DataSource, I would like to add for example: “Step.Result.PassFail=(Locals.readValue==Locals.ExpectedValue)”

 

I hope, my explanations are clear.

0 Kudos
Message 3 of 5
(3,640 Views)
Solution
Accepted by topic author Romuald123

You will most likely need to set it using the API.  Something like this:

 

Locals.PassFailStepReference.AsPropertyObject.SetValBoolean("Result.PassFail", 0, Evaluate(Locals.readValue == Locals.ExpectedValue))

 

Or just set your DataSource:

Locals.PassFailStepReference.AsPropertyObject.SetValBoolean("DataSource", 0, "Locals.readValue == Locals.ExpectedValue")

 

the second option might be a better option.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(3,632 Views)

Hello,

 

It works with SelValString.

 

Thank you for your help 🙂

 

Romuald

0 Kudos
Message 5 of 5
(3,624 Views)