Professional Documents
Culture Documents
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 SM0.0 SM0.1 SM0.2 SM0.3 SM0.4 SM0.5 SM0.6 SM0.7 Always On First Scan Retentive data lost Power up 30 s off / 30 s on 0.5 s off / 0.5 s on Off 1 scan / on 1 scan Switch in RUN position SM1.0 SM1.1 SM1.2 SM1.3 SM1.4 SM1.5 SM1.6 SM1.7 Result of operation = 0 Overflow or illegal value Negative result Division by 0 Table full Table empty BCD to binary conversion error ASCII to hex conversion error
489
Table G-2 8 9 23 24 25 26 19 20 0 2 4 6 1 3 5 7 12 27 28 13 14 15 16 17 18 32 29 30 31 33 10 11 21 22
Interrupt Events in Priority Order Interrupt Description Port 0: Receive character Port 0: Transmit complete Port 0: Receive message complete Port 1: Receive message complete Port 1: Receive character Port 1: Transmit complete PTO 0 complete interrupt PTO 1 complete interrupt I0.0, Rising edge I0.1, Rising edge I0.2, Rising edge I0.3, Rising edge I0.0, Falling edge I0.1, Falling edge I0.2, Falling edge I0.3, Falling edge HSC0 CV=PV (current value = preset value) HSC0 direction changed HSC0 external reset HSC1 CV=PV (current value = preset value) HSC1 direction input changed HSC1 external reset HSC2 CV=PV HSC2 direction changed HSC2 external reset HSC3 CV=PV (current value = preset value) HSC4 CV=PV (current value = preset value) HSC4 direction changed HSC4 external reset HSC5 CV=PV (current value = preset value) Timed interrupt 0 Timed interrupt 1 Timer T32 CT=PT interrupt Timer T96 CT=PT interrupt Timed (lowest) Discrete (middle) Communications (highest) Priority Group Priority in Group 0 0 0 1 1 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3
Event Number
490
Appendix G
Memory Ranges and Features for the S7-200 CPUs CPU 221
4096 bytes 4096 bytes 2048 bytes I0.0 to I15.7 Q0.0 to Q15.7 AIW0 to AIW30 AQW0 to AQW30 VB0 to VB2047 LB0 to LB63 M0.0 to M31.7 SM0.0 to SM179.7 SM0.0 to SM29.7 256 (T0 to T255) 1 ms 10 ms 100 ms T0, T64 T1 to T4, and T65 to T68 T5 to T31, and T69 to T95 T32, T96 T33 to T36, and T97 to T100 T37 to T63, and T101 to T255 C0 to C255 HC0 to HC5 S0.0 to S31.7 AC0 to AC3 0 to 255 0 to 63 0 to 127 256 0 to 7 Port 0
CPU 222
4096 bytes 4096 bytes 2048 bytes I0.0 to I15.7 Q0.0 to Q15.7 AIW0 to AIW30 AQW0 to AQW30 VB0 to VB2047 LB0 to LB63 M0.0 to M31.7 SM0.0 to SM299.7 SM0.0 to SM29.7 256 (T0 to T255) T0, T64 T1 to T4, and T65 to T68 T5 to T31, and T69 to T95 T32, T96 T33 to T36, and T97 to T100 T37 to T63, and T101 to T255 C0 to C255 HC0 to HC5 S0.0 to S31.7 AC0 to AC3 0 to 255 0 to 63 0 to 127 256 0 to 7 Port 0
CPU 224
8192 bytes 12288 bytes 8192 bytes I0.0 to I15.7 Q0.0 to Q15.7 AIW0 to AIW62 AQW0 to AQW62 VB0 to VB8191 LB0 to LB63 M0.0 to M31.7 SM0.0 to SM549.7 SM0.0 to SM29.7 256 (T0 to T255) T0, T64 T1 to T4, and T65 to T68 T5 to T31, and T69 to T95 T32, T96 T33 to T36, and T97 to T100 T37 to T63, and T101 to T255 C0 to C255 HC0 to HC5 S0.0 to S31.7 AC0 to AC3 0 to 255 0 to 63 0 to 127 256 0 to 7 Port 0
CPU 224XP
12288 bytes 16384 bytes 10240 bytes I0.0 to I15.7 Q0.0 to Q15.7 AIW0 to AIW62 AQW0 to AQW62 VB0 to VB10239 LB0 to LB63 M0.0 to M31.7 SM0.0 to SM549.7 SM0.0 to SM29.7 256 (T0 to T255) T0, T64 T1 to T4, and T65 to T68 T5 to T31, and T69 to T95 T32, T96 T33 to T36, and T97 to T100 T37 to T63, and T101 to T255 C0 to C255 HC0 to HC5 S0.0 to S31.7 AC0 to AC3 0 to 255 0 to 63 0 to 127 256 0 to 7 Port 0, Port 1
CPU 226
16384 bytes 24576 bytes 10240 bytes I0.0 to I15.7 Q0.0 to Q15.7 AIW0 to AIW62 AQW0 to AQW62 VB0 to VB10239 LB0 to LB63 M0.0 to M31.7 SM0.0 to SM549.7 SM0.0 to SM29.7 256 (T0 to T255) T0, T64 T1 to T4, and T65 to T68 T5 to T31, and T69 to T95 T32, T96 T33 to T36, and T97 to T100 T37 to T63, and T101 to T255 C0 to C255 HC0 to HC5 S0.0 to S31.7 AC0 to AC3 0 to 255 0 to 127 0 to 127 256 0 to 7 Port 0, Port 1
User program size with run mode edit without run mode edit User data size Process-image input register Process-image output register Analog inputs (read only) Analog outputs (write only) Variable memory (V) Local memory (L)1 Bit memory (M) Special Memory (SM) Read only Timers Retentive on-delay
On/Off delay
1 ms 10 ms 100 ms
Counters High-speed counters Sequential control relays (S) Accumulator registers Jumps/Labels Call/Subroutine Interrupt routines Positive/negative transitions PID loops Ports
1
491
High-Speed Counters HSC0, HSC3, HSC4, and HSC5 HSC0 Clk I0.0 I0.0 I0.0 I0.0 HSC0 Clk Up I0.0 I0.0 HSC0 Phase A I0.0 I0.0 HSC0 Clk Q0.0 Phase B I0.1 I0.1 Reset I0.2 HSC3 Clk Q0.1 Clk Down I0.1 I0.1 Reset I0.2 I0.1 I0.1 I0.2 I0.2 Direction Reset HSC3 Clk I0.1 HSC4 Clk I0.3 I0.3 I0.3 I0.3 HSC4 Clk Up I0.3 I0.3 HSC4 Phase A I0.3 I0.3 Phase B I0.4 I0.4 Reset I0.5 Clk Down I0.4 I0.4 Reset I0.5 I0.4 I0.4 I0.5 I0.5 Direction Reset HSC5 Clk I0.4
High-Speed Counters HSC1 and HSC2 HSC1 Clk I0.6 I0.6 I0.6 I0.6 I0.6 I0.6 HSC1 Clk Up I0.6 I0.6 I0.6 Phase A I0.6 I0.6 I0.6 Clk Down I0.7 I0.7 I0.7 Phase B I0.7 I0.7 I0.7 I1.0 I1.0 I1.1 Reset I1.0 I1.0 I1.0 Reset I1.1 Start Start I0.7 I0.7 I0.7 I1.0 I1.0 I1.1 I1.0 I1.0 I1.1 Clk Down Reset Start HSC2 Clk I1.2 I1.2 I1.2 I1.2 I1.2 I1.2 HSC2 Clk Up I1.2 I1.2 I1.2 Phase A I1.2 I1.2 I1.2 Clk Down I1.3 I1.3 I1.3 Phase B I1.3 I1.3 I1.3 I1.4 I1.4 I1.5 I1.4 I1.4 Reset I1.5 Start Reset Start I1.3 I1.3 I1.3 I1.4 I1.4 I1.5 I1.4 I1.4 I1.5 Direction Reset Start
492
Appendix G
Boolean Instructions
LD LDI LDN LDNI A AI AN ANI O OI ON ONI LDBx ABx OBx LDWx AWx OWx LDDx ADx ODx LDRx ARx ORx NOT EU ED = =I S R SI RI LDSx ASx OSx ALD OLD LPS LRD LPP LDS AENO Bit Bit Bit, Bit, Bit, Bit, N N N N Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 IN1, IN2 Load Load Immediate Load Not Load Not Immediate AND AND Immediate AND Not AND Not Immediate OR OR Immediate OR Not OR Not Immediate Load result of Byte Compare IN1 (x:<, <=,=, >=, >, <>I) IN2 AND result of Byte Compare IN1 (x:<, <=,=, >=, >, <>) IN2 OR result of Byte Compare IN1 (x:<, <=,=, >=, >, <>) IN2 Load result of Word Compare IN1 (x:<, <=,=, >=, >, <>) IN2 AND result of Word Compare IN1 (x:<, <=,=, >=, >, <>)I N2 OR result of Word Compare IN1 (x:<, <=,=, >=, >, <>) IN2 Load result of DWord Compare IN1 (x:<, <=,=, >=, >, <>) IN2 AND result of DWord Compare IN1 (x:<, <=,=, >=, >, <>)IN2 OR result of DWord Compare IN1 (x:<, <=,=, >=, >, <>) IN2 Load result of Real Compare IN1 (x:<, <=,=, >=, >, <>) IN2 AND result of Real Compare IN1 (x:<, <=,=, >=, >, <>) IN2 OR result of Real Compare IN1 (x:<, <=,=, >=, >, <>) IN2 Stack Negation Detection of Rising Edge Detection of Falling Edge Assign Value Assign Value Immediate Set bit Range Reset bit Range Set bit Range Immediate Reset bit Range Immediate Load result of String Compare IN1 (x: =, <>) IN2 AND result of String Compare IN1 (x: =, <>) IN2 OR result of String Compare IN1 (x: =, <>) IN2 And Load Or Load Logic Push (stack control) Logic Read (stack control) Logic Pop (stack control) Load Stack (stack control) And ENO
Load, Transition, Conditional End, and End Sequence Control Relay Diagnostic LED
493
IN, OUT IN, OUT IN, OUT, N IN, OUT, N IN, OUT, N IN DATA, S_BIT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N OUT, N
Move Byte Immediate Read Move Byte Immediate Write Block Move Byte, Word, DWord Swap Bytes Shift Register Bit Shift Right Byte, Word, DWord
Find data value in table that matches comparison Fill memory space with pattern Convert BCD to Integer Convert Integer to BCD Convert Convert Convert Convert Byte to Integer Integer to Byte Integer to Double Integer Double Integer to Integer
IN, OUT, N OUT OUT IN, IN, IN, IN, OUT OUT OUT OUT
DTR IN, OUT TRUNC IN, OUT ROUND IN, OUT ATH HTA ITA DTA RTA DECO ENCO SEG IN, IN, IN, IN, IN, OUT, OUT, OUT, OUT, OUT, LEN LEN FMT FM FM
Convert DWord to Real Convert Real to Double Integer Convert Real to Double Integer Convert Convert Convert Convert Convert Decode Encode Generate 7-segment pattern Convert Integer to String Convert Double Integer to String Convert Real to String Convert Substring to Integer Convert Substring to Double Integer Convert Substring to Real ASCII to Hex Hex to ASCII Integer to ASCII Double Integer to ASCII Real to ASCII
Logical Instructions
ANDB ANDW ANDD ORB ORW ORD XORB XORW XORD INVB INVW INVD IN1, OUT IN1, OUT IN1, OUT IN1, OUT IN1, OUT IN1, OUT IN1, OUT IN1, OUT IN1, OUT OUT OUT OUT Logical AND of Byte, Word, and DWord
IN, OUT IN, OUT IN, OUT IN, FMT, OUT IN, FMT, OUT IN, FMT, OUT STR, INDX, OUT STR, INDX, OUT STR, INDX, OUT
Logical XOR of Byte, Word, and DWord Invert Byte, Word and DWord (1s complement)
Interrupt Instructions
CRETI ENI DISI ATCH DTCH INT, EVNT EVNT Conditional Return from Interrupt Enable Interrupts Disable Interrupts Attach Interrupt routine to event Detach event
String Instructions
SLEN SCAT SCPY SSCPY CFND SFND IN, OUT IN, OUT IN, OUT IN, INDX, N, OUT IN1, IN2, OUT IN1, IN2, OUT String Length Concatenate String Copy String Copy Substring from String Find First Character within String Find String within String
Communications Instructions
XMT RCV NETR NETW GPA SPA TBL, PORT TBL, PORT TBL, PORT TBL, PORT ADDR, PORT ADDR, PORT Freeport transmission Freeport receive message Network Read Network Write Get Port Address Set Port Address
High-Speed Instructions
HDEF HSC PLS HSC, MODE N Q Define High-Speed Counter mode Activate High-Speed Counter Pulse Output
494