NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the TS API to create Global Variable Containers.

I am trying to create a Station Global Variable Container with elements of different types, can someone please point me in the right direction with respect to the API.
 
Regards
 
Steve

Message Edited by SercoSteve on 03-07-2006 07:11 AM

There are 10 types of people in the world that understand binary, those that do and those that don't.
0 Kudos
Message 1 of 10
(6,142 Views)

Hi Steve,

  best example is actually the login logout section of the TestStand 2.0 style interface.

Teststand - Login.vi from the simple OI TestStand 2.0 style directory creates a new property object, and then adds in a couple of Booleans to that property object.

 

The next step would be to do an SetValVariant with the appropriate lookup and the InsertIfMissing option to pass it in one go.

Hope that helps

Sacha Emery National Instruments (UK)

 

Message Edited by SachaE on 03-08-2006 09:20 AM

// it takes almost no time to rate an answer Smiley Wink
Message 2 of 10
(6,129 Views)

Ooops - forgot - there's no InsertIfMissing option on the SetValVariant.

Back in a minute with something that'll work!!

Sacha

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 10
(6,116 Views)

Hiya - said I'd only be a minute....

SetPropertyObject works fine.

Code attached

Hope that helps

Sacha Emery National Instruments (UK)

Message Edited by SachaE on 03-08-2006 09:36 AM

// it takes almost no time to rate an answer Smiley Wink
Download All
Message 4 of 10
(6,115 Views)

Hi Sacha

That's full on, dude.

Cheers

Steve

There are 10 types of people in the world that understand binary, those that do and those that don't.
0 Kudos
Message 5 of 10
(6,108 Views)
Any idea how to do exactly the same in Teststand?
 
(To create a Station Global Variable Container programmatically within the Teststand environment?)
 
Attila
0 Kudos
Message 6 of 10
(5,613 Views)

Hi Attila,

Try using this example
Note this only runs under TS4.0 or greater
if your TS < 4.0 you have to use ActiveX step types

Greetings

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 7 of 10
(5,592 Views)

Juergen:

Your technique is very useful; thank you for the example.  But one thing I'm struggling with in trying to implement this technique it in my project:  One of my station globals uses several containers within a top level container.  I'm able to create single container with sub entries per your example, but am struggling with how to programmatically create/insert a container within a container?

 

-John M.

0 Kudos
Message 8 of 10
(4,849 Views)

Hi John,

 

Try this example

 

Hope this helps

 

Juergen

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

Thank you, Juergen.  With the benefit of having your original post to study, I managed to bang my head against the wall for long enough (before receiving your reply) to eventually sort out the correct logic/syntax.  I won't bother to post, as it's essentially identical to your response.  Both your reply and original post are very much appreciated. 

 

Sincerely,

-John

0 Kudos
Message 10 of 10
(4,818 Views)