10-04-2011 05:16 AM
Hi everyone,
My problem is to be able to modify the FileGlobals.NumberArray variable I have in sequence1.seq from another file kernel.seq which calls the sequence1.seq. during its execution.
In order to do that I made an object reference to the sequence1.seq in the kernel.seq :
FileGlobals.SequenceUser.ObjRef = RunState.Engine.GetSequenceFileEx(StationGlobals.ClientPath.User, GetSeqFile_NoOptions, ConflictHandler_Error)
My problem is that when i modify, for example the first byte of my array :
FileGlobals.SequenceUser.ObjRef.AsSequenceFile.FileGlobalsDefaultValues.SetValNumber("NumberArray[0]", 0, 0x17)
the array is well updated but it doesn't update the FileGlobals.NumberArray for the sequence1.seq
The only location where I find this modification is in the thisContext.StationGlobals.UserTestObjectRef.{referenced Object}.Data.FileGlobalDefaults.Number
have you guys any idea of how this could be done ?
Feel free to ask questions if my post isn't clear enough
10-04-2011 06:40 AM
If kernel calls sequence1 why don't you just use sequence1 parameters? It would be simple, and efficient. It's the right way to do it IMHO
10-04-2011 07:55 AM
Hi Rodéric,
First thanks for the reply.
Then your suggestion is very interesting but i don't think that it suits my needs.
Indeed, my Kernel.seq calls sequence1.seq but it is partial calls each time. The problem is that in order to use the sequence call parameters I need to modify my sequence1.seq file to use these given parameters ..?
My goal is to only modify the calling kernel sequence which must, during its execution, update several values in the called sequence.
Thanks for you help
10-04-2011 02:25 PM
So they have to communicate? meaning they run in parallel.
You may use a TestStand FIFO each message may contain the parameter name and the value (Locals.NUMERIC ; 45)
10-04-2011 02:59 PM
Not sure if its the right/best way to do it...
you could create a sequence in sequence1.seq to update the variables based upon parameters in it...
then call that UpdateVaraibles sequence one time from your kernsel.seq and just use statements to copy over the values... fileglobal.xyz = parameters.xyz....
10-05-2011 02:07 AM
Hi,
Using parameters for a subsequence is, IMO, a good idea. But a huge problem is that my sequence1.seq which is called by kernel.seq must not be modified. All the work to update the sequence1.seq FileGlobals must be done from the kernel.
And no change must be done to the sequence1.seq (except the FileGlobals.value that I need to update for the kernel.seq)
That is why it would have been great to use a reference object to that sequence1.seq as a sequenceFile to update Fileglobals variables.
The Queue suggestion is another good proposition. But it would mean that sequence1.seq must be modified to use the queue messages.