Справочник Пользователя для Mitsubishi Electronics Mitsubishi Digital Electronics Welding System FXCPU

Скачать
Страница из 236
6 Standard Function Blocks
6.3 CTU(_E)
210
FXCPU Structured Programming Manual
(Application Functions)
6.3
CTU(_E)
Outline
This function block counts up the number of times of rising of a signal.
1. Format
*1.
Refer to caution points.
2. Set data
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function block counts up (adds "1" to) the value stored in a device specified in 
 when a device
specified in 
 turns ON.
When the count value reaches a value specified in 
, a device specified in 
 turns ON.
When a device specified in 
 turns ON, this function block turns OFF a device specified in 
, and
resets the count value of a device specified in 
.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) Expression of function blocks in each language
*1.
Set the instance when using a function block.
Describe the instance name when programming a function block.
FX
3U(C)
FX
3G
FX
2N(C)
FX
1N(C)
FX
1S
FX
U
/FX
2C
FX
0N
FX
0(S)
Function name
Expression in each language
Structured ladder
ST
CTU
CTU(CU,RESET,PV); *1
Example:
Instance name(CU:=M0,
RESET=M10, PV=D0);
M20:=Instance name.Q;
D10:=Instance name.CV;
CTU_E
CTU_E(EN,CU,RESET,PV); *1
Example:
Instance name(EN=X000,
CU:=M0, RESET=M10, PV=D0);
M20:=Instance name.Q;
D10:=Instance name.CV;
Variable
Description
Data type
Input
variable
EN
Execution condition
Bit
CU
(
)
Count source signal
Bit
RESET (
)
Reset input signal
Bit
PV
(
)
Counter set value
Word [signed]
Output
variable
ENO
Execution status
Bit
Q
(
)
Count-up output signal
Bit
CV
(
)
Number of times of rising
Word [signed]
CTU
Q
M20
CU
M0
CV
D10
RESET
M10
PV
D0
Instance name
CTU_E
EN
ENO
Q
M20
X000
CU
M0
CV
D10
RESET
M10
PV
D0
Instance name
s1
s2
n
d1
d2
d2
s1
n
d1
s2
d1
d2