Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore manual_s7_200_2005_en

manual_s7_200_2005_en

Published by thanutkorn, 2019-03-14 22:39:54

Description: manual_s7_200_2005_en

Search

Read the Text Version

Execution Times for STL Instructions Appendix F Instruction µs Instruction µs 21 4 SLEN 27 STOP Power flow not present 0.6 51 SLW Time = Base + (LM + N) 371 STR Time = Base + (LM õ N) 81 Base 460 Typ Base (for 1st source character) Length multiplier (LM)) 550 Max Length multiplier (LM) 17 N is the shift count 22 N is the number of additional source 1080 Typ 0.6 1300 Max SPA characters 331 28 391 Typ SQRT 1.5 SWAP 783 Typ 436 27 TAN 554 1 36 SRB Time = Base + (LM + N) TODR 33 Base 42 TODRX 32 Length multiplier (LM)) 5.3 53 Typ N is the shift count Daylight Saving Time correction 106 Max 69 TODW 7 SRD Time = Base + (LM + N) 27 TODWX 42 Base TOF 19 Length multiplier (LM)) 58 TON 29 N is the shift count 27 TONR 25 TRUNC SRW Time = Base + (LM + N) Base Length multiplier (LM)) N is the shift count SSCPY Time = Base + (LM õ N) WDR Base XMT Length multiplier (LM) XORB N is the number of copied characters XORD XORW STD Time = Base + (LM õ N) Base (for 1st source character) Length multiplier (LM) N is the number of additional source characters STI Time = Base + (LM õ N) Base (for 1st source character) Length multiplier (LM) N is the number of additional source characters 487

S7-200 Programmable Controller System Manual 488

S7-200 Quick Reference Information To help you find information more easily, this section summarizes the following information: - Special Memory Bits - Descriptions of Interrupt Events - Summary of S7-200 CPU Memory Ranges and Features - High-Speed Counters HSC0, HSC1, HSC2, HSC3, HSC4, HSC5 - S7-200 Instructions Table G-1 Special Memory Bits Special Memory Bits SM0.0 Always On SM1.0 Result of operation = 0 SM1.1 Overflow or illegal value SM0.1 First Scan SM1.2 Negative result SM1.3 Division by 0 SM0.2 Retentive data lost SM1.4 Table full SM1.5 Table empty SM0.3 Power up SM1.6 BCD to binary conversion error SM1.7 ASCII to hex conversion error SM0.4 30 s off / 30 s on SM0.5 0.5 s off / 0.5 s on SM0.6 Off 1 scan / on 1 scan SM0.7 Switch in RUN position 489

S7-200 Programmable Controller System Manual Table G-2 Interrupt Events in Priority Order Priority Group Priority in Group Event Number Interrupt Description Communications 0 (highest) 0 8 Port 0: Receive character 0 9 Port 0: Transmit complete Discrete (middle) 1 23 Port 0: Receive message complete 1 24 Port 1: Receive message complete Timed (lowest) 1 25 Port 1: Receive character 0 26 Port 1: Transmit complete 1 19 PTO 0 complete interrupt 2 20 PTO 1 complete interrupt 3 0 I0.0, Rising edge 4 2 I0.1, Rising edge 5 4 I0.2, Rising edge 6 6 I0.3, Rising edge 7 1 I0.0, Falling edge 8 3 I0.1, Falling edge 9 5 I0.2, Falling edge 10 7 I0.3, Falling edge 11 12 HSC0 CV=PV (current value = preset value) 12 27 HSC0 direction changed 13 28 HSC0 external reset 14 13 HSC1 CV=PV (current value = preset value) 15 14 HSC1 direction input changed 16 15 HSC1 external reset 17 16 HSC2 CV=PV 18 17 HSC2 direction changed 19 18 HSC2 external reset 20 32 HSC3 CV=PV (current value = preset value) 21 29 HSC4 CV=PV (current value = preset value) 22 30 HSC4 direction changed 23 31 HSC4 external reset 0 33 HSC5 CV=PV (current value = preset value) 1 10 Timed interrupt 0 2 11 Timed interrupt 1 3 21 Timer T32 CT=PT interrupt 22 Timer T96 CT=PT interrupt 490

S7-200 Quick Reference Information Appendix G Table G-3 Memory Ranges and Features for the S7-200 CPUs Description CPU 221 CPU 222 CPU 224 CPU 224XP CPU 226 User program size 4096 bytes 4096 bytes 8192 bytes 12288 bytes 16384 bytes with run mode edit 4096 bytes 4096 bytes 12288 bytes 16384 bytes 24576 bytes without run mode edit 8192 bytes 10240 bytes 10240 bytes I0.0 to I15.7 I0.0 to I15.7 I0.0 to I15.7 User data size 2048 bytes 2048 bytes Q0.0 to Q15.7 Q0.0 to Q15.7 Q0.0 to Q15.7 AIW0 to AIW62 AIW0 to AIW62 AIW0 to AIW62 Process-image input register I0.0 to I15.7 I0.0 to I15.7 AQW0 to AQW62 AQW0 to AQW62 AQW0 to AQW62 VB0 to VB8191 VB0 to VB10239 VB0 to VB10239 Process-image output register Q0.0 to Q15.7 Q0.0 to Q15.7 LB0 to LB63 LB0 to LB63 LB0 to LB63 M0.0 to M31.7 M0.0 to M31.7 M0.0 to M31.7 Analog inputs (read only) AIW0 to AIW30 AIW0 to AIW30 SM0.0 to SM0.0 to SM0.0 to SM549.7 SM549.7 SM549.7 Analog outputs (write only) AQW0 to AQW30 AQW0 to AQW30 SM0.0 to SM29.7 SM0.0 to SM29.7 SM0.0 to SM29.7 256 (T0 to T255) 256 (T0 to T255) 256 (T0 to T255) Variable memory (V) VB0 to VB2047 VB0 to VB2047 T0, T64 T0, T64 T0, T64 T1 to T4, and T1 to T4, and T1 to T4, and Local memory (L)1 LB0 to LB63 LB0 to LB63 T65 to T68 T65 to T68 T65 to T68 T5 to T31, and T5 to T31, and T5 to T31, and Bit memory (M) M0.0 to M31.7 M0.0 to M31.7 T69 to T95 T69 to T95 T69 to T95 T32, T96 T32, T96 T32, T96 Special Memory (SM) SM0.0 to SM0.0 to T33 to T36, and T33 to T36, and T33 to T36, and Read only SM179.7 SM299.7 T97 to T100 T97 to T100 T97 to T100 SM0.0 to SM29.7 SM0.0 to SM29.7 T37 to T63, and T37 to T63, and T37 to T63, and T101 to T255 T101 to T255 T101 to T255 Timers 1 ms 256 (T0 to T255) 256 (T0 to T255) C0 to C255 C0 to C255 C0 to C255 Retentive on-delay 10 ms T0, T64 T0, T64 HC0 to HC5 HC0 to HC5 HC0 to HC5 T1 to T4, and T1 to T4, and S0.0 to S31.7 S0.0 to S31.7 S0.0 to S31.7 100 ms T65 to T68 T65 to T68 AC0 to AC3 AC0 to AC3 AC0 to AC3 T5 to T31, and T5 to T31, and 0 to 255 0 to 255 0 to 255 On/Off delay 1 ms T69 to T95 T69 to T95 0 to 63 0 to 63 0 to 127 10 ms T32, T96 T32, T96 0 to 127 0 to 127 0 to 127 T33 to T36, and T33 to T36, and 256 256 256 100 ms T97 to T100 T97 to T100 0 to 7 0 to 7 0 to 7 T37 to T63, and T37 to T63, and Port 0 Port 0, Port 1 Port 0, Port 1 T101 to T255 T101 to T255 Counters C0 to C255 C0 to C255 High-speed counters HC0 to HC5 HC0 to HC5 Sequential control relays (S) S0.0 to S31.7 S0.0 to S31.7 Accumulator registers AC0 to AC3 AC0 to AC3 Jumps/Labels 0 to 255 0 to 255 Call/Subroutine 0 to 63 0 to 63 Interrupt routines 0 to 127 0 to 127 Positive/negative transitions 256 256 PID loops 0 to 7 0 to 7 Ports Port 0 Port 0 1 LB60 to LB63 are reserved by STEP 7--Micro/WIN, version 3.0 or later. 491

S7-200 Programmable Controller System Manual Table G-4 High-Speed Counters HSC0, HSC3, HSC4, and HSC5 Mode HSC0 HSC3 HSC4 HSC5 0 Clk Direction Reset Clk Clk Direction Reset Clk 1 I0.4 2 I0.0 I0.1 I0.3 I0.5 3 4 I0.0 I0.2 I0.3 I0.4 5 I0.4 I0.5 I0.0 I0.1 I0.3 Mode I0.0 I0.1 I0.2 I0.3 6 HSC0 Clk Down Reset HSC4 Clk Down Reset 7 I0.1 I0.2 I0.4 I0.5 8 Clk Up I0.1 Clk Up I0.4 I0.0 I0.3 Mode I0.0 I0.3 9 HSC0 Phase B Reset HSC4 Phase B Reset 10 I0.1 I0.2 I0.4 I0.5 11 Phase A I0.1 Phase A I0.4 I0.0 I0.3 Mode I0.0 I0.3 12 HSC0 HSC3 Clk Clk Q0.0 Q0.1 Table G-5 High-Speed Counters HSC1 and HSC2 Mode HSC1 HSC2 Clk 0 Clk Clk Down Reset Start I1.2 Direction Reset Start 1 I1.2 2 I0.6 I1.0 I1.1 I1.2 I1.4 I1.5 3 I0.6 I1.0 I1.2 I1.4 4 I0.6 I1.1 I1.2 I1.3 I1.5 5 I0.6 I0.7 I1.0 Start I1.2 I1.3 I1.4 Start I0.6 I0.7 I1.0 I1.3 I1.4 Mode I0.6 I0.7 I1.1 HSC2 I1.5 Start Clk Up Start 6 HSC1 I1.2 7 I1.1 I1.2 I1.5 8 Clk Up Clk Down Reset I1.2 Clk Down Reset Mode I1.3 9 I0.6 I0.7 I1.0 Phase A I1.3 I1.4 10 I0.6 I0.7 I1.0 I1.2 I1.3 I1.4 11 I0.6 I0.7 I1.0 I1.2 Reset I1.2 Phase B Phase A Phase B Reset I1.3 I1.4 I1.3 I1.4 I0.6 I0.7 I1.0 I1.3 I0.6 I0.7 I1.0 I0.6 I0.7 492

