* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download SECTION 7 Using Expansion Units and Expansion I
Buck converter wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Control system wikipedia , lookup
Flip-flop (electronics) wikipedia , lookup
Schmitt trigger wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Immunity-aware programming wikipedia , lookup
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 Section 7-1 Connecting Expansion Units and Expansion I/O Units 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 Expansion I/O Units is the same as the functionality and performance of CP1MAseries 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 Expansion Units Model Analog Input Unit Analog Output Unit Analog I/O Unit Temperature Control Unit CompoBus/S I/O Link Unit Expansion I/O Units DeviceNet I/O Link Unit 40-point I/O Unit 32-point Output Unit 20-point I/O Unit 16-point Output Unit 8-point Input Unit 8-point Output Unit Note 420 CP1W-AD041 CPM1A-AD041 CP1W-DA041 CPM1A-DA041 CPM1A-MAD01 CP1W-MAD11 CPM1A-MAD11 CP1W-TS001 CPM1A-TS001 CP1W-TS101 CPM1A-TS101 CP1W-TS002 CPM1A-TS002 CP1W-TS102 CPM1A-TS102 CP1W-SRT21 CPM1A-SRT21 CPM1A-DRT21 CP1W-40EDR CPM1A-40EDR CP1W-40EDT CPM1A-40EDT CP1W-40EDT1 CPM1A-40EDT1 CP1W-32ER CP1W-32ET CP1W-32ET1 CP1W-20EDR1 CPM1A-20EDR1 CP1W-20EDT CPM1A-20EDT CP1W-20EDT1 CPM1A-20EDT1 CP1W-16ER CPM1A-16ER CP1W-16ET CP1W-16ET1 CP1W-8ED CPM1A-8ED CP1W-8ER CPM1A-8ER CP1W-8ET CPM1A-8ET CP1W-8ET1 CPM1A-8ET1 Current consumption (mA) 5 VDC 24 VDC 100 90 4 I/O words Input Output 2 80 124 --- 4 66 83 66 110 2 1 40 59 2 --- 54 73 40 59 4 --- 54 73 29 --- 1 1 48 80 --90 2 2 2 2 160 --- 160 --- 49 113 113 103 131 ----44 --- 4 1 1 130 --- 130 --- 42 90 --- 2 76 76 18 ------- 1 --- 26 44 --- 1 75 --- 75 --- CP1W-32ER/32ET/32ET1’s maximum number of simultaneously ON points is 24 (75%). Section 7-2 Analog Input Units Allocation of I/O Words Input bits 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 CPU Unit First Unit: Temperature Control Unit Second Unit: Analog I/O Unit CIO 0.00 to CIO 0.11 CIO 1.00 to CIO 1.11 CIO 2 to CIO 5 None 24 input points 7-2 CIO 6.00 to CIO 6.11 CIO 7.00 to CIO 7.11 24 input points TS002 DA041 None CIO 102 to CIO 105 16 output points Output bits Third Unit: 40-point I/O Unit 16 output points CIO 100.00 to CIO 100.07 CIO 101.00 to CIO 101.07 CIO 106.00 to CIO 106.07 CIO 107.00 to CIO 107.07 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 Section 7-2 Analog Input Units ■ Input Terminal Arrangement IN CH I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC Note V IN1 I IN1 Voltage input 1 Current input 1 COM1 V IN2 Input common 1 Voltage input 2 I IN2 COM2 Current input 2 Input common 2 V IN3 I IN3 Voltage input 3 Current input 3 COM3 V IN4 Input common 3 Voltage input 4 I IN4 COM4 Current input 4 Input common 4 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 operating errors. 3. Expansion Connector Connected to the next Expansion Unit or Expansion I/O Unit to enable expansion. Main Analog Input Unit Specifications Analog Input Units are connected to a CP1L CPU Unit. For CP1L M-type CPU 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/ CPM1A-20EDR1 Expansion I/O Unit CP1L M-type CPU Unit SYSMAC CP1L CP1W-8ED/ CPM1A-8ED Expansion I/O Unit CP1W-AD041/ CPM1A-AD041 Analog Input Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM C OM 01 03 05 07 09 11 00 02 04 06 08 10 NC 01 00 CH IN 03 02 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 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 00 01 02 04 05 07 NC N C C OM 06 CO M C OM 03 CO M EXP EXP 04 C OM 06 05 07 IN CH I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC 4 analog inputs OUT 422 Section 7-2 Analog Input Units Item Voltage Input Current Input Number of inputs Input signal range 4 inputs (4 words allocated) 0 to 5 VDC, 1 to 5 VDC, 0 to 10 VDC, or –10 to 10 VDC 0 to 20 mA or 4 to 20 mA Max. rated input External input impedance ±15 V 1 MΩ min. ±30 mA Approx. 250 Ω Resolution Overall accuracy 1/6000 (full scale) 0.3% full scale 0.4% full scale 25°C 0 to 55°C A/D conversion data 0.6% full scale 0.8% full scale 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 Open-circuit detection function Supported (Set in output words n+1 and n+2.) Supported Conversion time Isolation method 2 ms/point (8 ms/all points) 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 Ranges Note Analog input data is digitally converted according to the input signal range as shown below. When the input exceeds the specified range, the A/D conversion data will be fixed at either the lower limit or upper limit. 423 Section 7-2 Analog Input Units Analog Input Signal Ranges ■ −10 to 10 V Inputs Converted data Hexadecimal (Decimal) 0CE4 (3300) 0BB8 (3000) −11 V −10 V 0000 (0) 10 V 11 V 0V Voltage in the -10 to 10 V range corresponds to hexadecimal values F448 to 0BB8 (-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 is expressed as two’s complement. F448 (−3000) F31C (−3300) ■ 0 to 10 V Inputs Voltage in the 0 to 10 V range corresponds to hexadecimal values 0000 to 1770 (0 to 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 two’s complement. Converted data Hexadecimal (Decimal) 189C (6300) 1770 (6000) −0.5 V 0000 (0) 10 V 10.5 V 0V FED4 (−300) ■ 0 to 5 V Inputs Voltage in the 0 to 5 V range corresponds to hexadecimal values 0000 to 1770 (0 to 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 two’s complement. Converted data Hexadecimal (Decimal) 189C (6300) 1770 (6000) −0.25V 0000 (0) 0V 5V 5.25 V FED4 (−300) ■ 1 to 5 V Inputs Converted data Hexadecimal (Decimal) 189c (6300) 1770 (6000) 0000 (0) 0.8 V 1V FED4 (−300) 424 5 V 5.2 V Voltage in the 1 to 5 V range corresponds to hexadecimal values 0000 to 1770 (0 to 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 1 V is expressed as two’s complement. If an input is below the range (i.e., less than 0.8 V), the open-circuit detection function is activated and the data becomes 8,000. Section 7-2 Analog Input Units ■ 0 to 20 mA Inputs Current in the 0 to 20 mA range corresponds to hexadecimal values 0000 to 1770 (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 two’s complement. Converted data Hexadecimal (Decimal) 189C (6300) 1770 (6000) −1 mA 0000 (0) 20 mA 21 mA 0 mA FED4 (−300) ■ 4 to 20 mA Inputs Converted data Hexadecimal (Decimal) 189C (6300) 1770 (6000) 0000 (0) 3.2 mA 0 mA FED4 (−300) Averaging Function 4 mA 20 mA 20.8 mA Current in the 4 to 20 mA range corresponds to hexadecimal values 0000 to 1770 (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 3.2 to 4 mA is expressed as two’s complement. If an input is below the range (i.e., less than 3.2 mA), the open-circuit detection function is activated and the data becomes 8,000. 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 variation 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 Function The open-circuit detection function is activated when the input range is set to 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 detection 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 Section 7-2 Analog Input Units Procedure • Connect Analog Input Units. • Wire to analog output devices. Connect and wire Units. • Write set data to output words (n+1, n+2). • 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. Create a ladder program Writing Set Data and Reading A/D Conversion Values Analog Input Unit CPU Unit Ladder program MOV Writes the set data (use of inputs, averaging, range codes). Reads the conversion value. (n+1) CH Set data (inputs 1, 2) (n+2) CH Set data (inputs 3, 4) (m+1) CH Analog input 1 conversion value (m+2) CH Analog input 2 conversion value (m+3) CH Analog input 3 conversion value (m+4) CH Analog input 4 conversion value The last input word allocated to the 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 CP1W-AD041 CPM1A-AD041 CPU Unit SYSMAC CP1L IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 05 02 04 00 01 COM 07 06 09 11 10 08 IN 00 01 COM OUT 426 02 COM 03 COM 04 COM 06 05 07 03 02 04 COM 06 05 07 CH I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG VIN1 COM1 I IN2 VIN3 COM3 I IN4 NC Analog devices Temperature sensor Pressure sensor Speed sensor Flow sensor Voltage/current meter Other devices Section 7-2 Analog Input Units 2. Wiring Analog Inputs Internal Circuits 510 kΩ V IN1 250 Ω Internal circuits I IN1 Analog input 1 COM1(−) 510 kΩ to to V IN4 510 kΩ 250 Ω I IN4 510 kΩ Analog input 4 COM4(−) AG Analog ground ■ Wiring for Analog Inputs 2-core shielded Analog device with voltage output + twisted-pair cable V IN I IN − COM FG Note + Analog Input Unit Analog device with current output 2-core shielded twisted-pair cable V IN I IN − COM Analog Input Unit FG (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 inputs. 427 Section 7-2 Analog Input Units A Analog input device 1 B C 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 detection function will not operate. Also, if there is an open circuit at C, the open-circuit 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 following 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 428 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. Section 7-2 Analog Input Units 15 Wd (n+1) 1 8 0 0 0 0 0 0 Set to 1. 15 Wd (n+2) 1 8 0 0 0 0 0 0 7 6 5 4 3 2 1 0 0 Analog input 2 Analog input 1 7 3 6 5 4 2 1 0 0 Analog input 4 Set to 1. Analog input 3 ■ Set Data Range code 00 01 10 11 Analog input signal range −10 to 10 V 0 to 10 V 1 to 5 V or 4 to 20 mA 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 conversion data. Reading Analog Input Conversion Values Read the conversion value storage area with the ladder program. With word m 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 simultaneously 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 T5 #0002 T5 MOV(021) 2 TIM5 is started when the power is turned ON. After 0.1 to 0.2 s (100 to 200 ms) elapses, the TIM5 contact turns ON and the analog input 1 conversion data stored in word 2 is transferred to DM0. D0 Handling Unit Errors • When an error occurs in an Analog Input Unit, the analog input conversion data becomes 0000. 429 Section 7-3 Analog Output Units • 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 Input 1 Input range Range code 0 to 10 V 01 Yes Destination word 1101 (B hex) n+1 Input 2 Input 3 4 to 20 mA 10 -10 to +10 V 00 Yes No 1110 (E hex) n+1 1000 (8 hex) n+2 Input 4 Not used. --- 0000 (0 hex) n+2 -(00) Averaging Set data Operation start 1 cycle ON A200.11 MOV(021) #80EB 102 ←Writes set data E and B. MOV(021) #8008 103 Always ON P_On ←Writes set data 0 and 8. TIM5 T5 #0002 Execution condition CMP(020) 003 #8000 P_EQ 110.00 T5 Input 2 open circuit alarm Execution condition MOV(021) 002 T5 Execution condition D100 ←Reads analog input 1 converted value. MOV(021) 003 T5 Execution condition D101 ←Reads analog input 2 converted value. MOV(021) 004 D102 7-3 ←Reads analog input 3 converted value. 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 detection 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 Section 7-3 Analog Output Units 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 connecting cable (1) Analog output terminals 1. Analog Output Terminals Connected to analog input devices. ■ Output Terminal Arrangement OUT CH I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC V OUT1 Voltage output 1 I OUT1 COM1 Current output 1 Output common 1 V OUT2 I OUT2 Voltage output 2 Current output 2 COM2 V OUT3 Output common 2 Voltage output 3 I OUT3 COM3 Current output 3 Output common 3 V OUT4 I OUT4 Voltage output 4 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 provided with the Unit and cannot be removed. Note Do not touch the cables during operation. Static electricity may cause operating errors. 3. Expansion Connector Connected to the next Expansion Unit or Expansion I/O Unit. Main Analog Output Unit Specifications Analog Output Units are connected to a CP1L CPU Unit. For CP1L M-type CPU Units, a maximum of three Units can be connected, including other Expansion Units and Expansion I/O Units. 431 Section 7-3 Analog Output Units For CP1L M-type CPU Units, a maximum of 3 Expansion Units or Expansion I/O Units can be connected. CP1W-20EDR1/ CPM1A-20EDR1 Expansion I/O Unit CP1L M-type CPU Unit SYSMAC CP1L CP1W-8ED/ CPM1A-8ED Expansion I/O Unit CP1W-DA041/ CPM1A-DA041 Analog Output Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM C OM 01 03 05 07 09 11 00 02 04 06 08 10 NC 01 00 CH IN 03 02 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 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 00 01 02 04 05 07 NC N C C OM 06 CO M C OM 03 CO M EXP EXP 04 C OM OUT 06 05 07 CH I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC 4 analog outputs OUT Item Number of outputs Voltage Output 4 outputs (4 words allocated) Resolution Overall 25°C accuracy 0 to 55°C 1/6000 (full scale) 0.4% full scale Current Output Analog 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 D/A conversion data Conversion time Isolation method 2 ms/point (8 ms/all points) Photocoupler isolation between analog I/O terminals and internal circuits. No isolation between analog I/O signals. 5 VDC: 80 mA max.; 24 VDC: 124 mA max. Current consumption Analog Output Signal Ranges Note 432 0.8% full scale 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 The analog values depend on the output signal ranges, as shown in the following diagrams. When the output exceeds the specified range, the output signal will be fixed at either the lower limit or upper limit. Section 7-3 Analog Output Units Analog Output Signal Ranges ■ −10 to 10 V The hexadecimal values F448 to 0BB8 (–3000 to 3000) correspond to an analog voltage range of –10 to 10 V. The entire output range is –11 to 11 V. Specify a negative voltage as a two’s complement. 11 V 10 V 8000 F31C (3300) F448 (3000) 0000 (0) 0V 0BB8 0CE4 (3000) (3300) 7FFF Conversion Data Hexadecimal (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 two’s complement. 10.5 V 10 V 8000 FED4 (−300) 0000 (0) 0V 1770 (6000) 189C (6300) 7FFF Conversion Data Hexadecimal (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 8000 FED4 (−300) 0V 1770 (6000) 189C (6300) 7FFF Conversion Data Hexadecimal (Decimal) 433 Section 7-3 Analog Output Units ■ 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 0000 (0) 8000 1770 (6000) 0 mA 189C (6300) 7FFF Conversion Data 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 FED4 (−300) 8000 0 mA 1770 (6000) 189C (6300) 7FFF Conversion Data Hexadecimal (Decimal) Procedure Connect and wire Units. • Connect Analog Output Units. • Wire to analog input devices. Create a ladder program • Write range code to output words (n+1, n+2). • 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 Analog Output Unit CPU Unit Ladder program (n+1) CH Range code (outputs 1, 2) (n+2) CH Range code (outputs 3, 4) (n+1) CH Analog output 1 conversion value (n+2) CH Analog output 2 conversion value (n+3) CH Analog output 3 conversion value (n+4) CH Analog output 4 conversion value MOV Writes the range code. Writes the converted values. Where "n" is the last output word allocated to the CPU Unit, or previous Expansion Unit or Expansion I/O Unit. 434 Analog devices Adjustment equipment Servo Controller Variable speed device Recorder Other Section 7-3 Analog Output Units 1. Connecting the Analog Output Unit Connect the Analog Output Unit to the CPU Unit. CP1W-DA041 CPM1A-DA041 Analog Output Unit CPU Unit SYSMAC CP1L IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 05 02 04 00 01 COM 07 06 09 08 11 10 OUT 00 01 COM 02 COM 03 COM 04 COM 06 05 07 03 02 04 06 COM 05 CH I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC 07 OUT 2. Wiring Analog Outputs Internal Circuits V OUT1 Analog output 1 Internal circuits I OUT1 COM1 (−) to to V OUT4 I OUT4 Analog output 4 COM4 (−) Analog ground NC ■ Wiring for Analog Outputs 2-core shielded twisted-pair cable V OUT Analog output unit + I OUT COM − FG Note 2-core shielded twisted-pair cable Analog device with voltage input V OUT Analog output unit + I OUT COM − Analog device with current input FG (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 Section 7-3 Analog Output Units 3. Ladder Program Allocation of Output Words Four output words are allocated, beginning from the first word following the 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 conversion will start when the set data is transferred from the CPU Unit to the Analog Output Unit. 15 Wd n+1 1 0 0 0 8 0 0 0 0 Wd n+2 1 0 0 0 8 0 6 5 4 Analog output 2 Set to 1. 15 7 0 0 0 3 2 1 0 7 6 5 4 Analog output 1 3 2 1 0 Analog output 4 Set to 1. Analog output 3 ■ Range Code Range code 000 001 010 011 100 Analog output signal range −10 to 10 V 0 to 10 V 1 to 5 V 0 to 20 mA 4 to 20 mA Output use 0 1 No 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 output 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 Section 7-3 Analog Output Units Writing Analog Output Set Values The ladder program can be used to write data to the output word where the 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 completed. Output type Voltage output Output range 0 to 10 V, -10 to +10 V Before range code is written After range code is written 0V Current output 1 to 5 V 0 to 20 mA 4 to 20 mA 0 mA 0V 1V 0 mA 4 mA Therefore, create a program as shown below, so that when operation begins simultaneously with startup it will wait for valid set data. TIM 005 will start as soon as power turns ON. After 0.1 to 0.2 s (100 to 200 ms), the Completion Flag for TIM 005 will turn ON, and the data stored in DM 0100 will be moved to IR 102 as the conversion data for analog output 1. Always ON Flag P_On T5 #0002 T5 MOV(021) D100 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 Output 1 0 to 10 V 001 1001 (9 hex) Destination word Wd n+1 Output 2 Output 3 4 to 20 mA -10 to 10 V 100 000 1100 (C hex) 1000 (8 hex) Wd n+1 Wd n+2 Output 4 Not used. -(000) 0000 (0 hex) Wd n+2 437 Section 7-4 Analog I/O Units 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. 103 Always ON Flag P_On TIM5 T5 Execution condition #0002 MOV(021) D200 T5 Execution condition ←Writes analog output 1 conversion data. 102 MOV(021) D201 T5 Execution condition ←Writes analog output 2 conversion data. 103 MOV(021) D202 104 7-4 7-4-1 ←Writes analog output 3 conversion data. Analog I/O Units 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 IN OUT CH EXP CH I OUT VIN 1 COM 1 I IN2 I IN1 V IN2 COM 2 V OUT COM (2) Expansion I/O connecting cable (1) Analog I/O terminals 438 Section 7-4 Analog I/O Units (1) Analog I/O Terminals Connected to analog I/O devices. I/O Terminal Arrangement IN OUT I OUT VOUT Note VIN1 COM1 I IN2 COM I IN1 V IN2 COM2 When using current inputs, short terminal V IN1 with I IN1 and terminal V IN2 with I IN2. V OUT Voltage output I OUT COM Current output Output common V IN1 I IN1 Voltage input 1 Current input 1 COM1 V IN2 Input common 1 Voltage input 2 I IN2 COM2 Current input 2 Input common 2 (2) Expansion I/O Connecting Cable Connected to the expansion connector of a CP1L CPU Unit or an 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 operating errors. (3) Expansion Connector Used for connecting Expansion Units or Expansion I/O Units. 439 Section 7-4 Analog I/O Units Main Analog I/O Unit Specifications Analog I/O Units are connected to the CP1L CPU Unit. For CP1L 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. For CP1L M-type CPU Units, a maximum of 3 Expansion Units or Expansion I/O Units can be connected. CP1W-20EDR1/ CPM1A-20EDR1 Expansion I/O Unit CP1L M-type CPU Unit SYSMAC CP1L CP1W-8ED/ CPM1A-8ED Expansion I/O Unit CPM1A-MAD01 Analog I/O Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM C OM 01 03 05 07 09 11 00 02 04 06 08 10 NC 01 00 CH IN 03 02 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 MAD01 8ED OUT CH 00 01 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 07 00 01 02 04 05 NC N C C OM 06 CO M C OM 03 CO M OUT EXP EXP 04 C OM IN CH EXP CH IO U T V IN 1 CO M1 IIN 2 V O UT CO M IIN 1 V IN 2 CO M2 06 05 07 Analog Input Section Analog Output Section (See note 2.) Voltage I/O 2 analog inputs 1 analog output OUT Item Number of inputs Current I/O 2 Input signal range Max. rated input 0 to 10 V/1 to 5 V ±15 V 4 to 20 mA ±30 mA External input impedance Resolution 1 MΩ min. 1/256 250 Ω rated current Accuracy A/D conversion data 1.0% full scale 8-bit binary Number of outputs Output signal range 1 0 to 10 V or −10 to 10 V 4 to 20 mA Max. external output current Allowable external output load resistance 5 mA --- --350 Ω Resolution Accuracy 1/256 (1/512 when the output signal range is −10 to 10 V) 1.0% of full scale Set data Conversion time 8-bit signed binary 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 output. (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 Section 7-4 Analog I/O Units Analog I/O Signal Ranges Analog Input Signal Ranges 0 to 10 V inputs Conversion value 1 to 5 V inputs Conversion value 4 to 20 mA inputs Conversion value FF FF FF 80 80 00 80 00 0V 5V 10 V Input signal 00 0V 1V 3V 5V Input signal 0 mA 4 mA 12 mA 20 mA Input signal Analog Output Signal Ranges (V) 10 −10 to +10 V outputs 9 8 7 6 5 4 3 2 Set value 8100 80FF 1 0 8080 00 −1 00FF 0100 0080 Set value −2 −3 −4 −5 −6 −7 −8 −9 −10 4 to 20 mA outputs 0 to 10 V output (mA) 20 (V) 10 16 12 5 8 4 8080 0000 0080 00FF 0100 8080 0000 0080 00FF 0100 Set value 441 Section 7-4 Analog I/O Units Using Analog I/O • Connect the Analog I/O Unit. Connect the Unit • Connect an analog input device. Wire the analog I/O • 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. Create a ladder program Connecting the Analog I/O Unit Connect the Analog I/O Unit to the CPU Unit. CPU Unit SYSMAC CP1L CPM1A-MAD01 Analog I/O Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 MAD01 OUT 00 01 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM IN CH EXP CH IO U T V IN 1 CO M1 IIN 2 V O UT CO M IIN 1 V IN 2 CO M2 06 05 07 OUT Wiring Analog I/O Devices Analog Input Wiring 2-core shielded twisted-pair cable Analog output device voltage output Analog output device current output Analog I/O Unit + V IN1 I IN1 − + COM1 FG 10 KΩ V IN2 I IN2 − 250 Ω 0V 250 Ω COM2 10 KΩ FG 0V Analog I/O Wiring Example Using analog input 1 as a voltage input I OUT V IN1 COM1 I IN2 VOUT COM I IN1 V IN2 COM2 Common (−) Voltage input 1 (+) 442 Using analog input 2 as a current input I OUT V IN1 COM1 I IN2 VOUT COM I IN1 V IN2 COM2 Current input 2 (+) Common (−) Section 7-4 Analog I/O Units Analog Output Wiring Voltage Outputs 2-core shielded twisted-pair cable Analog I/O Unit + VOUT I OUT − COM 0V Analog input device voltage input FG Current Outputs Analog I/O Unit VOUT 2-core shielded twisted-pair cable I OUT + COM − 0V Analog input device current input 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 N·m.) (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 Program I/O Allocation 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 Section 7-4 Analog I/O Units Analog I/O Unit (m + 1) (m + 2) 32 analog inputs 16 analog outputs "m" is the last allocated input word and "n" the last allocated output word on the CPU Unit or previous Expansion Unit or Expansion I/O Unit. (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 code FF00 Analog input 1 signal Analog input 2 signal Analog output signal range range range 0 to 10 V 0 to 10 V 0 to 10 V/4 to 20 mA FF01 FF02 0 to 10 V 1 to 5 V/4 to 20 mA 0 to 10 V 0 to 10 V −10 to 10 V/4 to 20 mA 0 to 10 V/4 to 20 mA FF03 FF04 1 to 5 V/4 to 20 mA 0 to 10 V 0 to 10 V 1 to 5 V/4 to 20 mA −10 to 10 V/4 to 20 mA 0 to 10 V/4 to 20 mA FF05 FF06 0 to 10 V 1 to 5 V/4 to 20 mA 1 to 5 V/4 to 20 mA 1 to 5 V/4 to 20 mA −10 to 10 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) FF02 (n+1) Range code (4 digits hexadecimal) Analog input 1: 1 to 5 V or 4 to 20 mA 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 analog I/O conversion will not start. 444 Section 7-4 Analog I/O Units 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 MOV(21) Word m + 1 MOVE instruction Word m + 2 Writes the range code. Reads the conversion value. Range code Analog input 1 conversion value Analog input 2 conversion value Analog devices · Temperature sensor "m" is the last input word and "n" is the last output word allocated to the CPU Unit, or previous Expansion Unit or Expansion I/O Unit. · Pressure sensor · 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 circuits are not detected when the input signal range is set to 0 to 10 V.) 445 Section 7-4 Analog I/O Units Setting D/A Conversion Data Output data is written to the Analog I/O Unit’s 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 • Servo Controller "n" is the last output word allocated to the CPU Unit, or previous Expansion Unit or Expansion I/O Unit. Note • Variable speed device • Recorder • Other 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 output signal range is −10 to 10 V.) 1,2,3... Set value (00 to FF hex) 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 Section 7-4 Analog I/O Units Always ON P_On TIM 0 #3 TIM 0 will start as soon as power turns ON. After 0.2 to 0.3 s (200 to 300 ms), the input for TIM 0 will turn ON, and the converted data 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 necessary 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 Always ON Flag P_On 102 ← Writes the range code (FF04) to the Unit. TIM 0 #3 T0 Execution condition MOV(021) 10 ← Reads analog input 0's converted value. D0 T0 Execution condition 3.15 110.00 T0 Open-circuit alarm Execution condition MOV(021) 3 D1 T0 ← Reads analog input 1's converted value. Execution condition MOV(021) D10 102 ← The content of D10 is written to the output word as the analog output set value. 447 Section 7-4 Analog I/O Units 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 I OUT NC V OUT COM Note 448 NC NC NC V IN0 NC COM0 I IN1 I IN0 AG V IN1 COM1 For current inputs, short V IN0 to I IN0 and V IN1 to I IN1. V OUT Voltage output I OUT COM Current output Output common V IN0 I IN0 Voltage input 0 Current input 0 COM0 V IN1 Input common 0 Voltage input 1 I IN1 COM1 Current input 1 Input common 1 Section 7-4 Analog I/O Units (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 operating 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 Specifications Analog I/O Units are connected to the CP1L CPU Unit. For CP1L 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. For CP1L M-type CPU Units, a maximum of 3 Expansion Units or Expansion I/O Units can be connected. CP1W-20EDR1/ CPM1A-20EDR1 Expansion I/O Unit CP1L M-tpye CPU Unit CP1W-MAD11/ CPM1A-MAD11 Analog I/O Unit IN L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM C OM 01 03 05 07 09 11 00 10 02 04 06 08 NC 01 00 CH IN 03 02 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 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 00 01 02 04 05 07 NC N C C OM CO M C OM 03 CO M 06 EXP EXP 04 C OM 06 05 NC 07 NC OUT 2 analog inputs L1 1 analog output SYSMAC CP1L CP1W-8ED/ CPM1A-8ED Expansion I/O Unit 449 Section 7-4 Analog I/O Units Analog Input Section Item Number of inputs Voltage I/O 2 inputs (2 words allocated) Input signal range Max. rated input 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 ±15 V ±30 mA External input impedance Resolution 1 MΩ min. 1/6000 (full scale) Approx. 250 Ω 0.3% full scale 0.6% full scale 0.4% full scale 0.8% full scale Overall accuracy 25°C 0 to 55°C A/D conversion data Analog Output Section Current I/O Averaging function 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 Supported (Settable for individual inputs via DIP switch) Open-circuit detection function Number of outputs Supported 1 output (1 word allocated) Output signal range Allowable external output load resistance 1 to 5 VDC, 0 to 10 VDC, or −10 to 10 VDC, 1 kΩ min. External output impedance Resolution 0.5 Ω max. 1/6000 (full scale) Overall accuracy y 25°C 0 to 55°C Set data (D/A conversion) Conversion time 0 to 20 mA or 4 to 20 mA 600 Ω max. 0.4% full scale 0.8% full scale 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 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 Ranges Analog I/O data is digitally converted according to the analog I/O signal range as shown below. Note 450 When the input exceeds the specified range, the AD converted data will be fixed at either the lower limit or upper limit. Section 7-4 Analog I/O Units Analog Input Signal Ranges −10 to 10 V 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 two’s 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 two’s 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 two’s complement. Converted Data Hexadecimal (Decimal) 189C (6300) 1770 (6000) −0.25 V 0000 (0) 0V 5 V 5.25 V FED4 (−300) 451 Section 7-4 Analog I/O Units 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 two’s 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 5 V 5.2 V 1V 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 two’s 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 two’s 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) FED4 (−300) 452 3.2 mA 0 mA 4 mA 20 mA 20.8 mA Section 7-4 Analog I/O Units Analog Output Signal Ranges −10 to 10 V The hexadecimal values F448 to 0BB8 (−3000 to 3000) correspond to an analog voltage range of −10 to 10 V. The entire output range is −11 to 11 V. Specify a negative voltage as a two’s complement. 11 V 10 V F31C F448 8000 (−3300) (−3000) 0000 (0) 0V 0BB8 0CE4 (3000) (3300) Conversion Data 7FFF Hexadecimal (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 two’s complement. 10.5 V 10 V 8000 FED4 (−300) 0000 (0) 0V 1770 189C (6000) (6300) Conversion Data 7FFF Hexadecimal (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 8000 FED4 0 V (−300) 1770 189C (6000) (6300) 7FFF Conversion Data Hexadecimal (Decimal) 453 Section 7-4 Analog I/O Units 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) 0 mA 1770 189C (6000) (6300) 7FFF Conversion Data 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 8000 FED4 (−300) 0 mA 1770 189C (6000) (6300) 7FFF Conversion Data Hexadecimal (Decimal) Averaging Function for Analog Inputs The averaging function can be enabled for inputs using the DIP switch. 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 Function for Analog Inputs The open-circuit detection function is activated when the input range is set to 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 detection 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 Section 7-4 Analog I/O Units Using Analog I/O Connect the Unit. Set the I/O ranges. Wire the analog I/O. Program operation in the ladder program. Reading Range Code Settings and A/D Conversion Data • Connect the Analog I/O Unit. • Analog inputs: 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 • 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. • Connect analog I/O devices. • Write the range code. • Analog inputs: Read converted data. • Analog output: Write set values. CPU Unit Analog I/O Unit Ladder program Word n + 1 MOV(21) Word m + 1 MOVE instruction Word m + 2 • Writes the range code. • Reads the converted values. "m" is the last input word and "n" is the last output word allocated to the CPU Unit or previous Expansion Unit or Expansion I/O Unit. Writing D/A Conversion Data CPU Unit Range code Analog input 0 converted value Analog input 1 converted value Analog devices • Temperature sensor • Pressure sensor • Speed sensor • Flow sensor • Voltage/current meter • Other 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. "n" is the last output word allocated to the CPU Unit or previous Expansion Unit or Expansion I/O Unit. Analog devices • Adjustment equipment • Servo Controller • Variable speed device • Recorder • Other 455 Section 7-4 Analog I/O Units Note Connecting the Analog I/O Unit and Setting the DIP Switch Word (n + 1) can be used for either the range code or the analog output set value. This section describes how to connect an Analog I/O Unit to the CPU Unit. CP1W-MAD11 CPM1A-MAD11 Analog I/O Unit CPU Unit SYSMAC CP1L IN L1 L2/N COM 01 00 03 02 05 04 00 01 COM 07 06 02 COM 09 08 03 COM 11 10 04 COM 01 00 06 05 03 05 02 04 00 01 COM 07 07 06 03 02 09 08 04 COM 11 10 06 05 NC NC 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 analog inputs 1 and 2. DIP switch Function pin 1-1 Averaging Setting Analog input 0 OFF: Disabled; ON: Enabled Analog input 1 OFF: Disabled; ON: Enabled 1-2 Wiring Analog I/O Devices OFF Analog Outputs I IN0 COM0 (−) 510 kΩ Input 1 V IN1 510 kΩ 250 kΩ I IN1 COM1 (−) V OUT Internal circuits 250 kΩ 510 kΩ Output Input 0 V IN0 510 kΩ Internal circuits OFF Internal Circuits Analog Inputs COM (−) I OUT NC AG Analog ground 456 Default NC Analog ground Section 7-4 Analog I/O Units Terminal Arrangements NC I OUT NC V OUT COM Note NC NC NC V IN0 NC COM0 I IN1 I IN0 AG V IN1 COM1 For current inputs, short V IN0 to I IN0 and V IN1 to I IN1. V OUT Voltage output I OUT COM Current output Output common V IN0 I IN0 Voltage input 0 Current input 0 COM0 V IN1 Input common 0 Voltage input 1 I IN1 COM1 Current input 1 Input common 1 Wiring for Analog Inputs Analog device with voltage output + V IN I IN − COM Analog I/O Unit Analog device with current output + V IN I IN − COM Analog I/O Unit Wiring for Analog Outputs V OUT Analog I/O Unit + I OUT COM Note − Analog device with voltage input V OUT Analog I/O Unit + I OUT COM − Analog device with current input (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 Section 7-4 Analog I/O Units (5) Refer to the following diagram regarding wiring disconnections when voltage 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 supply 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 situation 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 disconnection 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 connected 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 disconnection 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 Section 7-4 Analog I/O Units Creating a Ladder Program I/O Allocation 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 analog output signal ranges, as shown below. Range code Analog input 0 signal range Analog input 1 signal range Analog output signal range 000 001 −10 to 10 V 0 to 10 V −10 to 10 V 0 to 10 V −10 to 10 V 0 to 10 V 010 011 1 to 5 V/4 to 20 mA 0 to 5 V/0 to 20 mA 1 to 5 V/4 to 20 mA 0 to 5 V/0 to 20 mA 1 to 5 V 0 to 20 mA 100 --- --- 4 to 20 mA 15 n+1 1 8 0 0 0 0 0 7 6 5 4 3 2 1 0 0 Analog output Analog input 1 Analog 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) #800A n+1 Analog input 0: 4 to 20 mA Analog input 1: 0 to 10 V Analog output: −10 to 10 V • 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 Section 7-4 Analog I/O Units 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 #0002 T5 MOV(021) TIM 5 will start as soon as power turns ON. 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 word 2 will be transferred to D00000. 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 output. 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 necessary 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 Section 7-5 Temperature Sensor Units First Cycle ON Flag A200.11 MOV(021) #8051 ← Writes the range code (8051) to the Unit. 102 Always ON Flag P_On TIM5 #0002 T5 Execution condition MOV(021) 002 ← Reads analog input 0's converted value. D0 T5 Execution condition MOV(021) 003 ← Reads analog input 1's converted value. D1 T5 Execution condition MOV(021) D10 ← The content of D10 is written to the output word as the analog output set value. 102 T5 Execution condition CMP(020) 003 #8000 (P_EQ) 110.00 7-5 Open-circuit alarm 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 CPM1ATS001/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 Section 7-5 Temperature Sensor Units Part Names Temperature Sensor Units: CP1W-TS@@@ and CPM1A-TS@@@ (3) Rotary Switch (2) DIP 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 platinum 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 Expansion Unit or Expansion I/O Unit. The cable is included with the Temperature 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/ CPM1A-20EDR1 Expansion I/O Unit CP1L CPU Unit SYSMAC CP1L CP1W-8ED/ CPM1A-8ED Expansion I/O Unit CP1W-TS@@@/ CPM1A-TS@@@ Temperature Sensor Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM 01 02 00 NC 03 05 04 07 06 09 08 C OM 11 01 00 10 CH IN 03 02 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 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 00 01 02 04 05 07 NC N C C OM CO M C OM 03 CO M 06 EXP EXP 06 04 C OM 05 07 OUT Thermocouples or platinum resistance thermometers 462 Temperature inputs Section 7-5 Temperature Sensor Units Item CP1W-TS001 CPM1A-TS001 Thermocouples Temperature sensors CP1W-TS002 CPM1A-TS002 CP1W-TS101 CP1W-TS102 CPM1A-TS101 CPM1A-TS102 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 Allocated input words 2 2 4 4 2 2 4 4 Accuracy (The larger of ±0.5% of converted value or ±2°C) ±1 digit max. (See note.) Conversion time Converted temperature data 250 ms for 2 or 4 input points 16-bit binary data (4-digit hexadecimal) Isolation Current consumption Photocouplers between all temperature input signals 5 VDC: 40 mA max., 24 VDC: 59 mA max. 5 VDC: 54 mA max., 24 VDC: 73 mA max. (The larger of ±0.5% of converted value or ±1°C) ±1 digit max. Accuracy for a K-type sensor at −100°C or less is ±4°C ±1 digit max. Note Using Temperature Sensor Units • Connect the Temperature Sensor Unit. Connect the Unit. Set the temperature ranges. Connecting Temperature Sensor Units Connect the temperature sensors. • Connect temperature sensors. Program operation in the ladder program. • Read temperature data stored in the input word. A maximum of three CPM1A-TS002 and CPM1A-TS102 Temperature Sensor Units can be connected, because each is allocated four words. CP1W-20EDR1/ CPM1A-20EDR1 Expansion I/O Unit CP1L CPU Unit SYSMAC CP1L • Set the temperature unit, 2-decimal-place Mode if required, and set the temperature input range. CP1W-8ED/ CPM1A-8ED Expansion I/O Unit CP1W-TS001/TS101/ CPM1A-TS001/TS101 Temperature Sensor Unit IN L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 C OM C OM 01 03 05 07 09 11 02 04 06 08 00 10 NC 01 00 CH IN 03 02 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 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 00 01 02 03 04 05 06 07 CH 00 01 02 04 05 07 NC N C C OM 06 CO M C OM 03 CO M EXP EXP 04 C OM 06 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 Unit’s 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 Section 7-5 Temperature Sensor Units DIP Switch Used to set the temperature unit and the number of decimal places used. Rotary Switch Used to set the temperature input range. 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 Note 1 Temperature unit OFF 2 Number of decimal places used (See note.) (0.01 expression) Setting °C ON OFF ON °F Normal (0 or 1 digit after the decimal point, depending on the input range) 2-decimal-place Mode 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 connected to the Unit. Temperature data will not be converted correctly if the temperature 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 CPM1A-TS001/002 Input type 0 K 1 Range (°C) −200 to 1,300 Range (°F) −300 to 2,300 Input type Pt100 Range (°C) −200.0 to 650.0 Range (°F) −300.0 to 1,200.0 0.0 to 500.0 0.0 to 900.0 JPt100 −200.0 to 650.0 −300.0 to 1,200.0 −100 to 1,500 0.0 to 750.0 ----- Cannot be set. 2 3 J −100 to 850 0.0 to 400.0 4 to F --- Cannot be set. 464 CP1W-TS101/TS102 CPM1A-TS101/102 --- Section 7-5 Temperature Sensor Units Connecting Temperature Sensors Thermocouples 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 + + Input 0 Input 1 − − NC NC Temperature input 0 NC NC NC NC NC NC Cold junction compensator Temperature input 1 CP1W-TS002/CPM1A-TS002 Either K or J thermocouples can be connected, but all four of the thermocouples must be of the same type and the same input range must be used for each. Input 0 Input 1 + + Input 0 Input 1 − − Temperature input 0 Temperature input 1 Note Input 2 Input 3 + NC NC Cold junction compensator NC NC + Input 2 Input 3 − − Temperature input 2 Temperature input 3 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 correctly. • Do not touch the cold junction compensator. Doing so may result in incorrect temperature measurement. 465 Section 7-5 Temperature Sensor Units 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 A A B NC Input 0 Input 0 Input 1 B B B Pt NC NC NC NC NC NC NC Pt Temperature input 0 Temperature input 1 CP1W-TS102/CPM1A-TS102 Up to four Pt100 or JPt100 platinum resistance thermometers can be connected, 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 A A B Input 0 Input 0 Input 1 B B B Pt Temperature input 0 Note Creating a Ladder Program 466 NC Pt Temperature input 1 NC Input 2 Input 3 Input 3 A A B Input 2 Input 2 Input 3 B B B Pt Temperature input 2 Pt Temperature input 3 Do not connect anything to terminals not used for inputs. Word Allocations Temperature Sensor Units are allocated words as Expansion Units, in order of connection. A Temperature Sensor Unit is allocated the next input words following the input words of the CPU Unit or previous Expansion Unit or Expansion 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 CPM1ATS002 or CPM1A-TS102. No output words are allocated. Section 7-5 Temperature Sensor Units Example 1 CP1W-TS001/101 CPM1A-TS001/101 Temperature Sensor Unit CP1L Input word addresses CIO 0 CIO 1 Output word addresses CIO 100 CIO 101 CIO 2 CIO 3 None Example 2 CP1W-TS002/102 CPM1A-TS002/102 Temperature Sensor Unit CP1L Input word addresses CIO 0 CIO 1 CIO 2 CIO 3 CIO 4 CIO 5 Output word addresses CIO 100 CIO 101 None Converted Temperature Data The temperature data will be stored in the input words allocated to the Temperature 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 2’s 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: 1°C K or J 850°C → 0352 hex −200°C → FF38 hex Unit: 0.1°C K, J, Pt100 or JPt100 ×10 500.0°C → 5000 → 1388 hex −20.0°C → −200 → FF38 hex −200.0°C → −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 normal input temperature conversion will begin automatically when the input temperature returns to the convertible range. 467 Section 7-5 Temperature Sensor Units 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 #7FFE Temperature input data output word (P_EQ) 1000.00 Initialization Completed Flag 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-/CPM1ATS102 Temperature Sensor Units are allocated two bits each. Use these flags in the program when it is necessary to detect Expansion Unit/Expansion 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. CP1L Inputs Outputs 468 CP1W-TS001/101 CPM1A-TS001/101 Temperature Sensor Unit CIO 0 CIO 1 CIO 2 CIO 3 CIO 100 CIO 101 None Temperature unit setting: Two-decimal-place Mode: Input range setting: Input 0: Input 1: 0 (°C) 0 (normal) 1 (K: 0.0 to 500.0°C) CIO 2 CIO 3 Section 7-5 Temperature Sensor Units Always ON P_On CMP(020) Detects completion of input 0 initialization. 002 #7FFE (P_EQ) 1000.00 Always ON P_On CMP(020) ON when input 0 has been initialized 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) 2 #7FFF (P_EQ) 1000.02 CMP(020) 2 #1388 Detects an open-circuit alarm or Unit error by checking converted temperature data for the error code 7FFF. ON when an open-circuit alarm or Unit error has been detected for input 0. Checks to see if the temperature data in word 2 has exceeded 500.0°C (1388 hex without decimal point). (P_GT) 1000.03 ON for an input 0 temperature error (P_LT) BCD(024) 2 D0 Converts the temperature data for input 0 to BCD and stores the result in D0. 1000.01 Execution condition CMP(020) 3 #7FFF Detects an open-circuit alarm or Unit error by checking whether the error code 7FFF has been output (P_EQ) 1000.02 CMP(020) 3 #1388 ON when an open-circuit alarm or Unit error has been detected for input 1. Checks to see if the temperature data in word 3 has exceeded 500.0°C (1388 hex without decimal point). (P_GT) 1000.03 ON for an input 1 temperature error (P_LT) BCD(024) 3 Converts the temperature data for input 1 to BCD and stores the result in 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. CP1L Inputs Outputs CP1W-TS001/101 CPM1A-TS001/101 Temperature Sensor Unit CIO 0 CIO 1 CIO 2 CIO 3 CIO 100 CIO 101 None Temperature unit setting Two-decimal-place Mode 0 (°C) 0 (normal) Input range setting Input 0 1 (Pt100: −200.0 to 650.0°C) CIO 2 469 Section 7-5 Temperature Sensor Units Programming with BCD(24) Instruction Always ON P_On CMP(020) Detects completion of input 0 initialization. 2 #7FFE 1000.00 ON when input 0 has been initialized Execution 1000.00 condition CMP(020) 002 Detects an open-circuit alarm or Unit error by checking whether the error code 7FFF has been output #7FFF P_EQ P_EQ ON when an open-circuit alarm or Unit 1000.01 error has been detected for input 0. 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) #0000 2 When input 0 converted value is negative (#0000 minus two's complement = actual value) D0 BCD(024) Stores negative BCD data in D0. D0 D0 MOV(021) #0001 D1 470 Stores #0001 in D1 to indicate a negative number. Section 7-5 Temperature Sensor Units Programming with SCL2(−) Instruction Always ON P_On CMP(020) 2 Detects completion of input 0 initialization. #7FFE 1000.00 ON when initialization complete. Execution 1000.00 condition CMP(020) Detects an open-circuit alarm. 2 #7FFF P_EQ 01000 P_EQ ON when an open-circuit alarm has been detected. SCL2(486) 2 D10 Parameter settings for data conversion: D0 P_CY MOV(021) #0000 When the converted value is nonnegative, stores #0000 in D00001. D1 P_CY MOV(021) #0001 When the converted value is negative, stores #0001 in D00001. D1 Operation CIO 2 163 162 161 160 D1 0 0 0 Binary to BCD conversion 1/0 D0 103 102 101 100 CY (when using SCL2 instruction) 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 Mode Note If pin 2 on the DIP switch is turned ON, values are stored to two decimal 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. 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.01°C (°F). For this reason, there may be skipping and inaccuracies in the first digit after the decimal point (0.1). Treat any resolution above that specified for the normal data format as reference data. 471 Section 7-5 Temperature Sensor Units Temperature Data Partitioning and Structure Temperature Data (Actual Temperature x 100 Binary) @@@@@@ Leftmost 3 Digits and Flags 15 Leftmost/ Rightmost Flag 14 13 Temperature Unit Flag 11 Not used. 0: Normal 1: Error Always 0 0: °C 1: °F 0: Leftmost 1: Rightmost 12 Open-circuit Flag 8 7 4 3 0 Temperature data ×165 ×164 ×163 Rightmost 3 Digits and Flags 15 14 13 Leftmost/ Temperature Rightmost Flag Unit Flag 0: °C 1: °F 0: Leftmost 1: Rightmost 12 11 Open-circuit Flag Not used. 0: Normal 1: Error Always 0 8 7 4 3 0 Temperature data ×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 Examples Example 1 Temperature: 1,130.25°C ×100: 113025 Temperature Data: 01B981 (hexadecimal for 113025) Leftmost 3 Digits and Flags ×165 Flags Bits Data 15 14 13 12 0 0 0 0 °C Leftmost 11 to 08 0 ×164 ×163 07 to 04 1 03 to 00 B Normal 0 0 1 B Temperature data Flags Rightmost 3 Digits and Flags ×162 ×161 11 to 08 9 07 to 04 8 Flags Bits Data 15 14 13 12 1 0 0 0 Normal °C Rightmost 472 ×160 0 1 8 Flags 9 8 1 Temperature data Section 7-5 Temperature Sensor Units Example 2 Temperature: −100.12°C ×100: −10012 Temperature Data: FFD8E4 (hexadecimal for −10012) Leftmost 3 Digits and Flags ×165 Flags Bits Data 15 14 13 12 0 0 0 0 11 to 08 F ×164 ×163 07 to 04 F 03 to 00 D Normal °C Leftmost 0 F F D Temperature data Flags Rightmost 3 Digits and Flags ×162 ×161 ×160 11 to 08 8 07 to 04 E 03 to 00 4 Flags Bits Data 15 14 13 12 1 0 0 0 Normal °C Rightmost 8 Flags 8 E 4 Temperature data Example 3 Temperature: −200.12°F ×100: −20012 Temperature Data: FFB1D4 (hexadecimal for −20012) Leftmost 3 Digits and Flags ×165 Flags Bits Data 15 14 13 12 0 1 0 0 °F Leftmost 11 to 08 F ×164 ×163 107 to 04 F 03 to 00 B Normal 4 F F B Temperature data Flags Rightmost 3 Digits and Flags ×162 Flags Bits Data 15 14 13 12 1 1 0 0 11 to 08 1 Normal °F Rightmost ×161 07 to 04 D ×160 03 to 00 4 C Flags 1 D 4 Temperature data 473 Section 7-5 Temperature Sensor Units Example 4 Temperature: Open circuit (°F) Temperature Data: 7FFF FFFF Leftmost 3 Digits and Flags Flags Bits Data 15 14 13 12 0 1 1 0 °F Leftmost ×165 ×164 ×163 11 to 08 7 07 to 04 F 03 to 00 F 6 Error 7 F F Temperature data Flags Rightmost 3 Digits and Flags Flags Bits Data 15 14 13 12 1 1 1 0 ×162 ×161 ×160 11 to 08 F 07 to 04 F 03 to 00 F E Error °F Rightmost Note Flags F F F Temperature data (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 Unit’s 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 CIO 000 CIO 001 Inputs CIO 002 CIO 003 Outputs CIO 100 CIO 101 Outputs None Temperature unit setting: 0 (°C) Two-decimal-place Mode: 1 (2 digits after decimal point stored) In this example, 100 times the temperature data for temperature input 0 is stored in binary form in D100 to D102. CIO 2 Temperature input 0 Leftmost data CIO 200 Rightmost data Bit D100 D101 D102 15 14 13 12 11 10 9 ×162 ×167 ×166 5 ×161 ×165 Always 0 Always 0 Always 0 8 7 6 ×163 4 3 1 ×160 0 ×164 0 Temperature Unit Flag (0: °C, 1: °F) Open-circuit Flag (0: Normal, 1: Error) 474 2 0 Section 7-5 Temperature Sensor Units A200.11 (First Scan Flag) MOV(021) #0000 D102 (1) Sets D103 and D102 to #0100 and #0000, respectively. MOV(021) #0100 D103 P_On (Always ON Flag) CMP(020) 2 #7FFE Detects completion of input 0 initialization. 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) 2.15 (rightmost digits) MOV(021) 2 2000 MOVD(083) (3) 002 #0020 2001 (2) Leftmost digits moved to CIO 2000. Leftmost and rightmost digits rearranged and moved to CIO 2002 and CIO 2001. MOVD(083) (4) 2000 #0300 2001 MOVD(083) (5) 2000 #0011 2002 REST 2000.01 SET 2000.02 2000.02 2002.07 (non-negative data) BCDL(059) 2001 D100 2002.07 (negative data) CLC(041) −C(412) D102 2001 H0 Data rearrangement completed. (6) If the temperature data is non-negative, the binary data in CIO 202 and CIO 201 is converted to BCD and placed in D101 and D100. (7) If the temperature data is negative, the 2's complement data in CIO 202 and CIO 201 is converted to binary data representing the absolute value of the temperature input and placed in H1 and H0. −C(412) D0103 2002 H1 BCDL(059) H0 D100 (8) The binary data in H1 and H0 is converted to BCD and placed in D101 and D100. MOVD(083) (9) "1" is written to the bit in D101 indicating negative data. #0008 #0300 D101 REST2000.01 475 Section 7-6 CompoBus/S I/O Link Units Description of Operation CIO 2: Rightmost 3 digits of temperature data CIO 2: Leftmost 3 digits of temperature data CIO 2000 5 0 16 0 165 4 3 16 (2) 162 1 16 161 161 (3) 164 163 (4) (5) CIO 2002 0 D101 0/8 0 165 164 D100 106 105 104 (6) If the temperature data is non-negative, binary data is converted to BCD data. CIO 2001 164 163 161 160 103 102 101 100 (9) If temperature data is negative, "8" is written here. (1) #0100 D103 − (1) #0000 1 0 D102 0 CIO 2002 2's complement data (7) H1 Binary subtraction 7-6 0 0 (8) If the temperature data is negative, binary data is converted to BCD data. 0 165 164 0 0 0 0 CIO 2001 2's complement data H0 163 162 161 160 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 Master Control Unit) CP1W-SRT21/ CPM1A-SRT21 CompoBus/S I/O Link Unit CP1L CPU Unit SYSMAC CP1L ON IN 1 2 L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 S 3 4 5 6 No. COMM ERR SRT21 EXP 00 01 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 BD H NC( BS+) 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 allocated 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 Section 7-6 CompoBus/S I/O Link Units Master PLC (CS Series) CPU Unit I/O memory Output CIO 2000 Input CIO 2004 CP1L CompoBus/S Master Unit Unit No. 0 I/O memory 8 bits 8 bits Input CIO 2 8 bits 8 bits Output CIO 12 CompoBus/S I/O Link Unit Node number: 0 Specifications Model number Master/slave CP1W-SRT21/CPM1A-SRT21 CompoBus/S Slave Number of I/O points Number of words allocated in CPU Unit I/O memory 8 input points, 8 output points 1 input word, 1 output word (Allocated in the same way as Expansion Units and Expansion I/O Units.) Set using the DIP switch (Set before turning on the CPU Unit’s power supply.) Node number setting LED Indicators Indicator Name COMM Communications Indicator Color Yellow ERR Red Error indicator Meaning ON: Communications in progress. OFF: Communications stopped or error has occurred. 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 S (2) DIP Switch 2 3 4 5 6 No. (3) LED Indicators COMM ERR SRT21 (5) Expansion Connector EXP BD BD (4) Expansion I/O Connecting Cable NC(BS+) NC(BS-) NC (1) CompoBus/S Terminals (1) CompoBus/S Terminals The following CompoBus/S terminals are provided: CompoBus/S communications data high/low terminals, NC terminals for communications power supply plus (+) and minus (−), and an NC terminal. (Power is supplied internally for this Unit, so the NC terminals for communications power supply can be used as relay terminals.) 477 Section 7-6 CompoBus/S I/O Link Units (2) DIP Switch Used to specify the node number for the CompoBus/S I/O Link Unit. (Refer to the following table.) Contents Pin labels 1 2 4 8 DR HOLD NODE NUMBER 1 2 4 8 ON Node Number Setting 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 SW1 8 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 SW1 4 2 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 = ON, 0 = OFF Note: The long-distance communications mode can be used only when one of the following Master Units is connected: C200HW-SRM21-V1, CQM1-SRM21-V1, or SRM1-C0@-V2. ON OFF HOLD ON OFF DR Long-distance communications mode (See note.) High-speed communications mode Retain inputs after a communications error. Clear inputs after a communications error. (3) LED Indicators Used to show the CompoBus/S communications status. Indicator Name COMM Communications indicator Color Yellow ERR Red Error indicator Meaning ON: Communications in progress. OFF: Communications stopped or error has occurred. 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 Expansion Unit or Expansion I/O Unit. The cable is provided with the CompoBus/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 Section 7-6 CompoBus/S I/O Link Units Operating Procedure • Connect the CompoBus/S I/O Link Unit. Connect the Unit. • The node number should be a unique number between 0 and 15. • Use the DIP switch to set the CompoBus/S I/O Link Unit fs node number, communications mode, and the status of output data when a communications error occurs. Determine the node address of the CompoBus/S I/O Link Unit and set the DIP switch. • Connect the CompoBus/S I/O Link Unit to a CompoBus/S transmission path. Wire the CompoBus/S transmission path. Connecting the CompoBus/S I/O Link Unit CompoBus/S I/O Link Units are connected to the CP1L CPU Unit. For CP1L 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. CompoBus/S I/O Link Unit CP1L M-type CPU Unit SYSMAC CP1L ON IN 1 2 L1 L2/N COM 01 00 03 02 05 04 07 06 09 08 11 10 01 00 03 02 05 04 07 06 09 11 10 08 S 3 4 5 6 No. COMM ERR SRT21 EXP 00 01 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 05 07 BD H NC( BS+) 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 allocated 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 CPU Unit CompoBus/S I/O LInk Unit Input words CIO 0 CIO 1 CIO 2 Output words CIO 100 CIO 101 CIO 102 479 Section 7-6 CompoBus/S I/O Link Units The input word (m+1) contains the 8 bits of data from the Master Unit and two CompoBus/S communications flags. 09 08 07 15 00 Word m+1 CompoBus/S Communications Error Flag 0: Normal; 1: Error Data from the Master Unit 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 always 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 Unit’s 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 Number and Making DIP Switch Settings Node Number • The CompoBus/S I/O Link Unit is a Slave Unit with 8 input bits and 8 output 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 Section 7-6 CompoBus/S I/O Link Units DIP Switch Settings Use the DIP switch to set the CompoBus/S I/O Link Unit’s node number, communications mode, and the status of output data when a communications error occurs. Contents Pin labels 1 2 4 8 DR HOLD NODE NUMBER 1 2 4 8 ON SW1 Node Number Setting 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 SW1 4 2 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 = ON, 0 = OFF Note: The long-distance communications mode can be used only when one of the following Master Units is connected: C200HW-SRM21-V1, CQM1-SRM21-V1, or SRM1-C0@-V2. Note Wiring the CompoBus/S Communications Path ON OFF HOLD ON OFF DR Long-distance communications mode (See note.) High-speed communications mode Retain inputs after a communications error. Clear inputs after a communications error. Always turn OFF the power supply before changing the DIP switch settings. Wire the CompoBus/S communications path as shown in the following diagrams. BD H NC (BS+) BD L NC (BS−) NC These terminals are not used. They can however be used as communications power supply relay terminals. BD L BD H Connect the CompoBus/S Communications Cable. 481 Section 7-7 DeviceNet I/O Link Units 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 connected 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 SYSMAC CP1L DeviceNet slave IN L1 L2/N COM 01 00 03 02 05 07 04 06 09 08 11 10 01 00 03 02 05 04 07 06 09 08 11 10 Each Unit enables remote I/O communications for 32 input and 32 output points as a DeviceNet slave. 00 01 COM 02 COM 03 COM 04 COM 06 05 00 07 01 COM 03 02 04 COM 06 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 allocated 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 connected. Master PLC (CS Series with fixed allocations) CPU Unit I/O memory Outputs CIO 50 CIO 51 Inputs CIO 350 CIO 351 DeviceNet Master Unit Unit No. 0 CP1L CPU Unit I/O memory 32 bits 32 bits 32 bits 32 bits Note Inputs CIO 2 CIO 3 Outputs CIO 12 CIO 13 Refer to the DeviceNet Slaves Operation Manual (W347) for details on DeviceNet networks. Specifications Model number Master/slave 482 DeviceNet I/O Link Unit Node number: 0 CPM1A-DRT21 DeviceNet Slave Section 7-7 DeviceNet I/O Link Units Number of I/O points Number of words allocated in CPU Unit I/O memory 32 input points, 32 output points 2 input words, 2 output words (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 Unit’s 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 (1) DeviceNet Communications Connector (5) Expansion I/O Connecting Cable (1) DeviceNet Communications Connector Used to connect DeviceNet communications. For the wiring, use the connector 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 ON OFF OFF 125 kbps 250 kbps 500 m 250 m OFF ON ON ON 500 kbps Not allowed. 100 m --- Pin 4 Output hold function setting 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 Section 7-7 DeviceNet I/O Link Units 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 communications are set to be cleared, the timing for clearing outputs and setting the Error Flags may not agree. (4) LED Indicators Used to indicate CPM1A-DRT21 status, as shown in the following table. Indicator Color MS Green NS Status Lit Condition Normal status Meaning • Normal status Red Flashing Lit Not set Fatal error • Switch settings being read • Fatal hardware error (watchdog timer) --- Flashing OFF Nonfatal error Power not supplied. Green Lit Online and communications established. Online and communications not established. • Incorrect switch settings. • Power not supplied. • Waiting for initialization to start. • Reset in progress. • Network normal and communications established. Flashing Red --- Lit Fatal communications error Flashing Nonfatal communications error OFF Online and power OFF. • Network normal and communications not established. Unit has detected network status preventing normal communications. • Node number duplications • Bus OFF detected. • Communications timeout or communications error for one or more slaves. Waiting for node number 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 Expansion 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 484 If a communications error occurs while the slave is on standby, the appropriate 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 program when it is necessary to detect errors. Section 7-7 DeviceNet I/O Link Units Operating Procedure • Connect the DeviceNet I/O Link Unit. Connect the Unit. • The node number should be a unique number between 0 and 63. • Use the DIP switch to set the DeviceNet I/O Link Unit fs baud rate and the status of output data when a communications error occurs. Determine the node number of the DeviceNet I/O Link Unit and set the rotary switches. • Connect the DeviceNet I/O Link Unit to a DeviceNet transmission path. Wire the DeviceNet transmission path. Connecting the DeviceNet I/O Link Unit DeviceNet I/O Link Units are connected to the CP1L CPU Unit. For CP1L Mtype 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. DeviceNet I/O Link Unit CP1L M-type CPU Unit SYSMAC CP1L IN L1 L2/N COM 01 00 03 02 05 04 00 07 06 01 02 COM COM 09 08 03 COM 11 10 04 COM 01 00 06 05 03 05 02 04 00 01 COM 07 07 06 03 02 09 08 04 COM 11 10 06 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 allocated 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. Input words Output words CP1L CPU Unit CIO 0 CIO 1 CIO 100 CIO 101 DeviceNet I/O Link Unit CIO 2 CIO 3 CIO 102 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 Section 7-7 DeviceNet I/O Link Units DeviceNet master 15 14 13 12 11 10 I/O memory CIO 0 32 bits 9 8 7 6 5 4 3 1 0 Input Bits CIO 0.00 to CIO 0.11: 12 bits Do not use. CIO 1 (m) CIO 1.00 to CIO 1.11: 12 bits CIO 2 (m+1) CIO 2.00 to CIO 2.15: 16 bits CIO 3 (m+2) CIO 3.00 to CIO 3.15: 16 bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CIO 101 (n) CIO 101.00 to CIO 101.11: 8 bits CIO 102 (n+1) CIO 102.00 to CIO 102.15: 16 bits CIO 103 (n+2) CIO 103.00 to CIO 103.15: 16 bits Note CPU Unit DeviceNet I/O Link Unit Output Bits CIO 100.00 to CIO 100.11: 8 bits CIO 100 32 bits 2 CPU Unit DeviceNet I/O Link Unit (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 Unit’s 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 Number and Making DIP Switch Settings Setting Node Numbers Use rotary switches SW2 and SW3 to set DeviceNet node number. The setting 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 486 Pin 1 OFF Pin 2 OFF Baud rate 125 kbps Max. transmission path length 500 m ON OFF OFF ON 250 kbps 500 kbps 250 m 100 m ON ON Not allowed. --- Section 7-7 DeviceNet I/O Link Units Output Hold Function Pin 4 OFF ON Note Wiring the DeviceNet Communications Path DeviceNet baud rate Clears remote outputs when communications error occurs. (Outputs turned OFF for each logic value.) Holds remote outputs when communications error occurs. When using Expansion Unit/Expansion I/O Unit Error Flags (A436) in the program, 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. When using a CPM1A-DRT21 DeviceNet I/O Link Unit, wire the DeviceNet 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 Form and specifications Note XW4B-05C1-H1-D OMRON connector with screws (provided with CPM1A-DRT21) XW4B-05C4-TF-D OMRON connector for multidrop connections (See note.) Use the XW4B-05C4-TF-D when wiring multidrop connections using Thick Cables. Use the following screwdriver for the above connector. 487 Section 7-7 DeviceNet I/O Link Units XW4Z-00C 3.5 mm 0.6 mm I/O Response Time 488 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.