Sei sulla pagina 1di 70

SECTION 7

Using Expansion Units and Expansion I/O Units

This section describes how to use CP-series/CPM1A-series Expansion Units and Expansion I/O Units.

7-1 Connecting Expansion Units and Expansion I/O Units . . . . . . . . . . . . . . . . . 420


7-2 Analog Input Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
7-3 Analog Output Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
7-4 Analog I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
7-4-1 CPM1A-MAD01 Analog I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . 438
7-4-2 CP1W-MAD11/CPM1A-MAD11 Analog I/O Units . . . . . . . . . . . . 448
7-5 Temperature Sensor Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
7-6 CompoBus/S I/O Link Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
7-7 DeviceNet I/O Link Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

419
Connecting Expansion Units and Expansion I/O Units Section 7-1

7-1 Connecting Expansion Units and Expansion I/O Units


CP-series and CPM1A-series Expansion Units and Expansion I/O Units can
be connected to the CP1L. Up to three Expansion Units or Expansion I/O
Units can be connected to a CPU Unit with 30, 40 or 60 I/O points and one
Expansion Unit or Expansion I/O Unit can be connected to a CPU Unit with 20
or 14 I/O points.
The functionality and performance of CP-series Expansion Units and Expan-
sion I/O Units is the same as the functionality and performance of CP1MA-
series Expansion Units and Expansion I/O Units. CP-series Units are black,
and CPM1A-series Units are ivory.

Number of I/O Words


Unit name Model Current I/O words
consumption (mA)
5 VDC 24 VDC Input Output
Expansion Analog Input Unit CP1W-AD041 100 90 4 2
Units CPM1A-AD041
Analog Output Unit CP1W-DA041 80 124 --- 4
CPM1A-DA041
Analog I/O Unit CPM1A-MAD01 66 66 2 1
CP1W-MAD11 83 110
CPM1A-MAD11
Temperature Control Unit CP1W-TS001 40 59 2 ---
CPM1A-TS001
CP1W-TS101 54 73
CPM1A-TS101
CP1W-TS002 40 59 4 ---
CPM1A-TS002
CP1W-TS102 54 73
CPM1A-TS102
CompoBus/S I/O Link Unit CP1W-SRT21 29 --- 1 1
CPM1A-SRT21
DeviceNet I/O Link Unit CPM1A-DRT21 48 --- 2 2
Expansion 40-point I/O Unit CP1W-40EDR 80 90 2 2
I/O Units CPM1A-40EDR
CP1W-40EDT 160 ---
CPM1A-40EDT
CP1W-40EDT1 160 ---
CPM1A-40EDT1
32-point Output Unit CP1W-32ER 49 131 --- 4
CP1W-32ET 113 ---
CP1W-32ET1 113 ---
20-point I/O Unit CP1W-20EDR1 103 44 1 1
CPM1A-20EDR1
CP1W-20EDT 130 ---
CPM1A-20EDT
CP1W-20EDT1 130 ---
CPM1A-20EDT1
16-point Output Unit CP1W-16ER 42 90 --- 2
CPM1A-16ER
CP1W-16ET 76 ---
CP1W-16ET1 76 ---
8-point Input Unit CP1W-8ED 18 --- 1 ---
CPM1A-8ED
8-point Output Unit CP1W-8ER 26 44 --- 1
CPM1A-8ER
CP1W-8ET 75 ---
CPM1A-8ET
CP1W-8ET1 75 ---
CPM1A-8ET1

Note CP1W-32ER/32ET/32ET1s maximum number of simultaneously ON points is


24 (75%).

420
Analog Input Units Section 7-2

Allocation of I/O Words Expansion Units and Expansion I/O Units are allocated I/O bits in the order
the Units are connected starting from the CPU Unit. When the power to the
CPU Unit is turned ON, the CPU Unit checks for any Expansion Units and
Expansion I/O Units connected to it and automatically allocates I/O bits
40-point I/O Unit First Unit: Second Unit: Third Unit:
CPU Unit Temperature Control Unit Analog I/O Unit 40-point I/O Unit
CIO 0.00 to CIO 0.11 CIO 2 to CIO 5 None CIO 6.00 to CIO 6.11
Input bits
CIO 1.00 to CIO 1.11 CIO 7.00 to CIO 7.11
24 input points 24 input points
TS002 DA041
16 output points 16 output points
CIO 100.00 to CIO 100.07 None CIO 102 to CIO 105 CIO 106.00 to CIO 106.07
Output bits CIO 101.00 to CIO 101.07 CIO 107.00 to CIO 107.07

7-2 Analog Input Units


Each CP1W-AD041/CPM1A-AD041 Analog Input Unit provides four analog
inputs.
The analog input signal ranges are 0 to 5 V, 1 to 5 V, 0 to 10 V, -10 to +10
V, 0 to 20 mA, and 4 to 20 mA. The resolution is 1/6,000. The open-circuit
detection function is activated in the ranges of 1 to 5 V and 4 to 20 mA.
The Analog Input Unit uses four input words and two output words, so a
maximum of three Units can be connected.

Part Names CP1W-AD041/CPM1A-AD041

(3) Expansion connector

IN CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC

(2) Expansion I/O


connecting cable (1) Analog input terminals

1. Analog Input Terminals


Connected to analog output devices.

421
Analog Input Units Section 7-2

Input Terminal Arrangement

IN
V IN1 Voltage input 1
CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
I IN1 Current input 1
NC
COM1 Input common 1
V IN2 Voltage input 2
I IN2 Current input 2
COM2 Input common 2
V IN3 Voltage input 3
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG I IN3 Current input 3
VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC COM3 Input common 3
V IN4 Voltage input 4
I IN4 Current input 4
COM4 Input common 4

Note When using current inputs, voltage input terminals must be short-circuited
with current input terminals.
2. Expansion I/O Connecting Cable
Connected to the CPU Unit or Expansion Unit expansion connector. The
cable is attached to the Analog Input Unit and cannot be removed.
Note Do not touch the cables during operation. Static electricity may cause operat-
ing errors.
3. Expansion Connector
Connected to the next Expansion Unit or Expansion I/O Unit to enable ex-
pansion.

Main Analog Input Analog Input Units are connected to a CP1L CPU Unit. For CP1L M-type CPU
Unit Specifications Units, a maximum of three Units can be connected, including other Expansion
Units and Expansion I/O Units.

For CP1L M-type CPU Units, a


maximum of 3 Expansion Units or
Expansion I/O Units can be connected.

CP1W-20EDR1/ CP1W-8ED/ CP1W-AD041/


CP1L M-type CPU Unit CPM1A-20EDR1 CPM1A-8ED CPM1A-AD041
Expansion I/O Unit Expansion I/O Unit Analog Input Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED

OUT
CH
00 01 02 03 04 05 06 07
CH EXP EXP IN CH
00 01 02 03 04 06 00 01 03 04 06 NC 00 01 02 04 05 07 04 06 I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
COM COM COM COM 05 07 COM 02 COM 05 07 N C C OM CO M C OM 03 CO M 06 C OM 05 07 VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC

OUT
4 analog inputs

422
Analog Input Units Section 7-2

Item Voltage Input Current Input


Number of inputs 4 inputs (4 words allocated)
Input signal range 0 to 5 VDC, 1 to 5 VDC, 0 to 20 mA or 4 to 20 mA
0 to 10 VDC, or 10 to 10 VDC
Max. rated input 15 V 30 mA
External input impedance 1 M min. Approx. 250
Resolution 1/6000 (full scale)
Overall accuracy 25C 0.3% full scale 0.4% full scale
0 to 55C 0.6% full scale 0.8% full scale
A/D conversion data 16-bit binary (4-digit hexadecimal)
Full scale for 10 to 10 V: F448 to 0BB8 Hex
Full scale for other ranges: 0000 to 1770 Hex
Averaging function Supported (Set in output words n+1 and n+2.)
Open-circuit detection function Supported
Conversion time 2 ms/point (8 ms/all points)
Isolation method Photocoupler isolation between analog I/O terminals and internal circuits. No isolation
between analog I/O signals.
Current consumption 5 VDC: 100 mA max.; 24 VDC: 90 mA max.

Analog Input Signal Analog input data is digitally converted according to the input signal range as
Ranges shown below.

Note When the input exceeds the specified range, the A/D conversion data will be
fixed at either the lower limit or upper limit.

423
Analog Input Units Section 7-2

Analog Input Signal


Ranges
10 to 10 V Inputs
Converted data Voltage in the -10 to 10 V
Hexadecimal (Decimal)
range corresponds to hexa-
0CE4 (3300) decimal values F448 to 0BB8
0BB8 (3000) (-3,000 to 3,000). The range
of data that can be converted
is F31C to 0CE4 hex (-3,300
to 3,300). A negative voltage
11 V 10 V 0000 (0) is expressed as twos comple-
0V 10 V 11 V ment.

F448 (3000)
F31C (3300)

0 to 10 V Inputs
Converted data Voltage in the 0 to 10 V range
Hexadecimal (Decimal) corresponds to hexadecimal
189C (6300) values 0000 to 1770 (0 to
1770 (6000) 6,000). The range of data that
can be converted is FED4 to
189C hex (-300 to 6,300). A
negative voltage is expressed
as twos complement.
0.5 V 0000 (0)
0V 10 V 10.5 V

FED4 (300)

0 to 5 V Inputs
Converted data Voltage in the 0 to 5 V range
Hexadecimal (Decimal) corresponds to hexadecimal
189C (6300)
values 0000 to 1770 (0 to
1770 (6000) 6,000). The range of data that
can be converted is FED4 to
189C hex (-300 to 6,300). A
negative voltage is expressed
as twos complement.
0.25V 0000 (0)
0V 5V 5.25 V

FED4 (300)

1 to 5 V Inputs
Converted data Voltage in the 1 to 5 V range
Hexadecimal (Decimal)
corresponds to hexadecimal
189c (6300) values 0000 to 1770 (0 to
1770 (6000)
6,000). The range of data that
can be converted is FED4 to
189C hex (-300 to 6,300).
Voltage in the range of 0.8 to
0000 (0) 0.8 V
1 V is expressed as twos
1V 5 V 5.2 V
FED4 (300)
complement.
If an input is below the range
(i.e., less than 0.8 V), the
open-circuit detection func-
tion is activated and the data
becomes 8,000.

424
Analog Input Units Section 7-2

0 to 20 mA Inputs

Converted data
Current in the 0 to 20 mA
Hexadecimal (Decimal) range corresponds to hexa-
decimal values 0000 to 1770
189C (6300)
1770 (6000) (0 to 6,000). The range of
data that can be converted is
FED4 to 189C hex (-300 to
6,300). A negative current is
expressed as twos comple-
1 mA 0000 (0) ment.
0 mA 20 mA 21 mA

FED4 (300)

4 to 20 mA Inputs
Converted data Current in the 4 to 20 mA
Hexadecimal (Decimal)
range corresponds to hexa-
189C (6300) decimal values 0000 to 1770
1770 (6000) (0 to 6,000). The range of
data that can be converted is
FED4 to 189C hex (-300 to
6,300). Current in the range of
0000 (0) 3.2 mA
3.2 to 4 mA is expressed as
0 mA 4 mA 20 mA 20.8 mA
twos complement.
FED4 (300)
If an input is below the range
(i.e., less than 3.2 mA), the
open-circuit detection func-
tion is activated and the data
becomes 8,000.

Averaging Function For analog inputs, the averaging function operates when the averaging bit is
set to 1. The averaging function outputs the average (a moving average) of
the last eight input values as the converted value. If there is only a slight vari-
ation in inputs, it is handled by the averaging function as a smooth input.
The averaging function stores the average (a moving average) of the last eight
input values as the converted value. Use this function to smooth inputs that
vary at a short interval.
Open-circuit Detection The open-circuit detection function is activated when the input range is set to
Function 1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
to 20 mA and the current drops below 3.2 mA. When the open-circuit detec-
tion function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.

425
Analog Input Units Section 7-2

Procedure
Connect Analog Input Units.
Connect and wire Units.
Wire to analog output devices.

Write set data to output words (n+1, n+2).


Create a ladder program
Set use of inputs.
Select input signals using range codes.
Set use of averaging.
Read A/D conversion values from input words
(m+1 to m+4).
For current inputs, confirm that there is no open
circuit.

Writing Set Data and


Reading A/D
Conversion Values
CPU Unit Analog Input Unit

Ladder program
(n+1) CH Set data (inputs 1, 2)
(n+2) CH Set data (inputs 3, 4)
MOV
(m+1) CH Analog input 1 conversion value
(m+2) CH Analog devices
Analog input 2 conversion value
Temperature sensor
(m+3) CH Analog input 3 conversion value Pressure sensor
Writes the set data (use Speed sensor
of inputs, averaging, (m+4) CH Analog input 4 conversion value Flow sensor
range codes). Voltage/current meter
Reads the conversion The last input word allocated to the Other devices
value. CPU Unit or already connected
Expansion (I/O) Unit is m and the
last output word is n.

1. Connecting the Analog Input Unit

Connect the Analog Input Unit to the CPU Unit.


Analog Input Unit
CPU Unit CP1W-AD041
CPM1A-AD041

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

IN CH
00 01 02 03 04 06 00 01 03 04 06 I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
COM COM COM COM 05 07 COM 02 COM 05 07 VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC

OUT

426
Analog Input Units Section 7-2

2. Wiring Analog Inputs

Internal Circuits

V IN1
510 k 250
I IN1
Analog input 1

Internal circuits
COM1()
510 k to

to

V IN4
510 k 250
I IN4
Analog input 4
COM4()
510 k

AG
Analog ground

Wiring for Analog Inputs

2-core shielded 2-core shielded


