Mitsubishi Electronics FXCPU Welding System User Manual


 
6 Standard Function Blocks
6.9 COUNTER_FB_M
223
FXCPU Structured Programming Manual
(Application Functions)
1
Outline
2
Function List
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
6.9 COUNTER_FB_M
Outline
This counter starts counting when the condition turns ON from OFF and generates an output when counting
up to the set value.
A counter initial value can be set.
1. Format
*1. Refer to "Cautions".
2. Set data
Function and operation explanation
The counter starts counting when detecting the rising edge (from OFF to ON) of the input argument Coil. It
does not start counting if the Coil remains ON.
The counter starts counting from the value of input argument ValueIn. When the input argument Preset value
is reached, the output argument Status turns ON.
The current count value is stored in the output argument ValueOut.
*1. Var_D10 is a global label and is defined as D10.
*2. Var_M10 is a global label and is defined as M10.
FX3U(C) FX3G FX2N(C) FX1N(C) FX1S
FX
U
/FX
2C
FX0N FX0(S)
Function name
Expression in each language
Structured ladder ST
COUNTER_FB_M
COUNTER_FB_M(Coil,Preset,
ValueIn); *1
Example:
Instance name
(Coil:=X000,Preset:=D0,
ValueIn:=D10);
D20:=Instance name
ValueOut;
M0:=Instance name
Status;
Variable Description Data type
Input
variable
Coil Execution condition Bit
Preset Counter set value Word [signed]
ValueIn Counter initial value Word [signed]
Output
variable
ValueOut Counter current value ANY16
Status Counter output contact Bit
COUNTER_FB_M
Coil ValueOut
Preset
ValueIn
Status
Instance name
ONON ON
[Structured ladder]
ON
Var_M0
Var_M10
Value of Var_D10
1
timing chart
Instance name (Coil:= Var_M0,Preset:=10,Valueln:=1);
Var_D10:=Instance name.ValueOut;
Var_M10:=Instance name.Status;
[ ST ]
10
1
Var_D10
*1
Var_M10
*2
Var_M0
210
COUNTER_FB_M
Coil ValueOut
Preset
ValueIn
Status
3
Instance name