NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

[TS 4.1] How to modify a FileGlobals Array of Numbers from another sequencefile ?

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

 

 

 

 

 

0 Kudos
Message 1 of 6
(3,354 Views)

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

 

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 2 of 6
(3,352 Views)

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

 

 

0 Kudos
Message 3 of 6
(3,347 Views)

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)

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 4 of 6
(3,332 Views)

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....

0 Kudos
Message 5 of 6
(3,328 Views)

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.

 

 

0 Kudos
Message 6 of 6
(3,317 Views)