10-26-2015 02:57 PM
I have a large scale ATE the uses database logging. However, I am experiencing an issue with being able to query the information from the database that appears to be tied to the date and timestamp associated with the data. I have a primary sequence which contains all of the individual tests, and then I have other sequences which are used to perform certain tasks, like thermal cycling and vibration type testing. All of my sequences are setup to call the PreBatch, PostBatch, and PostUUT callbacks, and work fine when i execute them by themselves. However, when I call these sequences from within a sequence, its like the logging to the database isn't happening or when I try to query the database for the recently added information, it doesn't like the date and timestamp I associate with the data, which is established in the PreUUT callback.
10-27-2015 09:02 AM
I think the answer is: "It depends"
Do you have on-the-fly logging enabled? If not, the data will only get written after the the test of the current UUT has finished.
10-27-2015 09:27 AM
I do not have no-the-fly loggging enabled because that causes other problems. However if I call the PostUUT callback I keep getting a database data mismatch error that i am not understanding either?!?!
10-27-2015 10:27 AM
The exact time the data is submitted to the database will depend the Teststand version you are using as well as the process model you are using.
If you are using a fairly new version of Teststand any kind of results processing is now dealt with by results processing plugins. In the sequential process model the "Model Plugins - Post UUT" (which I suspect does the database write) comes directly before the PostUUT Loop Callback. I don't know how the database plugin submits the data, if this is an asynchronous call and you try to access the data in the PostUUT Loop callback I could imagine that you are dealing with a race condition.
10-27-2015 10:35 AM
I'm just reading this:
http://www.ni.com/white-paper/8289/en/
I think we might be onto something with the asynchronous logging (see "asynchronous report generation").
If you go to Configure | Result processing and click "show more options". In the now visible "New Thread" column, can you change the entry for Database logging to "No" and see if the problem persists?
Best Regards
Mathis
10-27-2015 10:49 AM
RIght now, I have everything working except for the data getting logged to the database. I found a callback called "LogToDatabase" to try and force the current test data to log to the database, but the list of parameters for the callback is asking for data that I'm not sure where to pull it from, in particular the DatabaseOptions and ModelPlugin containers shown in the .png I am including here.
10-27-2015 10:58 AM
I don't think that this callback is going to help you. The callback simply allows you to change how the data gets logged but not when as it is part of the database logging plugin. Unless you establish that there is something wrong with how the model plugin deals with the database I doubt that you will manage to solve the problem this way.
Did you try to disable the asynchronous logging?
10-27-2015 11:05 AM
If you mean by disabling asynchronous logging, DO NOT use on-the-fly logging, yes, that is how I am configured. If you mean something else, please clarify.
10-27-2015 11:07 AM
No that is not what I mean:
@Mathis_B wrote:
[...]
If you go to Configure | Result processing and click "show more options". In the now visible "New Thread" column, can you change the entry for Database logging to "No" and see if the problem persists?
[...]
10-27-2015 11:30 AM
Yes, the problem persists with this set to NO. Basically what i am doing is querying the database to create my reports using a customized report generation tool we developed. The problem is that TestStand doesn't log the data until the entire thermal cycle has completed (which can be days worth of test data). I just need to find a way to force the logged test results into the database.