S7-200 Quick Reference Information Appendix G Boolean Instructions Math, Increment, and Decrement instructions LD Bit Load +I IN1, OUT Add Integer, Double Integer or Real LDI Bit Load Immediate +D IN1, OUT IN1+OUT=OUT LDN Bit Load Not +R IN1, OUT LDNI Bit Load Not Immediate --I IN1, OUT Subtract Integer, Double Integer, or A Bit AND --D IN1, OUT Real AI Bit AND Immediate --R IN1, OUT OUT-- IN1=OUT AN Bit AND Not ANI Bit AND Not Immediate MUL IN1, OUT Multiply Integer (16*16-->32) O Bit OR *I IN1, OUT Multiply Integer, Double Integer, or Real OI Bit OR Immediate *D IN1, OUT IN1 * OUT = OUT ON Bit OR Not *R IN1, IN2 ONI Bit OR Not Immediate DIV IN1, OUT Divide Integer (16/16-->32) Load result of Byte Compare LDBx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>I) IN2 /I IN1, OUT Divide Integer, Double Integer, or Real /D, IN1, OUT OUT / IN1 = OUT AND result of Byte Compare /R IN1, OUT ABx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>) IN2 OR result of Byte Compare SQRT IN, OUT Square Root IN1 (x:<, <=,=, >=, >, <>) IN2 OBx IN1, IN2 LN IN, OUT Natural Logarithm Load result of Word Compare LDWx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>) IN2 EXP IN, OUT Natural Exponential AND result of Word Compare SIN IN, OUT Sine IN1 (x:<, <=,=, >=, >, <>)I N2 AWx IN1, IN2 COS IN, OUT Cosine OR result of Word Compare OWx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>) IN2 TAN IN, OUT Tangent LDDx IN1, IN2 Load result of DWord Compare INCB OUT Increment Byte, Word or DWord IN1 (x:<, <=,=, >=, >, <>) IN2 INCW OUT INCD OUT AND result of DWord Compare ADx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>)IN2 DECB OUT DECW OUT OR result of DWord Compare DECD OUT Decrement Byte, Word, or DWord IN1 (x:<, <=,=, >=, >, <>) IN2 ODx IN1, IN2 Load result of Real Compare LDRx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>) IN2 PID TBL, LOOP PID Loop AND result of Real Compare Timer and Counter Instructions IN1 (x:<, <=,=, >=, >, <>) IN2 ARx IN1, IN2 TON Txxx, PT On-Delay Timer OR result of Real Compare TOF Txxx, PT Off-Delay Timer ORx IN1, IN2 IN1 (x:<, <=,=, >=, >, <>) IN2 TONR Txxx, PT Retentive On-Delay Timer BITIM OUT Beginning Interval Timer NOT Stack Negation CITIM IN, OUT Calculate Interval Timer EU Bit Detection of Rising Edge CTU Cxxx, PV Count Up ED Bit Detection of Falling Edge CTD Cxxx, PV Count Down CTUD Cxxx, PV Count Up/Down = Bit, N Assign Value =I Bit, N Assign Value Immediate Real Time Clock Instructions Bit, N S Bit, N Set bit Range TODR T Read Time of Day clock R Reset bit Range TODW T Write Time of Day clock SI IN1, IN2 Set bit Range Immediate TODRX T Read Real Time Clock Extended RI Reset bit Range Immediate TODWX T Set Real Time Clock Extended LDSx Load result of String Compare Program Control Instructions IN1 (x: =, <>) IN2 AND result of String Compare END Conditional End of Program IN1 (x: =, <>) IN2 ASx IN1, IN2 OR result of String Compare STOP Transition to STOP Mode IN1 (x: =, <>) IN2 OSx IN1, IN2 WDR WatchDog Reset (300 ms) And Load ALD Or Load JMP N Jump to defined Label OLD LBL N Define a Label to Jump to Logic Push (stack control) LPS Logic Read (stack control) CALL N [N1,...] Call a Subroutine [N1, ... up to 16 LRD Logic Pop (stack control) CRET optional parameters] LPP Load Stack (stack control) Conditional Return from SBR LDS And ENO FOR INDX,INIT,FINAL For/Next Loop AENO NEXT N LSCR N Load, Transition, Conditional End, and SCRT N End Sequence Control Relay CSCRE SCRE DLED IN Diagnostic LED 493

S7-200 Programmable Controller System Manual Move, Shift, and Rotate Instructions Table, Find, and Conversion Instructions MOVB IN, OUT ATT DATA, TBL Add data to table MOVW IN, OUT MOVD IN, OUT Move Byte, Word, DWord, Real LIFO TBL, DATA Get data from table MOVR IN, OUT FIFO TBL, DATA BIR IN, OUT Move Byte Immediate Read FND= TBL, PTN, INDX Find data value in table that matches BIW IN, OUT Move Byte Immediate Write FND<> TBL, PTN, INDX comparison FND< TBL, PTN, INDX BMB IN, OUT, N FND> TBL, PTN, INDX BMW IN, OUT, N BMD IN, OUT, N Block Move Byte, Word, DWord FILL IN, OUT, N Fill memory space with pattern SWAP IN Swap Bytes BCDI OUT Convert BCD to Integer IBCD OUT Convert Integer to BCD SHRB DATA, S_BIT, N Shift Register Bit BTI IN, OUT Convert Byte to Integer ITB IN, OUT Convert Integer to Byte SRB OUT, N Shift Right Byte, Word, DWord ITD IN, OUT Convert Integer to Double Integer SRW OUT, N DTI IN, OUT Convert Double Integer to Integer SRD OUT, N SLB OUT, N Shift Left Byte, Word, DWord DTR IN, OUT Convert DWord to Real SLW OUT, N TRUNC IN, OUT Convert Real to Double Integer SLD OUT, N ROUND IN, OUT Convert Real to Double Integer RRB OUT, N Rotate Right Byte, Word, DWord ATH IN, OUT, LEN Convert ASCII to Hex RRW OUT, N HTA IN, OUT, LEN Convert Hex to ASCII RRD OUT, N ITA IN, OUT, FMT Convert Integer to ASCII DTA IN, OUT, FM Convert Double Integer to ASCII RLB OUT, N Rotate Left Byte, Word, DWord RTA IN, OUT, FM Convert Real to ASCII RLW OUT, N RLD OUT, N DECO IN, OUT Decode ENCO IN, OUT Encode Logical Instructions ANDB IN1, OUT SEG IN, OUT Generate 7--segment pattern ANDW IN1, OUT ANDD IN1, OUT Logical AND of Byte, Word, and DWord ITS IN, FMT, OUT Convert Integer to String DTS IN, FMT, OUT Convert Double Integer to String ORB IN1, OUT RTS IN, FMT, OUT Convert Real to String ORW IN1, OUT ORD IN1, OUT Logical OR of Byte, Word, and DWord STI STR, INDX, OUT Convert Substring to Integer STD STR, INDX, OUT Convert Substring to Double Integer STR STR, INDX, OUT Convert Substring to Real XORB IN1, OUT Logical XOR of Byte, Word, and DWord Interrupt Instructions XORW IN1, OUT XORD IN1, OUT Invert Byte, Word and DWord CRETI Conditional Return from Interrupt (1’s complement) INVB OUT ENI Enable Interrupts INVW OUT String Length DISI Disable Interrupts INVD OUT Concatenate String Copy String ATCH INT, EVNT Attach Interrupt routine to event String Instructions Copy Substring from String DTCH EVNT Detach event Find First Character within String SLEN IN, OUT Find String within String Communications Instructions SCAT IN, OUT SCPY IN, OUT XMT TBL, PORT Freeport transmission SSCPY IN, INDX, N, OUT RCV TBL, PORT Freeport receive message CFND IN1, IN2, OUT SFND IN1, IN2, OUT NETR TBL, PORT Network Read NETW TBL, PORT Network Write GPA ADDR, PORT Get Port Address SPA ADDR, PORT Set Port Address High-Speed Instructions HDEF HSC, MODE Define High-Speed Counter mode HSC N Activate High-Speed Counter PLS Q Pulse Output 494

Index Symbols Analog modules, 3 EM 231 analog input, 404 &, 33 EM 231 RTD, 411 *, 33 EM 231 thermocouple, 411 EM 232 analog output, 408 A EM 235 analog input/output, 405 AC installation guidelines, 21 Analog output (AQ), addressing, 31 AC outputs and relays, 22 Analog outputs, configuring values, 44 ACCEL_TIME (Acceleration Time), EM 253 Position AND instruction, 162 Module, 256 example, 163 Access restriction, 48 AND load instruction, 75 Accessing AQ. See Analog output (AQ) AS--i Wizard, 448 direct addressing, 26 AS--interface modules, order numbers for manuals, S7--200 data, 26, 33 status chart, 63 480 Accumulators, 29 ASCII conversion instructions, 103 Add instruction, 140 ASCII to hex instruction, 103 Add to table instruction, 189 example, 189 example, 106 Address Assigning assigning, 62 high--speed counters, 126 addresses, 62 Modbus, 349 initial values, 62 network, 211 interrupts to HSC, 126 setting remote, 213 network addresses, 211 symbolic, 62 Asynchronous updates, PWM instruction, 136 Address switches, EM 277 PROFIBUS--DP, 424 Attach interrupt instruction, 153 Addressing Auto--hysteresis, 375 accumulators, 29 Auto--Tune, PID, 372 analog inputs, 30 Automatic mode, PID loop, 151 analog outputs, 31 Avoiding, network conflicts, 236 bit memory, 27 byte:bit, 26 B counter memory, 28 direct, 26 Backlash, selecting work zone, 306 expansion I/O, 32 Battery cartridge, 450 high--speed counters, 29 indirect (pointers), 33 order number, 480 local I/O, 32 Baud rates local memory, 30 memory areas, 27–30 network, 221 process--image input register, 27 optimal, 233 process--image output register, 27 setting, 211 S7--200 memory, 26 switch selections sequence control relay (SCR) memory, 31 special memory (SM) bits, 30 Multi--Master cable, 9 timer memory, 28 PPI Multi--Master cable, 213, 225, 227, 231, variable memory, 27 AENO instruction, 75 232 Agency approvals, 382 BCD to integer instruction, 100 AI. See Analog input (AI) Biasing Alarm checking, PID loop, 151 Allocating memory, Data Log Wizard, 367 network cable, 223 American Bureau of Shipping (ABS) Maritime PID loop, 145, 147 Agency, 382 Bit logic instructions Analog adjustment coil instructions, 73 potentiometers, 50 contact instructions, 70 SMB28 and SMB29, 470 logic stack instructions, 75 Analog input (AI) reset dominant bistable, 77 addressing, 30 set/reset bistable, 77 filtering, 45 Bit memory area (M), 27 saving on power loss, 38 Block diagram, EM 241 modem, 435 Block move byte instruction, 166 Block move double word instruction, 166 Block move instructions, example, 166 Block move word instruction, 166 Bookmarks, 244 495

