From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Strings from PreBatch to PreUUT?

Solved!
Go to solution

Hello everyone,

 

I am currently improving our test reports and I am working on adding the feature for users to add test notes before the execution of a test.

I have added this feature into the PreBatch subsequence because we use this to call a VI that we use to get the serial numbers.

 

Because I am adding the test notes to the UUT report header I have overriden the PreUUT Process Model callback to add the additional data and to set the include flag.

 

I have an issue however where the Test Notes string information doesn't seem to be getting copied and is instead showing up as  ' " ' .

Within the code module that we use to get the serial numbers and the test notes I output the String into a file global that I then include into my report under the Test Notes header.

 

Any ideas on why the string isn't showing and I only get this ' " ' ?

0 Kudos
Message 1 of 2
(1,896 Views)
Solution
Accepted by topic author Conor.

I figured it out.

 

Both the PreBatch and the PreUUT can see the ModelData property.

With a lot of help from a colleague I implemented the following code.

 

PreBatch Code

Statement (Add TestNotes Property)

Expression = Parameters.ModelData.BatchUUT.AdditionalData.SetValString("TestNotes",1,Locals.TestNotes)

 

PreUUT Code

If (PropertyExists("Parameters.ModelData.BatchUUT.AddiitonalData.TestNotes"))

       Statement (Populate Header)

          Expression = Parameters.UUT.AdditionalData.SetValString("TestNotes",PropOption_InsertIfMissing,Parameters.ModelData.GetValString("BatchUUT.AdditionalData.TestNotes",PropOption_NoOptions))

 

Statement (Include within Report)

Expression = Parameters.UUT.AdditionalData.SetFlags("",0,PropFlags_IncludeInReport)

 

 

I hope this helps whoever else comes across this problem 🙂

 

 

 

 

 

0 Kudos
Message 2 of 2
(1,881 Views)