Mitsubishi Electric MELSEC-L02SCPU User Manual page 247

Cpu module, built-in i/o function
Table of Contents

Advertisement

(3) Preset value write instructions: ICPREWR1(P), ICPREWR2(P)
ICPREWR1
ICPREWR1P
ICPREWR2
ICPREWR2P
Internal device
Setting data
Bit
Word
S
(a) Setting data
Setting data
Setting item
• Preset value setting (constant)
• Start number of the device where a
S
value to replace is stored
(b) Function
This function sets a preset value (a value to replace another).
The number of steps is basically two.
(c) Error
In the following cases, an operation error occurs. Error flag (SM0) turns on and an error code is stored into
SD0.
• The device specified in
• Other than "Normal Mode" is selected for "Operation Mode Setting" of the specified channel.
• High-speed counter function of the specified channel is not enabled.
(d) Program example
10000 is set as the preset value of CH1 when M0 turns on.
Command
Command
Command
Command
J\
R, ZR
Bit
Word
Bit
Word
• Constant: -2147483648 to 2147483647
• Device: within the range of a specified device
is exceeding its range.
S
CHAPTER 8 HIGH-SPEED COUNTER FUNCTION
ICPREWR1
ICPREWR1P
ICPREWR2
ICPREWR2P
U\G
Z
Setting range
S
S
S
S
Constant
Others
K, H
$
Data type
• Constant: BIN 32-bit
• Device: device name
(Error code: 4101)
(Error code: 4116)
(Error code: 4116)
245
8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents