Clock Functions - Omron CJ2 CPU UNIT SOFTWARE User Manual

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

10-1 Clock Functions

10-1-1 Clock Functions
Clock Data
A clock is built into the CJ2 CPU Units.
The clock data from the clock in the CPU Unit is stored in the following bits in the Auxiliary Area in BCD.
Name
Clock Data
If the battery is not connected or the battery voltage is low, the clock data in words A351 to A354 will be
unstable. Do not use the clock data unless a reliable battery is connected.
Setting Clock Data
The data can be set by connecting the CX-Programmer online and double-clicking the PLC Clock Icon
in the project tree or by executing the DATE(735) instruction. Also, clock data can be incremented and
decremented and converted between seconds and hours.
Clock Instructions
Instruction
CLOCK ADJUSTMENT
HOURS TO SECONDS
SECONDS TO HOURS
CALENDAR ADD
CALENDAR SUBTRACT
CJ2 CPU Unit Software User's Manual
Address
A351.00 to
Seconds: 00 to 59 (BCD)
A351.07
A351.08 to
Minutes: 00 to 59 (BCD)
A351.15
A352.00 to
Hour: 00 to 23 (BCD)
A352.07
A352.08 to
Day of the month: 01 to 31 (BCD)
A352.15
A353.00 to
Month: 01 to 12 (BCD)
A353.07
A353.08 to
Year: 00 to 99 (BCD)
A353.15
A354.00 to
Day of the week (00 to 06 BCD):
A354.07
00: Sunday, 01: Monday, 02: Tuesday, 03: Wednesday, 04: Thursday,
05: Friday, 06: Saturday
Mnemonic
DATE(735)
Changes the internal clock setting to the setting in the specified
source words.
SEC(065)
Converts time data in hours/minutes/seconds format to an equiva-
lent time in seconds only.
HMS(066)
Converts seconds data to an equivalent time in hours/minutes/sec-
onds format.
CADD(730)
Adds time to the calendar data in the specified words.
CSUB(731)
Subtracts time from the calendar data in the specified words.
10 CPU Unit Functions
Description
Function
10
10-3

Advertisement

Table of Contents
loading

Table of Contents