S7-200 Programmable Controller System Manual Boolean instructions reset immediate, 73 coils, 73 set, 73 contacts, 70 set immediate, 73 logic stack, 75 Command Byte, EM 253 Position Module, 299 set/reset bistable, 77 Communication S7--200, 10 Break detection, 90 with MicroMaster drives, 332 Buffer consistency, PROFIBUS, 428 Communication processors Building, network, 221 CP 243--1 Ethernet module, 444 Bureau Veritas (BV) Maritime Agency, 382 CP 243--1 IT Internet module, 446 Byte address format, 26 CP 243--2 AS--Interface, 448 Byte and integer range, 26 Communication protocol Byte consistency, PROFIBUS, 428 multi--point interface (MPI), 215, 235 Byte to integer instruction, 100 point--to--point interface (PPI), 235 PROFIBUS, 235 C selecting, 214 user--defined, 225 C memory, 28 Communication requests, processing, 25 Cables Communication settings, STEP 7--Micro/WIN, 10 Communications, 210 biasing, 223 background time, 43 configuring baud rate, 231, 232 conflicts, 236 Freeport, 231 Interface, selecting, 210 remote modem, 230 Modbus Slave Protocol, 348 I/O expansion, 451 modem, 231–232 network, 221, 222 protocols supported, 214 order numbers, 480 radio modem, 232–233 RS--232/PPI Multi--Master, 452 Communications cards, order numbers, 480 selecting, 210 Communications instructions terminating, 223 get port address, 95 USB/PPI Multi--Master, 452 network read, 81 Calculating network write, 81 power requirements, 457–459 receive, 86 token rotation time, 233 set port address, 95 Calibration transmit, 86 EM 231, 403 Communications port EM 235, 403 connector pin assignments, 223 inputs, 403 Freeport mode, 225 Call subroutine instruction, 204 interrupts, 156 example, 205 Communications processors. See CP cards Callback, EM 241 Modem module, 312 Communications protocol Cartridges point--to--point interface (PPI), 214 memory, 450 PROFIBUS, 215 order numbers, 480 TCP/IP, 215 Changing Communications queue, 157 current value in HSC, 131 Compare byte instruction, 96 high--speed counter direction, 130 Compare double word instruction, 96 preset value in HSC, 131 Compare instructions, 59 Character interrupt control, 92 compare byte, 96 Clear interrupt event instruction, 153 compare double word, 96 Clearance requirements, 16 compare integer, 96 Clock compare real, 96 cartridge, 450 compare string, 98 status bits, 466 example, 96 Clock instructions Compare integer instruction, 96 read real--time clock, 78 Compare real instruction, 96 read real--time clock extended, 79 Compare string instruction, 98 set real--time clock, 78 Comparing, token rotation times, 235 set real--time clock extended, 79 Coil instructions no operation, 73 output, 73 output immediate, 73 reset, 73 496

Index Compatibility CPU 224 AC/DC/Relay, 391, 392 EM 231 RTD, 412 CPU 224 DC/DC/DC, 391, 392 EM 231 thermocouple, 412 CPU 226 AC/DC/Relay, 393 EM 241 Modem, 436 CPU 226 DC/DC/DC, 393 EM 253 Position, 439 EM 221 DI 8 x AC, 398 EM 277 PROFIBUS--DP, 424 EM 221 DI 8x24 VDC, 398 EM 222 DO 8 x Relay, 398 Compile errors, 60 EM 222 DO 8x24 VDC, 398 Compile rule violations, 464 EM 223 4x24 VDC In/4x24 VDC Out, 397 Complex PPI network, 217 EM 223 DI 16/DO 16 x DC 24V, 399 Concatenate string instruction, 184 EM 223 DI 16/DO 16 x 24 VDC Relay, 399 Conditional end instruction, 167 EM 223 DI 4/DO 4 x DC 24V/Relay, 397, 398 EM 223 DI 8/ DO 8 x 24 VDC/Relay, 399 example, 168 EM 223 DI 8/DO 8 x 24 VDC, 399 Conditional inputs, 59 EM 231 AI 4 x 12 Bit, 402 Conditional return from interrupt instruction, 153 EM 231 RTD, 412 Conditional return from subroutine instruction, 204 EM 231 thermocouple, 412 Conditional sequence control relay end instruction, EM 232 AQ 2 x 12 Bit, 402 EM 235 AI 4/AQ 1 x 12 Bit, 402 172 Connectors, order numbers, 480 Conditional transitions, example, 177 Constant values, 32 Configuration Contact instructions, 70 example, 72 analog output values, 44 Control byte, setting for HSC, 124 CP 243--1 Ethernet module, 444 Control logic, 24 CP 243--1 IT Internet module, 447 Conventions digital output states, 43 program editors, 58 EM 231, 404 S7--200 programming, 59 EM 231 RTD, 418 Convergence control EM 231 thermocouple, 413 example, 176 EM 235, 405 sequence control relay instructions, 175 EM 253 Position Module, 291 Conversion instructions EM 277 PROFIBUS--DP, 426–427 ASCII, 103 retentive ranges of memory, 44 ASCII to hex, 103 symbol table for Modbus, 349 decode, 112 Configuration drawings, 53 encode, 112 Configuration table, EM 241 Modem module, 313, example, 101 325 hex to ASCII, 103 Configuration/Profile table, EM 253 Position Module, round, 101 294 segment, 102 Configuring standard, 99 FBD and LAD status display, 246 string, 107, 110 HyperTerminal, 239–483 truncate, 101 network, 221 Convert double integer to string instruction, 107, 110 password, 49 Convert integer to string instruction, 107, 110 PTO/PWM operation, 136 Convert real to string instruction, 107, 110 STL status display, 247 Convert substring to double integer instruction, 107, Conflicts, avoiding network, 236 110 Connecting Convert substring to integer instruction, 107, 110 MM3 drive, 342 Convert substring to real instruction, 107, 110 MM4 drive, 345 Converting modem to S7--200, 231 loop inputs, 148 Multi--Master cable, 9 loop outputs to scaled integer, 149 network devices, 235 Copy string instruction, 184 radio modem to S7--200, 232 Copy substring from string instruction, 186 with S7--200, 10 Cosine instruction, 143 Connections Count down counter instruction, 113 CP 243--1 Ethernet module, 444 example, 115 CP 243--1 IT Internet module, 447 Count up counter instruction, 113 CP 243--2, 449 Count up/down counter instruction, 114 Connector pins, communications port assignments, example, 115 223 Connector terminals CPU 221 AC/DC/Relay, 390 CPU 221 DC/DC/DC, 390 CPU 222 AC/DC/Relay, 391, 392 CPU 222 DC/DC/DC, 391, 392 497

S7-200 Programmable Controller System Manual Counter instructions real--time clock, 2 high--speed counter (HSC), 118 scan cycle, 24 high--speed counter definition (HDEF), 118 screw sizes for installation, 18 IEC searching for on network, 213 down counter, 116 CPU 224, sample DP program, 433 up counter, 116 CPU Data Transfer Message Format, EM 241 up/down counter, 116 Modem module, 329 SIMATIC CPU events, history log, 48 count down counter, 113 CPU modules count up counter, 113 features, 68 count up/down counter, 114 input specifications, 387 installing, 18 Counter memory area (C), 28 memory ranges, 68, 491 Counters, high--speed, 50 order numbers, 385, 479 Country codes, supported by EM 241, 308 output specifications, 388 CP 243--1 Ethernet module power specifications, 387 removing, 19 communication processors, 444 self--test diagnostics, 25 configuration, 444 specifications, 385, 386 connections, 444 wiring diagrams, 390–392 functions, 444 CPUs, supporting intelligent modules, 323 number of connections, 215 CRC table, Modbus Slave Protocol, 348 order number, 443, 479 Creating specifications, 443 configuration drawings, 53 wizard, 444 program, 10 CP 243--1 IT Internet module program with Micro/WIN, 55 communication processors, 446 symbolic name list, 53 configuration, 447 user--defined protocols, 225 connections, 447 Cross reference table, 244 functions, 446 Current value Internet wizard, 447 changing in HSC, 131 number of connections, 215 setting for HSC, 125 order number, 446, 479 Cycle time (PTO function), 133 specifications, 446 CP 243--2 AS--I Interface, specifications, 448 D CP 243--2 AS--Interface module, order number, 479 CP 243--2 AS--Interface Module Data features, 448 receiving, 87, 92 order number, 448 saving and restoring, 36 CP 243--2 communications processor transmitting, 87 connections, 449 functions, 449 Data block, 54 operation, 449 Data block editor wizard, 448 CP Cards, supported by STEP 7 Micro/WIN, 225 assigning addresses, 62 CP cards assigning initial values, 62 order numbers, 480 Data consistency, PROFIBUS, 428 selecting, 224 Data exchange mode, EM 277 PROFIBUS--DP, 428 CP5411, 480 Data Log Wizard CP5511, 480 allocating memory, 367 CP5611, 480 application example, 364 CPU DATx_WRITE subroutine, 369 backup, 2 downloading the project, 368 comm ports, 2 overview, 364 digital I/O, 2 S7--200 cpus that support, 364 dimensions, 2 S7--200 Explorer, 368 error handling, 60 terminology, 364 execution speed, 2 using the, 365 expansion modules, 2 Data transfers, EM 241 Modem module, 311 ID register (SMB6), 468 Data types, subroutine parameters, 205 input simulators, 456 Date, setting, 78 memory, 2 DATx_WRITE, Data Log subroutine, 369 number of connections, 214 DC installation guidelines, 21 password protection, 48 DC outputs and relays, 22 power requirements, 17, 457 498

Index DC transistor, protecting, 22 Downloading Debugging data log configurations, 36 program, 14, 36 editing in RUN mode, 244 recipes, 36 features, 244 forcing values, 248 Drawings, creating configuration, 53 multiple scans, 248 Drive communication, calculating time requirement, DECEL_TIME (Deceleration Time), EM 253 Position Module, 256 332 Decode instruction, 112 Drives. See MicroMaster drives example, 112 Dumb terminal, configuring the RS--232/PPI Decrement instruction, 144 example, 144 Multi--Master cable, 239–483 Designing Micro PLC system, 52 E safety circuits, 52 Det Norske Veritas (DNV) Maritime Agency, 382 Editing, in RUN mode, 244 Detach interrupt instruction, 153 Editors Deviation, 375 Device database file (GSD), EM 277 Function Block Diagram (FBD), 56 PROFIBUS--DP, 431–432 Ladder Logic (LAD), 56 Diagnostic LED, 47 Statement List (STL), 55 Diagnostics, CPU self--test, 25 EEPROM Diagnostics information, EM 253 Position Module, error codes, 462 291 saving bit memory (M), 38 Differential term, PID algorithm, 148 saving variable memory (V), 39, 471 Digital expansion module, addressing, 32 Electric service life, 383 Digital input circuit, 47 Electromagnetic Digital inputs compatibility, S7--200, 383 filtering, 45 emission standards, 383 pulse catch, 45 immunity standards, 383 reading, 42 EM 231 analog input module writing to, 25 accuracy and repeatablity, 409 Digital outputs, configuring states, 43 calibration, 403 Dimensions, CPU, 2 input block diagram, 406 DIN rail mounting, 18 input data word format, 406 Diode suppression, 22 installation, 408 DIP switch settings, PPI Multi--Master cable, 9 specifications, 410 DIP switch settings, PPI Multi--Master cable, 227 EM 231 RTD module DIP switches configuring, 418 RS--232/PPI Multi--Master Cable, 454 connector terminals, 412 RTD, 418–419 CPU compatibility, 412 thermocouple, 414 selecting DIP switches, 418–419 Direction, changing in HSC, 130 specifications, 411 Disable interrupt instruction, 153 status indicators, 420 Disabling, high--speed counters, 131 temperature ranges and accuracy, 421–422 Discrete modules, 3 EM 231 thermocouple module Display panels basics, 413 TD 200 text display, 5 configuring, 413 TP070 touch panel, 5 connector terminals, 412 Displaying CPU compatibility, 412 program elements, 55 selecting DIP switches, 414 program status, 246 specifications, 411 Divergence control status indicators, 415 example, 175 temperature ranges and accuracy, 416–417 sequence control relay instructions, 175 EM 232 analog output module Divide instruction, 140 output block diagram, 408 Divide integer with remainder instruction (DIV), 142 output data word format, 407 example, 142 EM 235 analog input/output module Double integer to ASCII instruction, 104 accuracy and repeatablity, 409 Double integer to integer instruction, 100 calibration, 403 Double integer to real instruction, 100 configuration, 405 Down counter instruction, 116 input block diagram, 407 input data word format, 406 installation, 408 499