+ twisted-pair cable V IN +
twisted-pair cable
V IN
Analog Analog Analog
device with Analog I IN
I IN device with Input
voltage Input
current Unit
output COM Unit COM
output
FG FG

Note (1) Connect the shield to the FG terminal to prevent noise.


(2) When an input is not being used, short the + and terminals.
(3) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(4) When there is noise in the power supply line, install a noise filter on the
input section and the power supply.
(5) Refer to the following information on open circuits when using voltage in-
puts.

427
Analog Input Units Section 7-2

A
Analog
input
device
B C
1

Analog
input
device
2

24 VDC

For example, if analog input device 2 is outputting 5 V and the same power
supply is being used as shown above, about 1/3, or 1.6 V, will be applied at
the input for input device 1.
Consider the following information on open input circuits when using voltage
inputs. Either use separate power supplies, or install an isolator at each input.
If the same power supply is used as shown in the following diagram and an
open circuit occurs at point A or B, an unwanted current flow will occur as
shown by the dotted lines in the diagram, creating a voltage at the other input
of about 1/3 to 1/2. If the 1 to 5-V range is being used, the open-circuit detec-
tion function will not operate. Also, if there is an open circuit at C, the open-cir-
cuit detection function will not operate because the negative sides are the
same.

3. Creating the Ladder Program

Allocating I/O Words Four input words and two output words are allocated from the next words fol-
lowing the last I/O words allocated to the CPU Unit or an existing Expansion
Unit or Expansion I/O Unit.

Words (m+1) to (m+4)

Analog Input Unit

Words (n+1), (n+2)

Writing Set Data Write the settings for input use, averaging use, and range codes for words n+1
and n+2. When the set data is transferred from the CPU Unit to the Analog I/O
Unit, the A/D conversion will be started.

428
Analog Input Units Section 7-2

15 8 7 6 5 4 3 2 1 0

Wd (n+1) 1 0 0 0 0 0 0 0

Set to 1. Analog input 2 Analog input 1

15 8 7 6 5 4 3 2 1 0
Wd (n+2) 1 0 0 0 0 0 0 0

Set to 1. Analog input 4 Analog input 3

Set Data

Range code Analog input signal range


00 10 to 10 V
01 0 to 10 V
10 1 to 5 V or 4 to 20 mA
11 0 to 5 V or 0 to 20 mA

Averaging
0 No
1 Yes
Input Use
0 No
1 Yes

