From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

START_DATE​_TIME in UUT_RESULT not logging seconds in database

At one of our manufacturing plants we are experiencing a problem when TestStand is logging results to UUT_RESULT. It is not storing the seconds portion of the time (or milliseconds) in the START_DATE​_TIME field (they are all zeros). The accuracy is only down to minutes. Other plant locations (with different DB's, schema's, and station models) are recording the seconds, but we can't seem to find any differences between the two that would indicate why the seconds are not being recorded at this particular plant. The model seems to pass the time correctly into the ActiveX/COM adapter zNI TestStand Database Logging (Ver 1.0) with Object Class TSDBLog (ITSDBLog), but it is not getting to the database correctly.

 

Anyone have any ideas where to look to try to find out why this is occuring? We're at a loss and have run out of ideas.

 

Using TestStand 4.2.1


Thanks

0 Kudos
Message 1 of 5
(2,316 Views)

Hey Raydur,

 

You should be able to change the format in the "Configure»Database Options..." menu. Next, click the Columns/Parameters tab and select START_DATE_TIME. From here, you have access to several options including a format drop down. Do you have access to this property?

 

Luke W

0 Kudos
Message 2 of 5
(2,300 Views)

Sorry for the (very) delayed response. This issue got put on the back burner due to some hgh priority projects. There have been some problems lately becuase of this issue, so it's getting attention again and I'm back at it.

 

The Columns/Parameters tab has the following values:

Type: Date/Time

Size: 255

Direction: Input

Precondition: Logging.DatabaseOptions.IncludeTimes   (set to true)

Expression: Str(Logging.StartDate.Month) + "-" + Str(Logging.StartDate.MonthDay) + "-" + Str(Logging.StartDate.Year) + " " + Str(Logging.StartTime.Hours) + ":" + Str(Logging.StartTime.Minutes) + ":" + Str(Logging.StartTime.Seconds) + "." + Str(Logging.StartTime.Milliseconds)

Format: mm-dd-yyyy hh:ii:ss

 

I've monitored the value of the Expression and it does appear to be properly formatting a datetime value (including the seconds).

Any thoughts/ideas? Let me know if there's any other info that would be helpful.

 

Thanks!

 

0 Kudos
Message 3 of 5
(2,106 Views)

Also, the database is using a stored procedure to write to the UUT_RESULT table. Not sure if this is relevant, but the stored procedure is as follows:

USE

[DatabaseName]

GO

SET

ANSI_NULLSON

GO

SET

QUOTED_IDENTIFIERON

GO

 

ALTER

PROCEDURE[dbo].[InsertUUTRESULT] @pID char(38),

@pSTATION_ID varchar(255),

@pBATCH_SERIAL_NUMBER varchar(255),

@pTEST_SOCKET_INDEX int,

@pUUT_SERIAL_NUMBER varchar(255),

@pUSER_LOGIN_NAME varchar(255),

@pSTART_DATE_TIME datetime,

@pEXECUTION_TIME float,

@pUUT_STATUS varchar(32),

@pUUT_ERROR_CODE int,

@pUUT_ERROR_MESSAGE varchar(255),

@pTEST_NAME varchar(255),

@pADDRESS varchar(255),

@pWORK_ORDERvarchar(255)

AS

INSERT INTO UUT_RESULT(ID,STATION_ID,BATCH_SERIAL_NUMBER,TEST_SOCKET_INDEX,UUT_SERIAL_NUMBER,USER_LOGIN_NAME,START_DATE_TIME,

EXECUTION_TIME,UUT_STATUS,UUT_ERROR_CODE,UUT_ERROR_MESSAGE,TEST_NAME,[ADDRESS],WORK_ORDER)

VALUES (RTRIM(@pID),

RTRIM(@pSTATION_ID),

RTRIM(@pBATCH_SERIAL_NUMBER),

RTRIM(@pTEST_SOCKET_INDEX),

RTRIM(@pUUT_SERIAL_NUMBER),

RTRIM(@pUSER_LOGIN_NAME),

RTRIM(@pSTART_DATE_TIME),

RTRIM(@pEXECUTION_TIME),

RTRIM(@pUUT_STATUS),

RTRIM(@pUUT_ERROR_CODE),

RTRIM(@pUUT_ERROR_MESSAGE),

RTRIM(@pTEST_NAME),

RTRIM(@pADDRESS),

RTRIM(@pWORK_ORDER))

 

Any other information that would be helpful?

0 Kudos
Message 4 of 5
(2,105 Views)

Hi Raydur,

 

Are you monitoring the time in the ResultsList and seeing the seconds recorded? You can learn more about what I'm talking about in this forum thread here: http://forums.ni.com/t5/NI-TestStand/Log-the-start-time-of-each-step-to-database/td-p/806154

 

Additionally, for more views on your question, you may want to start a new thread since this is a little bit old.

 

Regards,

 

Anna L

 

 

Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,057 Views)