EasyManua.ls Logo

Delta AH500 - Page 542

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AH500 Programming Manual
6-374
API Instruction code Operand
Function
1606 TZCP P
S
1
, S
2
, S, D
Time zone comparison
Device
X Y M S T C HC D L SM SR E PR K 16# “$” DF
S
1
S
2
S
D
Pulse instruction
16-bit instruction (9 steps)
32-bit instruction
AH500 AH500 -
Symbol:
S
1
Lower limit time Word
S
2
Upper limit time Word
S
Current time Word
D
Comparison result Bit
Explanation:
1. The instruction is used to compare the current time specified by S with the lower limit time
specified by S
1
, and compare the current time specified by S with the upper limit time specified
by S
2
, and the comparison result is stored in D.
2. The hour of the lower limit time is in the device specified by S
1
, the minute of the lower limit
time e is in the device specified by S
1
+1, and the second of the lower limit time is in the device
specified by S
1
+2.
3. The hour of the upper limit time is in the device specified by S
2
, the minute of the upper limit
time e is in the device specified by S
2
+1, and the second of the upper limit time is in the device
specified by S
2
+2.
4. The hour of the current time is in the device specified by S, the minute of the current time e is
in the device specified by S+1, and the second of the current time is in the device specified by
S+2.
5. The time in the device specified by S
1
must be less than the time in the device specified by S
2
.
If the time in the device specified by S
1
is larger than the time in the device specified by S
2
, the
time in the device specified by S
1
will be taken as the upper/lower limit time during the
execution of the instruction TZCP.
6. Users generally use the instruction TRD to read the current time from the real-time clock first,
and then they use the instruction TZCP to compare the time.
7. If the current time in the device specified by S is less than the lower limit time in the device
specified by S
1
, and is less than the upper limit time in the device specified by S
2
, D is ON. If
the current time in the device specified by S is larger than the lower limit time in the device
specified by S
1
, and is larger than the upper limit time in the device specified by S
2
, D+2 is ON.
In other conditions, D+1 is ON.
Example:
When X0.0 is ON, the instruction TZCP is executed. M10, M11, or M12 is ON. When X0.0 is OFF,
the instruction TZCP is not executed, the state of M10, the state of M11, and the state of M12 remain
the same as those before X0.0s being ON.

Table of Contents

Other manuals for Delta AH500

Related product manuals