The Analog Input Unit will not start converting analog I/O values until the
range code has been written.
Once the range code has been set, it is not possible to change the setting
while power is being supplied to the CPU Unit. To change the I/O range,
turn the CPU Unit OFF then ON again.
Averaging Set whether averaging is to be used for set data. When the averaging bit is set
to 1, the average (moving average) for the past eight inputs is output as con-
version data.
Reading Analog Input Read the conversion value storage area with the ladder program. With word m
Conversion Values as the last input word allocated to the CPU Unit or an already-connected
Expansion Unit, the A/D conversion data will be output to the following words
m+1 to m+4.
Startup Operation After the power is turned ON, it will require two cycle times plus approximately
50 ms before the first conversion data is stored in the input words. Therefore,
create a program as shown below, so that when operation begins simulta-
neously with startup it will wait for valid conversion data.
The analog input data will be 0000 until the initial processing is completed.
Power ON
P_On TIM5 is started when the power is
T5 turned ON. After 0.1 to 0.2 s (100 to
#0002 200 ms) elapses, the TIM5 contact
T5 turns ON and the analog input 1 con-
MOV(021) version data stored in word 2 is trans-
2 ferred to DM0.
D0

Handling Unit Errors When an error occurs in an Analog Input Unit, the analog input conversion
data becomes 0000.

429
Analog Output Units Section 7-3

Expansion Unit errors are output to bits 0 to 6 of word A436. The bits are
allocated from A436.00 in order starting with the Unit nearest the CPU
Unit. Use these flags in the program when it is necessary to detect errors.
Ladder Program Example
Analog Input range Range code Averaging Set data Destination
input word
Input 1 0 to 10 V 01 Yes 1101 (B hex) n+1
Input 2 4 to 20 mA 10 Yes 1110 (E hex) n+1
Input 3 -10 to +10 V 00 No 1000 (8 hex) n+2
Input 4 Not used. -(00) --- 0000 (0 hex) n+2

Operation start 1 cycle ON


A200.11
MOV(021)
#80EB
102 Writes set data E and B.

MOV(021)
#8008
Always ON 103 Writes set data 0 and 8.
P_On
TIM5
#0002
Execution
T5 condition
CMP(020)
003
#8000

P_EQ
110.00 Input 2 open circuit alarm
Execution
T5 condition
MOV(021)
002

Execution D100 Reads analog input 1 converted value.


T5 condition
MOV(021)
003

Execution D101 Reads analog input 2 converted value.


T5 condition
MOV(021)
004
D102 Reads analog input 3 converted value.

7-3 Analog Output Units


Each CP1W-DA041/CPM1A-DA041 Analog Output Unit provides four analog
outputs.
The analog output signal ranges are 1 to 5 V, 0 to 10 V, -10 to +10 V, 0 to
20 mA, and 4 to 20 mA. The resolution is 1/6,000. The open-circuit detec-
tion function is activated in the ranges of 1 to 5 V and 4 to 20 mA.
The Analog Input Unit uses four output words, so a maximum of three
Units can be connected.

430
Analog Output Units Section 7-3

Part Names CP1W-DA041/CPM1A-DA041

(3) Expansion connector

OUT CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 NC
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC

(2) Expansion I/O


(1) Analog output terminals
connecting cable

1. Analog Output Terminals


Connected to analog input devices.

Output Terminal Arrangement


V OUT1 Voltage output 1
OUT CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG I OUT1 Current output 1
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
COM1 Output common 1
V OUT2 Voltage output 2
I OUT2 Current output 2
COM2 Output common 2
V OUT3 Voltage output 3
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG I OUT3 Current output 3
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
COM3 Output common 3
V OUT4 Voltage output 4
I OUT4 Current output 4
COM4 Output common 4

2. Expansion I/O Connecting Cable


Connected to the CPU Unit or previous Expansion Unit. The cable is pro-
vided with the Unit and cannot be removed.
Note Do not touch the cables during operation. Static electricity may cause operat-
ing errors.
3. Expansion Connector
Connected to the next Expansion Unit or Expansion I/O Unit.

Main Analog Output Analog Output Units are connected to a CP1L CPU Unit. For CP1L M-type
Unit Specifications CPU Units, a maximum of three Units can be connected, including other
Expansion Units and Expansion I/O Units.

431
Analog Output Units Section 7-3

For CP1L M-type CPU Units, a maximum


of 3 Expansion Units or Expansion I/O
Units can be connected.

CP1W-20EDR1/ CP1W-8ED/ CP1W-DA041/


CP1L M-type CPU Unit CPM1A-20EDR1 CPM1A-8ED CPM1A-DA041
Expansion I/O Unit Expansion I/O Unit Analog Output Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED

OUT
CH00 01 02 03 04 05 06 07
CH EXP EXP OUT CH
00 01 02 03 04 06 00 01 03 04 06 NC 00 01 02 04 05 07 04 06 I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
COM COM COM COM 05 07 COM 02 COM 05 07 N C C OM CO M C OM 03 CO M 06 C OM 05 07 VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC

OUT

4 analog outputs
Item Voltage Output Current Output
Analog Number of outputs 4 outputs (4 words allocated)
output sec- Output signal range 1 to 5 VDC, 0 to 10 VDC, or 10 to 10 VDC 0 to 20 mA or 4 to 20 mA
tion
External output allow- 2 k min. 350 max.
able load resistance
External output 0.5 max. ---
impedance
Resolution 1/6000 (full scale)
Overall 25C 0.4% full scale
accuracy 0 to 55C 0.8% full scale
D/A conversion data 16-bit binary (4-digit hexadecimal)
Full scale for 10 to 10 V: F448 to 0BB8 Hex
Full scale for other ranges: 0000 to 1770 Hex
Conversion time 2 ms/point (8 ms/all points)
Isolation method Photocoupler isolation between analog I/O terminals and internal circuits. No isola-
tion between analog I/O signals.
Current consumption 5 VDC: 80 mA max.; 24 VDC: 124 mA max.

Analog Output Signal The analog values depend on the output signal ranges, as shown in the fol-
Ranges lowing diagrams.

Note When the output exceeds the specified range, the output signal will be fixed at
either the lower limit or upper limit.

432
Analog Output Units Section 7-3

Analog Output Signal


Ranges
10 to 10 V
The hexadecimal values F448 to 0BB8 (3000 to 3000) correspond to an ana-
log voltage range of 10 to 10 V. The entire output range is 11 to 11 V. Spec-
ify a negative voltage as a twos complement.

11 V
10 V

F31C F448
8000
(3300) (3000) 0000 (0) Conversion
0BB8 0CE4 7FFF Data
0V Hexadecimal
(3000) (3300)
(Decimal)

10 V
11 V

0 to 10 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 0 to 10 V. The entire output range is 0.5 to 10.5 V. Specify a
negative voltage as a twos complement.

10.5 V
10 V

FED4
8000 (300) 0000 (0) Conversion
1770 189C 7FFF Data
0V Hexadecimal
(6000) (6300)
(Decimal)
0.5 V

1 to 5 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 1 to 5 V. The entire output range is 0.8 to 5.2 V.

5.2 V
5V

1V

0.8 V
Conversion
Data
8000 FED4 1770 189C 7FFF Hexadecimal
0V
(300) (6000) (6300) (Decimal)

433
Analog Output Units Section 7-3

0 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 0 to 20 mA. The entire output range is 0 to 21 mA.

21 mA
20 mA

Conversion
8000 0000 (0)
Data
1770 189C 7FFF Hexadecimal
0 mA (Decimal)
(6000) (6300)

4 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 4 to 20 mA. The entire output range is 3.2 to 20.8 mA.

20.8 mA
20 mA

4 mA

3.2 mA Conversion
Data
8000 FED4 0 mA 1770 189C 7FFF Hexadecimal
(300) (6000) (6300) (Decimal)

Procedure
Connect and wire Units.
Connect Analog Output Units.
Wire to analog input devices.

Write range code to output words (n+1, n+2).


Create a ladder program
Set use of outputs.
Select output signals using range codes.
Write D/A conversion values to output words
(n+1 to n+4).

Writing D/A Conversion


Data
CPU Unit Analog Output Unit

Ladder program (n+1) CH Range code (outputs 1, 2)


(n+2) CH Range code (outputs 3, 4)
MOV
(n+1) CH Analog output 1 conversion value
(n+2) CH Analog output 2 conversion value Analog devices
Adjustment equipment
(n+3) CH Analog output 3 conversion value Servo Controller
Writes the range code.
Writes the converted (n+4) CH Analog output 4 conversion value Variable speed device
values. Recorder
Where "n" is the last output word Other
allocated to the CPU Unit, or
previous Expansion Unit or
Expansion I/O Unit.

434
Analog Output Units Section 7-3

1. Connecting the Analog Output Unit


Connect the Analog Output Unit to the CPU Unit.
CP1W-DA041
CPU Unit CPM1A-DA041
Analog Output Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

OUT CH
00 01 02 03 04 06 00 01 03 04 06 I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
COM COM COM COM 05 07 COM 02 COM 05 07 VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC

OUT

2. Wiring Analog Outputs

Internal Circuits

V OUT1
Analog output 1
I OUT1
Internal circuits

COM1 ()
to
to
V OUT4

I OUT4 Analog output 4

COM4 ()

Analog ground NC

Wiring for Analog Outputs

2-core shielded 2-core shielded


twisted-pair cable twisted-pair cable
V OUT + V OUT +
Analog Analog
Analog device Analog device
I OUT I OUT
output with output with
unit COM voltage unit COM current
input input
FG FG

Note (1) Connect the shield to the FG terminal to prevent noise.


(2) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(3) When there is noise in the power supply line, install a noise filter on the
input section and the power supply.
(4) When external power is supplied (when range codes are set), or when the
power is interrupted, there may be a pulse status analog output of up to
1 ms. If this status is a problem, take the following measures.
Turn ON the power to the CP1L CPU Unit, check the operation status,
and then turn ON the power at the load.
Turn OFF the power to the load and then turn OFF the power to the
CP1L CPU Unit.

435
Analog Output Units Section 7-3

3. Ladder Program

Allocation of Output Four output words are allocated, beginning from the first word following the
Words last I/O word allocated to the CPU Unit or already-connected Expansion I/O
Unit or Expansion Unit.

Analog Output Unit

Words n+1 to n+4

Writing the Range Code Write the output use and the range code to words n+1 and n+2. The D/A con-
version will start when the set data is transferred from the CPU Unit to the
Analog Output Unit.
15 0 8 7 6 5 4 3 2 1
Wd n+1 1 0 0 0 0 0 0 0

Set to 1. Analog output 2 Analog output 1

15 0 8 7 6 5 4 3 2 1

Wd n+2 1 0 0 0 0 0 0 0

Set to 1. Analog output 4 Analog output 3

Range Code

Range code Analog output signal range


000 10 to 10 V
001 0 to 10 V
010 1 to 5 V
011 0 to 20 mA
100 4 to 20 mA
Output use
0 No
1 Yes

The Analog Output Unit will not start converting analog I/O values until the
range code has been written. The output will be 0 V or 0 mA.
From when the range code has been written until data in the analog out-
put convertible range is written, 0 V or 0 mA will be output in the 0 to 10 V,
-10 to +10 V, and 0 to 20 mA ranges, and 1 V or 4 mA will be output in the
1 to 5 V and 4 to 20 mA ranges.
Once the range code has been set, it is not possible to change the setting
while power is being supplied to the CPU Unit. To change the I/O range,
turn the CPU Unit OFF then ON again.

436
Analog Output Units Section 7-3

Writing Analog Output Set The ladder program can be used to write data to the output word where the
Values set value is stored. The output word will be n+1 when n is the last output
word allocated to the CPU Unit, or previous Expansion Unit or Expansion I/O
Unit.
Startup Operation After power is turned ON, it will require two cycle times plus approximately 50
ms before the first data is converted.
The following table shows the output status after the initial processing is com-
pleted.
Output type Voltage output Current output
Output range 0 to 10 V, 1 to 5 V 0 to 20 mA 4 to 20 mA
-10 to +10 V
Before range 0V 0 mA
code is written
After range 0V 1V 0 mA 4 mA
code is written

Therefore, create a program as shown below, so that when operation begins


simultaneously with startup it will wait for valid set data.

Always ON Flag TIM 005 will start as soon as power


P_On
turns ON. After 0.1 to 0.2 s (100 to
T5
200 ms), the Completion Flag for
#0002
TIM 005 will turn ON, and the data
T5
stored in DM 0100 will be moved to
MOV(021) IR 102 as the conversion data for
D100 analog output 1.
102

Handling Unit Errors When an error occurs at the Analog Output Unit, the analog output will be
0 V or 0 mA. If a CPU Unit fatal error occurs when analog outputs are set
in the 1 to 5 V or 4 to 20 mA range, 0 V or 0 mA will be output for a CPU
error I/O bus error, and 1 V or 1 mA will be output for all other errors.
Expansion Unit errors are output to bits 0 to 6 of word A436. The bits are
allocated from A436.00 in order starting with the Unit nearest the CPU
Unit. Use these flags in the program when it is necessary to detect errors.
Program Example
Analog output Output range Range code Set data Destination
word
Output 1 0 to 10 V 001 1001 (9 hex) Wd n+1
Output 2 4 to 20 mA 100 1100 (C hex) Wd n+1
Output 3 -10 to 10 V 000 1000 (8 hex) Wd n+2
Output 4 Not used. -(000) 0000 (0 hex) Wd n+2

437
Analog I/O Units Section 7-4

Operation start 1 cycle ON


A200.11
MOV(021)
#80C9
102 Writes set data C and 9.

MOV(021)
#8008 Writes set data 0 and 8.
Always ON Flag 103
P_On
TIM5
#0002
Execution
T5 condition
MOV(021)
D200
102 Writes analog output 1 conversion data.
Execution
T5 condition
MOV(021)
D201

Execution 103 Writes analog output 2 conversion data.


T5 condition
MOV(021)
D202
104 Writes analog output 3 conversion data.

7-4 Analog I/O Units


7-4-1 CPM1A-MAD01 Analog I/O Units
Each CPM1A-MAD01 Analog I/O Unit provides 2 analog inputs and 1 analog
output.
The analog input range can be set to 0 to 10 VDC, 1 to 5 VDC, or 4 to
20 mA with a resolution of 1/256.
An open-circuit detection function can be used with the 1 to 5 VDC and 4
to 20 mA settings.
The analog output range can be set to 0 to 10 VDC, 10 to 10 VDC, or 4
to 20 mA. The output has a resolution of 1/256 when the range is set to 0
to 10 VDC or 4 to 20 mA, or a resolution of 1/512 when set to 10 to
10 VDC.

Part Names
CPM1A-MAD01

MAD01 (3) Expansion connector

OUT IN
CH CH EXP
I OUT VIN 1 COM 1 I IN2
V OUT COM I IN1 V IN2 COM 2

(2) Expansion I/O connecting cable


(1) Analog I/O terminals

438
Analog I/O Units Section 7-4

(1) Analog I/O Terminals


Connected to analog I/O devices.
I/O Terminal Arrangement

OUT IN

I OUT VIN1 COM1 I IN2


VOUT COM I IN1 V IN2 COM2

Note When using current inputs, short terminal V IN1 with I IN1 and ter-
minal V IN2 with I IN2.
V OUT Voltage output
I OUT Current output
COM Output common
V IN1 Voltage input 1
I IN1 Current input 1
COM1 Input common 1
V IN2 Voltage input 2
I IN2 Current input 2
COM2 Input common 2

(2) Expansion I/O Connecting Cable


Connected to the expansion connector of a CP1L CPU Unit or an Expan-
sion Unit or Expansion I/O Unit. The cable is provided with the Analog I/
O Unit and cannot be removed.

!Caution Do not touch the cables during operation. Static electricity may cause operat-
ing errors.

(3) Expansion Connector


Used for connecting Expansion Units or Expansion I/O Units.

439
Analog I/O Units Section 7-4

Main Analog I/O Unit Analog I/O Units are connected to the CP1L CPU Unit. For CP1L M-type CPU
Specifications Units, up to three Units can be connected, including any other Expansion
Units and Expansion I/O Units that are also connected.
For CP1L M-type CPU Units, a maximum
of 3 Expansion Units or Expansion I/O
Units can be connected.

CP1W-20EDR1/ CP1W-8ED/ CPM1A-MAD01


CP1L M-type CPU Unit CPM1A-20EDR1 CPM1A-8ED Analog I/O Unit
Expansion I/O Unit Expansion I/O Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED MAD01

OUT
CH00 01 02 03 04 05 06 07 OUT IN
CH EXP EXP CH CH EXP
00 01 02 03 04 06 00 01 03 04 06 NC 00 01 02 04 05 07 04 06 IO U T V IN 1 CO M1 IIN 2
COM COM COM COM 05 07 COM 02 COM 05 07 N C C OM CO M C OM 03 CO M 06 C OM 05 07 V O UT CO M IIN 1 V IN 2 CO M2

OUT

2 analog inputs
1 analog output
Item Voltage I/O Current I/O
Analog Number of inputs 2
Input Input signal range 0 to 10 V/1 to 5 V 4 to 20 mA
Section
Max. rated input 15 V 30 mA
External input impedance 1 M min. 250 rated current
Resolution 1/256
Accuracy 1.0% full scale
A/D conversion data 8-bit binary
Analog Number of outputs 1
Output Output signal range 0 to 10 V or 10 to 10 V 4 to 20 mA
Section
(See Max. external output current 5 mA ---
note 2.) Allowable external output load resistance --- 350
Resolution 1/256 (1/512 when the output signal range is 10 to 10 V)
Accuracy 1.0% of full scale
Set data 8-bit signed binary
Conversion time 10 ms max. per Unit (See note 1.)
Isolation method Photocoupler isolation between I/O terminals and PC signals.
No isolation between analog I/O signals.
Current consumption 5 VDC: 66 mA max., 24 VDC: 66 mA max.

Note (1) The conversion time is the total time for 2 analog inputs and 1 analog out-
put.
(2) With analog outputs it is possible to use both voltage outputs and current
outputs at the same time. In this case however, the total output current
must not exceed 21 mA.

440
Analog I/O Units Section 7-4

Analog I/O Signal Ranges


Analog Input Signal Ranges
0 to 10 V inputs 1 to 5 V inputs 4 to 20 mA inputs
Conversion value Conversion value Conversion value
FF FF FF

80 80 80

00 00 00
0V 5V 10 V 0V 1V 3V 5V 0 mA 4 mA 12 mA 20 mA
Input signal Input signal Input signal

Analog Output Signal Ranges


(V)
10 to +10 V outputs 10

7
6

3
2
Set value
1
8100 80FF 8080
0
00 0080 00FF 0100
1 Set value
2
3

4
5

6
7

8
9

10

4 to 20 mA outputs 0 to 10 V output
(mA) (V)
20 10

16
12 5

8
4

8080 0000 0080 00FF 0100 8080 0000 0080 00FF 0100
Set value

441
Analog I/O Units Section 7-4

Using Analog I/O


Connect the Unit Connect the Analog I/O Unit.

Wire the analog I/O Connect an analog input device.

Create a ladder program Write the range code.


Analog input: 0 to 10 V, 1 to 5 V, 4 to 20 mA
Analog output: 0 to 10 V, 10 to 10 V, 4 to 20 mA
Analog input: Read converted data.
Analog output: Write set value.

Connecting the Analog I/O Connect the Analog I/O Unit to the CPU Unit.
Unit
CPU Unit CPM1A-MAD01
Analog I/O Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

MAD01

OUT IN
CH CH EXP
00 01 02 03 04 06 00 01 03 04 06 IO U T V IN 1 CO M1 IIN 2
COM COM COM COM 05 07 COM 02 COM 05 07 V O UT CO M IIN 1 V IN 2 CO M2

OUT

Wiring Analog I/O Devices Analog Input Wiring


2-core shielded Analog I/O Unit
twisted-pair cable
Analog + V IN1
output 250
I IN1
device
voltage COM1
output
10 K
FG
+ V IN2 0V
Analog
output I IN2 250
device
current COM2
output
10 K
FG
0V

Analog I/O Wiring Example


Using analog input 1 as a voltage input Using analog input 2 as a current input

I OUT V IN1 COM1 I IN2 I OUT V IN1 COM1 I IN2


VOUT COM I IN1 V IN2 COM2 VOUT COM I IN1 V IN2 COM2

Common () Current input 2 (+)

Voltage input 1 (+) Common ()

442
Analog I/O Units Section 7-4

Analog Output Wiring


Voltage Outputs
Analog I/O Unit 2-core shielded
twisted-pair cable
VOUT +
Analog
input
I OUT
device
voltage
COM input

0V FG

Current Outputs
Analog I/O Unit

VOUT 2-core shielded


twisted-pair cable
Analog
I OUT + input
device
current
COM input

0V FG

Analog I/O Wiring Example


Using analog output as a voltage output

I OUT V IN1 COM1 I IN2


VOUT COM I IN1 V IN2 COM2

Voltage output (+)


Common ()

Note (1) For analog outputs it is possible to use both voltage outputs and current
outputs at the same time, but the total current output must not exceed
21 mA.
(2) Use 2-core shielded twisted-pair cables.
(3) Wire away from power lines (AC power supply wires, power lines, etc.)
(4) When an input is not being used, short V IN and I IN to the COM terminal.
(5) Use crimp terminals. (Tighten terminals to a torque of 0.5 Nm.)
(6) When using current inputs, short VIN to IIN.
(7) When there is noise in the power supply line, install a noise filter on the
input section and the power supply terminals.
Creating a Ladder I/O Allocation
Program
Two input words and one output word are allocated to the Analog I/O Unit,
starting from the next word following the last allocated word on the CPU Unit
or previous Expansion Unit or Expansion I/O Unit.

443
Analog I/O Units Section 7-4

Analog I/O Unit


(m + 1)
(m + 2) "m" is the last allocated input word and
"n" the last allocated output word on
32 analog inputs the CPU Unit or previous Expansion
Unit or Expansion I/O Unit.
16 analog outputs

(n + 1)

Writing the Range Code


Write the range code to word n+1. A/D or D/A conversion begins when the
range code is transferred from the CPU Unit to the Analog I/O Unit. There are
eight range codes, FF00 to FF07, that combine both the analog input 1 and 2
and analog output signal ranges, as shown below.
Range Analog input 1 signal Analog input 2 signal Analog output signal
code range range range
FF00 0 to 10 V 0 to 10 V 0 to 10 V/4 to 20 mA
FF01 0 to 10 V 0 to 10 V 10 to 10 V/4 to 20 mA
FF02 1 to 5 V/4 to 20 mA 0 to 10 V 0 to 10 V/4 to 20 mA
FF03 1 to 5 V/4 to 20 mA 0 to 10 V 10 to 10 V/4 to 20 mA
FF04 0 to 10 V 1 to 5 V/4 to 20 mA 0 to 10 V/4 to 20 mA
FF05 0 to 10 V 1 to 5 V/4 to 20 mA 10 to 10 V/4 to 20 mA
FF06 1 to 5 V/4 to 20 mA 1 to 5 V/4 to 20 mA 0 to 10 V/4 to 20 mA
FF07 1 to 5 V/4 to 20 mA 1 to 5 V/4 to 20 mA 10 to 10 V/4 to 20 mA

The voltage/current selection is made by switching the wiring.


Write the range code to the Analog I/O Unit output word (n + 1) in the first
cycle of program execution.
First Cycle Flag
A200.11
MOV(021)
Range code (4 digits hexadecimal)
FF02
Analog input 1: 1 to 5 V or 4 to 20 mA
(n+1)
Analog input 2: 0 to 10 V
Analog output: 0 to 10 V or 4 to 20 mA

Allocated output word

The Analog I/O Unit will not start converting analog I/O values until the
range code has been written.
Once the range code has been set, it is not possible to change the setting
while power is being supplied to the CPU Unit. To change the I/O range,
turn the CPU Unit OFF then ON again.
If a range code other than those specified in the above table is written to
n+1, the range code will not be received by the Analog I/O Unit and ana-
log I/O conversion will not start.

444
Analog I/O Units Section 7-4

Reading A/D Conversion Tables


Data converted from analog to digital is output to bits 00 to 07 in words m+1
and m+2.
CPU Unit Analog I/O Unit

Ladder program
Word n + 1 Range code
Analog input 1
MOVE instruction Word m + 1
MOV(21) conversion value
Word m + 2 Analog input 2
Writes the range conversion value
code. Reads the
conversion value.

Analog devices
"m" is the last input word and "n" is the last Temperature sensor
output word allocated to the CPU Unit, or Pressure sensor
previous Expansion Unit or Expansion I/O Unit. Speed sensor
Flow sensor
Voltage/current meter

15 07 00
m+1

Analog input 1 Analog input 1 conversion value (00 to FF hex)


Open-circuit
Detection Flag
0: Normal
1: Open-circuit

15 07 00
m+2

Analog input 2 Analog input 2 conversion value (00 to FF hex)


Open-circuit
Detection Flag
0: Normal
1: Open-circuit

Note The Open-circuit Detection Flag is turned ON if the input signal range is set to
1 to 5 V or 4 to 20 mA and the input signal falls below 1 V or 4 mA. (Open cir-
cuits are not detected when the input signal range is set to 0 to 10 V.)

445
Analog I/O Units Section 7-4

Setting D/A Conversion Data


Output data is written to the Analog I/O Units allocated output word, word
n+1.
CPU Unit Analog I/O Unit

Ladder program (See note.)


Word n + 1 Range code
Analog output set value

MOV(21) MOVE instruction

Writes the range code


Writes the set value

Analog devices
Adjustment equipment
"n" is the last output word allocated to the CPU Servo Controller
Unit, or previous Expansion Unit or Expansion I/O Variable speed device
Unit. Recorder
Other

Note Word (n + 1) can be used for either the range code or the analog output set
value.

15 00
n+1
Sign bit
(Used when the Set value (00 to FF hex)
output signal range is
10 to 10 V.)

1,2,3... 1. The set value range is 0000 to 00FF hex when the output signal range is 0
to 10 V/4 to 20 mA.
2. The set value range is divided into two parts: 8000 to 80FF hex (10 to 0
V) and 0000 to 00FF hex (0 to 10 V) when the output signal range is 10
to 10 V.
3. If FF@@ is input, 0 V/4 mA will be output.
4. If an output value is specified, the following bits will be ignored.
Output range of 10 to 10 V: Bits 08 to 14
Output range of 0 to 10 V/4 to 20 mA: Bits 08 to 15
Startup Operation
After power is turned ON, it will require two cycle times plus approx. 100 ms
before the first data is converted. The following instructions can be placed at
the beginning of the program to delay reading converted data from analog
inputs until conversion is actually possible.
Analog input data will be 0000 until initial processing has been completed.
Analog output data will be 0 V or 0 mA until the range code has been written.
After the range code has been written, the analog output data will be 0 V or
4 mA if the range is 0 to 10 V, 10 to 10 V, or 4 to 20 mA.

446
Analog I/O Units Section 7-4

Always ON
P_On
TIM TIM 0 will start as soon as power turns ON.
After 0.2 to 0.3 s (200 to 300 ms), the input for
0 TIM 0 will turn ON, and the converted data
#3 from analog input 0 that is stored in word 2
will be transferred to D00000.
T0
MOV(021)
2
D0

Handling Unit Errors


When an error occurs in the Analog I/O Unit, analog input data will be
0000 and 0 V or 4 mA will be output as the analog output.
Expansion Unit/Expansion I/O Unit errors are output to bits 0 to 6 of word
A436. The bits are allocated from A436.00 in order starting with the Unit
nearest the CPU Unit. Use these flags in the program when it is neces-
sary to detect errors.
Programming Example
This programming example uses these ranges:
Analog input 0: 0 to 10 V
Analog input 1: 1 to 5 V or 4 to 20 mA
Analog output: 0 to 10 V or 4 to 20 mA
First Cycle ON Flag
A200.11
MOV(021)
#FF04
102 Writes the range code (FF04) to the Unit.
Always ON Flag
P_On
TIM
0
#3
Execution
T0 condition
MOV(021)
10
D0 Reads analog input 0's converted value.
Execution
T0 condition 3.15
110.00 Open-circuit alarm

Execution
T0 condition
MOV(021)
3
D1 Reads analog input 1's converted value.
Execution
T0 condition
MOV(021)
D10
102 The content of D10 is written to the output
word as the analog output set value.

447
Analog I/O Units Section 7-4

7-4-2 CP1W-MAD11/CPM1A-MAD11 Analog I/O Units


Each CP1W-MAD11/CPM1A-MAD11 Analog I/O Unit provides 2 analog
inputs and 1 analog output.
The analog input range can be set to 0 to 5 VDC, 1 to 5 VDC, 0 to
10 VDC, 10 to 10 VDC, 0 to 20 mA, or 4 to 20 mA. The inputs have a
resolution of 1/6000.
An open-circuit detection function can be used with the 1 to 5 VDC and 4
to 20 mA settings.
The analog output range can be set to 1 to 5 VDC, 0 to 10 VDC, 10 to
10 VDC, 0 to 20 mA, or 4 to 20 mA. The outputs have a resolution of
1/6000.

Part Names
CP1W-MAD11/CPM1A-MAD11

(4) DIP switch

(3) Expansion connector

NC NC

(2) Expansion I/O connecting cable


(1) Analog I/O terminals

(1) Analog I/O Terminals


Connected to analog I/O devices.
CPM1A-MAD11 Terminal Arrangements

NC NC

I OUT NC NC V IN0 COM0 I IN1 AG


V OUT COM NC NC I IN0 V IN1 COM1

Note For current inputs, short V IN0 to I IN0 and V IN1 to I IN1.
V OUT Voltage output
I OUT Current output
COM Output common
V IN0 Voltage input 0
I IN0 Current input 0
COM0 Input common 0
V IN1 Voltage input 1
I IN1 Current input 1
COM1 Input common 1

448
Analog I/O Units Section 7-4

(2) Expansion I/O Connecting Cable


Connected to the expansion connector of a CP1L CPU Unit or a CMP1A
Expansion Unit or Expansion I/O Unit. The cable is provided with the
Analog I/O Unit and cannot be removed.

!Caution Do not touch the cables during operation. Static electricity may cause operat-
ing errors.

(3) Expansion Connector


Used for connecting Expansion Units or Expansion I/O Units.
(4) DIP Switch
Used to enable or disable averaging.
Pin1: Average processing for analog input 0
(OFF: Average processing not performed; ON: Average processing performed)
Pin2: Average processing for analog input 1
(OFF: Average processing not performed; ON: Average processing performed)

Main Analog I/O Unit Analog I/O Units are connected to the CP1L CPU Unit. For CP1L M-type CPU
Specifications Units, up to three Units can be connected, including any other Expansion
Units and Expansion I/O Units that are also connected.

For CP1L M-type CPU Units, a maximum


of 3 Expansion Units or Expansion I/O
Units can be connected.

CP1W-20EDR1/ CP1W-8ED/ CP1W-MAD11/


CP1L M-tpye CPU Unit CPM1A-20EDR1 CPM1A-8ED CPM1A-MAD11
Expansion I/O Unit Expansion I/O Unit Analog I/O Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED

OUT
CH00 01 02 03 04 05 06 07
CH EXP EXP
00 01 02 03 04 06 00 01 03 04 06
NC 00 01 02 04 05 07 04 06 NC NC
COM COM COM COM 05 07 COM 02 COM 05 07 N C C OM CO M C OM 03 CO M 06 C OM 05 07

OUT
1 analog output

2 analog inputs

449
Analog I/O Units Section 7-4

Item Voltage I/O Current I/O


Analog Number of inputs 2 inputs (2 words allocated)
Input Input signal range 0 to 5 VDC, 1 to 5 VDC, 0 to 20 mA or 4 to 20 mA
Section 0 to 10 VDC, or 10 to 10 VDC
Max. rated input 15 V 30 mA
External input impedance 1 M min. Approx. 250
Resolution 1/6000 (full scale)
Overall accuracy 25C 0.3% full scale 0.4% full scale
0 to 55C 0.6% full scale 0.8% full scale
A/D conversion data 16-bit binary (4-digit hexadecimal)
Full scale for 10 to 10 V: F448 to 0BB8 hex
Full scale for other ranges: 0000 to 1770 hex
Averaging function Supported (Settable for individual inputs via DIP switch)
Open-circuit detection function Supported
Analog Number of outputs 1 output (1 word allocated)
Output Output signal range 1 to 5 VDC, 0 to 10 VDC, or 0 to 20 mA or 4 to 20 mA
Section 10 to 10 VDC,
Allowable external output load resistance 1 k min. 600 max.
External output impedance 0.5 max.
Resolution 1/6000 (full scale)
Overall accuracy y 25C 0.4% full scale
0 to 55C 0.8% full scale
Set data (D/A conversion) 16-bit binary (4-digit hexadecimal)
Full scale for 10 to 10 V: F448 to 0BB8 hex
Full scale for other ranges: 0000 to 1770 hex
Conversion time 2 ms/point (6 ms/all points)
Isolation method Photocoupler isolation between analog I/O terminals and internal
circuits.
No isolation between analog I/O signals.
Current consumption 5 VDC: 83 mA max., 24 VDC: 110 mA max.

Analog I/O Signal Analog I/O data is digitally converted according to the analog I/O signal range
Ranges as shown below.

Note When the input exceeds the specified range, the AD converted data will be
fixed at either the lower limit or upper limit.

450
Analog I/O Units Section 7-4

Analog Input Signal 10 to 10 V


Ranges
The 10- to 10-V range corresponds to the hexadecimal values F448 to 0BB8
(3000 to 3000). The entire data range is F31C to 0CE4 (3300 to 3300).
A negative voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)