S7-200 Programmable Controller System Manual EM 235 analog input/output module (cont.) POSx_LDOFF, 279 output block diagram, 408 POSx_LDPOS, 280 output data word format, 407 POSx_MAN, 275 specifications, 410 POSx_RSEEK, 278 POSx_RUN, 277 EM 241 Modem Module POSx_SRATE, 281 block diagram, 435 programming, 266 configuration table, 313, 325 RP seek modes, 303–307 countries supported, 308 sample program to control module, 302 CPU compatibility, 436 examples, 285–289 CPU Data Transfer Message Format, 329 special memory, 298 Data transfers, 311 wiring diagram, 441–442 errors from instructions, 321 EM 277 PROFIBUS--DP module example, 323 additional features, 430 features, 308 address switches, 424 installing, 436 as DP slave, 425 instructions, 318 configuration file, 431–432 International telephone line interface, 308 configuration options, 427 Messaging Telephone Number, 327 configuring, 426–427 MOD_XFR instruction, 319 CPU compatibility, 424 Modbus addresses, 310 data exchange mode, 428 Modbus RTU protocol, 309 DP protocol, 425 Modem Expansion wizard, 314 LED status indicators, 430 MODx_CTRL instruction, 319 number of connections, 214 MODx_MSG instruction, 320 on PROFIBUS network, 426 numeric paging, 310 special memory bytes, 429 paging, 310 specifications, 423 password protection, 311 status LEDs, 424 RJ11 jack, 308 Embeded variables, in text and SMS messages, 311 security callback, 312 EN, 59, 67 Short Message Service (SMS), 310 Enable in (EN), 59 special memory locations, 323 Enable interrupt instruction, 153 specifications, 435 Enable out (ENO), 59 status LEDs, 314 Encode instruction, 112 STEP 7--Micro/WIN Interface, 309 example, 112 text paging, 310 End character detection, 91 End instruction, 167 EM 253 Control Panel, 290–292 ENO, 59, 67 EM 253 Position Module Entering, instruction, 12 Environmental specifications ACCEL_TIME, 256 operating, 383 command byte, 299 transport and storage, 383 configuration, 291 Equipment requirements, 4 Configuration/Profile table, 294 Error codes, 462 configuring, 267 compile rule violations, 464 CPU compatibility, 439 EM 253 Position module, 292 creating instructions, 302 fatal errors, 462 DECEL_TIME, 256 instructions for EM 253 Position Module, 292 diagnostics information, 291 module errors for EM 253 Position Module, 293 displaying and controlling operation, 290 PTO instructions, 264 eliminating backlash, 306 PWMxRUN instruction, 254 EM 253 Control Panel, 290–292 run--time programming problems, 463 error codes, 292 USS protocol instructions, 342 Features, 265 Errors inputs and outputs, 265 EM 241 Modem module configuration, 313 instruction error codes, 292 EM 241 Modem module instructions, 321 instruction guidelines, 273 fatal, 61 instructions, 273 handling, 60 module error codes, 293 I/O, 60 motion commands, 300 Modbus Slave Protocol execution, 353 Position Control wizard, 267 network read and write instructions, 82 POSx_CFG, 284 non--fatal, 60 POSx_CLR, 283 PID auto--tune, 377 POSx_CTRL, 274 POSx_DIS, 282 POSx_GOTO, 276 500

Index Errors (cont.) sequence control relay instructions, 172 PID loop, 151 set instruction, 73 program compile, 60 shift instructions, 180 program execution, 61 shift register bit instruction, 182 run--time, 60 SIMATIC counters, 115 SMB1, execution errors, 466 SIMATIC timers, 198, 199, 200 viewing, 60 standard conversion instructions, 101 stop instruction, 168 Ethernet, 214 subroutine, 53 TCP/IP, 215 subroutine call, 205 subroutine instructions, 207 Ethernet Module, wizard, 444 swap instructions, 183 Ethernet network, CP 243--1, 219 table find instruction, 195 Examples timed interrupt routine, 159 token--passing network, 234 add to table instruction, 189 transmit instructions, 93 AND instruction, 163 USS protocol program, 341 ASCII to hex instruction, 106 watchdog reset instruction, 168 block move instruction, 166 XOR instruction, 163 calculating power requirements, 457 Exception conditions, PID auto--tune, 377 compare instructions, 96 Exclusive OR instruction, 162 conditional end instruction, 168 example, 163 conditional transitions, 177 Executing contact instructions, 72 control logic, 24 convergence of control streams, 176 instructions, 25 count down counter instruction, 115 Execution error codes, USS protocol instructions, count up/down counter instruction, 115 342 decode instructions, 112 Execution errors, 61 decrement instruction, 144 Execution status, 43 DIV instruction, 142 Execution times, STL instructions, 483 divergence of control streams, 175 Expansion cable, 451 EM 241 Modem module, 323 Expansion I/O, 32 encode instructions, 112 bus errors (SMW98), 475 first--in--first--out instruction, 190 Expansion modules, 3 for--next loop instructions, 170 addressing I/O points, 32 Freeport mode, 226 analog high--speed counter instructions, 132 high--speed counter modes, 121 input specifications, 400 IEC counter instructions, 116 order numbers, 400, 411 IEC timers, 201 output specifications, 401 increment instruction, 144 specifications, 400 integer math instructions, 141 wiring diagrams, 402 integer to ASCII instruction, 106 digital, order numbers, 394 interrupt instructions, 159 dimensions, 18 interrupt routines, 53 discrete invert instructions, 161 general specifications, 394 jump to label instruction, 171 input specifications, 395 last--in--first--out instruction, 191 output specifications, 396 logic stack instructions, 76 wiring diagrams, 397–399 memory fill instruction, 192 ID and error register, 469 Modbus Slave Protocol, programming, 354 installing, 18 move instructions, 183 order numbers, 479 MUL instruction, 142 power requirements, 17, 457 network read/write instructions, 84 removing, 19 off--delay timer instruction, 199 on--delay timer instruction, 198 F OR instruction, 163 Position module, 285–289 Faceplate overlays, TD 200 C, order number, 481 real math instructions, 141 Fatal errors, 61 real to ASCII instruction, 106 receive instructions, 93 viewing, 462 reset instruction, 73 retentive on--delay timer instruction, 200 501 return from subroutine instructions, 207 rotate instructions, 180 segment instruction, 102

S7-200 Programmable Controller System Manual FBD editor modifying pointers for indirect addressing, 34 conventions, 58 network configuration, 221 description, 56 subroutines, 54 features, 56 suppression circuits, 22 vertical installation, 18 Features wiring, 20 CPU modules, 68 EM 241 Modem module, 308 H EM 253 Position Module, 265 Handling Fill instruction, 192 complex communications, 236 Filtering errors, 60 analog inputs, 45 Hardware, troubleshooting, 249 digital inputs, 45 Hex to ASCII instruction, 103 Find first character within string instruction, 187 High potential isolation test, 383 Find instruction, 193 High--speed counter (HSC) instruction, 118 Find string within string instruction, 187 First--in--first--out instruction, 190 example, 132 example, 190 High--speed counter definition (HDEF) instruction, Floating point values, 31, 149 For--next loop instructions 118 example, 170 High--speed counters, 50 for, 169 next, 169 addressing, 126 Forcing values, 247, 248 assigning interrupts, 126 Forward--acting loops, 150 changing current value, 131 Freeport, configuring, PPI Multi--Master cable, 231 changing direction, 130 Freeport communication, 467 changing preset value, 131 SMB30 and SMB130, 470 control byte, 119 Freeport control registers (SMB30 and SMB130), defining modes and inputs, 120 470 disabling, 131 Freeport mode initialization sequence, 127 changing from PPI, 87 interrupts, 120 character interrupt control, 92 memory area, addressing, 29 definition, 156 modes, 121, 492 enabling, 86 programming, 119 example, 226 reset and start operations, 123 parity error (SMB3), 467 selecting active state, 124 receive character (SMB2), 467 setting control byte, 124 RS--232 standard, 227 setting current and preset values, 125 transmit and receive instructions, 86 SMB36--SMB65, 471 user--defined protocols, 225 status byte, 126 Function Block Diagram. See FBD editor timing diagrams, 121–123 Functions, Modbus, 350 understanding, 119 High--speed pulse output G operation, 133 SMB66--SMB85, 473 Gap update factor (GUF), 233 High--speed pulse outputs, 50 Germanisher Lloyd (GL) Maritime Agency, 382 Highest station address (HSA), 233 Get port address instruction, 95 History log , CPU events, 48 Global variable table, 62 HMI devices, 225 Grounding, 20, 21 HSC, 50 GSD file, EM 277 PROFIBUS--DP, 431–432 Instruction wizard, 119 Guidelines HSC0, HSC1, HSC2 register (SMB36 to SMB65), 471 designing a Micro PLC system, 52 HSC3, HSC4, HSC5 register (SMB131 to SMB165), grounding and circuit, 20 475 grounding and wiring, 21 HyperTerminal, configuring RS--232/PPI high--vibration environment, 18 Multi--Master cable, 239–483 Inductive loads, 22 installation, 16 I instructions for EM 253 Position Module, 273 interrupt routines, 54, 155 I memory, 27 isolation, 20 I/O, reading and writing, 42 lamp loads, 22 502

Index I/O addressing, 32 power supply, 17 I/O errors, 60 S7--200, 17 I/O expansion cable, installation, 451 STEP 7--Micro/WIN, 4 I/O interrupt queue, 157 Instruction, entering, 12 I/O interrupts, 156 Instruction error codes, EM 253 Position Module, I/O module identification and error register, 469 292 I/O status (SMB5), 468 Instruction Libraries, 64 Idle line detection, 89 Instruction sets IEC 1131--3 instruction set, 57 IEC 1131--3, 57 IEC counter instructions selecting, 57 down counter, 116 SIMATIC, 57 example, 116 Instruction tree, 11, 55 up counter, 116 Instruction Wizard up/down counter, 116 HSC, 119 IEC timer instructions, 201 NETR, NETW, 81 example, 201 Instructions Immediate contact instruction, 70 add, 140 Increase program memory, disable run mode edit, 48 add to table, 189 Increment instruction, 144 AENO, 75 example, 144 AND, 162 Incrementing pointers, 34 AND load, 75 Indirect addressing, 33 ASCII to hex, 103 & and *, 33 attach interrupt, 153 modifying pointers, 34 BCD to integer, 100 Inductive Loads, 22 bit logic, 70 Initial values, assigning, 62 block move byte, 166 Initializing block move double word, 166 high--speed counters, 127 block move word, 166 Modbus Protocol, 348 byte to integer, 100 Input block diagram call subroutine, 204 EM 231, 406 clear interrupt event, 153 EM 235, 407 compare, 59 Input data word format concatenate string, 184 EM 231, 406 conditional end, 167 EM 235, 406 conditional return from interrupt, 153 Input image register, 25 conditional return from subroutine, 204 Input simulators, 456 conditional sequence control relay end, 172 Input specifications convert double integer to string, 107, 110 analog expansion module, 400 convert integer to string, 107, 110 CPU modules, 387 convert real to string, 107, 110 discrete expansion module, 395 convert substring to double integer, 107, 110 Inputs, 24, 25 convert substring to integer, 107, 110 calibration, 403 convert substring to real, 107, 110 conditional/unconditional, 59 copy string, 184 CPU module, 390 copy substring from string, 186 discrete expansion module, 395 cosine, 143 EM 253 Position Module, 265 count down counter, 113 filtering analog, 45 count up counter, 113 filtering digital, 45 count up/down counter, 114 high--speed counters, 120 creating motion, 302 start and reset (HSC), 123 decode, 112 Installation decrement, 144 clearance requirements, 16 detach interrupt, 153 CPU module, 18 disable interrupt, 153 electrical noise, 16 divide, 140 EM 231, 408 divide integer with remainder (DIV), 142 EM 235, 408 double integer to ASCII, 104 expansion module, 18 double integer to integer, 100 guidelines, 16 double integer to real, 100 heat--generating devices, 16 down counter, 116 high voltage devices, 16 EM 241 Modem module, 318 I/O expansion cable, 451 EM 253 Position Module, 273 mounting requirements, 18 enable interrupt, 153 503

