NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

different file globals in each execution

Hello All

 

I am working on my first project in TestStand and am stuck with file globals. I have some VIs developed in LabVIEW. I wrote those VIs and built into a DLL file. All the VIs are set to be re-entrant with shared memory allocation.

 

In TestStand, I created a sequence "Run.seq" which has a parameter "IndexNumber" and in the File Globals is another "IndexNumber". I have a step where I write "FileGlobals.IndexNumber=Parameters.IndexNumber". I have a message pop-up here to show "FileGloblas.IndexNumber".

 

This Run.seq has multiple sub sequences, which correspond to each DLL function call. Each sub sequence will have the same FileGlobals as those in the Run.seq Main Sequence.  Here, in each sub sequence, I have a message pop-up to show "FileGlobals.IndexNumber"

 

In the Main Sequence of Run.seq, I use a LabVIEW DLL (this also has re-entrant VIs) that will use the Sequence Context and run a specififc sub sequence, as per some test setttings (read from a file, path of the file in Station Global).

 

I am calling this Run.seq 4 times, in another sequence file "Caller.seq" and set them to New Execution. My Sequence File Properties are set to 'Seperate File Globals for each Execution". I am not using any Process Model. I have set the Sequence Call settings to New Execution, Do not use Process model.

 

so, all the 4 executions should run the same test settings file but with different index numbers. Index number corresponds to device ID.

 

When I run the Caller.seq and pass different parameters to each execution, in the first pop-up, I get the Index Number as passed to the execution (0, 1, 2, 3 indices). In the second Index number, I get a shared value of the index number, common to all the 4 executions (always 3 or always 2).

 

When the File Globals are specific to each execution,why do get the a single FileGlobal value in all the 4 executions? I tried using RunState.SequenceFile.Data.FileGlobalDefaults but still the same result.

 

Each execution is getting a different parameter input and it is fine with it in the Main Sequence. When the sequecne call goes into the sub sequence, I get a single value instead of 4.

 

What I am doing wrong? Please help

 

Thank you.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 1 of 4
(3,459 Views)

It may be easier to help you if you could post a small example demonstrating the bahavior.  I wouldn't need your code modules. 

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(3,449 Views)

Hello

 

I have tried yesterday to create a replica... but I can re-create that behavior only when I use my DLL which calls the sub-sequences as required. When I do not use this DLL, how can I call the sub sequences and pass parameters to them?

 

The ActiveX adapter works and if I use that, my logic also works for parallel execution. The point is, I will then have to re create my entire LabVIEW module into TestStand, using this ActiveX adapter. So, I will be redoing my Block diagram, with its subvis, into TestStand.

 

I am trying to see if there is another way out..

 

But again, I will tryo to create an example and post today.

 

Thank you

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 3 of 4
(3,435 Views)

What do you mean by, "When I do not use this DLL, how can I call the sub sequences and pass parameters to them?" The normal way a sequence call works you can pass parameters to them. I'm not sure how you are calling a sequence from a dll either since the only way you could do that that I can think of is by creating an entirely new execution. Thus I think I am probably misunderstanding what you mean. Please explain in more detail.

 

One possibility, though I'm not even sure what you are asking so this might not apply, is that there is a sequence file properties setting for whether the file globals are shared between all executions. Maybe you accidentally enabled this setting?

 

-Doug

0 Kudos
Message 4 of 4
(3,418 Views)