0CE4 (3300)
0BB8 (3000)

11V 10V 0000 (0)


0V 10 V 11 V

F448 (3000)
F31C (3300)

0 to 10 V
The 0- to 10-V range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (300 to 6300). A negative
voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)

189C (6300)
1770 (6000)

0.5 V 0000 (0)


0V 10 V 10.5 V

FED4 (300)

0 to 5 V
The 0- to 5-V range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (300 to 6300). A negative
voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)

189C (6300)
1770 (6000)

0.25 V 0000 (0)


0V 5 V 5.25 V

FED4 (300)

451
Analog I/O Units Section 7-4

1 to 5 V
The 1- to 5-V range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (300 to 6300). Inputs
between 0.8 and 1 V are expressed as twos complements. If the input falls
below 0.8 V, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)

189C (6300)
1770 (6000)

0000 (0) 0.8 V


1V 5 V 5.2 V
FED4 (300)

0 to 20 mA
The 0- to 20-mA range corresponds to the hexadecimal values 0000 to 1770
(0 to 6000). The entire data range is FED4 to 189C (300 to 6300). A negative
voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)

1 mA 0000 (0)
0 mA 20 mA 21 mA

FED4 (300)

4 to 20 mA
The 4- to 20-mA range corresponds to the hexadecimal values 0000 to 1770
(0 to 6000). The entire data range is FED4 to 189C (300 to 6300). Inputs
between 3.2 and 4 mA are expressed as twos complements. If the input falls
below 3.2 mA, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)

189C (6300)
1770 (6000)

0000 (0) 3.2 mA


0 mA 4 mA 20 mA 20.8 mA
FED4 (300)

452
Analog I/O Units Section 7-4

Analog Output Signal 10 to 10 V


Ranges
The hexadecimal values F448 to 0BB8 (3000 to 3000) correspond to an ana-
log voltage range of 10 to 10 V. The entire output range is 11 to 11 V. Spec-
ify a negative voltage as a twos complement.

11 V
10 V

F31C F448
8000 (3300) (3000) 0000 (0)
Conversion Data
0V 0BB8 0CE4 7FFF Hexadecimal (Decimal)
(3000) (3300)

10 V
11 V

0 to 10 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 0 to 10 V. The entire output range is 0.5 to 10.5 V. Specify a
negative voltage as a twos complement.

10.5 V
10 V

FED4
8000 (300) 0000 (0)
Conversion Data
0V 1770 189C 7FFF Hexadecimal (Decimal)
(6000) (6300)
0.5 V

1 to 5 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 1 to 5 V. The entire output range is 0.8 to 5.2 V.

5.2 V
5V

1V
0.8 V
Conversion Data
8000 FED4 0 V 1770 189C 7FFF
(300) (6000) (6300) Hexadecimal (Decimal)

453
Analog I/O Units Section 7-4

0 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 0 to 20 mA. The entire output range is 0 to 21 mA.

21 mA
20 mA

8000 0000 (0)


1770 189C Conversion Data
0 mA 7FFF
(6000) (6300) Hexadecimal (Decimal)

4 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 4 to 20 mA. The entire output range is 3.2 to 20.8 mA.

20.8 mA
20 mA

4 mA
3.2 mA
1770 189C 7FFF Conversion Data
8000 FED4 0 mA
(300) (6000) (6300) Hexadecimal (Decimal)

Averaging Function for The averaging function can be enabled for inputs using the DIP switch. The
Analog Inputs averaging function stores the average (a moving average) of the last eight
input values as the converted value. Use this function to smooth inputs that
vary at a short interval.
Open-circuit Detection The open-circuit detection function is activated when the input range is set to
Function for Analog 1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
Inputs to 20 mA and the current drops below 3.2 mA. When the open-circuit detec-
tion function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.

454
Analog I/O Units Section 7-4

Using Analog I/O


Connect the Unit. Connect the Analog I/O Unit.

Analog inputs: 0 to 5 VDC, 1 to 5 VDC, 0 to 10 VDC, 10 to


Set the I/O ranges. 10 VDC, 0 to 20 mA, or 4 to 20 mA
Analog output: 1 to 5 VDC, 0 to 10 VDC, 10 to 10 VDC, 0 to
20 mA, or 4 to 20 mA
Set analog inputs as voltage or current inputs and set the
averaging function.
Wire the analog I/O. Connect analog I/O devices.

Program operation in Write the range code.


the ladder program. Analog inputs: Read converted data.
Analog output: Write set values.

Reading Range Code


Settings and A/D CPU Unit Analog I/O Unit
Conversion Data

Ladder program
Word n + 1 Range code
Analog input 0
MOVE instruction Word m + 1 converted value
MOV(21)
Word m + 2 Analog input 1
Writes the range code.
Reads the converted
converted value
values.

Analog devices
"m" is the last input word and "n" is the last Temperature sensor
output word allocated to the CPU Unit or Pressure sensor
previous Expansion Unit or Expansion I/O Unit. Speed sensor
Flow sensor
Voltage/current meter
Other