S7-200 Programmable Controller System Manual Instructions (cont.) positive transition, 70 encode, 112 POSx_CFG, 284 End, 167 POSx_CLR, 283 exclusive OR, 162 POSx_CTRL, 274 executing, 25 POSx_DIS, 282 find first character within string, 187 POSx_GOTO, 276 find string within string, 187 POSx_LDOFF, 279 first--in--first--out, 190 POSx_LDPOS, 280 for, 169 POSx_MAN, 275 get port address, 95 POSx_RSEEK, 278 hex to ASCII, 103 POSx_RUN, 277 high--speed counter (HSC), 118 POSx_SRATE, 281 high--speed counter definition (HDEF), 118 PTOx_ADV, 264 high--speed pulse output (PLS), 133 PTOx_CTRL, 260 immediate contact, 70 PTOx_LDPOS, 263 increment, 144 PTOx_MAN, 262 integer to ASCII, 103 PTOx_RUN, 261 integer to BCD, 100 pulse output (PLS), 133 integer to byte, 100 pulse timer (TP), 201 integer to double integer, 100 pulse train output (PTO), 133 interrupt, 153–159 pulse width modulation (PWM), 133 invert byte, 161 PWMx_RUN, 254 invert double word, 161 read real--time clock, 78 invert word, 161 read real--time clock extended, 79 jump to label, 171 real to ASCII, 105 label, 171 real--time clock, 78 last--in--first--out, 190 receive, 86 load sequence control relay, 172 reset, 73 load stack, 75 reset dominant bistable, 77 logic pop, 75 reset immediate, 73 logic push, 75 retentive on--delay timer (TONR), 196 logic read, 75 return from interrupt, 153 loop control (PID), 145 return from subroutine, 204 MBUS_INIT, 351 rotate left byte, 179 MBUS_SLAVE, 353 rotate left double word, 179 memory fill, 192 rotate left word, 179 Modbus Slave Protocol, 350 rotate right byte, 179 MODx_CTRL, 319 rotate right double word, 179 MODx_MSG, 320 rotate right word, 179 MODx_XFR, 319 round, 101 move byte, 164 segment, 102 move byte immediate read, 165 sequence control relay end, 172 move byte immediate write, 165 sequence control relay transition, 172 move double word, 164 set, 73 move real, 164 set dominant bistable, 77 move word, 164 set immediate, 73 multiply, 140 set port address, 95 multiply integer to double integer (MUL), 142 set real--time clock, 78 natural exponential, 143 set real--time clock extended, 79 natural logarithm, 143 shift left byte, 179 negative transition, 70 shift left double word, 179 network read, 81 shift left word, 179 network write, 81 shift register bit, 181 next, 169 shift right byte, 179 no operation, 73 shift right double word, 179 NOT, 70 shift right word, 179 off--delay timer (TOF), 196, 201 sine, 143 on--delay timer (TON), 196, 201 square root, 143 OR, 162 standard contact, 70 OR load, 75 stop, 167 output, 73 string length, 184 output immediate, 73 subtract, 140 PID loop, 145 swap bytes, 183 504

Instructions (cont.) Index table, 190–195 table find, 193 J tangent, 143 transmit, 86 Jump instructions truncate, 101 jump to label, 171 up counter, 116 label, 171 up/down counter, 116 example, 171 USS protocol, 333 watchdog reset, 167 L without outputs, 59 L memory, 30 Instructions, quick reference guide, 493 Label instruction, 171 Integer math instructions, example, 141 LAD editor Integer to ASCII instruction, 103 conventions, 58 example, 106 description, 56 Integer to BCD instruction, 100 features, 56 Integer to byte instruction, 100 Ladder Logic. See LAD editor Integer to double integer instruction, 100 Lamp loads, guidelines, 22 Integral term, PID algorithm, 147 Last--in--first--out instruction, 190 Intelligent modules, 3 example, 191 LEDs CPUs that support, 323 diagnostic, 47 status (SMB200 to SMB549), 477 EM 241 Modem module, 314 Intercharacter timer, 91 Libraries, Instruction, 64 Interface, selecting communications, 210 Lloyds Register of Shipping (LRS) Maritime Agency, International standards, 382 382 Internet Devices, CP 243--1 IT, 219 Load sequence control relay instruction, 172 Internet module, wizard, 447 Load stack instruction, 75 Interrupt events Loading priority, 158 new current value in HSC, 131 quick reference, 490 new preset value in HSC, 131 types, 154 Local I/O, 32 Interrupt instructions Local memory area (L), 30 attach interrupt, 153 Local variable table, 55, 63 clear interrupt event , 153 Logic pop instruction, 75 conditional return from interrupt, 153 Logic push instruction, 75 detach interrupt, 153 Logic read instruction, 75 disable interrupt, 153 Logic stack instructions enable interrupt, 153 AENO, 75 example, 159 AND load, 75 Interrupt routines, 25, 42 example, 76 calling subroutines from, 156 load stack, 75 communication port, 156 logic pop, 75 example, 53 logic push, 75 guidelines, 54, 155 logic read, 75 I/O, 156 OR load, 75 priority, 157 Logic, control, 24 queues, 157 Logical connections rising/falling edge, 156 MPI, 215 sharing data with main program, 155 PPI, 214 system support, 155 Logical operations instructions time--based, 156 AND, OR, XOR, 162 types supported by S7--200, 156 invert, 161 understanding, 155 Loop control Interrupts (PID) instructions, 145–156 assigning to HSC, 126 adjusting bias, 150 high--speed counters, 120 converting inputs, 148 Invert byte instruction, 161 converting outputs, 149 Invert double word instruction, 161 error conditions, 151 Invert instructions, example, 161 forward/reverse, 150 Invert word instruction, 161 modes, 151 Isolation ranges/variables, 150 network, 221 selecting type, 148 wiring guidelines, 20 505

S7-200 Programmable Controller System Manual Loop inputs Micro/WIN. See STEP 7--Micro/WIN converting, 148 MicroMaster drive normalizing, 148 communication, 332 Loop outputs, converting to scaled integer, 149 connecting, 342 Loop table, 152 controlling, 331 reading and writing, 338, 339 PID, 372 MM3 drive Lost password, 49 connecting, 342 setup, 343 M MM4 drive connecting, 345 M memory, 27 setup, 346 Manual mode, PID loop, 151 Modbus Protocol Library, 347 Manuals, order numbers, 480 Modbus RTU Protocol, 350 Mapping address to S7--200, Modbus, 349 EM 241 Modem module, 309 Maritime Agency approvals, 382 functions supported by Modem module, 309 Master devices, 211 mapping addresses, 310 Math instructions Modbus Slave Protocol addresses, 349 add, 140 configuring symbol table, 349 decrement, 144 CRC table, 348 divide, 140 example of programming, 354 divide integer with remainder (DIV), 142 execution error codes, 353 increment, 144 execution time, 348 multiply, 140 functions supported, 350 multiply integer to double integer (MUL), 142 initialization, 348 subtract, 140 instructions, 350 Maximum and start/stop speeds, position control mapping aadresses to S7--200, 349 wizard, 255 MBUS_INIT, 351 Maximum character count, 92 MBUS_SLAVE, 353 MBUS_INIT instruction, 351 resources used, 348 MBUS_SLAVE instruction, 353 special memory, 348 Memory Mode switch, 41 accessing, 26 Modem CPU, 2 remote, PPI Multi--Master cable, 230 retentive, 44 with PPI Multi--Master cable, 231 Memory areas Modem Expansion Wizard, EM 241 Modem module, clearing, 49 314 operand ranges, 69 Modem Expansion wizard, 230 Memory Cartridge, restoring program from, 38 Modem module, 435 Memory cartridge, 36, 450 configuration table, 313 electrostatic discharge, 36 CPU Data Transfer Message Format, 329 error codes, 462 data transfers, 311 storing program, 37 errors from instructions, 321 Memory cartridges, order number, 480 example, 323 Memory fill instruction, 192 features, 308 example, 192 instructions, 318 Memory functions International telephone line interface, 308 block move instructions, 166 Messaging Telephone Number, 327 move instructions, 164 Modem Expansion wizard, 314 rotate instructions, 179 MODx_CTRL instruction, 319 shift instructions, 179 MODx_MSG instruction, 320 shift register bit instruction, 181 MODx_XFR instruction, 319 swap instructions, 183 numeric paging, 310 Memory ranges paging, 310 CPU modules, 68 password protection, 311 quick reference, 491 RJ11 jack, 308 Memory retention, 36–39 security callback, 312 ranges, 44 Short Message Service, 310 Message timer, 91 SMS messaging, 310 Messages, token--passing network, 234 status LEDs, 314 Messaging Telephone Number Format, EM 241 Text Message Format, 328 Modem module, 327 text paging, 310 Micro PLC system, designing, 52 506

Index Modes complex, 236 high--speed counters, 120 complex PPI, 217 PID loop, 151 components, 221–224 configuration guidelines, 221 Modifying, pointers, 34 CP card, 224 Module error codes, EM 253 Position Module, 293 device addresses, 214 MODx_CTRL instruction, EM 241 Modem module, gap update factor (GUF), 233 highest station address (HSA), 233 319 HMI devices, 225 MODx_XFR instruction, EM 241 Modem module, isolation, 221 master devices, 211 319 modem, 231 MODx_MSG instruction, EM 241 Modem module, MPI, greater than 187.5 Kbaud, 218 MPI, less than 187.5 Kbaud, 217 320 multi--master PPI, 216 Monitoring, 14 optimizing performance, 233 PPI Multi--Master cable, 224 process variables, 63 PROFIBUS, 211 program status, 246 PROFIBUS--DP, 218 variables with status chart, 247 radio modem, 232 Motion commands, EM 253 Position Module, 300 repeaters, 222 Mode of operation, motion profile, 257 sample configurations, 216, 217, 218 Motion profile searching for CPU, 213 creating steps, 258 single--master PPI, 216 defining, 257 slave devices, 211 position module, 257 terminating cable, 223 Mounting token rotation time, 233 clearance requirements, 18 transmission rate, 221 dimensions, 18 Network read instruction, 81, 82 DIN rail, 18 error codes, 82 panel, 18 example, 84 Move byte immediate read instruction, 165 Network write instruction, 81, 82 Move byte immediate write instruction, 165 error codes, 82 Move byte instruction, 164 example, 84 Move double word instruction, 164 Next instruction, 169 Move instructions, example, 183 example, 170 Move real instruction, 164 Nippon Kaiji Kyokai (NK) Maritime Agency, 382 Move word instruction, 164 No operation instruction, 73 MPI network Noise rejection, input filter, 45 greater than 187.5 Kbaud, 218 Non--fatal errors, 60 less than 187.5 Kbaud, 217 Normalizing, loop inputs, 148 MPI protocol, 215, 235 NOT instruction, 70 Multi--Master cable, 9 Null modem adapter, 231 Multi--master PPI network, 216 Number, representation, 31 Multiply instruction, 140 Numbers, representation, 26, 32 Multiply integer to double integer instruction (MUL), Numeric instructions 142 cosine, 143 example, 142 natural exponential, 143 natural logarithm, 143 N sine, 143 square root, 143 National standards, 382 tangent, 143 Natural exponential instruction, 143 Numeric paging, EM 241 Modem module, 310 Natural logarithm instruction, 143 Navigation bar, 55 O Negative transition instruction, 70, 71 Nesting, subroutines, 204 Off--delay timer instruction (TOF), 196, 201 NETR, NETW, Instruction Wizard, 81 example, 199 Network On--delay timer instruction (TON), 196, 201 addresses, 211 example, 198 baud rate, 221 biasing cable, 223 OP3, OP7, OP17, order numbers, 481 building, 221 Open Loop Control, 252 cable, 221, 222 calculating distances, 221 communications port, 223 communications setup, 210–433 507

