Mitsubishi Electronics MELSEC Q series MELSEC L series Home Theater Server User Manual


 
8.2 Counter Function Dedicated Instruction
8.2.3 ICPREWR instruction
8-21
8
BUILT-IN I/O FUNCTION
INSTRUCTION
ICPREWR1, ICPREWR2
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