Writing D/A Conversion


Data CPU Unit Analog I/O Unit

Ladder program (See note.)


Word n + 1 Range code
Analog output set value

MOV(21) MOVE instruction

Writes the range code.


Writes the set value.

Analog devices
Adjustment equipment
"n" is the last output word allocated to the CPU Servo Controller
Unit or previous Expansion Unit or Expansion I/O Variable speed device
Unit. Recorder
Other

455
Analog I/O Units Section 7-4

Note Word (n + 1) can be used for either the range code or the analog output set
value.
Connecting the Analog I/O This section describes how to connect an Analog I/O Unit to the CPU Unit.
Unit and Setting the DIP
Switch CP1W-MAD11
CPU Unit CPM1A-MAD11
Analog I/O Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

00 01 02 03 04 06 00 01 03 04 06 NC NC
COM COM COM COM 05 07 COM 02 COM 05 07

OUT

Setting the Averaging Function


DIP switch pins 1-1 and 1-2 are used to set the averaging function. When
averaging is enabled, a moving average of the last eight input values is output
as the converted value. The averaging function can be set separately for ana-
log inputs 1 and 2.

DIP switch Function Setting Default


pin
1-1 Averaging Analog input 0 OFF
OFF: Disabled; ON: Enabled
1-2 Analog input 1 OFF
OFF: Disabled; ON: Enabled

Wiring Analog I/O Devices Internal Circuits


Analog Inputs Analog Outputs

Input 0 Output
510 k V IN0 V OUT
I IN0
250 k
Internal circuits

Internal circuits

COM0 () COM ()
510 k
Input 1
V IN1
510 k I OUT
I IN1
250 k
COM1 ()
510 k NC

AG
NC

Analog ground Analog ground

456
Analog I/O Units Section 7-4

Terminal Arrangements

NC NC

I OUT NC NC V IN0 COM0 I IN1 AG


V OUT COM NC NC I IN0 V IN1 COM1

Note For current inputs, short V IN0 to I IN0 and V IN1 to I IN1.
V OUT Voltage output
I OUT Current output
COM Output common
V IN0 Voltage input 0
I IN0 Current input 0
COM0 Input common 0
V IN1 Voltage input 1
I IN1 Current input 1
COM1 Input common 1

Wiring for Analog Inputs


Analog + V IN Analog + V IN
device Analog device Analog
I IN I IN
with I/O Unit with I/O Unit
voltage COM current COM
output output

Wiring for Analog Outputs

V OUT + Analog V OUT + Analog


Analog device Analog device
I OUT I OUT
I/O Unit with I/O Unit with
COM voltage COM current
input input

Note (1) Use shielded twisted-pair cables, but do not connect the shield.
(2) When an input is not being used, short the + and terminals.
(3) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(4) When there is noise in the power supply line, install a noise filter on the
input section and the power supply terminals.

457
Analog I/O Units Section 7-4

(5) Refer to the following diagram regarding wiring disconnections when volt-
age input is being used.

A
Analog
input
device 1
B C

Analog
input
device 2

24 VDC

Example: If analog input device 2 is outputting 5 V and the same power sup-
ply is being used for both devices as shown above, approximately 1/3, or 1.6
V, will be applied to the input for input device 1.
If a wiring disconnection occurs when voltage input is being used, the situa-
tion described below will result. Either separate the power supplies for the
connected devices, or use an isolator for each input.
If the same power supply is being used by the connected devices and a dis-
connection occurs at points A or B in the above diagram, an unwanted circuit
path will occur as shown along the dotted line in the diagram. If that occurs, a
voltage of approximately 1/3 to 1/2 of the output voltage of the other con-
nected device will be generated. If that voltage is generated while the setting
is for 1 to 5 V, open-circuit detection may not be possible. Also, if a disconnec-
tion occurs at point C in the diagram, the negative (-) side will be used in for
both devices and open-circuit detection will not be possible.
This problem will not occur for current inputs even if the same power supply is
used.
Note When external power is supplied (when setting the range code), or when
there is a power interruption, pulse-form analog output of up to 1 ms may be
generated. If this causes problems with operation, take countermeasures
such as those suggested below.
Turn ON the power supply for the CP1L CPU Unit first, and then turn ON
the power supply for the load after confirming correct operation.
Turn OFF the power supply for the load before turning OFF the power
supply for the CP1L CPU Unit.

458
Analog I/O Units Section 7-4

Creating a Ladder I/O Allocation


Program
Two input words and one output word are allocated to the Analog I/O Unit
starting from the next word following the last allocated word on the CPU Unit
or previous Expansion Unit or Expansion I/O Unit.

Analog I/O Unit

Word m+1
Word m+2

32 inputs
16 outputs

Word n+1

Writing the Range Code


Write the range code to word n+1. A/D or D/A conversion begins when the
range code is transferred from the CPU Unit to the Analog I/O Unit. There are
five range codes, 000 to 100, that combine the analog input 1 and 2 and ana-
log output signal ranges, as shown below.
Range Analog input 0 signal Analog input 1 signal Analog output signal
code range range range
000 10 to 10 V 10 to 10 V 10 to 10 V
001 0 to 10 V 0 to 10 V 0 to 10 V
010 1 to 5 V/4 to 20 mA 1 to 5 V/4 to 20 mA 1 to 5 V
011 0 to 5 V/0 to 20 mA 0 to 5 V/0 to 20 mA 0 to 20 mA
100 --- --- 4 to 20 mA

15 8 7 6 5 4 3 2 1 0
n+1 1 0 0 0 0 0 0

Analog Analog Analog


output input 1 input 0

Example
The following instructions set analog input 0 to 4 to 20 mA, analog input 1 to 0
to 10 V, and the analog output to 10 to 10 V.
First Cycle Flag
A200.11
MOV(021) Analog input 0: 4 to 20 mA
#800A Analog input 1: 0 to 10 V
Analog output: 10 to 10 V
n+1

The Analog I/O Unit will not start converting analog I/O values until the
range code has been written. Until conversion starts, inputs will be 0000,
and 0 V or 0 mA will be output.
After the range code has been set, 0 V or 0 mA will be output for the 0 to
10-V, 10 to 10-V, or 0 to 20-mA ranges, and 1 V or 4 mA will be output for
the 1 to 5-V and 4 to 20-mA ranges until a convertible value has been
written to the output word.
Once the range code has been set, it is not possible to change the setting
while power is being supplied to the CPU Unit. To change the I/O range,
turn the CPU Unit OFF then ON again.

459
Analog I/O Units Section 7-4

Reading Converted Analog Input Values


The ladder program can be used to read the memory area words where the
converted values are stored. Values are output to the next two words (m + 1,
m + 2) following the last input word (m) allocated to the CPU Unit or previous
Expansion Unit or Expansion I/O Unit.
Writing Analog Output Set Values
The ladder program can be used to write data to the memory area where the
set value is stored. The output word will be n+1, where n is the last output
word allocated to the CPU Unit or previous Expansion Unit or Expansion I/O
Unit.
Startup Operation
After power is turned ON, it will require two cycle times plus approx. 50 ms
before the first data is converted. The following instructions can be placed at
the beginning of the program to delay reading converted data from analog
inputs until conversion is actually possible.
Analog input data will be 0000 until initial processing has been completed.
Analog output data will be 0 V or 0 mA until the range code has been written.
After the range code has been written, the analog output data will be 0 V or
0 mA if the range is 0 to 10 V, 10 to 10 V, or 0 to 20 mA, or it will be 1 V or
4 mA if the range is 1 to 5 V or 4 to 20 mA.
Always ON Flag
P_On
T5
TIM 5 will start as soon as power turns ON.
#0002 After 0.1 to 0.2 s (100 to 200 ms), the input
for TIM 5 will turn ON, and the converted
data from analog input 0 that is stored in
T5
word 2 will be transferred to D00000.
MOV(021)
2
D0

Handling Unit Errors


When an error occurs in the Analog I/O Unit, analog input data will be
0000 and 0 V or 0 mA will be output as the analog output.
If a CPU error or an I/O bus error (fatal errors) occurs at the CPU Unit and
the analog output is set to 1 to 5 V or 4 to 20 mA, 0 V or 0 mA will be out-
put. For any other fatal errors at the CPU Unit, 1 V or 4 mA will be output.
Expansion Unit and Expansion I/O Unit errors are output to bits 0 to 6 of
word A436. The bits are allocated from A436.00 in order starting from the
Unit nearest the CPU Unit. Use these flags in the program when it is nec-
essary to detect errors.
Programming Example
This programming example uses these ranges:
Analog input 0: 0 to 10 V
Analog input 1: 4 to 20 mA
Analog output: 0 to 10 V

460
Temperature Sensor Units Section 7-5

First Cycle ON Flag


A200.11
MOV(021)
#8051
102 Writes the range code (8051) to the Unit.
Always ON Flag
P_On
TIM5
#0002

Execution
T5 condition
MOV(021)
002
D0 Reads analog input 0's converted value.
Execution
T5 condition
MOV(021)
003
D1 Reads analog input 1's converted value.

Execution
T5
condition
MOV(021)
D10
102 The content of D10 is written to the output
Execution word as the analog output set value.
T5 condition
CMP(020)
003
#8000

(P_EQ)
110.00 Open-circuit alarm

7-5 Temperature Sensor Units


CP1W-TS002/TS102 and CPM1A-TS002/TS102 Temperature Sensor Units
each provide up to four input points, and CP1W-TS001/TS001 and CPM1A-
TS001/TS101 Temperature Sensor Units each provide up to two input points.
The inputs can be from thermocouples or platinum resistance thermometers.
CP1W-TS002/TS102 and CPM1A-TS002/TS102 Temperature Sensor Units
are each allocated four input words.

461
Temperature Sensor Units Section 7-5

Part Names
Temperature Sensor Units:
CP1W-TS@@@
and CPM1A-TS@@@

(2) DIP Switch (3) Rotary Switch

(5) Expansion Connector

(4) Expansion I/O


Connector Cable (1) Temperature Sensor Input Terminals

(1) Temperature Sensor Input Terminals


Used to connect temperature sensors such as thermocouples or plati-
num resistance thermometers.
(2) DIP Switch
Used to set the temperature unit (C or F) and the number of decimal
places used.
(3) Rotary Switch
Used to set the temperature input range. Make the setting according to
the specifications of the temperature sensors that are connected.
(4) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a Expan-
sion Unit or Expansion I/O Unit. The cable is included with the Tempera-
ture Sensor Unit and cannot be removed.
Note Do not touch the cables during operation. Static electricity may
cause operating errors.
(5) Expansion Connector
Used for connecting Expansion Units or Expansion I/O Units.

Main Specifications
Possible to connect to a maximum of
3 Units including Expansion I/O Units

CP1W-20EDR1/ CP1W-8ED/ CP1W-TS@@@/


CP1L CPU Unit CPM1A-20EDR1 CPM1A-8ED CPM1A-TS@@@
Expansion I/O Unit Expansion I/O Unit Temperature Sensor Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED

OUT
CH00 01 02 03 04 05 06 07
CH EXP EXP
00 01 02 03 04 06 00 01 03 04 06 NC 00 01 02 04 05 07 04 06
COM COM COM COM 05 07 COM 02 COM 05 07 N C C OM CO M C OM 03 CO M 06 C OM 05 07

OUT

Thermocouples or
platinum resistance
thermometers Temperature inputs

462
Temperature Sensor Units Section 7-5

Item CP1W-TS001 CP1W-TS002 CP1W-TS101 CP1W-TS102


CPM1A-TS001 CPM1A-TS002 CPM1A-TS101 CPM1A-TS102
Temperature sensors Thermocouples Platinum resistance thermometer
Switchable between K and J, but same type Switchable between Pt100 and JPt100, but
must be used for all inputs. same type must be used for all inputs.
Number of inputs 2 4 2 4
Allocated input words 2 4 2 4
Accuracy (The larger of 0.5% of converted value or (The larger of 0.5% of converted value or
2C) 1 digit max. (See note.) 1C) 1 digit max.
Conversion time 250 ms for 2 or 4 input points
Converted temperature data 16-bit binary data (4-digit hexadecimal)
Isolation Photocouplers between all temperature input signals
Current consumption 5 VDC: 40 mA max., 24 VDC: 59 mA max. 5 VDC: 54 mA max., 24 VDC: 73 mA max.

Note Accuracy for a K-type sensor at 100C or less is 4C 1 digit max.

Using Temperature Sensor Units


Connect the Unit. Connect the Temperature Sensor Unit.

Set the temperature ranges. Set the temperature unit, 2-decimal-place Mode
if required, and set the temperature input range.

Connect the temperature Connect temperature sensors.


sensors.

Program operation in the Read temperature data stored in the input word.
ladder program.

Connecting Temperature A maximum of three CPM1A-TS002 and CPM1A-TS102 Temperature Sensor


Sensor Units Units can be connected, because each is allocated four words.
CP1W-20EDR1/ CP1W-8ED/ CP1W-TS001/TS101/
CP1L CPU Unit CPM1A-20EDR1 CPM1A-8ED CPM1A-TS001/TS101
Expansion I/O Unit Expansion I/O Unit Temperature Sensor Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 C OM 01 03 05 07 09 11 C OM 01 03
00 02 04 06 08 10 00 02 04 06 08 10 NC 00 02 04 06 08 10 00 02

IN CH IN
C H 00 01 02 03 04 05 06 07 C H 00 01 02 03

08 09 10 11 08 09 10 11

20EDR1 8ED

OUT
CH00 01 02 03 04 05 06 07

