Справочник Пользователя для Mitsubishi Electronics MELSEC Q series MELSEC L series

Скачать
Страница из 412
8.2 Counter Function Dedicated Instruction
8.2.3 ICPREWR instruction
8-21
8
B
U
IL
T-
IN
 I/
O
 FU
N
C
TI
O
N
 
IN
S
TRUC
TI
ON
IC
PREWR1,
 IC
PREW
R2
ICPREWR1, ICPREWR2
8.2.3  
ICPREWR instruction
ICPREWR1, ICPREWR2
Function
This instruction sets a preset value of the specified CH (refer to the following).
• ICPREWR1(P): CH1
• ICPREWR2(P): CH2
Program Example
The following program sets 10000 for the preset value of CH 1 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICPREWR1(M0, 10000);
ICPREWR1(P)
ICPREWR2(P)
P: Executing condition
:
 
indicates any of the following
 
instructions.
ICPREWR1
ICPREWR1P
ICPREWR2
ICPREWR2P
Input argument
EN:
Executing condition
:Bit
s:
Preset value (constant), or start number of the device that 
stores the preset value
• Constant: Settings which is within the range of -2147483648 
to 2147483647
• Device: Within the range of specified device
:ANY32
Output argument
ENO:
Execution result
:Bit
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
Others
Bit
Word
Bit
Word
LCPU
ST
ICRNGWR1
EN
ENO
s
ICRNGWR1
(EN, s);
ENO:=
Structured ladder/FBD
s