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

Скачать
Страница из 236
6 Standard Function Blocks
6.9 COUNTER_FB_M
223
FXCPU Structured Programming Manual
(Application Functions)
1
O
utlin
e
2
Function Li
st
3
Functi
on 
Cons
tructi
on
4
Ho
w t
o R
ea
Explanati
on of 
Func
tions
5
Appl
ie
Functions
6
Stan
dard 
Functi
on
 Blocks
A
Correspondence 
be
tw
een Dev
ice
an
d A
ddres
ses
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. 
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
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
ON
ON
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
2
10
COUNTER_FB_M
Coil
ValueOut
Preset
ValueIn
Status
3
Instance name