NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Log a "FileGlobals.BuildStatus" to a Database in TestStand?

    I'm using Microsoft SQL sever 2000 and Teststand database function. For the current statements in Teststand database-options, there's no field to indentify whether current UUT Test is under Debug, Build or formal production condition.So I plan to have this information in the context of "FileGlobals.BuildStatus", so everytime when beginning UUT test, "FileGlobals.BuildStatus" will be given a certain value to indentify Debug/Build/formal production status. Then in order to log this information in database,I need to insert a field of BuildStatus under UUT_RESULT statement. 
   Now the problem I have is: How to log "FileGlobals.BuildStatus" to SQL database in Teststand?
   There's a good exmpale in NI website, explaining how to Log a Local Variable from a Sequence to a Database in TestStand(http://digital.ni.com/public.nsf/allkb/d44a2fc939d893c386256d1a0078d013). After I tried by following its instruction, I still failed to have it work correct. So I have to ask for help here and hope somebody to let me know how to do it step by step.
 
 
Thanks!
Jacky
0 Kudos
Message 1 of 6
(3,442 Views)

Hi,

Where abouts are you setting the "FileGlobals.BuildStatus". If you are doing it in the Setup of MainSequence then it would be to late as the LogToDatabase callback sequence would have already been run.

Do you Override the LogToDatabase sequence in you sequencefile?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,432 Views)

I set the "FileGlobals.BuildStatus" in the PreUUTLoop seq callback in Client seq file, please see attached file.

 

Thanks!

Jacky

0 Kudos
Message 3 of 6
(3,428 Views)
Hi
  I got it sucessfully and put it in the StationGlobals.BuildStatus, so it's quite easy to exchange data between client sequence file and process model.
 
Thanks!
Jacky
0 Kudos
Message 4 of 6
(3,424 Views)
Hi Jacky,
 
Thats good.
 
With your FileGlobals. did you set your SequenceFile in the properties to use the same FileGlobals.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,421 Views)

I changed my way, below is the process step by step:
1, configure client seq file
    Insert PreUUTLoop, in this seq callback, insert a step used to change "StationGlobals.BuildStatus"

2, Configure Station Globals
    Add string variable of "StationGlobals.BuildStatus"

3, Configure process Model
    In Test UUT Entry point:add a local string of Temp_J;    insert a step to have "Locals.Temp_J=StationGlobals.BuildStatus";
    In the "log to data seq" callback, insert string parameter of Temp_J
    Open  "log to data seq" seq and insert string parameter of Temp_J

4, Configure Teststand database option
    In the columns/Parameters tab, add new filed of BuildStatus,with the expression of "Logging.Temp_J"

5, In UUT_Result of SQL sever,add a new filed of BuildStatus

6, Save and Run

 

Thanks!

Jacky

0 Kudos
Message 6 of 6
(3,418 Views)