Mitsubishi Electronics FXCPU Welding System User Manual


 
6 Standard Function Blocks
6.5 CTUD(_E)
214
FXCPU Structured Programming Manual
(Application Functions)
6.5 CTUD(_E)
Outline
This function block counts up/down 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.
This function block counts down (subtracts "1" from) the value stored in a device specified in when a
device specified in turns ON.
specifies the maximum value of the counter.
When the value stored in a device specified in reaches the maximum value of the counter, a device
specified in turns ON.
When the value stored in a device specified in becomes "0", a device specified in turns ON.
FX3U(C) FX3G FX2N(C) FX1N(C) FX1S
FX
U
/FX
2C
FX0N FX0(S)
Function name
Expression in each language
Structured ladder ST
CTUD
CTUD(CU,CD,RESET,LOAD,PV);
*1
Example:
Instance name(CU:=M0,
CD:=M10,RESET:=M20,LOAD:=
M30,PV:=D0);
M40:=Instance name.QU;
M50:=Instance name.QD;
D10:=Instance name.CV;
CTUD_E
CTUD_E(EN,CU,CD,RESET,LOA
D,PV); *1
Example:
Instance name(EN=X000,
CU:=M0,CD:=M10,RESET:=M20,
LOAD:=M30,PV:=D0);
M40:=Instance name.QU;
M50:=Instance name.QD;
D10:=Instance name.CV;
Variable Description Data type
Input
variable
EN Execution condition Bit
CU ( )
Count up signal Bit
CD ( )
Count down signal Bit
RESET ( )
Reset input signal Bit
LOAD ( )
Resetting signal Bit
PV ( )
Counter set value Word [signed]
Output
variable
ENO Execution status Bit
QU ( )
Count-up output signal Bit
QD ( )
Output signal (which turns ON when the current counter value
becomes "0" or less)
Bit
CV ( )
Count value data Word [signed]
CTUD
QU
M40CUM0
QD M50CDM10
RESETM20 CV D10
LOADM30
PVD0
Instance name
CTUD_E
EN ENO
QU
M40
X000
CUM0
QD M50CDM10
RESETM20 CV D10
LOADM30
PVD0
Instance name
s1
s2
s3
s4
n
d1
d2
d3
d3
s1
d3
s2
n
d3 n
d1
d3 d2