S7-200 Programmable Controller System Manual Open loop position control, using steppers or servos, Peer--to--peer communications, 217–218 255 Performance, optimizing network, 233 Opening, program editor, 11 Permanent Memory, copying V memory, 40 Operand ranges, 69 Permanent memory, 36, 39 Operation modes, CPU Permanent program storage, 39 changing, 41 PID , loop table, expanded, 372 Freeport protocol, 226 PID Auto--Tune status bits, 466 auto--hysteresis, 375 Operator interfaces, order number, 481 deviation, 375 Operator stations, specifying, 52 error conditions, 377 Optimizing, network performance, 233 exception conditions, 377 OR instruction, 162 prerequisites, 375 example, 163 PV out of range, 377 OR load instruction, 75 sequence, 376 Order, of interrupt events, 158 understanding, 372 Order numbers, 479–922 PID Tuning Control Panel, 378 CP 243--2 AS--Interface Module, 448 PID loop instruction, 145 CPU modules, 385 alarm checking, 151 digital expansion module, 394 automatic mode, 151 analog expansion module, 400, 411 converting loop inputs, 148 input simulators, 456 converting loop outputs to scaled integer, 149 PPI Multi--Master cables, 452 derivative term, 148 Output block diagram error conditions, 151 EM 232, 408 forward--acting, 150 EM 235, 408 integral term, 147 Output data word format loop control, 148 EM 232, 407 loop control types, 148 EM 235, 407 loop table, 152 Output image register, 24 manual mode, 151 Output immediate instruction, 73 modes, 151 Output instruction, 73 normalizing loop inputs, 148 Output specifications proportional term, 147 analog expansion module, 401 ranges, 150 CPU modules, 388 reverse--acting, 150 discrete expansion module, 396 understanding, 146 Outputs, 24 variables, 150 CPU module, 390 wizard, 145 discrete expansion module, 397 Pin assignment, communications port, 223 EM 253 Position Module, 265 Pipelining, PTO pulses, 134 instructions without, 59 PLC Information dialog box, 60 Outputs and relays, 22 Pointers, indirect addressing, 33 Outputs, analog, configuring values, 44 Port, settings, PPI Multi--Master cables, 220 Outputs, Digital, configuring states, 43 Position Control Wizard, 267 Overview, open loop control, 252 PTOx_ADV, 264 PTOx_CTRL, 260 PTOx_LDPOS, 263 P PTOx_MAN, 262 PTOx_RUN, 261 Paging, Modem module, 310 Position Control wizard, 133 Panel mounting, 18 Position module Parameters ACCEL_TIME, 256 in subroutines, 205 configuration, 291 types for subroutines, 205 Configuration/Profile table, 294 configuring, 267 Parity errors configuring motion profiles, 257 SMB3, 467 SMB30 and SMB130, 92 creating instructions, 302 Password DECEL_TIME, 256 clearing, 49 diagnostics information, 291 configuring, 49 displaying and controlling operation, 290 eliminating backlash, 306 CPU functions, 48 EM 253 Control Panel, 290–292 recovering lost, 49 restricting access, 49 error codes, 292 Password protection, EM 241 Modem module, 311 Features, 265 508

Index Position module (cont.) Preset value inputs and outputs, 265 changing in HSC, 131 instruction error codes, 292 setting for HSC, 125 instruction guidelines, 273 Priority instructions, 273 interrupt events, 158 module error codes, 293 interrupt routines, 157 motion commands, 300 Process image register, 42 Position Control wizard, 267 Process--image input register (I), 27 POSx_CFG, 284 Process--image output register (Q), 27 POSx_CLR, 283 Processing, communication requests, 25 POSx_CTRL, 274 PROFIBUS, master and slave devices on, 211 POSx_DIS, 282 PROFIBUS protocol, 215, 235 POSx_GOTO, 276 PROFIBUS -- DP POSx_LDOFF, 279 data consistency, 428 POSx_LDPOS, 280 module (EM 277), 426 POSx_MAN, 275 sample program, 433 POSx_RSEEK, 278 standard communications, 425 POSx_RUN, 277 PROFIBUS--DP network POSx_SRATE, 281 cable specifications, 221 programming, 266 pin assignments, 223 RP seek modes, 303–307 repeaters, 222 sample program to control, 302 S7--315--2 and EM 277, 218 special memory, 298 STEP 7--Micro/WIN and HMI, 218 Positive transition instruction, 70, 71 Profile table, EM 253 Position Module, 294 POSx_CFG, 284 Profile table values, PTO/PWM generators, 138 POSx_CLR, 283 Program POSx_CTRL, 274 analog inputs, 25 POSx_DIS, 282 basic elements, 53 POSx_GOTO, 276 compile errors, 60 POSx_LDOFF, 279 creating, 10 POSx_LDPOS, 280 creating with STEP 7--Micro/WIN, 55 POSx_MAN, 275 debugging features, 244 POSx_RSEEK, 278 downloading, 14, 36 POSx_RUN, 277 editing in RUN mode, 244 POSx_SRATE, 281 execution errors, 61 Potientiometers, analog adjustment, 50 monitoring, 14 Power flow, subroutine parameter, 205 monitoring status, 246 Power loss, retentive memory, 38, 44 running, 14 Power requirements, 17 saving, 13 calculating, 457, 459 sharing data with interrupt routines, 155 CPU, 457 specifying number of scans, 248 expansion module, 457 status chart, 63 sample, 458 storage, 36–40 table for calculating, 459 structuring, 53 Power specifications, CPU modules, 387 subroutines, 54 Power supply, 8, 17 Program control instructions PPI communications, changing to Freeport mode, 87 basic program control, 167 PPI mode, radio modem, 232 conditional end, 167 PPI Multi--Master cable, 4 for--next loop, 169 baud rate switch selections, 231 jump instructions, 171 radio modem, 232 sequence control relay (SCR), 172 configuring, 230 stop, 167 configuring for Freeport, 231 watchdog reset, 167 Freeport mode, 227 Program editors, 55 RS--232 standard, 227 conventions, 58 selecting, 210, 224 Function Block Diagram (FBD), 55 with modem, 231 Ladder Logic (LAD), 55 with radio modem, 232 opening, 11 PPI protocol, 214, 235 selecting, 55 complex network, 217 Statement List (STL), 55 multi--master network, 216 Program memory, increase, 48 single--master network, 216 Program, sample, controlling Position module, 302 PPI/Freeport mode, radio modem, 232 509

S7-200 Programmable Controller System Manual Programming PWMx_RUN instruction, error codes, 254 EM 253 Position Module, 266 high--speed counters, 119 Q Programming cable, 4 Q memory, 27 Programming software, order numbers, 480 Queue overflow (SMB4), 467 Proportional term, PID algorithm, 147 Queues, interrupt routines, 157 Protection circuit, 383 Quick reference information, 489 Protocol, communication R selecting, 214 user--defined, 225 Radio modem Protocols PPI mode, 232 PROFIBUS--DP, 425 PPI/Freeport mode, 232 supported by STEP 7--Micro/WIN, 225 with PPI Multi--Master cable, 232 PTO instructions, error codes, 264 PTO Output, 258 Rail PTO/PWM functions, registers (WMB66 to SMB85), dimensions, 18 473 mounting, 18 PTO_CTRL, 260 PTO0, PTO1 Profile Definition Table (SMB166 to Ranges, PID loop, 150 SMB185), 476 RCPx_Read subroutine, recipe instruction, 361 PTOx_CTRL, 260 Read real--time clock extended instruction, 79 PTOx_LDPOS, 263 Read real--time clock instruction, 78 PTOx_MAN, 262 Reading data from inputs, 24, 25 PTOx_RUN, 261 Real math instructions, example, 141 Pulse catch, 45 Real number values, 26, 31 Pulse catch feature, 46 Real to ASCII instruction, 105 Pulse Output instruction (PLS), 133 Pulse outputs example, 106 high--speed, 50 Real--time clock instructions, 78 pulse output instruction (PLS), 133 Receive instruction, 86 pulse train output instruction (PTO), 133 pulse width modulation instruction (PWM), 133 break detection, 90 Pulse timer instruction (TP), 201 end character detection, 91 Pulse Train Output end conditions, 89 PTOx_ADV, 264 example, 93 PTOx_CTRL, 260 Freeport mode, 86 PTOx_LDPOS, 263 idle line detection, 89 PTOx_MAN, 262 intercharacter timer, 91 PTOx_RUN, 261 maximum character count, 92 Pulse train output instruction (PTO), 50, 133 message timer, 91 configuring with SM memory, 136 parity errors, 92 cycle time, 134 receiving data, 87 multiple--segment pipelining, 135 SMB86 to SMB94, SMB186 to SMB194, 474 Position Control wizard, 133 start character detection, 89 profile table values, 138 start conditions, 89 single--segment pipelining, 134 user termination, 92 stepper motor control, 138 Receiving data, 92 understanding, 134 Recipes, uploading and downloading, 36 Pulse Width Modulation, 253 Recipe Wizard, 357 configuring PWM output, 253 allocating memory, 359 Pulse width modulation instruction (PWM), 50, 133 downloading, 360 configuring with SM memory, 136 instructions, 361 cycle time, 135 terms, 357 Position Control wizard, 133 Recovering, lost password, 49 profile table values, 138 Reinstalling, terminal block connector, 19 stepper motor control, 138 Relays, 22 understanding, 135 service life, 383 update methods, 136 Remote address, setting for S7--200, 213 Pulse Width Modulation Output, PWMx_RUN, 254 Removing PV out of range, PID auto--tune, 377 CPU module, 19 PWM Output, configuring, 253 expansion module, 19 PWMx_RUN, 254 terminal block connector, 19 pulse width modulation instruction, 254 510

