08-22-2016 12:17 AM - edited 08-22-2016 12:18 AM
I'm running tests that last around 30 sec / DUT and stores data to a database using a user defined schema. When the (external) SQL DB server sometimes makes a hick-up / no connection, then teststand reports a runtime error (An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'). - see also post forums.ni.com/t5/NI-TestStand/An-error-occurred-calling-LogResults-in-ITSDBLog-of-zNI/td-p/3240276" which describes the same issue
How would I go around setting up teststand to automatically retry the write? Maybe with a dialog to the user where he can press 'retry' or 'stop'. It woul dprobably be something with resetting the reference (RunState.Root.RunState.Execution.TSDatabaseLoggingDatalinkxxxxxxxx) and then calling ITSDBLOG again. Or could the offline results processing do it instead? It doesn't matter if the writing of the data is some minutes delayed.
08-22-2016 01:25 PM
If it's fine to delay the logging then offline results processing is the way to go. This will give you better execution performance since you delay results processing.
If you have to reconnect automatically, the LogToDatabase callback is where you should look at implementing what was mentioned in the forum post you pointed out. One potential way would be to check for an error on the "Log Results to Database" step and handle it by reconnecting and retrying (you could also include a popup like you mentioned).
Generally, I would recommend going with the offline results processing because it's 1. Faster, and 2. Not an internal implementation.
-Trent
08-22-2016 02:09 PM
Thank you very much for the advice on the offline results processing. This looks to be almost perfect for my situation.
A couple of questions:
1) is it possible for the offline results processing utility to retry processing failed items in inbox? I tried to unplug the network for some minutes - new results generated after the network was plugged in again processes fine - but the results that failed because of the network outage does not retry automatically. I have to manually select "process" on these items in the inbox. This could leave some results for weeks in the inboxes on the different test stations - until someone checks the processing utility and finds them in the inbox.
2) Is it possible to get a status back from the offline results processing utility which I could show on my operator panel - that the utility is runnng and how many items there are in the inbox?
3) Can the TSR filenames be altered in any way? The path is very long and I don't need a lot of the information. Besides, I have chosen to store only one UUT before creating a new TSR offline file - so I would like to have the part and serial numbers in it (the serial numbers are generated while running the test sequence based on things in the UUT)
08-22-2016 04:49 PM - last edited on 10-20-2024 05:33 PM by Content Cleaner
Not sure if this is exactly what you're looking for, but hopefully it's some help:
-Trent
08-29-2016 09:17 AM
Thank you very much for your help!
My projects typically have a specialized process model (based on the parallel model) set up as default in station options in labview. I use SequenceFileLoad / Unload to initialize instruments, set up system things, etc. When starting the offline utility, I can see that it also runs the processmodel - reinitializing the instruments, thus invalidating all references etc.
If I instead specify the processmodel in my main sequence file that the test system uses, the processmodel does not start for the offline utility - but then my Operator Interface does not work either. So I'm looking for a way to disable the start of SequenceFileLoad when starting the offiline utility. Do you know of a way to accomplish this?
Using the IsEditor property will not work because I switch between the sequence editor (for debugging) and the Operator Interface (for the production people)
08-30-2016 07:22 PM
You can specify a callback file in your profile and define callbacks. If you don't specify one it uses the default.
-Trent
08-31-2016 01:25 AM
I tried your proposal - I did several things
But still same result - the SequenceFiledLoad in my teststand process model runs when starting the offline utility 😞