00 01 02 03 04 06 00 01 03 04 06
CH EXP EXP
NC 00 01 02 04 05 07 04 06
COM COM COM COM 05 07 COM 02 COM 05 07
N C C OM CO M C OM 03 CO M 06 C OM 05 07

OUT

Setting Temperature Ranges


Note (1) Always turn OFF the power supply before setting the temperature range.
(2) Never touch the DIP switch or rotary switch during Temperature Sensor
Unit operation. Static electricity may cause operating errors.
The Temperature Sensor Units DIP switch and rotary switch are used to set
the temperature unit, to select 2-decimal-place Mode is to be used, and to set
the temperature input range.

463
Temperature Sensor Units Section 7-5

DIP Switch Rotary Switch


Used to set the temperature Used to set the
unit and the number of temperature input range.
decimal places used.

Temperature input terminals

DIP Switch Settings


The DIP switch is used to set the temperature unit (C or F) and the number
of decimal places used.

ON

1 2

SW1 Setting
1 Temperature unit OFF C
ON F
2 Number of decimal OFF Normal (0 or 1 digit after the decimal
places used (See note.) point, depending on the input range)
(0.01 expression) ON 2-decimal-place Mode

Note For details on 2-decimal-place Mode, refer to Two-decimal-place Mode on


page 471.
Rotary Switch Setting

!Caution Set the temperature range according to the type of temperature sensor con-
nected to the Unit. Temperature data will not be converted correctly if the tem-
perature range does not match the sensor.

!Caution Do not set the temperature range to any values other than those for which
temperature ranges are given in the following table. An incorrect setting may
cause operating errors.

The rotary switch is used to set the temperature range.

Setting CP1W-TS001/TS002 CP1W-TS101/TS102


CPM1A-TS001/002 CPM1A-TS101/102
Input type Range (C) Range (F) Input type Range (C) Range (F)
0 K 200 to 1,300 300 to 2,300 Pt100 200.0 to 650.0 300.0 to
1,200.0
1 0.0 to 500.0 0.0 to 900.0 JPt100 200.0 to 650.0 300.0 to
1,200.0
2 J 100 to 850 100 to 1,500 --- Cannot be set.
3 0.0 to 400.0 0.0 to 750.0 ---
4 to F --- Cannot be set. ---

464
Temperature Sensor Units Section 7-5

Connecting Temperature Thermocouples


Sensors
CP1W-TS001/CPM1A-TS001
Either K or J thermocouples can be connected, but both of the thermocouples
must be of the same type and the same input range must be used for each.
Input 0 Input 1 NC NC NC
+ +
Input 0 Input 1 NC NC NC NC NC

Temperature input 0
Cold junction compensator

Temperature input 1

CP1W-TS002/CPM1A-TS002
Either K or J thermocouples can be connected, but all four of the thermocou-
ples must be of the same type and the same input range must be used for
each.
Input 0 Input 1 Input 2 Input 3 NC
+ + + +
Input 0 Input 1 NC NC NC Input 2 Input 3

Temperature input 0
Cold junction Temperature input 2
compensator
Temperature input 1 Temperature input 3

Note When using a Temperature Sensor Unit with a thermocouple input, observe
the following precautions:
Do not remove the cold junction compensator attached at the time of
delivery. If the cold junction compensator is removed, the Unit will not be
able to measure temperatures correctly.
Each of the input circuits is calibrated with the cold junction compensator
attached to the Unit. If the Unit is used with the cold junction compensator
from other Units, the Unit will not be able to measure temperatures cor-
rectly.
Do not touch the cold junction compensator. Doing so may result in incor-
rect temperature measurement.

465
Temperature Sensor Units Section 7-5

Platinum Resistance Thermometers


CP1W-TS101/CPM1A-TS101
One or two Pt or JPt platinum resistance thermometers can be connected, but
both of the thermometers must be of the same type and the same input range
must be used for each.
Input 0 Input 1 Input 1 NC NC NC NC
A A B
Input 0 Input 0 Input 1 NC NC NC NC
B B B

Pt Pt

Temperature input 0 Temperature input 1

CP1W-TS102/CPM1A-TS102
Up to four Pt100 or JPt100 platinum resistance thermometers can be con-
nected, but all four of the thermometers must be of the same type and the
same input range must be used for each.
Input 0 Input 1 Input 1 NC Input 2 Input 3 Input 3
A A B A A B
Input 0 Input 0 Input 1 NC Input 2 Input 2 Input 3
B B B B B B

Pt Pt Pt Pt

Temperature Temperature Temperature Temperature


input 0 input 1 input 2 input 3

Note Do not connect anything to terminals not used for inputs.


Creating a Ladder Word Allocations
Program Temperature Sensor Units are allocated words as Expansion Units, in order of
connection. A Temperature Sensor Unit is allocated the next input words fol-
lowing the input words of the CPU Unit or previous Expansion Unit or Expan-
sion I/O Unit. Four input words are allocated is to the 2-input CPM1A-TS001
or CPM1A-TS101 and four input words are allocated to the 4-input CPM1A-
TS002 or CPM1A-TS102. No output words are allocated.

466
Temperature Sensor Units Section 7-5

Example 1
CP1W-TS001/101
CP1L CPM1A-TS001/101
Temperature Sensor Unit
Input word CIO 0 CIO 2
addresses CIO 1 CIO 3

Output word CIO 100 None


addresses CIO 101

Example 2
CP1W-TS002/102
CP1L CPM1A-TS002/102
Temperature Sensor Unit

Input word CIO 0 CIO 2


addresses CIO 1 CIO 3
CIO 4
CIO 5
Output word CIO 100 None
addresses CIO 101

Converted Temperature Data


The temperature data will be stored in the input words allocated to the Tem-
perature Sensor Unit in 4-digit hexadecimal.
TS002/TS102 TS001/TS101
m+1 Converted temperature data from input 0 m+1 Converted temperature data from input 0

m+2 Converted temperature data from input 1 m+2 Converted temperature data from input 1

m+3 Converted temperature data from input 2

m+4 Converted temperature data from input 3

m is the last input word allocated to the CPU Unit, Expansion I/O Unit, or
Expansion Unit connected immediately before the Temperature Sensor Unit.
Negative values are stored as 2s complements.
Data for range codes that include one digit after the decimal point are
stored without the decimal point, i.e., 10 times the actual value is stored.
Input Data conversion examples
Unit: 1C K or J 850C 0352 hex
200C FF38 hex
Unit: 0.1C K, J, Pt100 or 10 500.0C 5000 1388 hex
JPt100 20.0C 200 FF38 hex
200.0C 2000 F830 hex

If the input temperature exceeds the range that can be converted, the
converted temperature data will be held at the maximum or minimum
value in the range.
If the input temperature exceeds the range by more than a specified
amount, the open-circuit detection function will detect an open-circuit and
the converted temperature data will be set to 7FFF.
The open-circuit detection function will also operate if the cold junction
compensator is faulty.
The open-circuit detection function will be automatically cleared and nor-
mal input temperature conversion will begin automatically when the input
temperature returns to the convertible range.

467
Temperature Sensor Units Section 7-5

Startup Operation
After power is turned ON, approximately 1 s is required for the first conversion
data to be stored in the input word. During that period, the data will be 7FFE.
Therefore, create a program as shown below, so that when operation begins
simultaneously with startup it will wait for valid conversion data.
Always ON
P_On
CMP(020)
2 Temperature input data
#7FFE
output word
(P_EQ)
Initialization
Completed Flag
1000.00

Handling Unit Errors


Expansion Unit and Expansion I/O Unit errors are output to bits 0 to 6 of
word A436. The bits are allocated from A436.00 in order starting from the
Unit nearest the CPU Unit. CP1W-/CPM1A-TS002 and CP1W-/CPM1A-
TS102 Temperature Sensor Units are allocated two bits each. Use these
flags in the program when it is necessary to detect Expansion Unit/Expan-
sion I/O Unit errors.
When an error occurs, the Temperature Sensor Unit data becomes 7FFF
hex (the same as for an open-circuit detection). With an open-circuit
detection, it is not reflected in word A436.
Programming Example

1,2,3... 1. The following programming example shows how to convert the input data
from 2 temperature sensor inputs to BCD and store the result in D0 and
D1.
CP1W-TS001/101
CP1L CPM1A-TS001/101
Temperature Sensor Unit
CIO 0 CIO 2
Inputs CIO 1 CIO 3 Temperature unit setting: 0 (C)
Two-decimal-place Mode: 0 (normal)
Input range setting: 1 (K: 0.0 to 500.0C)
Input 0: CIO 2
Outputs CIO 100 None Input 1: CIO 3
CIO 101

468
Temperature Sensor Units Section 7-5

Always ON
P_On
CMP(020) Detects completion of input 0 initialization.
002
#7FFE
(P_EQ)
1000.00 ON when input 0 has been initialized
Always ON
P_On
CMP(020) Detects completion of input 1 initialization.
3
#7FFE
(P_EQ)
1000.01 ON when input 1 has been initialized
1000.00 Execution condition
CMP(020) Detects an open-circuit alarm or Unit
2 error by checking converted temperature
data for the error code 7FFF.
#7FFF
(P_EQ)
1000.02 ON when an open-circuit alarm or Unit
error has been detected for input 0.
CMP(020) Checks to see if the temperature data
2 in word 2 has exceeded 500.0C (1388
hex without decimal point).
#1388
(P_GT)
1000.03 ON for an input 0 temperature error
(P_LT)
BCD(024) Converts the temperature data for
2 input 0 to BCD and stores the result in
D0.
D0
1000.01 Execution condition
CMP(020) Detects an open-circuit alarm or Unit
3 error by checking whether the error
code 7FFF has been output
#7FFF
(P_EQ)
1000.02 ON when an open-circuit alarm or Unit
error has been detected for input 1.
CMP(020) Checks to see if the temperature data
3 in word 3 has exceeded 500.0C
(1388 hex without decimal point).
#1388
(P_GT)
1000.03 ON for an input 1 temperature error
(P_LT)
BCD(024) Converts the temperature data for
input 1 to BCD and stores the result in
3
D1.
D1

2. The following programming example shows how to convert the data for
temperature input 0 to BCD and store the result in D0 and D1. 0001 is
stored in D1 when the input data is a negative value. The following system
configuration is used.
CP1W-TS001/101
CP1L CPM1A-TS001/101
Temperature Sensor Unit
Inputs CIO 0 CIO 2
CIO 1 CIO 3

Outputs CIO 100 None


CIO 101

Temperature unit setting 0 (C)


Two-decimal-place Mode 0 (normal)
Input range setting 1 (Pt100: 200.0 to 650.0C)
Input 0 CIO 2

469
Temperature Sensor Units Section 7-5

Programming with BCD(24) Instruction


Always ON
P_On
CMP(020) Detects completion of input 0 initialization.
2
#7FFE

Execution 1000.00 ON when input 0 has been initialized


1000.00 condition
CMP(020) Detects an open-circuit alarm or Unit
error by checking whether the error code
002 7FFF has been output
#7FFF
P_EQ ON when an open-circuit alarm or Unit
1000.01 error has been detected for input 0.
P_EQ 2.15
BCD(024) Stores positive BCD data in D00000.
2
D0

MOV(021) Stores #0000 in D00001.


#0000
D1
2.15
CLC(041)

SBB(051) When input 0 converted value is negative


#0000 (#0000 minus two's complement = actual
value)
2
D0

BCD(024) Stores negative BCD data in D0.


D0
D0

MOV(021) Stores #0001 in D1 to indicate a


#0001 negative number.
D1

470
Temperature Sensor Units Section 7-5

Programming with SCL2() Instruction


Always ON
P_On
CMP(020) Detects completion of input 0
initialization.
2
#7FFE

Execution 1000.00 ON when initialization complete.


1000.00 condition
CMP(020) Detects an open-circuit alarm.
2
#7FFF
P_EQ
01000 ON when an open-circuit alarm has
been detected.
P_EQ
SCL2(486)
2
D10 Parameter settings for data conversion:
D0

P_CY
MOV(021) When the converted value is non-
#0000 negative, stores #0000 in D00001.
D1
P_CY
MOV(021) When the converted value is
#0001 negative, stores #0001 in D00001.

D1

Operation
Binary to BCD conversion
CIO 2 163 162 161 160
CY
D1 D0 (when using SCL2 instruction)
0 0 0 1/0 103 102 101 100 1/0

1: Negative, 0: Non-negative
0: If data non-negative, "0000" stored in D1.
1: If data negative, "0001" stored in D1.

Two-decimal-place If pin 2 on the DIP switch is turned ON, values are stored to two decimal
Mode places. In this case, temperature data is stored as 6-digit signed hexadecimal
(binary) data with 4 digits in the integer portion and 2 digits after the decimal
point. The actual data stored in memory is 100 times the actual value, i.e., the
decimal point is not indicated. Methods for handling this data are described in
this section.
Note When set to store values to two decimal places, temperature data as far as
two digits after the decimal point is converted to 6-digit binary data, but the
actual resolution is not 0.01C (F). For this reason, there may be skipping
and inaccuracies in the first digit after the decimal point (0.1). Treat any reso-
lution above that specified for the normal data format as reference data.

471
Temperature Sensor Units Section 7-5

Temperature Data Partitioning and Structure


Temperature Data (Actual Temperature x 100 Binary)
@@@@@@

Leftmost 3 Digits and Flags

15 14 13 12 11 8 7 4 3 0
Leftmost/ Temperature Open-circuit Not used.
Rightmost Flag Unit Flag Flag Temperature data

0: Leftmost 0: C 0: Normal
1: Rightmost 1: F 1: Error
Always 0 165 164 163

Rightmost 3 Digits and Flags


15 14 13 12 11 8 7 4 3 0
Leftmost/ Temperature Open-circuit Not used.
Rightmost Flag Unit Flag Flag Temperature data