Index Repeaters analog outputs (AQ), 31 network, 222 as slave device, 211, 425 order numbers, 480 baud rates, 211, 212–214 bit memory area (M), 27 Requirements, Modbus Slave Protocol, 348 C memory, 28 Reset, high--speed counter, 123 connecting with STEP 7--Micro/WIN, 10 Reset dominant bistable instruction, 77 constant values, 32 Reset immediate instruction, 73 counter memory area (C), 28 Reset instruction, 73 CPU modules, 2 dimensions, 2 example, 73 downloading, 36 Resolution, timer, 197, 198 electromagnetic compatibility, 383 Restarting, after fatal error, 61 environmental conditions, 383 Restoring Data, after power on, 39 error codes, 462 Restoring program, from memory cartridge, 38 error handling, 60 Retentive bit memory, 38 executing control logic, 24 Retentive data memory, 36 expansion modules, 3 Retentive memory, 44 grounding guidelines, 21 Retentive on--delay timer instruction (TONR), 196 hardware troubleshooting, 249 high--speed counters, 29 example, 200 I memory, 27 Return from interrupt instruction, 153 installation guidelines, 16 Return from subroutine instruction, 204 installing, 17 interrupt routines, 155 example, 207 L memory, 30 Reverse--acting loops, 150 local memory area (L), 30 RJ11 jack, EM 241 Modem module, 308, 436 M memory, 27 Rotate instructions, 179 memory, 26 memory ranges, 68 example, 180 modem, 231 types, 179 network address, 212–214 Rotate left byte instruction, 179 password protection, 48 Rotate left double word instruction, 179 power supply, 8 Rotate left word instruction, 179 process image register, 42 Rotate right byte instruction, 179 process--image input register (I), 27 Rotate right double word instruction, 179 process--image output register (Q), 27 Rotate right word instruction, 179 programming conventions, 59 Round instruction, 101 pulse catch feature, 46 RP Seek mode options, 303–307 Q memory, 27 EM 253 Position Module, 303–307 radio modem, 232 RP Seek modes, 303 reading and writing data, 24 RS--232 standard response to fatal error, 462 Freeport mode, 227 retentive memory, 44 PPI Multi--Master cable, 227 RS--232 standard, 227 RS--232/PPI Multi--Master cable RUN mode, 14, 41 configuring for HyperTerminal, 239–483 S memory, 31 DIP switch settings, 454 sample network configurations, 216, 217, 218, port settings, 220 specifications, 452 219 RS--485 standard, 222 saving data, 36 RTD module (EM 231), 418 scan cycle, 24, 42 RUN mode, 14, 41 sequence control relay memory area (S), 31 editing program, 244 SM memory, 30 Run mode edit, 43 special features, 42 disable , 48 special memory area (SM), 30 Run--time errors, 60 status chart, 247 Run--time programming, error codes, 463 STOP mode, 14, 41 Running, program, 14 supported interrupt routines, 156 system components, 2 S T memory, 28 technical specifications, 383 S memory, 31 timer memory area (T), 28 S7 -- 200 troubleshooting, 249 uploading, 36 accessing data, 26 accumulators, 29 511 addressing, 26 analog inputs (AI), 30

S7-200 Programmable Controller System Manual S7--200 (cont.) Setting up V memory, 27 MM3 drive, 343 variable memory area (V), 27 MM4 drive, 346 wiring diagrams, 390–392 wiring guidelines, 21 Seven--segment display, 102 Shift instructions S7--200 Explorer, 36, 41 Data Log Wizard, 368 example, 180 types, 179 S7--200 system manual, order numbers, 480 Shift left byte instruction, 179 S7--300, sample network configurations, 217 Shift left double word instruction, 179 S7--400, sample network configurations, 217 Shift register bit instruction, 181 Safety circuits, designing, 52 example, 182 Sample program, 10 Shift right byte instruction, 179 Saving Shift right double word instruction, 179 Shift right word instruction, 179 bit memory (M) to EEPROM, 38 Short Message Service, EM 241 Modem module, program, 13 310 S7--200 program data, 36 SIMATIC counter instructions value to EEPROM, 471 count down, 113 variable memory (V) to EEPROM, 39 count up, 113 Scaled integer, converting loop outputs, 149 count up/down, 114 Scan cycle, 24 examples, 115 specifying number, 248 SIMATIC instruction set, 57 timers, 198 SIMATIC timer instructions, 196 Scan times: SMW22 to SMW26, 470 example, 198, 199, 200 Security, passwords, 48 Simulators, order numbers, 481 Security callback, EM 241 Modem module, 312 Simulators, input, 456 Segment instruction, 102 Sine instruction, 143 example, 102 Single--master PPI network, 216 Selecting Slave device, 211 communication protocol, 214 EM 277 PROFIBUS--DP, 425 CP card, 224 S7--200, 425 instruction sets, 57 SM memory, 30 PPI Multi--Master cable, 224 Modbus Slave Protocol, 348 program editor, 55 PTO/PWM operation, 136 RTD DIP switches, 418–419 SMB0: status bits, 466 S7--200 operating mode, 41 SMB1: status bits, 466 thermocouple DIP switches, 414 SMB130: freeport control registers, 470 Sequence control relay end instruction, 172 SMB131 to SMB165: HSC3, HSC4, HSC5 register, Sequence control relay instructions 475 conditional sequence control relay end, 172 SMB166 to SMB185: PTO0, PTO1 Profile Definition convergence control, 175 Table, 476 divergence control, 175 SMB186 to SMB194: receive message control, 474 example, 172 SMB2: freeport receive character, 467 load sequence control relay, 172 SMB200 to SMB549: intelligent module status, 477 restrictions, 172 SMB28, SMB29 analog adjustment, 50, 470 sequence control relay end, 172 SMB3: freeport parity error, 467 sequence control relay transition, 172 SMB30 and SMB130: freeport control registers, 470 Sequence control relay memory area (S), 31 SMB31 and SMW32: EEPROM write control, 471 Sequence control relay transition instruction, 172 SMB34 and SMB35: timed interrupt registers, 471 Servos, open loop position control, 255 SMB36 to SMB65: HSC0, HSC1, HSC2 register, 471 Set dominant bistable instruction, 77 SMB4: queue overflow, 467 Set immediate instruction, 73 SMB5: I/O status, 468 Set instruction, 73 SMB6: CPU ID register, 468 example, 73 SMB66 to SMB85: PTO/PWM registers, 473 Set port address instruction, 95 SMB7: reserved, 468 Set real--time clock extended instruction, 79 SMB8 to SMB21: I/O module identification and error Set real--time clock instruction, 78 registers, 469 Setting SMB86 to SMB94, SMB186 to SMB194: receive baud rate, 211 message control, 474 control byte (HSC), 124 SMS, Modem module, 310 current and preset values for HSC, 125 SMW22 to SMW26: scan times, 470 date, 78 SMW98: expansion I/O bus errors, 475 remote address for S7--200, 213 Software debugging, 243 time, 78 512

Index Special memory network address, 212–214 EM 241 Modem module, 323 opening, 55 Modbus Slave Protocol, 348 order numbers, 480 Special memory area (SM), 30 PPI Multi--Master cable, 225 analog adjustment potentiometers, 50 program editors, 55 Special memory bits, 466–474 programming package, 4 quick reference, 489 sample network configurations, 216–219 Special memory bytes, EM 277 PROFIBUS--DP, 429 starting, 9 Special memory locations, EM 253 Position Module, STEP 7--Micro/WIN 32 Instruction Libraries, 480 298 Stepper motor control, PTO/PWM generators, 138 Specifications Steppers, open loop position control, 255 analog expansion module, 400 Steps, creating for motion profile, 258 CP 243--1 Ethernet module, 443 STL editor CP 243--1 IT Internet module, 446 description, 55 CP 243--2 AS--Interface module, 448 features, 55 CPU module, 385, 386 STL instructions discrete expansion module, 394 execution times, 483 EM 231 RTD, 411 quick reference, 493 EM 231 thermocouple, 411 Stop instruction, 167 EM 241 modem, 435 example, 168 EM 277 PROFIBUS--DP, 423 STOP mode, 14, 41 Micro PLC system, 52 Storing RS--232/PPI Multi--Master Cable, 452 program on memory cartridge, 37 Square root instruction, 143 S7--200 program data, 36 Standard contact instruction, 70 String, representation, 32 Standard conversion instructions, 99 String constant, 31 Standard DIN rail, 17 String instructions Standards, national and international, 382 concatenate string, 184 Start, high--speed counter, 123 copy string, 184 Start character detection, 89 copy substring from string, 186 Starting, STEP 7--Micro/WIN, 9 find first character within string, 187 Statement List. See STL Editor find string within string, 187 Status string length, 184 displaying in LAD and FBD, 246 String length instruction, 184 displaying in STL, 247 Strings, format, 31 end of scan, 246 Structuring, program, 53 execution, 246 Subroutine instructions monitoring program, 246 call subroutine, 204 Status byte, high--speed counter, 126 conditional return from subroutine, 204 Status chart, 63 example, 207 forcing values, 248 Subroutines monitoring values, 247 calling from interrupt routines, 156 Status LEDs data types, 205 EM 231 RTD, 420 example, 53 EM 231 thermocouple, 415 guidelines, 54 EM 253 position module, 439 nesting, 204 EM 277 PROFIBUS--DP, 424, 430 parameter types, 205 STEP 7--Micro/WIN power flow parameter, 205 as master device, 211 with parameters, 205 baud rate, 212–214 Subtract instruction, 140 communication settings, 10 Suppression circuits, 22 computer requirements, 4 Surge suppression, 22 connecting with S7--200, 10 Swap bytes instruction, 183 CP card, 225 example, 183 creating programs, 55 Symbol table, 62 debugging tools, 243 addressing, 62 equipment requirements, 4 configure for Modbus, 349 installation, 4 Symbolic addressing, 62 instruction sets Symbolic names, creating list, 53 IEC 1131--3, 57 Synchronous updates, PWM instruction, 136 selecting, 57 System block, 54 SIMATIC, 57 System design, Micro PLC, 52 Interface for EM 241, 309 System support, for interrupt routines, 155 513

S7-200 Programmable Controller System Manual T Token--passing network, example, 234 Toolbars, 55 T memory, 28 TP--Designer for TP070, Version 1.0, 480 Table find instruction, 193 TP070 touch panel unit, 5 example, 195 order number for manual, 480 Table instructions order numbers, 481 Transition instructions, 70 add to table, 189 Transmission rate, network, 221 first--in--first--out, 190 Transmit instruction, 86 last--in--first--out, 190 example, 93 memory fill, 192 Freeport mode, 86 table find, 193 transmitting data, 87 Tangent instruction, 143 Troubleshooting TC/IP, communications protocol, 215 error codes, 462 TCP/IP , protocol, 215 fatal errors, 61 TD 200, Wizard, 5 guide, 249 TD 200 text display unit, 5 non--fatal errors, 60 TD 200C text display unit, order number, 481 S7--200 hardware, 249 TD 200 text display unit Truncate instruction, 101 order number, 481 order number for manual, 480 U Telephone line interface, international, EM 241 Modem module, 308 Unconditional inputs, 59 Teleservice, 309 Up counter instruction, 116 Temperature ranges Up/down counter instruction, 116 EM 231 RTD, 421–422 Updating, PWM waveform, 136 EM 231 thermocouple, 416–417 Uploading, program, 36 Terminal block connector USB/PPI Multi--Master cable reinstalling, 19 removing, 19 order number, 452 Terminating, network cable, 223 port settings, 220 Text displays selecting, 210 faceplate overlays (TD 200C), 481 User Libraries, 64 order number, 481 User termination, 92 Text Message Format, EM 241 Modem module, 328 User--defined protocol, Freeport mode, 225 Text paging, EM 241 Modem module, 310 USS protocol, requirements, 332 Thermocouple module (EM 231) USS protocol instructions basics, 413 execution errror codes, 342 configuring, 413 guidelines for using, 333 status indicators, 415 sample program, 341 temperature ranges, 416–417 USS4_DRV_CTRL, 335 Time, setting, 78 USS4_INIT, 334 Time--based interrupts, 156 USS4_RPM_x and USS4_WPM_x, 338, 339 Time--of--Day (TOD) clock, 78 USS Protocol Library, controlling MicroMaster drives, Time--stamp, history log, 48 331 Timed interrupt queue, 157 USS4_DRV_CTRL instruction, 335 Timed interrupt routine, example, 159 USS4_INIT instruction, 334 Timed interrupts, time interval registers (SMB34, USS4_RPM_x instruction, 338, 339 SMB35), 471 USS4_WPM_x instruction, 338, 339 Timer instructions IEC V off--delay timer (TOF), 201 V memory, 27 on--delay timer (TON), 201 assigning addresses, 62 pulse timer (TP), 201 copying to permanent memory, 40 interrupts, 157 saving to EEPROM, 39 SIMATIC off--delay timer (TOF), 196 Variable memory area (V), 27 on--delay timer (TON), 196 Variables retentive on--delay timer (TONR), 196 Timer memory area (T), 28 monitoring, 63 Timer resolution, 197, 198 monitoring with status chart, 247 TOD clock, 78 PID loop, 150 Token rotation time, 233 symbolic addressing, 62 comparing, 235 514

