Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
21 Applied Instructions (Real Time Clock Control)
21.9 HOUR / Hour Meter
565
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Cautions
1) The instruction is provided in the FX2N and FX2NC PLCs Ver. 3.00 or later.
2) Number of devices occupied
The device specified by occupies two devices (16-bit operation) or three devices (32-bit operation).
Be careful not to overlap with the devices used in machine control.
3) Some restrictions to applicable devices.
S1: The FX
3U and FX3UC PLCs only are applicable, index (V, Z) decoration is disabled.
S2: The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S3: The FX
3U and FX3UC PLCs only are applicable.
4) When the DHOUR instruction is used for 32-bit operation in the FX
2N or FX2NC PLC.
A device specified for alarm output may turn ON before the time specified by the DHOUR instruction is
reached.
For avoiding such turning ON, add the circuit inside in the program example shown below to the program.
Program example
When the cumulative total of ON time duration of X000 exceeds 300 hours, Y005 is turned ON.
In D201, the present time of less than one hour is stored in one-second unit.
: Time setting for turning ON
Specified in one-hour unit.
: Present value of one-hour unit
+1 : Present value of less than one hour (one-second unit)
: Specification of alarm output
It turns ON when the current value reaches or exceeds the time specified in .
(In this example, to be turned ON when reaching 300 hours.)
X000
Input
specification
M0
Alarm output
ANDD<=
EN ENO
s1
s2
K40000
*2
D210
*3
ANDD>
EN ENO
s1
s2
K40000
*2
D210
*3
K40000
M0
*4
SET
EN
d
ENO
M0
*4
RST
EN
d
ENO
DHOUR
EN ENO
d1
d2
s
D210
M0
Y007
M0 turns ON when the cumulative
total (D210 and D211) of ON time
duration of X000 exceeds 40,000 hours.
M0 is set when the current value of
D210 and D211 is 40,000 hours or more.
M0 is reset when the current value of
D210 and D211 is less than 40,000 hours.
Alarm notice
A
*1
*1: Program the part in the interrupt disabled range when a device specified for alarm output is used in the interrupt program.
(Lay out the program part between the DI instruction and the EI instruction.)
*2: Set a value set in of the DHOUR instruction.
*3: Set a value set in of the DHOUR instruction.
*4: Set a value set in of the DHOUR instruction.
A
A
s
d1
d2
[Structured ladder/FBD]
[ST]
HOUR(X000,K300,D200,Y005);
HOUR
EN ENO
d1
d2
s
Y005
K300
X000
D200