302
MTR
1. With the PWM instruction, the argument device data is registered in the work area of the CPU module and counting
operation is processed as a system interrupt. (The device data registered in the work area is cleared by turning the
execution command OFF, or turning the STOP/RUN switch STOP RUN.) The interrupt interval of individual modules is
shown below:
For this reason, the PWM instruction can be used only once within all the programs being executed by the CPU module.
2. The instruction is not processed in the following cases:
• When both n1 and n2 are 0
• When n1
n2
• When the PWM instruction is executed twice or more.
3. Do not change the argument for the PWM instruction during pulse output directed by the PWM instruction (while the
execution command is ON). To change the argument, turn OFF the execution command.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program Example
(1) The following program outputs a 100 ms pulse once each second to Y20 when X0 is ON.
[Ladder Mode]
[List Mode]
: Head input device (bits)
: Head output device (bits)
: Head number of the devices where matrix input data will be stored (bits)
n
: Number of input rows (BIN 16 bit)
CPU Module Type Name
Interrupt Interval of n1, n2
High Performance model QCPU, Process CPU,
Universal model QCPU, LCPU
1 ms
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The device specified by exceeds the range of the corresponding
device.
––
––
––
––
MTR
Matrix input
6.8.10
MTR
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
(Only X)
––
––
(Only Y)
––
––
––
––
n
––
S
Step
Instruction
Device
Basic
Redundant
Process
High
performance
Universal
LCPU
Command
MTR
n
S
MTR
D1
D2
S
D1
D2
S
D1
D2