NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Stationglobals in a Labview custom step type inside a new thread do not get updated

Hi,

 

I have a Custom Step type which I use to pass parameters to TestStand from a VI and vice-versa through some step fields. I run the VI inside a sequence in a new thread and expect the VI to update the parameters when I change them through the TestStand StationGlobals.

 

For example, I have a waveform injection custom step. I want to continuously inject a signal while I do some measurements on it. So, I put this step type in a sequence and ran it in a new thread. 

 

I pass the VI parameter 'Stop_Injection' through a step field as shown in image 1. And I expect the step field to get updated when the new thread is run continuously by passing the corresponding stationglobal in the Pre-expression of the custom step (image 2). But this fails to happen. The VI does not get updated.

 

On the other hand, if I do not bother with the step field and directly pass the stationglobal (figure 3), it works perfectly. 

 

Any idea why this is happening?

 

I hope I was clear in my question.

 

LabVIEW 8.6.1

TestStand 4.1.1

Message Edited by Changi on 08-06-2009 12:50 AM
Download All
0 Kudos
Message 1 of 3
(5,716 Views)

Hi,

 

In image 3 you are linked directly to the StationGlobal of which you are continually updating therefore seeing the changes.

 

In the other you are only linked to the Step.Stop_Injection and are only updating this valve from the stationglobals once in the pre-expression. You are not changing the reference.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(5,707 Views)

Thanks Ray. What you say is correct. The pre-expression will be evaluated only once.

 

I was attempting it this way to keep my step type generic. If end-user decides against having the VI I used and develops some of his own or uses another adapter, then all he has to do is map the step fields to the appropriate variables in his code.

 

But I guess I cannot do this separation (between TestStand code and LabVIEW) if I want dynamic updating of the VI parameters.

0 Kudos
Message 3 of 3
(5,697 Views)