5 - 5 5 - 5
5 MELSEC FUNCTIONS
5.1.3 High-speed timer TIMER_H_M
When the coil of the timer (high-speed timer, high-speed retentive timer) turns ON, the timer calculates up to the
set value, and when the timer times out (calculation value ( set value), the contact is put in the following status.
N/O contact: Conduction N/C contact: Non-conduction
Function definition
BOOL TIMER_H_M (BOOL EN, BOOL TCoil, ANY16 TValue);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
TCoil
IN
TS, TC device or STS, STC device (bit data)
TValue
IN
Timer set value (BIN 16-bit data)
Remarks: When a constant is specified for the timer set value, only a decimal number can be specified.
The timer set value can be specified within the range 0 to 32767.
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, TC0 turns ON and the timer calculates *)
(* up to TValue, and when the timer times out (calculation value( TValue), the
*)
(* contact is put in the following status.
*)
(* N/O contact: Conduction N/C contact: Non-conduction
*)
TIMER_H_M (X0, TC0, TValue);
Corresponding MELSEC command
OUTH T (High-speed timer)
5.1.4 Counter COUNTER_M
The present value (count value) of the counter is incremented by 1, and when the counter counts up (present
value = set value), the contact is put in the following status.
N/O contact: Conduction N/C contact: Non-conduction
Function definition
BOOL COUNTER_M (BOOL EN, BOOL CCoil, ANY16 CValue);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only
when the result is TRUE)
CCoil IN
CS, CC device number (bit data)
CValue IN
Counter set value (BIN 16-bit data)
Remarks: When a constant is specified for the counter set value, only a decimal
number can be specified.
The timer set value can be specified within the range 0 to 32767.
Return Value
Description
BOOL
Execution condition
Example of use
(* After execution condition X0 has turned ON, the present value (count value) is *)
(* incremented by 1 when CC0 changes from OFF to ON, and when the counter *)
(* counts up (present value = CValue), the contact is put in the following status. *)
(* N/O contact: Conduction N/C contact: Non-conduction
*)
COUNTER_M (X0, CC0, CValue);
Corresponding MELSEC command
OUT C (Counter)
For the usable data type, refer to "3.2.2
About ANY type".
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......