NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add to Multiple Numeric Limit Test from code

How can I add tests to Adding to Multiple Numeric Limit Test from code using CVI code?
 
0 Kudos
Message 1 of 9
(4,983 Views)
You'll need to configure the test type as NI_MultipleNumericLimitTest, # of result and limits for each result.
 
The code below set result[0..3]
 
 TS_PropertySetValNumber(td->seqContextCVI, 0, "Step.NumericArray[0]", 0, 10.0);
 TS_PropertySetValNumber(td->seqContextCVI, 0, "Step.NumericArray[1]", 0, 20.0);
 TS_PropertySetValNumber(td->seqContextCVI, 0, "Step.NumericArray[2]", 0, 30.0); 
 TS_PropertySetValNumber(td->seqContextCVI, 0, "Step.NumericArray[3]", 0, 40.0);  
 
0 Kudos
Message 2 of 9
(4,972 Views)
I'm not sure how Step.NumericArray relates, but
 
I already have:
 
TS_PropertySetValNumber (seqContextCVI, NULL,
                         "RunState.Sequence.Main.[\"Test Summary\"].Result.Measurement.[\"Measurement 1\"].Limits.Low",
                         0, -95); 
 
Which lets me set individual properties.

 

Measurement is an array of structures and I want to insert additional elements(through code). How can I do this?

0 Kudos
Message 3 of 9
(4,970 Views)

I found that  

TS_PropertySetDimensions (seqContextCVI, NULL, "RunState.Sequence.Main.[\"Test Summary\"].Result.Measurement", 0, "[0]", "[5]")

lets me specify the number of tests to evaluate, but I still do not know how to set the names of each one. 

 

 

0 Kudos
Message 4 of 9
(4,967 Views)
I figured out how to add items, but the one thing that is missing is the numeric format for each measurement. I cannot find it in the sequence context. Do you know if and where it is located in the sequence context?
0 Kudos
Message 5 of 9
(4,960 Views)
0 Kudos
Message 6 of 9
(4,952 Views)
I think I figured everything out now. I'll reopen this if I need further assistance in the future. THanks.
0 Kudos
Message 7 of 9
(4,949 Views)

Hi

I have the similar requirement. I need to change the "Result.Masurement"'s  dimension at run-time and then change the limits, units and comp type. I wrote a LabVIEW VI to automatically do this at run time. it works. But the numeric results are not pupulated to "Result.Measurement[n].Data" property after the step executes.

TS_PropertySetDimensions (seqContextCVI, NULL, "RunState.Sequence.Main.[\"Test Summary\"].Result.Measurement", 0, "[0]", "[5]") . I used the similar command to set the dimensions in LabVIEW. Do I miss anything?

Thx

Abdulla

 

0 Kudos
Message 8 of 9
(4,656 Views)

Hi Abdulla,

In this Thread there is an example
http://forums.ni.com/ni/board/message?board.id=330&thread.id=18374

Hope this helps,

Greetings

juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 9 of 9
(4,651 Views)