02-09-2012 04:19 PM
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
02-10-2012 10:51 AM
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
12-19-2013 10:15 PM
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!
12-19-2013 10:16 PM
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?
12-20-2013 05:19 PM
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