NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass a container to a remote sequence (TS 3.5)

I found out yesterday that you cannot pass a container by value to a sequence running on a remote TS server. Containers are only passed by reference. I am trying to pass a copy of a station globals container to the sequence on the remote computer so that that container doesn't have to be deployed to each remote server in the system everytime it gets changed. That's a maintenance nightmare. If I try to pass a reference to the station globals container I get an error when executing the remote sequence when it tries to access subproperties within the container. A variable scope issue I'm guessing.
 
1) How can I achieve what I explained above by passing something to the remote sequence?
 
2) Any other valid approach to do this?
 
Thanks
 
0 Kudos
Message 1 of 9
(4,832 Views)
Hi,
 
How are you trying the access the sub properties? What is the error you are getting?
 
Regard
Ray Farmer
 
 
Regards
Ray Farmer
0 Kudos
Message 2 of 9
(4,823 Views)
When you pass a container to a remote sequence, the remote sequence receives an object reference to that container. You can access the container properties using the TestStand ActiveX API. Also, you can use the TestStand API to serialize and then unserialize the container to create a copy of the container on the remote computer. Any changes made to that copy will not affect the original.
Message 3 of 9
(4,821 Views)

Freak,
How do you deploy the container?
Do you deploy the station globals file every time the station globals change?
Have you thought about using the property loader step type to update your station globals dynamically before executing your sequence?

Regards.

Antonio Lie.

0 Kudos
Message 4 of 9
(4,812 Views)
At the moment the system I am working on is still in development so I just copy the station globals file manually to all the remote teststand servers. It looks like the property loader would be a great way to get this done, since all the teststand stations can load these properties from the same file on a network drive, and it eliminates the need to pass around this station global.
 
Q: What callback(s) get executed on the remote server when a remote sequence call is executed from the client? I need to find the appropriate place to load those properties with the property loader before running the target sequence
 
Thanks

Message Edited by freak on 10-03-2007 06:56 AM

0 Kudos
Message 5 of 9
(4,797 Views)
freak,
 
You can add a property loader step to the setup step group of the sequence you execute remotely.
 
Hope it helps
 
Regards.
 
0 Kudos
Message 6 of 9
(4,756 Views)

Antonio,

I don't want to have put anything custom in the target remote sequence, because it is not transparent to the sequence developers, and it would be very difficult to maintain. Is there a place in the execution model that can be used instead?

Thanks

0 Kudos
Message 7 of 9
(4,756 Views)

Freak,

Remote execution does not use the process model, so you can not use model callbacks.
One possible solution for this problem would be the following:
1. On the remote system create a new sequence containing only a property loader.
    This sequence woul be on charge of loading the station globals dynamically.
2. On the local system you would have to call the sequence created in the previous step remotely, whenever you need to update the station globals.

Hope it helps.

Antonio Lie.

0 Kudos
Message 8 of 9
(4,743 Views)

Hello,

can you outline briefly, how I would use the TestStand ActiveX API to access or serialize/unserialize the container from an ActiveX reference? I have seen how it works with a SequenceContext, but not with an arbitrary container type.

 

Regards

Peter 

0 Kudos
Message 9 of 9
(4,053 Views)