11-23-2020 06:36 AM
Hi Forum
I am trying to extend the database scheme to save the relevant data in a flat structure in uut_result. For this purpose I save some data in locals during the test and try to add it to the table. Unfortunately this context local seems to be unavailable at processing time, I get the error message "Unknown variable or property name Locals.xyz".
Is there a way to access the content of the Locals.xyz during offline processing?
Thanks, Raphael
Solved! Go to Solution.
11-23-2020 08:15 AM - edited 11-23-2020 08:56 AM
Hi Raphael,
Well Locals are by nature... local to your test sequence...
Therefore if you build the report at the end of the test, well they are gone.
If the data you want to add are related to the UUT, the best way is to add your data into UUT.AdditionalData.
Otherwise, you can still use Additional Result step to feed your result list.
Then you'd have to dive into the result list at runtime (check for the accurate callback) to extract the data needed. And add them into a specific variable (can be local this time) that is linked to your DB schema.
Another way is to use persistant data accross executions : StationGlobals. I find this solution ugly, but hey what's in there will stay until overwritten... so it might work for your use case.
11-23-2020 08:39 AM
Hi CyGa
thanks for your explanation!
The issue with additional data is that I have to exclude it while processing the results into the database otherwise it fills my result database due to the database scheme. Can I still access data stored there even though I exclude it in the database options?
The station globals would work, but as you write it is ugly. And it would probably break the asynchronous nature of my results processing.
Thanks, Raphael
11-23-2020 09:25 AM - edited 11-23-2020 09:39 AM
Ok,
I see that you're using the parallel process model.
Something to test maybe is to us FileGlobals and to share them within your execution between sequence calls.
This way they would be available in your process model for your test socket entry point.
Then referring the file globals in your schema.
The other way would be to specialise your process model : you could add FileGlobals into your process model seq file, and write into it from your sequence file (RunState.Root.FileGlobals).
Then use the FG into your schema.
12-01-2020 07:45 AM
I tried adding the Data to the Additional Data with this Statement Step:
#NoValidation(Parameters.UUT.AdditionalData.SetValNumber("LimitCMUvoltageDelta",0,Locals.LimitCMUvoltageDelta))
unfortunately I get Error -17306. What is the correct path to add this item to?
12-01-2020 08:07 AM
I also tried another solution which seems to fit the parallel model, again no success and the same error as before:
#NoValidation(Parameters.ModelData.TestSockets[ThisContext.RunState.TestSockets.MyIndex].UUT.AdditionalData.SetValNumber("LimitCMUvoltageDelta",0,Locals.LimitCMUvoltageDelta))
https://forums.ni.com/t5/NI-TestStand/Additional-data-in-ModelData-Testsockets-0-UUT/td-p/3814747
12-04-2020 07:16 AM
The problem with writing the values was the missing container Parameters.UUT.
Since I created this manually I can write. Unfortunately reading the data from Parameters.UUT still fails. Where is this content copied to?
12-04-2020 09:24 AM
Where do you exactly store that variables ?
The parallel model has 2 entry points.
One for the 'controller' and one used by each test socket.
These are 'not' sharing their values.
From your test sequence, if you write into RunState.Root.Locals, you'll be able to write data into the Locals of your test socket entry point.
It'll then be available from all the callbacks related to that entry point using the same path (RunState.Root.Locals.xxx).
If you need to get your data into the controller entry point because you need them to be available from the callbacks trigger by this controller entry point, then you've got to go 1 step upper.
I can't try it myself now because I do not have access to TS right now, but If I remember well, if you attack RunState.Root.Root.Locals (some doubling the Root variable in your access path) you'll be able to write into the Locals of the controller entry point.
12-04-2020 10:35 AM - edited 12-04-2020 10:37 AM
Hello CyGa
the RunState.Root.Root.Locals.xy seems to be available at the time I do the offline processing. Thanks!
However, there seems to be a problem with the database connection, I will have to check on monday if it runs through.
Raphael
12-07-2020 02:59 AM - edited 12-07-2020 03:01 AM
Hello CyGa
unfortunately this also doesn't work:
Basically there are two problems masking the issue, if the database connection doesn't work the error reading the variable doesn't appear and the changes to the database scheme are not always applied before restarting the offline processing tool 2017 32bit.
Raphael