NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you access station global teststand variables from your labwindows/CVI code?

Hi,

The same way you Set and Get from Locals or FileGlobals.


The snippit of code below sets a StationGlobals variable called "NumericValue" to some random number:

tsErrChk(TS_PropertySetValNumber(seqContextCVI, &errorInfo, "StationGlobals.NumericValue", 0, (10 * rand()) / RAND_MAX));


Hope this helps
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(4,430 Views)

Greetings,

How do i get the seqContextCVI or the Object handle. I am trying to read teststand station global variable from CVI.

Regards,

deen..

0 Kudos
Message 3 of 4
(4,155 Views)

Hi,

It depends what version of TestStand your are using, If its version 3.x or greater then just pass it as a parameter to you function.

Check out the Using the LabWindows/CVI with TestStand manual. Appendix B -4 is useful.

If its lower, one of the many examples in the TestStand examples folder should help

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 4
(4,152 Views)