08-17-2010 06:39 AM
Hi!
I have idea to put a cluster which I created in LV (stored in *.ctl) to TestStand as a Station Global. Programmatically of course.
It should work like that:
1. Read from file path to my control
2. ***here's some magic***
3. My control is a Station Global
Is this even possible? I'm a rookie in TestStand, so please give me some advice!
08-26-2010 03:41 AM
Hi,
I've looked into that problem and there is Knowledge Base covering this topic.
Here is the link:
http://digital.ni.com/public.nsf/allkb/3237F79C267F92EF8625713B00818D6A
I hope this is what you needed.
Does it help?
Peter
08-26-2010 04:12 AM - edited 08-26-2010 04:13 AM
Hi,
Thanks for reply. I was trying to use that method but I failed. There is a method SetValVariant but I don't know how to use it (or how can I set my typedef cluster into newValue input).
At the beginning of my sequence I'm reading path to my typedef control from some config file. Then I want that control to became StationGlobal. I'm thinking about creating a VI that will parse that typedef to Variant and then send it to newValue input of SetValVariant method. Is it a good idea? Will it work? Correct me if I'm trying to do something impossible/stupid 🙂
The main idea is to create StationGlobals that may vary (depending on path of a typedef control) in each execution of sequence. If you have better ways to achieve that please let me know 🙂 I'm eager to learn about TestStand.
08-27-2010 07:08 AM
Hi Pitol,
I am afraid that you can not create a Station Global variable from a CTL file, which would be your custom control (typedef) created to be used in LabVIEW. The CTL file can not be used to create custom data types in TestStand. If you want to create a variable with custom data type under the Station Globals, you first need to create the custom type under TestStand (on the Types Palette for instance). Than create Station Global variable from the custom data type.
One way you could do it is to have the CTL as input or output in a dummy VI and by calling that VI you can create the custom data type in TestStand from the input/output parameters of the dummy VI. This works manually, I am not sure if is possible to do it programatically. BUT after that you will still have to create your variable in Station Globals.
Can you foresee all the types you might use in LV and Teststand? If yes than probably it would be simple to create the custom datatypes on the TS Typepalette, which is easy to transfer to other machines, by copying the MyTypes.ini file over.
Here is a link where you can see how to create custom datatypes under TestStand.
http://digital.ni.com/public.nsf/allkb/4177A3FDD3AB1F4286256BB3005B2C81?OpenDocument
I hope this helps.
Regards,
Barna D
National Instruments
08-27-2010 07:45 AM