NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access FileGlobals out of an execution thread, for example from an ExpressVI configuration VI?

I am Using TestStand 3.1 and LabVIEW 7.1.1

I would like to change the contents of a global variable (FileGlobals)
from within the configuration window from my Express VI.

That seems to be a tough task, because when using an Express VI as a
step module and when configuring it, there isn't any SequenceContext
available yet. At the other Hand, there are well defined FileGlobals for
the sequence file, which can be seen and changed.

How do I access FileGlobals from such a configuration VI?

When I try to use a SequenceContext reference in this VI,
the following error comes up:

Code: 97
Source: Unknown System Error in TestStand - Get Property Value (Numeric Array).vi->Configure MyExpressVI.vi

Thanks a lot for your Help!

Best Regards,

- Caribe -
0 Kudos
Message 1 of 9
(4,135 Views)
Hi,

Basically, you can't. What you will have to do is create a standard VI from your expressVI. Then you can add the sequenceContext control and some activeX node function to beable to access the FileGlobals.

By opening the front panel of the ExpressVI you can create a VI, which you can then modify and save it out as your own VI.

See attached example. (only I have done is added the Sequence Context to the connector pane)

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 9
(4,132 Views)
Hello Ray,

I think you didn't understand my question.

Actually I have no problems in Acessing the SequenceContext object
from my ExpressVIs. I just have to pass the SequenceContext (through
the ThisContext reference) to the ExpressVI source VI. So the ExpressVI
has actually the "Sequece Context" in its Conector Pane.

So, when the ExpressVI is called by TestStand during sequence execution,
it is able to access the FileGlobals (or whatever other propriety from
the SequenceContext).

The Problem is how to access the FileGlobals while **configuring** the
ExpressVI, that will be executed as a Step Module. TestStand is running,
the sequence file is open, there are file globals defined, but there is
no execution at this point. Is it possible to access the FileGlobals
while configuring the ExpressVI tough? (step context menu - "Configure VI..."
option)

Thanks, maybe you can still help me?

Regards,

- Caribe -
0 Kudos
Message 3 of 9
(4,129 Views)
So you are creating an Express VI.

In your custom configuration dialog, you want to have access to access the FileGlobals from TestStand. You can't just pass them in because the VI that is being configured is not running. I think I've got it.

I have never done anything like this, but I have built Express VIs and I have done a tiny bit of work with TestStand.

One thing to keep in mind is that the configuration VI is running, however. I know that you don't have live data on the reference, but maybe you can obtain it in the configuration VI somehow? If I get a chance, I'll play around with it.

I hope that this helps a little,
Bob
Message 4 of 9
(4,118 Views)
Thanks Bob!

Yeah thats the idea! I am trying to comunicate
with TestStand and change some off-line global
variables from the configuration dialog box
of my ExpressVIs (which are used as step code-modules)

Thanks!

I ll keep on trying to solve this problem with
LabVIEW global variables maybe or using other
accesspoints to the TestStand API.

Regards,

- Caribe -

Test Engineer, Siemens AG
0 Kudos
Message 5 of 9
(4,115 Views)
Hi,

Sorry about that, just as I pressed the submit button, I reread the bottom part of your text and thought that I had probably misread your question.


I think you need to obtain the FileGlobals using the lookup string of

"RunState.SequenceFile.Data.FileGlobalDefaults.YouVariableName"

or maybe using

"RunState.InitialSelection.SelectedFile.Data.FileGlobalDefaults.YourVariableName"


Regards
Ray Farmer

Message Edited by Ray Farmer on 06-08-2005 06:20 PM

Regards
Ray Farmer
Message 6 of 9
(4,112 Views)
Hi,

Try this little example. I have created a steptype which doesn't do much but it has an Edit panel which will load the value of the FileGlobals.MyId and display on the front panel. you can change this value which will be passed back to the sequencefile when you press OK.

Regards
Ray Farmer
Regards
Ray Farmer
Message 7 of 9
(4,106 Views)
Hi,

I forgot to include incrementing RunState.SequenceFile.ChangeCount by one to indicate that the SequenceFile has changed so that when you close the sequence file you will be prompt to save the changes.

Regards
Ray Farmer
Regards
Ray Farmer
Message 8 of 9
(4,099 Views)
Thanks a lot Ray!

I will try your suggestion!
I think it will work in my case as well!

Nice day and regards,

- Caribe -
0 Kudos
Message 9 of 9
(4,084 Views)