Index Viewing, errors, 60 Wizards AS--i, 448 W Ethernet, 444 Instruction, HSC, 119 Watchdog reset instruction, 167 Instruction, NETR, NETW, 81 example, 168 Internet, 447 Modem Expansion, 230, 314 Wiring, 20, 21 PID, 145 Wiring diagrams Position Control, 267 TD 200, 5 analog expansion modules, 402 CPU inputs and outputs, 390 Word access, 26 CPU modules, 390–392 Word consistency, PROFIBUS, 428 discrete expansion modules, 397–399 Work zone location, EM 253 Position Module, 306 EM 253 Position Module, 441–442 515

S7-200 Programmable Controller System Manual 516

To SIEMENS ENERGY & AUTOMATION INC ATTN: TECHNICAL COMMUNICATIONS ONE INTERNET PLAZA PO BOX 4991 JOHNSON CITY TN USA 37602--4991 From _______________________________ Name: _______________________________ Job Title: _______________________________ Company Name: _______________________________ _______________________________ Street: _______________________________ City and State: _______________________________ Country: Telephone: Please check any industry that applies to you: ❒ Automotive ❒ Pharmaceutical ❒ Chemical ❒ Plastic ❒ Electrical Machinery ❒ Pulp and Paper ❒ Food ❒ Textiles ❒ Instrument and Control ❒ Transportation ❒ Non-electrical Machinery ❒ Other ___________________________ ❒ Petrochemical ✄ S7-200 Programmable Controller System Manual

Remarks Form Your comments and recommendations will help us to improve the quality and usefulness of our publications. Please take the first available opportunity to fill out this questionnaire and return it to Siemens. Please give each of the following questions your own personal mark within a range from 1 (very good) to 5 (very poor). 1. Do the contents meet your requirements? 2. Is the information you need easy to find? 3. Is the text easy to understand? 4. Does the level of technical detail meet your requirements? 5. Please rate the quality of the graphics and tables. Additional comments: ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ ________________________________________ S7-200 Programmable Controller System Manual

S7-200 Memory Ranges and Features Description CPU 221 CPU 222 CPU 224 CPU 224XP CPU 226 User program size 4096 bytes 4096 bytes 8192 bytes 12288 bytes 16384 bytes with run mode edit 4096 bytes 4096 bytes 12288 bytes 16384 bytes 24576 bytes without run mode edit 8192 bytes 10240 bytes 10240 bytes I0.0 to I15.7 I0.0 to I15.7 I0.0 to I15.7 User data size 2048 bytes 2048 bytes Q0.0 to Q15.7 Q0.0 to Q15.7 Q0.0 to Q15.7 AIW0 to AIW62 AIW0 to AIW62 AIW0 to AIW62 Process-image input register I0.0 to I15.7 I0.0 to I15.7 AQW0 to AQW62 AQW0 to AQW62 AQW0 to AQW62 VB0 to VB8191 VB0 to VB10239 VB0 to VB10239 Process-image output register Q0.0 to Q15.7 Q0.0 to Q15.7 LB0 to LB63 LB0 to LB63 LB0 to LB63 M0.0 to M31.7 M0.0 to M31.7 M0.0 to M31.7 Analog inputs (read only) AIW0 to AIW30 AIW0 to AIW30 SM0.0 to SM549.7 SM0.0 to SM549.7 SM0.0 to SM549.7 SM0.0 to SM29.7 SM0.0 to SM29.7 SM0.0 to SM29.7 Analog outputs (write only) AQW0 to AQW30 AQW0 to AQW30 256 (T0 to T255) 256 (T0 to T255) 256 (T0 to T255) T0, T64 T0, T64 T0, T64 Variable memory (V) VB0 to VB2047 VB0 to VB2047 T1 to T4, and T1 to T4, and T1 to T4, and T65 to T68 T65 to T68 T65 to T68 Local memory (L)1 LB0 to LB63 LB0 to LB63 T5 to T31, and T5 to T31, and T5 to T31, and T69 to T95 T69 to T95 T69 to T95 Bit memory (M) M0.0 to M31.7 M0.0 to M31.7 T32, T96 T32, T96 T32, T96 T33 to T36, and T33 to T36, and T33 to T36, and Special Memory (SM) SM0.0 to SM179.7 SM0.0 to SM299.7 T97 to T100 T97 to T100 T97 to T100 Read only SM0.0 to SM29.7 SM0.0 to SM29.7 T37 to T63, and T37 to T63, and T37 to T63, and T101 to T255 T101 to T255 T101 to T255 Timers 1 ms 256 (T0 to T255) 256 (T0 to T255) C0 to C255 C0 to C255 C0 to C255 Retentive on-delay 10 ms T0, T64 T0, T64 HC0 to HC5 HC0 to HC5 HC0 to HC5 T1 to T4, and T1 to T4, and S0.0 to S31.7 S0.0 to S31.7 S0.0 to S31.7 On/Off delay 100 ms T65 to T68 T65 to T68 AC0 to AC3 AC0 to AC3 AC0 to AC3 T5 to T31, and T5 to T31, and 0 to 255 0 to 255 0 to 255 1 ms T69 to T95 T69 to T95 0 to 63 0 to 63 0 to 127 10 ms T32, T96 T32, T96 0 to 127 0 to 127 0 to 127 T33 to T36, and T33 to T36, and 256 256 256 100 ms T97 to T100 T97 to T100 0 to 7 0 to 7 0 to 7 T37 to T63, and T37 to T63, and Port 0 Port 0, Port 1 Port 0, Port 1 T101 to T255 T101 to T255 Counters C0 to C255 C0 to C255 High-speed counters HC0 to HC5 HC0 to HC5 Sequential control relays (S) S0.0 to S31.7 S0.0 to S31.7 Accumulator registers AC0 to AC3 AC0 to AC3 Jumps/Labels 0 to 255 0 to 255 Call/Subroutine 0 to 63 0 to 63 Interrupt routines 0 to 127 0 to 127 Positive/negative transitions 256 256 PID loops 0 to 7 0 to 7 Ports Port 0 Port 0 1 LB60 to LB63 are reserved by STEP 7--Micro/WIN, version 3.0 or later.

STL Page STL Page STL Page STL Page STL Page = 73 AW > = 96 IBCD 99 MOVB 164 RLW 179 +D 140 AW <> 96 INCB 144 MOVD 164 ROUND 99 --D 140 BCDI 99 INCD 144 MOVR 164 RRB 179 *D 140 BIR 165 INCW 144 MOVW 164 RRD 179 /D 140 BITIM 196 INVB 161 MUL 142 RRW 179 +I 140 BIW 165 INVD 161 NEXT 169 RTA 103 --I 140 BMB 166 INVW 161 NETR 81 RTS 107 =I 73 BMD 166 ITA 103 NETW 81 S 73 *I 140 BMW 166 ITB 99 NOT 70 SCAT 184 /I 140 BTI 99 ITD 99 O 70 SCPY 184 +R 140 CALL 204 ITS 107 OB = 96 SCRE 172 --R 140 CEVNT 153 JMP 171 OB > = 96 SCRT 172 *R 140 CFND 187 LBL 171 OB > 96 SEG 99 /R 140 CITIM 196 LD 70 OB < 96 SFND 187 A 70 COS 143 LDB <= 96 OB < = 96 SHRB 181 AB < = 96 CRET 204 LDB = 96 OB <> 96 SI 73 AB = 96 CRETI 153 LDB >= 96 OD < 96 SIN 143 AB > 96 CSCRE 172 LDB > 96 OD < = 96 SLB 179 AB< 96 CTD 113 LDB < 96 OD = 96 SLD 179 AB > = 96 CTU 113 LDB <> 96 OD > 96 SLEN 184 AB <> 96 CTUD 113 LDD >= 96 OD > = 96 SLW 179 AD < 96 DECB 144 LDD < 96 OD <> 96 SPA 95 AD < = 96 DECD 144 LDD <= 96 OI 70 SQRT 143 AD = 96 DECO 112 LDD = 96 OLD 75 SRB 179 AD > 96 DECW 144 LDD > 96 ON 70 SRD 179 AD > = 96 DISI 153 LDD <> 96 ONI 70 SRW 179 AD <> 96 DIV 142 LDI 70 OR= 96 SSCPY 186 AENO 75 DLED 178 LDN 70 OR < 96 STD 110 AI 70 DTA 103 LDNI 70 OR<= 96 STI 110 ALD 75 DTCH 153 LDR= 96 OR > 96 STOP 167 AN 70 DTI 99 LDR < 96 OR >= 96 STR 110 ANDB 162 DTR 99 LDR<= 96 OR <> 96 SWAP 183 ANDD 162 DTS 107 LDR > 96 ORB 162 TAN 143 ANDW 162 ED 70 LDR>= 96 ORD 162 TODR 78 ANI 70 ENCO 112 LDR <> 96 ORW 162 TODRX 78 AR= 96 END 167 LDS 75 OS= 98 TODW 78 AR < 96 ENI 153 LDS= 98 OS<> 98 TODWX 78 AR<= 96 EU 70 LDS<> 98 OW < 96 TOF 196 AR > 96 EXP 143 LDW <= 96 OW < = 96 TON 196 AR>= 96 FIFO 190 LDW < 96 OW = 96 TONR 196 AR <> 96 FILL 192 LDW = 96 OW > 96 TRUNC 99 AS= 98 FND < 193 LDW > 96 OW > = 96 WDR 167 AS<> 98 FND <> 193 LDW >= 96 OW <> 96 XMT 86 ATCH 153 FND = 193 LDW <> 96 PID 145 XORB 162 ATH 103 FND > 193 LIFO 190 PLS 133 XORD 162 ATT 189 FOR 169 LN 143 R 73 XORW 162 AW < 96 GPA 95 LPP 75 RCV 86 AW < = 96 HDEF 118 LPS 75 RI 73 AW= 96 HSC 118 LRD 75 RLB 179 AW > 96 HTA 103 LSCR 172 RLD 179


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook