NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

database logging on-the-fly or not?

Hi,

I'm not sure which option of data logging to choose and what is the advantage/disadvantage of each one.

1) Which option to choose and why?

2) For not on-the-fly option, I noticed that the step 'Log To Database Callback' is activated. I could not figured out what happend when the on-the-fly is selected. The Help indicates that in this case 'Post Result callbacks' is called. Where do I find it?

3) I have a specific requirent that in 'Run Selected Step Using Single Pass' I like to insert the SN both in the report and in the database. Since the preUUT callback is not called in this mode I overcome it by getting the last UUT SN from within the code of my mainSequence (I read it from a file and have the operator approve it). Th
en, I added a statment step (in the sequentialModel) right after the MainSequence where I set 'Locals.UUT.SerialNumber'. With this mechanism, the SN is get into the database only if I don't use on-the-fly!!
My question is: Is it OK to do it the way I described it? Is there a better way?

Thanks
Rafi
TS 3.0
0 Kudos
Message 1 of 4
(3,123 Views)
Hi Rafi,

1. Please refer to the link below for information on the on-the-fly option.

On-the-Fly Reporting and Logging in TestStand

2. If on-the-fly logging is selected then the ProcessModelPostResultListEntry and SequenceFilePostResultListEntry callbacks are used to log data to the database. If you look at the process model you'll see how steps are added to these callbacks to log data to the database.

3. It's okay to do this. If you want it to get logged with on-the-fly logging just move the step up above the main sequence.

I hope this helps!!

Regards,

Sarah Miracle
National Instruments
0 Kudos
Message 2 of 4
(3,120 Views)
Hi Sara and thanks for answering,

Regarding itme no. 3 -
I think you misunderstood me. When using 'Single Pass' the main sequence is the one that gets the Serial Number (along with 3 more parameters I added to the DB). Since the PreUUT is not part of the SinglePass, I read these parameters from a text file. The data in this file was stored in the last PreUUT activation.

Hence, I can not move it in front of the MainSequence.

I just had a new idea instead of adding the statement--To use the local.UUT of the sequentialModel as a parameter to the MainSequence (byRef). Since local.UUT is used in data logging I should be able to do on-the-fly logging.

a) Do you thinks it will work?
b) Any problems with doing it this way? or the fact that I'm adding
a parameter to the MainSequence?
c) Although I attempted, I was not able to add the parameter. Can you instruct me step-by-step how to do it?

Thank you very much in advance
Rafi
TS 3.0
0 Kudos
Message 3 of 4
(3,121 Views)
Hey Rafi,

I wouldn't suggest adding a parameter to main sequence. Is this something you want to do with every sequence that runs with the single pass entry point (Meaning everytime you select Run Single Pass you want to get the serial number)? If so, then I would suggest modifying the single pass entry point to include this code before the main sequence callback.

If this change is something you want to make just for a specific sequence then adding it to the client sequence is one way to do it. Another way would be to add an addition callback to the single pass entry point - like the preUUT callback in Test UUTs. You would pass as a parameter to this callback Locals.UUT (just like preUUT). This callback could be empty by default but you could add the callback to your client sequence file and set the serial number from there: Parameters.UUT.SerialNumber = Locals.SerialNumber. You could use the preUUT callback in Test UUTs as a guide.

If you can't modify the process model then you should be able to set the serial number from the client sequence file. Use the expression RunState.Root.Locals.UUT.SerialNumber to reference the serial number. For example I added a statement step to my main sequence that has the expression: RunState.Root.Locals.UUT.SerialNumber = "myserialnumber". This set the serial number from the client sequence.

I hope this helps!! Please let me know if you have any additional questions on any of these approaches.

Regards,

Sarah Miracle
National Instruments
0 Kudos
Message 4 of 4
(3,108 Views)