NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Tasks to FileGlobals

Hi

I have a problem by passing an Array of DAQmx_Tasks into the FileGlobals. I tried it by using the StepParameter to pass the array in FileGlobals but my Variable in FileGlobals is alwasy empty.
Passing an Array of DAQmx_Tasks into the StationGlobals is no problem. I dont know is there a problem by passing tasks into FileGlobals in TS 4.0?
Has anyone an approach to avoid this problem?

Regards

Matthias Kubli
_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
0 Kudos
Message 1 of 10
(4,685 Views)

Hi Mathias,

can you post a small example of your code ?

greetings

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 10
(4,669 Views)

Hi,

A couple of things about FileGlobals.

1. The contents within a FileGlobals is only valid during the execution of the sequence(s).
2. They are only in-scope to those items within the same sequencefile, unless you are using Parallel or Batch Process Models and have set the SequenceFile property to use the same FileGlobals.

Therefore, providing you bear these points in mind, then how you pass data to FileGlobals is the same way how you pass data to StationGlobals, is the same way as for Locals and Parameters.

Now if its the Static value of a FileGlobal then you need to use FileGlobalDefaults not FileGlobals.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 10
(4,657 Views)
Hello, thanks for quick replies

I've created a small example to pass Tasks into TestStand FileGlobals. Pass data to FileGlobals failed but pass the same data in StationGlobals in this way is no problem.

TS 4.0, LV 8.5

Thanks
_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
Download All
0 Kudos
Message 4 of 10
(4,646 Views)
What exactly is not working?  The code looks fine to me.

Allen P.
NI
0 Kudos
Message 5 of 10
(4,636 Views)
Hi Allen
 
after i called this teststep to pass the array of Task from my VI to FileGlobals in TestStand. The FileGlobals is always empty. I have no values in my FileGlobals.Tasks after this step.
 
Regards
 
Matthias Kubli
_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
0 Kudos
Message 6 of 10
(4,634 Views)
Are you setting a breakpoint or are you looking at the Edit Time copy of the Sequence after the sequence is done executing.  I don't have NI-DAQ installed on my machine, so I cannot run the code.  The value of a FileGlobal does not persist after a sequence is done executing.

Allen P.
NI
0 Kudos
Message 7 of 10
(4,630 Views)
Hi

sorry i'ts my failure. I thought I can show all the variables after the sequence executed! I was definately wrong!
With a Breakpoint while executing I can see my FileGlobals.

Thanks for the quick answers
Matthias Kubli
_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
0 Kudos
Message 8 of 10
(4,627 Views)

Hi,

If you want the static version of the FileGlobals to contain your values then try in your Post Expression of your step the following example

RunState.InitialSelection.SelectedFile.Data.FileGlobalDefaults.Tasks = FileGlobals.Tasks

Now when the sequence finishes you will see the values in you FileGlobals at Edit time.

Regards

Ray Farmer

Regards
Ray Farmer
Message 9 of 10
(4,615 Views)

Hi Ray,

Thats an amazing hint !
It's time to pass some stars on.

Greetings

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 10 of 10
(4,605 Views)