NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple numeric test with cluster from labview?

Solved!
Go to solution

Is it possible to make a multiple numeric limit test with the values from a cluster from a labview vi?

0 Kudos
Message 1 of 8
(4,726 Views)
Solution
Accepted by Alteschwed

As it is called "Multiple Numeric Limit" step, the data has to be numeric. So the cluster already contains only numeric fields.

Given that, i would cast the cluster within the module to an array (Cluster to Array). The disadvantage of this is that all fields in the array share the data type, so all are double or single or I32, ....

Other solutions won't work with the default step type, but you could create your own step type to accept a cluster similar to the Multiple Numeric, which only accepts an array.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(4,724 Views)

This can be done with a little work.
The first step is to get the cluster's data back in to TestStand's memory space as you would do normally.
Then you either use post expressions (since you're at a point in time between the test code module completing and the status evaluation) to move the pertinent parts in to the data source for the step (usually step.numericarray) or...
https://www.ni.com/docs/en-US/bundle/teststand/page/multiple-numeric-limit-test-step-type.html
And
https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/tsref/multiple-numeric-limit-test-...
Use the 'specify data source for each measurement''.
I'm not in front of a computer with TestStand right now to knock up an example but it should be pretty straight forward.
Either method should allow you to work with a mixed cluster of data types and just evaluate on the numeric ones.
Thanks
Sacha

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 8
(4,705 Views)

what kind of cluster is it?

cc

0 Kudos
Message 4 of 8
(4,700 Views)

Hello all

 

Thanks for your advices. But im sorry last days i could not continou to work on this project i had to do other work. But as soon as possible i ll try the solution.

The cluster is just with numeric values. And what i dont like with the cluster to array solution is that i lose the names of the values.

 

I ll write again here next week to reply when i could try.

 

Greets

 

Christoph

0 Kudos
Message 5 of 8
(4,673 Views)

Christoph,

 

in TS, you can provide names for each field of an array. This, of course, is rather static and does not adopt to LV "cluster to array" elements.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(4,627 Views)

Hello Guys thanks it s solved now. Cluster to array solution. But one problem i still have. How i can write my 7 array values whitch i have now in TS  to 7 local variables? It s for the end of the test to write all measurements of the complete test in a csv.

0 Kudos
Message 7 of 8
(4,567 Views)

 

Hello again.

 

I think it s solved with this.

 

https://forums.ni.com/t5/NI-TestStand/using-post-expression-to-copy-more-than-one-local-variables/m-...

 

 

Cheers Guys

 

Christoph

 

 

0 Kudos
Message 8 of 8
(4,559 Views)