0: Leftmost 0: C 0: Normal
1: Rightmost 1: F 1: Error
Always 0 162 161 160

Leftmost/Rightmost Flag: Indicates whether the leftmost or rightmost 3 digits are provided.
Temperature Unit Flag: Indicates whether the temperature is in C or F.
Open-circuit Flag: Turns ON (1) when an open-circuit is detected. The temperature
data will be 7FF FFF if this flag is ON.

Data Conversion Example 1


Examples
Temperature: 1,130.25C
100: 113025
Temperature Data: 01B981 (hexadecimal for 113025)
Leftmost 3 Digits and Flags

Flags 165 164 163


Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 0 0 0 0 0 1 B 0 0 1 B
Normal Flags Temperature
C
data
Leftmost

Rightmost 3 Digits and Flags

Flags 162 161 160


Bits 15 14 13 12 11 to 08 07 to 04 0
Data 1 0 0 0 9 8 1 8 9 8 1

Normal Flags Temperature


C data
Rightmost

472
Temperature Sensor Units Section 7-5

Example 2
Temperature: 100.12C
100: 10012
Temperature Data: FFD8E4 (hexadecimal for 10012)
Leftmost 3 Digits and Flags
Flags 165 164 163
Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 0 0 0 0 F F D 0 F F D
Normal Flags Temperature
C
data
Leftmost

Rightmost 3 Digits and Flags


Flags 162 161 160
Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 1 0 0 0 8 E 4 8 8 E 4

Normal Flags Temperature


C
data
Rightmost

Example 3
Temperature: 200.12F
100: 20012
Temperature Data: FFB1D4 (hexadecimal for 20012)
Leftmost 3 Digits and Flags
Flags 165 164 163
Bits 15 14 13 12 11 to 08 107 to 04 03 to 00
Data 0 1 0 0 F F B 4 F F B
Normal Flags Temperature
F
data
Leftmost

Rightmost 3 Digits and Flags


Flags 162 161 160
Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 1 1 0 0 1 D 4 C 1 D 4

Normal Flags Temperature


F data
Rightmost

473
Temperature Sensor Units Section 7-5

Example 4
Temperature: Open circuit (F)
Temperature Data: 7FFF FFFF
Leftmost 3 Digits and Flags
Flags 165 164 163
Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 0 1 1 0 7 F F 6 7 F F
Error Flags Temperature
F
data
Leftmost

Rightmost 3 Digits and Flags


Flags 162 161 160
Bits 15 14 13 12 11 to 08 07 to 04 03 to 00
Data 1 1 1 0 F F F E F F F
Error Flags Temperature
F
data
Rightmost

Note (1) Leftmost digits are stored in the lower memory addresses. Treat the data
in the lower memory address as the leftmost digits when programming.
(2) Be sure that the data is read at least once every 125 ms to allow for the
CPU Units cycle time and communications time. Correct data may not be
obtained if the read cycle is greater than 125 ms.
Programming Example The following programming example shows how to use 2-decimal-place Mode
for the following PC configuration.
CPU Unit CP1W/CPM1A-TS001
Temperature Sensor Unit

Inputs Inputs Temperature unit setting:


0 (C)
CIO 000 CIO 002
CIO 001 CIO 003 Two-decimal-place Mode:
1 (2 digits after decimal point stored)
Outputs Outputs
CIO 100 None
CIO 101

In this example, 100 times the temperature data for temperature input 0 is
stored in binary form in D100 to D102.
Temperature input 0 CIO 2 Leftmost data CIO 200
Rightmost data

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D100 163 162 161 160
D101 167 166 165 164
D102 Always 0 Always 0 Always 0 0 0

Temperature Unit Flag (0: C, 1: F)


Open-circuit Flag (0: Normal, 1: Error)

474
Temperature Sensor Units Section 7-5

A200.11 (First Scan Flag)


MOV(021) (1)
#0000 Sets D103 and D102 to #0100 and
D102 #0000, respectively.

MOV(021)
#0100
D103
P_On (Always ON Flag)
CMP(020) Detects completion of input 0 initialization.
2
#7FFE
P_EQ
1000.00 ON when input 0 has been initialized.
1000.00 2.13 (open-circuit detected)
1000.01 Open-circuit alarm output
2.15 (leftmost digits)
SET 02001
1000.02 2.15 (leftmost digits)
MOV(021) (2)
2 Leftmost digits moved to CIO 2000.

2.15 (rightmost digits) 2000


MOVD(083) (3)
Leftmost and rightmost digits
002 rearranged and moved to CIO 2002
#0020 and CIO 2001.
2001
MOVD(083) (4)
2000
#0300
2001
MOVD(083) (5)
2000
#0011
2002
REST 2000.01

SET 2000.02 Data rearrangement completed.

2000.02 2002.07 (non-negative data)


(6)
BCDL(059) If the temperature data is non-negative, the
2001 binary data in CIO 202 and CIO 201 is
D100 converted to BCD and placed in D101 and
2002.07 (negative data) D100.
CLC(041)
(7)
C(412) If the temperature data is negative, the 2's
D102 complement data in CIO 202 and CIO 201 is
converted to binary data representing the
2001 absolute value of the temperature input and
H0 placed in H1 and H0.
C(412)
D0103
2002
H1
BCDL(059) (8)
H0 The binary data in H1 and H0 is
converted to BCD and placed in D101
D100 and D100.
MOVD(083) (9)
#0008 "1" is written to the bit in D101 indicating
negative data.
#0300
D101
REST2000.01

475
CompoBus/S I/O Link Units Section 7-6

Description of Operation
CIO 2: Leftmost 3 digits of temperature data CIO 2: Rightmost 3 digits of temperature data
5 4 3
0 16 16 16 1 162 161 161
(2)
(3)
CIO 2000 0 165 164 163
(4)
(5)

(6)
CIO 2002 0 0 165 164 CIO 2001 164 163 161 160
If the temperature data is
non-negative, binary data is
converted to BCD data.
D101 0/8 106 105 104 D100 103 102 101 100

(9) If temperature data is negative, "8" is written here. (8)


If the temperature data is negative,
(1) #0100 (1) #0000
binary data is converted to BCD data.
D103 0 1 0 0 D102 0 0 0 0

CIO 2002 2's complement data CIO 2001 2's complement data

(7)
H1 0 0 165 164 H0 163 162 161 160
Binary
subtraction

7-6 CompoBus/S I/O Link Units


The CP1L can function as a slave to a CompoBus/S Master Unit (or SRM1
CompoBus/S Master Control Unit) when a CP1W-SRT21/CPM1A-SRT21
CompoBus/S I/O Link Unit is connected. The CompoBus/S I/O Link Unit
establishes an I/O link of 8 inputs and 8 outputs between the Master Unit and
the PLC. Up to three CompoBus/S I/O Link Units, including other Expansion I/
O Units, can be connected to a CP1L CPU Unit.
CompoBus/S Master Unit
(or SRM1 CompoBus/S CP1W-SRT21/
Master Control Unit) CPM1A-SRT21
CompoBus/S
CP1L CPU Unit I/O Link Unit

ON
SYSMAC
CP1L IN
1 2 3 4 5 6

S
L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10
No.

COMM
ERR

SRT21

EXP
00 01 02 03 04 06 00 01 03 04 06 BD H NC( BS+)
COM COM COM COM 05 07 COM 02 COM 05 07 BD L NC( BS-) N C

OUT

Special flat cable or VCTF cable

From the standpoint of the CP1L CPU Unit, the 8 input bits and 8 output bits
allocated to the CompoBus/S I/O Link Unit are identical to input and output
bits allocated to Expansion I/O Units even though the CompoBus/S I/O Link
Unit does not control actual inputs and outputs. The input and output bits allo-
cated to the CompoBus/S I/O Link Unit are one side of an I/O link between the
slave CPU Unit and the CPU Unit to which the Master Unit is connected.

476
CompoBus/S I/O Link Units Section 7-6

Master PLC (CS Series) CP1L

CPU Unit CompoBus/S


CompoBus/S
Master Unit I/O Link Unit
I/O memory I/O memory Node
Unit No. 0
number: 0
8 bits 8 bits Input
Output
CIO 2000 CIO 2
8 bits 8 bits Output
Input
CIO 2004 CIO 12

Specifications
Model number CP1W-SRT21/CPM1A-SRT21
Master/slave CompoBus/S Slave
Number of I/O points 8 input points, 8 output points
Number of words allocated in 1 input word, 1 output word
CPU Unit I/O memory (Allocated in the same way as Expansion Units and
Expansion I/O Units.)
Node number setting Set using the DIP switch
(Set before turning on the CPU Units power supply.)

LED Indicators
Indicator Name Color Meaning
COMM Communications Yellow ON: Communications in progress.
Indicator OFF: Communications stopped or error
has occurred.
ERR Error indicator Red ON: A communications error has
occurred.
OFF: Indicates normal communications
or stand-by.

CP1W-SRT21/CPM1A-SRT21 CompoBus/S I/O Link Unit

ON

1 2 3 4 5 6
(2) DIP Switch

S No.

COMM
ERR
(3) LED Indicators
SRT21

(5) Expansion Connector


EXP
BD NC(BS+)
BD NC(BS-) NC

(4) Expansion I/O Connecting Cable (1) CompoBus/S Terminals

(1) CompoBus/S Terminals


The following CompoBus/S terminals are provided: CompoBus/S com-
munications data high/low terminals, NC terminals for communications
power supply plus (+) and minus (), and an NC terminal. (Power is sup-
plied internally for this Unit, so the NC terminals for communications
power supply can be used as relay terminals.)

477
CompoBus/S I/O Link Units Section 7-6

(2) DIP Switch


Used to specify the node number for the CompoBus/S I/O Link Unit.
(Refer to the following table.)

NODE NUMBER Pin labels Contents

HOLD
DR
1
1
2
4
8
Node Number SW1
2 Setting 8 4 2 1
ON
4 0 0 0 0 0
8 1 0 0 0 1
SW1 2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1

1 = ON, 0 = OFF
Note: The long-distance communications
mode can be used only when one of DR ON Long-distance communications mode (See note.)
the following Master Units is OFF High-speed communications mode
connected: C200HW-SRM21-V1, HOLD ON Retain inputs after a communications error.
CQM1-SRM21-V1, or SRM1-C0@-V2.
OFF Clear inputs after a communications error.

(3) LED Indicators


Used to show the CompoBus/S communications status.
Indicator Name Color Meaning
COMM Communications Yellow ON: Communications in progress.
indicator OFF: Communications stopped or error
has occurred.
ERR Error indicator Red ON: A communications error has
occurred.
OFF: Indicates normal communications
or stand-by.

(4) Expansion I/O Connecting Cable


Connected to the expansion connector of a CP1L CPU Unit or a Expan-
sion Unit or Expansion I/O Unit. The cable is provided with the Compo-
Bus/S I/O Link Unit and cannot be removed.

Note Do not touch the cables during operation. Static electricity may
cause operating errors.
(5) Expansion Connector
Used to connect Expansion Units or Expansion I/O Units.

478
CompoBus/S I/O Link Units Section 7-6

Operating Procedure
Connect the Unit. Connect the CompoBus/S I/O Link Unit.

Determine the node The node number should be a unique number between
address of the 0 and 15.
CompoBus/S I/O Link Unit Use the DIP switch to set the CompoBus/S I/O Link
and set the DIP switch. Unit fs node number, communications mode, and the
status of output data when a communications error
occurs.

Wire the CompoBus/S Connect the CompoBus/S I/O Link Unit to a


transmission path. CompoBus/S transmission path.

Connecting the CompoBus/S I/O Link Units are connected to the CP1L CPU Unit. For CP1L
CompoBus/S I/O Link Unit M-type CPU Units, up to three Units can be connected, including any other
Expansion Units and Expansion I/O Units that are also connected. The Units
can be connected in any order from the CPU Unit.
CP1L M-type CPU Unit CompoBus/S I/O Link Unit

ON
SYSMAC
CP1L IN
1 2 3 4 5 6

S
L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10
No.

COMM
ERR

SRT21

EXP
00 01 02 03 04 06 00 01 03 04 06 BD H NC( BS+)
COM COM COM COM 05 07 COM 02 COM 05 07 BD L NC( BS-) N C

OUT

I/O Allocation
I/O words are allocated to the CompoBus/S I/O Link Unit in the same way as
to other Expansion Units and Expansion I/O Units, i.e., the next available input
and output words are allocated. As shown below, when m is the last allo-
cated input word and n is the last allocated output word, the CompoBus/S I/
O Link Unit is allocated m+1 as its input word and n+1 as its output word.
CompoBus/S I/O Link Unit

Word m+1

8 inputs
8 outputs
Word n+1

In the following example, a CompoBus/S I/O Link Unit is connected as the first
Unit after the CP1L CPU Unit.
CP1L CompoBus/S
CPU Unit I/O LInk Unit
Input words CIO 0 CIO 2
CIO 1

Output words CIO 100 CIO 102


CIO 101

479
CompoBus/S I/O Link Units Section 7-6

The input word (m+1) contains the 8 bits of data from the Master Unit and two
CompoBus/S communications flags.
15 09 08 07 00
Word m+1

CompoBus/S Communications Error Flag Data from the Master Unit


0: Normal; 1: Error

CompoBus/S Communication Status Flag


0: Stopped; 1: Communicating

Write the data to be transmitted to the Master Unit in the output word (n+1).
15 07 00
Word n+1

Data to be transferred to the Master Unit

