NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

station globals enum type

Within TestStand (3.5), in the Station Globals, I have two questions
 
1) Once you create a field (say you make it a string), can you later change its type - if so, how?
 
2) Within one of my LabVIEW dialogs, I have an enum control that contains several options.  How do I map a LabVIEW enum into a TestStand station global type?
0 Kudos
Message 1 of 25
(4,189 Views)

Hi,

The answer to part 1

Yes. Hightlight the item to change, then select Replace Global, then you can select what to replace it with.  If the item was in a Container, then It will say Replace Field.

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 25
(4,182 Views)
Hi,
 
Answer to Part 2
 
You could do a number of ways.
 
1) Pass the number.of the enum
 
2) Pass a String then do a Search ID Array on Strings[] (which is a Property of the Enum control)to obtain the index then get the required value.
 
3) You could hold the array of Strings containing your valid Enums texts, pass this and pass the index, setup the enum in LabVIEW etc
 
and so on
 
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 3 of 25
(4,179 Views)

Hi,

I forgot to say, if you are passing a Constant, then you can select the Enum from the the drop down control in the Specify module Dialog.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 25
(4,177 Views)
I'm not seeing the Replace Global option.
0 Kudos
Message 5 of 25
(4,174 Views)
I'm not having very good success with your suggestions.   To clarify my problem, I have in my stationglobals.ini a def of
[Globals.ATEReg]
WorkCenter = ""
 
The first time around, if I try to read the value of WorkCenter, it should be "".  I'll place a "" in the WorkCenter control.  Then, the operator may chose from two possible enums (drop down), "MYWC" or "YOURWC".  After all other control edits are made, I'll write the new values (found in the controls) back to the .ini file.  That's how it's supposed to work.
 
Getting it to do that has not  been easy.  I have a TestStand - Get Property Value.vi that I pass a lookup string of "StationGlobals.ATEReg.WorkCenter".  I then create a property node with at Value listed so I can write to it.  However, LabVIEW won't let me connect the Value output of the TestStand GetPropertyValue to the Value pin (I made it a write) of the WorkCenter control's Property Node.
 
The type of the TestStand output is String.
0 Kudos
Message 6 of 25
(4,175 Views)

The "value" of an enum is not a string! The default data type of an enum is a U16 number. Just look at the terminal on the block diagram. Strings terminals are red and numeric terminals are blue. You would have to use the Strings[] property of an enum to do what you want. The easiest thing for you do is to use a combo box. The value of a combo box is a string. You might want to look into taking some LabVIEW classes. Information on those and on-line tutorials can be found at http://www.ni.com/devzone/lvzone/fundamentals.htm .

Message Edited by Dennis Knutson on 06-07-2006 01:33 PM

0 Kudos
Message 7 of 25
(4,171 Views)

Hi,

Your not having much success because it sounds like you are looking in the actual ini file. You need to be doing the action I discribed from the SeqEditor.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 25
(4,165 Views)
I am in the TestStand Sequence Editor.  I'm viewing the Station Globals, but I don't see the Replace Global you speak of.
0 Kudos
Message 9 of 25
(4,164 Views)

Ok,

Select a variable and then click left mouse button. you should see the Replace selection.

see attachec PNG's.

Regards

Ray Farmer

Message Edited by Ray Farmer on 06-07-2006 09:34 PM

Regards
Ray Farmer
Download All
0 Kudos
Message 10 of 25
(4,166 Views)