Chapter 16 PLC Function Applications│CP2000 
 
 
16-106
 
API   
 
TZCP 
 
       
Comparison of calendar data 
161 
 
 
P 
 
  
 
 
Bit device    Word device   
16-bit command    (9 STEP) 
TZCP  Continuous 
execution type 
TZCPP  Pulse 
execution type 
 
32-bit command   
-  -  -  - 
 
Flag signal: none   
X  Y  M  K  H  KnX  KnY  KnM  T  C  D 
S1     
*  *  * 
S2     
*  *  * 
S     
*  *  * 
D   
*  * 
 
Notes on operand usage:   
Please refer to the function specifications table for each device in 
series for the scope of device usage 
 
 
  S
1
:  Sets  the  lower  limit  of  the  comparison  time.  S
2
:  Sets  the  upper  limit  of  the 
comparison time. S: current calendar time. D: Results of comparison.   
  Performs range comparison by comparing the hours, minutes, and seconds of the 
current calendar time designated by S with the lower limit of the comparison time 
set as S
1
 and the upper limit of the comparison time set as S
2
, and expresses the 
results of comparison in D.   
  S
1
、S
1
 +1、S
1
 +2: Sets the hours, minutes, and seconds of the lower limit of the 
comparison time.   
  S
2
、S
2
 +1、S
2
 +2: Sets the hours, minutes, and seconds of the upper limit of the 
comparison time. 
  S、S +1、S +2: The hours, minutes, and seconds of the current calendar time   
  The  D0  designated  by  the  S  listed  in  this  program  is  usually  obtained  by 
comparison using the TZCP command after using the TRD command in advance to 
read the current calendar time. If the value of S
1
, S
2
, or S exceeds the range, this is 
considered an operating error, the command will not execute, and M1068=On.   
  When the current time S is less than the lower limit value S
1
 and S is less than the 
upper limit value S
2
, D will be On. When the current time S is greater than the lower 
limit value S
1
 and S is greater than the upper limit value S
2
, D +2 will be On; D +1 
will be On under other conditions.   
 
  When X10=On, the TZCP command executes, and one of M10-M12 will be On. 
When X10=Off, the TZCP command will not execute, and M10-M12 will remain in 
the X10=Off state.