In the processor, In the database, E 279) – Rockwell Automation RSBizWare Administration Guide User Manual
Page 279
![background image](/manuals/580023/279/background.png)
Application notes for FactoryTalk Transaction Manager Appendix D
For more information and sample files, go to the Rockwell
Automation Knowledgebase Web site
23299.
In the processor, define the following:
• A 16-bit integer (for example, Result).
• An array of 7, 32-bit integers (for example, Current).
• An array of 7, 32-bit integers (for example, New).
• Ladder logic to set the processor's wall-clock time when
Result.0 = 1 and Result.1 = 0.
• Ladder logic to read the processor's wall-clock time into the
current array.
In the database, define a stored procedure that reads the system
clock and sends outputs as a byte-swapped varbinary(12) string.
The following is a sample SQL script for creating a stored procedure
which reads the current time in the controller, compares it to the
system time, and writes back the server's current time. The stored
procedure can be reworked slightly to log the difference between the
processor and computer real-time clocks (if desired).
NOTE
This SQL script is for Microsoft SQL Server 2000 only. Other databases will
require modified scripts to function properly.
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE logix5000time (
-- @control_id AS INT, --uncomment this line if you wish to log
the time difference
@control_time_in AS DATETIME,
@control_time_out AS VARBINARY(24) OUT
) AS
In the processor
In the database
Rockwell Automation Publication BZWARE-IN001M-EN-P-June 2014
279