Note (1) The 8 bits of I/O data are not always transmitted simultaneously. In other
words, 8 bits of data transmitted from the Master CPU Unit at the same
time will not always reach the Slave CPU Unit simultaneously, and 8 bits
of data transmitted from the Slave CPU Unit at the same time will not al-
ways reach the Master CPU Unit simultaneously.
When the 8 bits of input data must be read together, modify the ladder
program in the CPU Unit receiving the data. For example, read the input
data twice in succession and accept the data only when the two values
match.
(2) Unused bits in the CompoBus/S I/O Link Units output word can be used
as work bits, but unused bits in the output slaves cannot be used as work
bits.
(3) Unused bits in input word cannot be used as work bits.
Determining the Node Node Number
Number and Making DIP
The CompoBus/S I/O Link Unit is a Slave Unit with 8 input bits and 8 out-
Switch Settings
put bits. The node number setting is made using the DIP switch; the
inputs and outputs share the same node number.
The range of possible node number settings is determined by the type of
PLC the Master Unit is mounted to and the settings on the Master Unit.
For details refer to the CompoBus/S Operation Manual.

480
CompoBus/S I/O Link Units Section 7-6

DIP Switch Settings


Use the DIP switch to set the CompoBus/S I/O Link Units node number, com-
munications mode, and the status of output data when a communications
error occurs.

NODE NUMBER Pin labels Contents

HOLD
DR
1
1
2
4
8
Node Number SW1
2 Setting 8 4 2 1
ON
4 0 0 0 0 0
8 1 0 0 0 1
SW1 2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1

1 = ON, 0 = OFF
Note: The long-distance communications
mode can be used only when one of DR ON Long-distance communications mode (See note.)
the following Master Units is OFF High-speed communications mode
connected: C200HW-SRM21-V1, HOLD ON Retain inputs after a communications error.
CQM1-SRM21-V1, or SRM1-C0@-V2.
OFF Clear inputs after a communications error.

Note Always turn OFF the power supply before changing the DIP switch settings.
Wiring the CompoBus/S Wire the CompoBus/S communications path as shown in the following dia-
Communications Path grams.
These terminals are not used. They can
however be used as communications power
BD H NC (BS+) supply relay terminals.
BD L NC (BS) NC

BD L
BD H Connect the CompoBus/S Communications Cable.

481
DeviceNet I/O Link Units Section 7-7

7-7 DeviceNet I/O Link Units


Connecting a CPM1A-DRT21 DeviceNet I/O Link Unit (with 32 inputs and 32
outputs as built-in I/O) to function as a slave allows the CP1L to be used as a
DeviceNet slave. A maximum of three DeviceNet I/O Link Units can be con-
nected to the CP1L to create I/O Links for up to 192 points (96 inputs and 96
outputs) between the CP1L and the DeviceNet master.
PLC supporting DeviceNet
master, e.g., CS, C200HX/HG/HE
(-Z), CVM1, CV-series, etc.

DeviceNet Master Unit or


DeviceNet Unit
DeviceNet transmission path

DeviceNet slave DeviceNet slave

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

Each Unit enables remote I/O


communications for 32 input and 32
output points as a DeviceNet slave.
00 01 02 03 04 06 00 01 03 04 06
COM COM COM COM 05 07 COM 02 COM 05 07

OUT

CP1H CPU Unit CPM1A-DRT21


DeviceNet I/O Link Unit

From the standpoint of the CP1L CPU Unit, the 32 input bits and 32 output
bits allocated to the DeviceNet I/O Link Unit are identical to input and output
bits allocated to Expansion I/O Units even though the DeviceNet I/O Link Unit
does not control external inputs and outputs. The input and output bits allo-
cated to the DeviceNet I/O Link Unit are one side of an I/O link between the
slave CPU Unit and the CP1L CPU Unit to which the Master Unit is con-
nected.

Master PLC (CS Series with fixed allocations) CP1L

CPU Unit DeviceNet CPU Unit DeviceNet


Master Unit I/O Link Unit
I/O memory Unit No. 0 I/O memory Node
Outputs Inputs number: 0
CIO 50 CIO 2
CIO 51 32 bits 32 bits CIO 3
Inputs Outputs
CIO 350 CIO 12
CIO 351 32 bits 32 bits
CIO 13

Note Refer to the DeviceNet Slaves Operation Manual (W347) for details on
DeviceNet networks.
Specifications
Model number CPM1A-DRT21
Master/slave DeviceNet Slave

482
DeviceNet I/O Link Units Section 7-7

Number of I/O points 32 input points, 32 output points


Number of words allocated in2 input words, 2 output words
CPU Unit I/O memory (Allocated in the same way as other Expansion Units
and Expansion I/O Units.)
Node number setting Set using the rotary switches
(Set before turning ON the CPU Units power supply.)
Communications current con- 48 mA
sumption

CPM1A-DRT21 DeviceNet I/O Link Unit


(2) Rotary Switches

(3) DIP Switch

(4) LED Indicators

(6) Expansion Connector

(5) Expansion I/O Connecting Cable (1) DeviceNet Communications


Connector

(1) DeviceNet Communications Connector


Used to connect DeviceNet communications. For the wiring, use the con-
nector provided with the CPM1A-DRT21 or use a connector purchased
separately.
(2) Rotary Switches (SW2, SW3)
Used to set DeviceNet node numbers.

Setting range: 0 to 63 (Do not set 64 to 99.)

(3) DIP Switch (SW1)


Used to set the DeviceNet baud rate and the output hold function.

Baud rate setting (See note.)


Pin 1 Pin 2 Baud rate Max. transmission path
length
OFF OFF 125 kbps 500 m
ON OFF 250 kbps 250 m
OFF ON 500 kbps 100 m
ON ON Not allowed. ---

Output hold function setting


Pin 4 DeviceNet baud rate
OFF Clears remote outputs when communications error occurs. (Outputs
turned OFF for each logic value.)
ON Holds remote outputs when communications error occurs.

483
DeviceNet I/O Link Units Section 7-7

Note When using Expansion Unit/Expansion I/O Unit Error Flags (A436)
in the program, set pin 4 on the DIP switch to ON. If communica-
tions are set to be cleared, the timing for clearing outputs and set-
ting the Error Flags may not agree.
(4) LED Indicators
Used to indicate CPM1A-DRT21 status, as shown in the following table.
Indicator Color Status Condition Meaning
MS Green Lit Normal status Normal status
Flashing Not set Switch settings being read
Red Lit Fatal error Fatal hardware error
(watchdog timer)
Flashing Nonfatal error Incorrect switch settings.
--- OFF Power not supplied. Power not supplied.
Waiting for initialization to
start.
Reset in progress.
NS Green Lit Online and commu- Network normal and com-
nications estab- munications established.
lished.
Flashing Online and commu- Network normal and com-
nications not estab- munications not estab-
lished. lished.
Red Lit Fatal communica- Unit has detected network
tions error status preventing normal
communications.
Node number duplications
Bus OFF detected.
Flashing Nonfatal communi- Communications timeout
cations error or communications error
for one or more slaves.
--- OFF Online and power Waiting for node number
OFF. check by master.
Switch setting error.
Power not supplied.

(5) Expansion I/O Connecting Cable


Connected to the expansion connector of a CP1L CPU Unit or an Expan-
sion Unit or Expansion I/O Unit. The cable is included with the DeviceNet
Unit and cannot be removed.
Note Do not touch the cables during operation. Static electricity may
cause operating errors.
(6) Expansion Connector
Used for connecting Expansion Units or Expansion I/O Units.
Handling Unit Errors If a communications error occurs while the slave is on standby, the appropri-
ate bit in word A436 will turn ON. The appropriate bit is determined by the
order in which the Expansion Units and Expansion I/O Units are connected.
The Unit nearest to the CPU Unit uses A436.00. Use these flags in the pro-
gram when it is necessary to detect errors.

484
DeviceNet I/O Link Units Section 7-7

Operating Procedure
Connect the Unit. Connect the DeviceNet I/O Link Unit.

Determine the node The node number should be a unique number between
number of the DeviceNet 0 and 63.
I/O Link Unit and set the Use the DIP switch to set the DeviceNet I/O Link Unit fs
rotary switches. baud rate and the status of output data when a
communications error occurs.

Wire the DeviceNet Connect the DeviceNet I/O Link Unit to a DeviceNet
transmission path. transmission path.

Connecting the DeviceNet DeviceNet I/O Link Units are connected to the CP1L CPU Unit. For CP1L M-
I/O Link Unit type CPU Units, up to three Units can be connected, including any other
Expansion Units and Expansion I/O Units that are also connected. The Units
can be connected in any order from the CPU Unit.
CP1L M-type CPU Unit DeviceNet I/O Link Unit

SYSMAC
CP1L IN

L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11
00 02 04 06 08 10 00 02 04 06 08 10

00 01 02 03 04 06 00 01 03 04 06
COM COM COM COM 05 07 COM 02 COM 05 07

OUT

I/O Allocation
I/O words are allocated to the DeviceNet I/O Link Unit in the same way as to
Expansion I/O Units or other Expansion Units, i.e., the next available input
and output words are allocated. As shown below, when m is the last allo-
cated input word and n is the last allocated output word, the DeviceNet I/O
Link Unit is allocated m+1 as its input word and n+1 as its output word.
DeviceNet I/O Link Unit

Word m+1
Word m+2
32 inputs
32 outputs
Word n+1
Word n+2

In the following example, a CompoBus/S I/O Link Unit is connected as the first
Unit after the CP1L CPU Unit.
CP1L DeviceNet I/O
CPU Unit Link Unit
Input words CIO 0 CIO 2
CIO 1 CIO 3

Output words CIO 100 CIO 102


CIO 101 CIO 103

All of the words allocated to the DeviceNet I/O Link Unit are used to read and
write data between the CPU Unit of the DeviceNet I/O Link Unit and the CPU
Unit of the DeviceNet master, as shown in the following illustration.

485
DeviceNet I/O Link Units Section 7-7

DeviceNet master
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Input Bits
I/O memory CIO 0.00 to CIO 0.11: 12 bits
CIO 0 Do not use. CPU Unit
CIO 1 (m) CIO 1.00 to CIO 1.11: 12 bits
32 bits
CIO 2 (m+1) CIO 2.00 to CIO 2.15: 16 bits
DeviceNet
CIO 3 (m+2) CIO 3.00 to CIO 3.15: 16 bits I/O Link Unit

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Output Bits

CIO 100.00 to CIO 100.11: 8 bits CPU Unit


CIO 100
CIO 101 (n) CIO 101.00 to CIO 101.11: 8 bits
32 bits
CIO 102 (n+1) CIO 102.00 to CIO 102.15: 16 bits DeviceNet
I/O Link Unit
CIO 103 (n+2) CIO 103.00 to CIO 103.15: 16 bits

Note (1) The 32 bits each of I/O data are not always transmitted simultaneously.
In other words, 32 bits of data transmitted from the Master CPU Unit at
the same time will not always reach the CP1L CPU Unit simultaneously,
and 32 bits of data transmitted from the CP1L CPU Unit at the same time
will not always reach the Master CPU Unit simultaneously.
When the 32 bits of input data must be read together, modify the ladder
program in the CPU Unit receiving the data. For example, read the input
data twice in succession and accept the data only when the two values
match.
(2) Unused bits in the DeviceNet I/O Link Units output words can be used as
work bits if they are not used for output from the slave.
(3) Unused bits in input words cannot be used as work bits.
Determining the Node Setting Node Numbers
Number and Making DIP
Use rotary switches SW2 and SW3 to set DeviceNet node number. The set-
Switch Settings
ting range is from 00 to 63, and 64 to 99 cannot be set. Rotary switch settings
go into effect when the power is turned ON.

Setting range: 0 to 63 (Do not set 64 to 99.)

Note The actual range of node numbers that can be set depends on the type of
PLC to which the Master Unit is mounted, and on the Master Unit setting. For
details, refer to the DeviceNet DRT1-series Slaves Operation Manual.
Setting the DIP Switch (SW1)
Used to set the DeviceNet baud rate and the output hold function.

Baud Rate
Pin 1 Pin 2 Baud rate Max. transmission path length
OFF OFF 125 kbps 500 m
ON OFF 250 kbps 250 m
OFF ON 500 kbps 100 m
ON ON Not allowed. ---

486
DeviceNet I/O Link Units Section 7-7

Output Hold Function


Pin 4 DeviceNet baud rate
OFF Clears remote outputs when communications error occurs. (Outputs turned
OFF for each logic value.)
ON Holds remote outputs when communications error occurs.

Note When using Expansion Unit/Expansion I/O Unit Error Flags (A436) in the pro-
gram, turn ON pin 4 on the DIP switch. If communications are set to be
cleared, the timing for clearing outputs and setting the Error Flags may not
agree.
Wiring the DeviceNet When using a CPM1A-DRT21 DeviceNet I/O Link Unit, wire the DeviceNet
Communications Path communications cable as shown in the following diagram.

CPM1A-DRT21
DeviceNet I/O Link Unit

Connector for same CPM1A-DRT21


network (XW4B-05C1-H1-D)
Multidrop Connector
(XW4B-05C4-TF-D)
Black (V)
Blue (CAN low)

Shield

White (CAN high)

Red (V+)

DeviceNet Connectors
Use the following connectors.
Model XW4B-05C1-H1-D XW4B-05C4-TF-D
Form and OMRON connector with screws OMRON connector for multidrop
specifications (provided with CPM1A-DRT21) connections (See note.)

Note Use the XW4B-05C4-TF-D when wiring multidrop connections using Thick
Cables.
Use the following screwdriver for the above connector.

487
DeviceNet I/O Link Units Section 7-7

XW4Z-00C

3.5 mm

0.6 mm

I/O Response Time Refer to the DeviceNet Slaves Operation Manual (W347) for details on the
response time. The data read/write time for one cycle for the CPM1A-DRT21
is approximately 0.5 ms. Add a maximum of 1 ms to the I/O response time.

488

Potrebbero piacerti anche