NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequential Model: Locals.BatchSerialNumber in ReportOptions callback

Solved!
Go to solution

Hello I am using Teststand 2010 f1

 

I have configured my report options for logging with an expression:

"P:\\Data_Log\\<FileYear>\\<ClientFileName>\\" +  Locals.UUT.BatchSerialNumber + "\\<UUT>[<FileDate>][<FileTime>].<FileExtension>"

In the PreUUTLoop callback I open a dialog for the user that records the Batch nr (RunState.Root.Locals.UUT.BatchSerialNumber = Step.Result.Response)

 

This works all fine on my machine, but I want to run this test on operator versions.

Since there are also a lot of other tests running I want to be sure that all report options are set correctly.

 

So I added the ReportOptions callback.

I ran a copy of the sequence with a breakpoint.

And I copied all of the report options from "RunState.Root.Locals.ReportOptions" to the callback's parameters (Parameters.ReportOptions)

 

However, when the sequence analizes it gives as error:

Invalid Escape Sequence in expression: "P:\\Data_Log\\<FileYear>\\<ClientFileName>\\" +  Locals.UUT.BatchSerialNumber + "\\<UUT>[<FileDate>][<FileTime>].<FileExtension>"

Expressions must evaluate to a value of the expected type      Unknown variable or property name Locals.UUT

 

Note for Teststand developers: integrate a "copy error message" function Like visual studio, etc have. It is better for my keyboard...

 

When I change Locals.UUT.BatchSerialNumber in RunState.Root.Locals.UUT.BatchSerialNumber the last error dissapears.

 

Both of them are not available in the ReportOptions callback so that is probably the reason of my errors.

 

Can anyone help me to fix this problem?

0 Kudos
Message 1 of 15
(4,198 Views)

Is there no one who knows a solution to my problem?

Or a good direction to look at?

0 Kudos
Message 2 of 15
(4,164 Views)

why are you using Locals.UUT.BatchSerialNumber when <UUT> will be converted to the UUT serial number.

Regards
Ray Farmer
0 Kudos
Message 3 of 15
(4,159 Views)

Probably I wasn't clear enough in the first post...

I am using both the serial number and the batch (Order) number.

In our situation the easiest way to track problems is with the order number.

Besides that we want to identify each panel with their unique serial number.

 

I like the sequential model best for my test, so I use this model.

 

The strange thing however is when i set the expression above in the report options dialog, there is no problem (Locals.UUT.BatchSerialNumber is also available)

but when I set this expression in the report options callback (sequence), it does NOT work (Locals.UUT.BatchSerialNumber can not be found).

<BATCH> does not work in both options because of the model.

0 Kudos
Message 4 of 15
(4,150 Views)

Sorry, I missed read your original post

Regards
Ray Farmer
0 Kudos
Message 5 of 15
(4,145 Views)

But you dont have a clue how I can solve this problem?

Mostly you do.....

0 Kudos
Message 6 of 15
(4,134 Views)

You seem a bit rude.

 

I believe there is an option to switch this error check off but I dont have Sequence Analyzer available to me so I can not help you.

A similar error condition has been reported before on the forum so do a searh for Analyzer in the TestStand forum and see what comes up.

 

 

Regards
Ray Farmer
0 Kudos
Message 7 of 15
(4,130 Views)

First of all: it was not my intend to be rude.
I have to admit that when I read back my previous posts it appears so...
As far as I have seen on the forums you give very helpful answers.
The last thing I want to be, is rude to a big helper.

You can turn on "Do not analyze sequence files before running", but I want to leave that off if possible.
I checked and PreUUTLoop is called before ReportOptions, so the variable is set before it is read in the path.

As (temporary) solution I changed the ordernr(batchnr) to a fileglobal (FileGlobals.OrderNumber) and now I can run my sequence.
The ReportOptions callback is called, but the parameters are not taken over.
I saw somewhere that you schould copy over the runtime version of reportoptions with the one in the callback.
I made a statement with: RunState.Root.Locals.Parameters.ReportOptions = Parameters.ReportOptions
But this trows an error: variable or property types do not match or are not compatible.

I generated the ReportOptions callback in the same TestStand as I am using now, what am I doing wrong?

0 Kudos
Message 8 of 15
(4,122 Views)

Hi,

 

Have you included the ReportOptions Sequence in your top level sequence file so that it overrides the one in the process model.

 

If you have then all you have to do is setup Parameter.ReportOptions in the ReportOptions sequence for the condition you require. Then when ReportOptions returns It will return with your setup as Parameter.ReportOptions is set as 'By Reference' so the information is passed back into the Process Model sequence.

 

It's late now but I'll try an do you an example tomorrow. There is an example of using the ReportOptions in the TestStand Example folder if that helps to understand the principle.

 

 

 

 

Regards
Ray Farmer
0 Kudos
Message 9 of 15
(4,116 Views)

Hi,

 

If you can, can you post an example of what you are trying to do.

 

 

Regards
Ray Farmer
0 Kudos
Message 10 of 15
(4,114 Views)