SIMATIC S5 S5-115U Programmable Controller CPU 941/942/943/944 Reference Guide Order No. 6ES5 997-7LA21 1 Index Page Explanations of the Operations List Explanations of the Operands Basic Operations Boolean Logic Operations Set/Reset Operations Load Operations Transfer Operations Timer Operations Counter Operations Arithmetic Operations Comparison Operations Block Call Operations Return Operations "No" Operations Stop Operations Display Generation Operations 1 2 6 6 8 12 14 16 16 16 18 20 22 22 22 Supplementary Operations Boolean Logic Operations Bit Operations Set/Reset Operations Timer and Counter Operations Load and Transfer Operations Conversion Operations Shift Operations Jump Operations Other Operations 24 24 26 28 30 32 32 32 34 System Operations Set Operations Load and Transfer Operations Jump Operations Arithmetic Operations Other Operations 38 38 40 40 40 Machine Code Listing Alphabetical Index of Operations 42 50 Integral Blocks Integral Organization Blocks Integral Function Blocks Integral Data Block 1 52 55 56 Evaluation of CC 1 and CC 0 60 Explanation of the Operations List Abbreviation Explanation ACCUM 1 Accumulator 1 (When accumulator 1 is loaded, any existing contents are shifted into accumulator 2.) ACCUM 2 Accumulator 2 CC0/CC1 Condition code 0/Condition code 1 CSF STEP 5 control system flowchart method of representation Formal operand Expression with a maximum of 4 characters. The first character must be a letter of the alphabet. LAD STEP 5 ladder diagram method of represent. OV Overflow. This condition code bit is set if, e.g., a numerical range is exceeded during arithmetic operations. PII Process image input PIQ Process image output RLO Result of logic operation RLO reloaded? Y N RLO Y dependent? Y / N The RLO does not change. The RLO cannot be combined any further. When the next binary operation takes place (but not assignment operation), the RLO is reloaded. Depending on whether the operation affects the RLO, the RLO is combined further or left unchanged according to the operation and the status of the bit that was scanned. The statement is executed only if the RLO is "1". The statement is executed only on positive/negative edge change of the RLO. The statement is always executed. RLO Y/N affected? The RLO is affected/not affected by the operation. STL STEP 5 statement list method of represent. Explanation of the Operands Abb. Explanation Permissible operand value range for CPU 941 942 943 BN Byte constant (fixed-point no.) - 128 to+127 C Counter - for the bit test and set operations (system operations) 0 to 127 0.0 to 127.15 D Data word (1 bit) - for load operations (supplementary operations) and transfer operations (system operations) - for bit test and set operations (system operations) 0.0 to 255.15 DB Data block 2 to 255 DL Data word (left byte) 0 to 255 DR Data word (right byte) 0 to 255 DW Data word 0 to 255 F Flag FB Function block 0 to 255 FW Flag word 0 to 254 FY Flag byte 0 to 255 I Input 0.0 to 255.7 0.0 to 63.7 0.0 to 127.7 944 Abb. Explanation Permissible operand value range for CPU 941 942 943 IB Input byte 0 to 63 0 to 127 IW Input word 0 to 62 0 to 126 KB Constant (1 byte) 0 to 255 KC Constant (count) 0 to 999 KF Constant (fixedpoint number) KH Constant (hexadecimal code) KM Constant (2-byte bit pattern) KS Constant (2 characters) KT Constant (time) KY Constant (2 bytes) 0 to 255 (per byte) OB 1 Organization block 0 to 255 PB Program block (with block call and return operations) 0 to 255 PB/ PY 2 Peripheral byte - Digital inputs - Analog inputs - Digital outputs - Analog outputs 1 2 944 - 32768 to +32767 0 to FFFF arbitrary bit pattern (16 bit) any two alphanumeric characters 0.0 to 999.3 0 to 63 128 to 255 0 to 63 128 to 255 0 to 127 128 to 255 0 to 127 128 to 255 See page 52 for an overview of the organization blocks and their function PY in the case of S5-DOS programmers Abb. Explanation Permissible operand value range for CPU 941 942 PW 943 944 Peripheral word - Digital inputs - Analog inputs - Digital outputs - Analog outputs 0 to 63 128 to 254 0 to 63 128 to 254 0 to 126 128 to 254 0 to 126 128 to 254 Q Output 0.0 to 63.7 0.0 to 127.7 QB Output byte 0 to 63 0 to 127 QW Output word 0 to 62 0 to 126 RS System data range - for load operations (supplementary operations) and transfer operations (system operations) - for bit test and set operations (system operations) 0 to 255 0.0 to 255.15 SB Sequence block 0 to 255 T Timer - for the bit test and set operations (system operations) 0 to 127 0.0 to 127.15 Note regarding execution times Please note that, on account of the processor architecture, the execution times quoted for the following list of operations should be treated as approximate values. Depending on the type of CPU installed, the operations are executed in the standard processor or in the STEP 5 coprocessor. In the case of a switch from direct execution in the coprocessor to execution in the standard processor, the pure processing time is incremented by the time required for switching. These switchover times are included in the specified execution times. Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 2 Function 3 CPU 941 CPU 942 CPU 943 CPU 944 Boolean Logic Operations A I, Q, F, T, C N Y N 1,6 1,6 0,8 0,8 Scan operand for "1" and combine with RLO through logic AND. AN I, Q, F, T, C N Y N 1,6 1,6 0,8 0,8 Scan operand for "0" and combine with RLO through logic AND. O I, Q, F, T, C N Y N 1,6 1,6 0,8 0,8 Scan operand for "1" and combine with RLO through logic OR. ON I, Q, F, T, C N Y N 1,6 1,6 0,8 0,8 Scan operand for "0" and combine with RLO through logic OR. O N Y Y 1,6 1,6 0,8 0,8 Combine AND operations through logic OR. A( N Y Y 1,6 1,6 0,8 0,8 Combine expressions enclosed in parentheses through logic AND (6 levels). O( N Y Y 1,6 1,6 0,8 0,8 Combine expressions enclosed in parentheses through logic OR (6 levels). ) N Y N 1,6 1,6 0,8 0,8 Close parenthesis (conclusion of a parenthetical expression). Set/Reset Operations S I, Q, F Y N Y 1,6 1,6 0,8 0,8 Set operand to "1". R I, Q, F Y N Y 1,6 1,6 0,8 0,8 Reset operand to "0". = I, Q, F Y N Y 1,6 1,6 0,8 0,8 Assign value of RLO to operand. Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. Function 1 2 3 CPU 941 CPU 942 CPU 943 CPU 944 Load Operations L IB N N N 1,6 1,6 0,8 0,8 Load an input byte from the PII into ACCUM 1. L QB N N N 1,6 1,6 0,8 0,8 Load an output byte from the PIQ into ACCUM 1. L IW N N N 1,6 1,6 0,8 0,8 Load input word from the PII into ACCUM 1: byte n ACCUM 1 (bits 8-15); byte n+1 ACCUM 1 (bits 0-7). L QW N N N 1,6 1,6 0,8 0,8 Load an output word from the PIQ into ACCUM 1: byte n ACCUM 1 (bits 8 - 15); byte n+1 ACCUM 1 (bits 0 - 7). L PB/PY1 N N N 93* 93* 93* 4* Load an input byte from the digital/analog input modules into ACCUM 1. L PW N N N 107* 107* 107* 4,8** L FY N N N 1,6 1,6 0,8 0,8 Load a flag byte into ACCUM 1. L FW N N N 1,6 1,6 0,8 0,8 Load a flag word into ACCUM 1: byte n ACCUM 1 (bits 8 - 15); byte n+1 ACCUM 1 (bits 0 - 7). L DL N N N 3,4 3,4 1,7 1,7 Load a data word (left-hand byte) of the current data block into ACCUM 1. 1 PY in the case of S5-DOS programmers * + ready delay time of the referenced I/O modules (digital I/O: 2 s/byte, analog I/O: 16 s/byte) Load a peripheral word from the digital/analog inputs into ACCUM 1: byte n ACCUM 1 (bits 8 - 15); byte n+1 ACCUM 1 (bits 0 - 7). ** + 2 x ready delay time of the referenced I/O modules Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 Function 2 3 CPU 941 CPU 942 CPU 943 CPU 944 Load Operations (cont.) Load a data word (right-hand byte) of the current data block into ACCUM 1. L DR N N N 3,4 3,4 1,7 1,7 L DW N N N 3,9 3,9 2 2 L KB N N N 2,8 2,8 1,4 1,4 Load a constant (1-byte number) into ACCUM 1. L KS N N N 1,6 1,6 0,8 0,8 Load a constant (2 characters in ASCII format) into ACCUM 1. L KF N N N 1,6 1,6 0,8 0,8 Load a constant (fixed-point number) into ACCUM 1. L KH N N N 1,6 1,6 0,8 0,8 Load a constant (hexadecimal code) into ACCUM 1. L KM N N N 1,6 1,6 0,8 0,8 Load a constant (bit pattern) into ACCUM 1. L KY N N N 1,6 1,6 0,8 0,8 Load a constant (bit pattern) into ACCUM 1. L KT N N N 1,6 1,6 0,8 0,8 Load a constant (count in BCD) into ACCUM 1. L KC N N N 1,6 1,6 0,8 0,8 Load a constant (count in BCD) into ACCUM 1. L T, C N N N 1,6 1,6 0,8 0,8 Load a time or count (in binary code) into ACCUM 1. Load a data word of the current data block into ACCUM 1: byte n ACCUM 1 (bits 8 - 15); byte n+1 ACCUM 1 (bits 0 - 7). Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. Function 2 3 CPU 941 CPU 942 CPU 943 CPU 944 N N N 3,5 3,5 1,8 1,8 Load times or counts (in BCD) into ACCUM 1. 1 Load Operations (cont.) LC T, C Transfer Operations T IB N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to an input byte (into the PII). T QB N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to an output byte (into the PIQ). T IW N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to an input word (into the PII): ACCUM 1 (bits 8 - 15) byte n; ACCUM 1 (bits 0 - 7) byte n+1. T QW N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to an output word (into the PIQ): ACCUM 1 (bits 8 - 15) byte n; ACCUM 1 (bits 0 - 7) byte n+1. T PB/PY1 N N N 67* 67* 67* 3,9* Transfer the contents of ACCUM 1 to an I/O byte of the digital output modules with updating of the PIQ or analog output modules. T PW N N N 85* 85* 85* 4,7** Transfer the contents of ACCUM 1 to an I/O byte of the digital output modules with updating of the PIQ or the analog output modules. 1 PY in the case of S5-DOS programmers * + ready delay time of the referenced I/O modules (digital I/O: 2 s/byte, analog I/O: 16 s/byte) ** + 2x ready delay time of the referenced I/O modules Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 2 Function 3 CPU 941 CPU 942 CPU 943 CPU 944 Transfer Operations (cont.) T FY N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to a flag byte. T FW N N N 1,6 1,6 0,8 0,8 Transfer the contents of ACCUM 1 to a flag word (into the PIQ): ACCUM 1 (bits 8 - 15) byte n; ACCUM 1 (bits 0 - 7) byte n+1. T DL N N N 2,2 2,2 1,1 1,1 Transfer the contents of ACCUM 1 to a data word (left-hand byte). T DR N N N 2,2 2,2 1,1 1,1 Transfer the contents of ACCUM 1 to a data word (right-hand byte). T DW N N N 2,7 2,7 1,4 1,4 Transfer the contents of ACCUM 1 to a data word. Timer Operations SP T Y N Y 3,7 3,7 1,9 1,9 Start a timer (stored in ACCUM 1) as signalcontracting pulse on the leading edge of the RLO. SE T Y N Y 3,7 3,7 1,9 1,9 Start a timer (stored in ACCUM 1) as extended pulse (signal contracting and stretching) on the leading edge of the RLO. SR T Y N Y 3,7 3,7 1,9 1,9 Start an on-delay timer (stored in ACCUM 1) on the leading edge of the RLO. SS T Y N Y 3,7 3,7 1,9 1,9 Start a stored on-delay timer (stored in ACCUM 1) on the leading edge of the RLO. Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 Function 2 3 CPU 941 CPU 942 CPU 943 CPU 944 N Y 3,7 3,7 1,9 1,9 Start an off-delay timer (stored in ACCUM 1) on the trailing edge of the RLO. N Y 3,7 3,7 1,9 1,9 Reset a timer if RLO="1". Timer Operations (cont.) SA T R T Y Y Counter Operations CU C Y N Y 3,7 3,7 1,9 1,9 Counter counts up 1 on the leading edge of the RLO. CD C Y N Y 3,7 3,7 1,9 1,9 Counter counts down 1 on leading edge of the RLO. S C Y N Y 3,7 3,7 1,9 1,9 Set counter if RLO="1". R C Y N Y 3,7 3,7 1,9 1,9 Reset counter if RLO="1". Arithmetic Operations +F N N N 1,6 1,6 0,8 0,8 Add two fixed-point numbers: ACCUM 1 + ACCUM 2. Result evaluation via CC 1/CC 0/OV -F N N N 1,6 1,6 0,8 0,8 Subtract two fixed-point numbers: ACCUM 1 ACCUM 2. Result evaluation via CC 1/CC 0/OV Y N 1,6 1,6 0,8 0,8 Compare two fixed-point numbers for "equal to". If ACCUM 2=ACCUM 1, the RLO is "1". CC 1/CC 0 are affected. Comparison Operations !=F N Basic Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 2 3 Function CPU 941 CPU 942 CPU 943 CPU 944 Comparison Operations (cont.) >F N Y N 1,6 1,6 0,8 0,8 Compare two fixed-point numbers for "greater than". If ACCUM 2>ACCUM 1, the RLO is "1". CC 1/CC 0 are affected. >=F N Y N 1,6 1,6 0,8 0,8 Compare two fixed-point numbers for "greater than or equal to". If ACCUM 2 ACCUM 1, the RLO is "1". CC 1/CC 0 are affected. 0. The jump is made only if CC 1=1 und CC 0=0. The RLO is not changed. JM= Symb. address max. 4 charact. N N N 1,6 1,6 0,8 0,8 Jump if the result <0. The jump is made only if CC 1=0 and CC 0=1. The RLO is not changed. JO= Symb. address max. 4 charact. N N N 1,6 1,6 0,8 0,8 Jump on overflow. The jump is made only if the OVERFLOW bit is set. The RLO is not changed. IA N N N 55 55 55 55 Disable interrupt. Input/output interrupt or timer OB processing is disabled. RA N N N 55 55 55 55 Enable interrupt. This operation cancels the effect of IA. D N N N 1,7 1,7 0,9 0,9 Decrement the low byte (bits 0 to 7) of ACCUM 1 by the value n (n=0 to 255). I N N N 1,7 1,7 0,9 0,9 Increment the low byte (bits 0 to 7) of ACCUM 1 by the value n (n=0 to 255). Other Operations Supplementary Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 Function 2 3 CPU 941 CPU 942 CPU 943 CPU 944 Other Operations (cont.) DO= Formal oper. I, Q, F, T, C N N N 170* 170* 170* 3,6* Process a block. (Only C DB, JU PB, JU FB, JU SB and JU OB can be substituted). DO DW** N N N 162* 162* 162* 3,6* Process data word. The next operation is combined through logic OR with the parameter specified in the data word and executed **. DO FW** N N N 134* 134* 134* 2,6* Process flag word. The next operation is combined through logic OR with the parameter specified in the flag word and executed **. * plus execution time of the substituted operation ** Permissible operations: A, AN, O, ON; S, R, =; FR T, R T, SF T,SR T, SP T, SS T, SE T; FR C, R C, S C, CR C, CU C; L, LC, T; JU, JC, JZ, JN, JP, JM, JO, SLW, SRW; D, I; C DB; T RS, TNB System Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. Function 1 2 3 CPU 941 CPU 942 CPU 943 CPU 944 Set Operations SU RS N N Y 142 142 142 142 Set bit in system data range unconditionally. RU RS N N Y 142 142 142 142 Reset bit in system data range unconditionally. Load and Transfer Oprations LIR 0 ( ACCUM 1) 2 ( ACCUM 2) N N N 126* 126* 126* 4,5** Load the contents of a memory word (addressed by ACCUM 1) indirectly into the register (0: ACCUM 1; 2: ACCUM 2) 1 TIR 0 ( ACCUM 1) 2 ( ACCUM 2) N N N 105* 105* 105* 4,5** Transfer the contents of the accumulator indirectly to the memory word (addressed by ACCUM 1) (0: ACCUM 1; 2: ACCUM 2) 1 LDI A1 ( ACCUM 1) A2 ( ACCUM 2) N N N - - - 126 Load the contents of a memory word (addressed by ACCUM 1) indirectly into ACCUM 1 or ACCUM 2 (A1=ACCUM 1, A2=ACCUM 2) 2 TDI A1 ( ACCUM 1) A2 ( ACCUM 2) N N N - - - 105 Transfer the register contents indirectly into the memory word (addressed by ACCUM 1) (A1=ACCUMW1, A2=ACCUM 2) 2 TNB Parameter n=0 ... 255 N N N * * * 68 + 68 + 68 + 34 * n 34 * n 34 * n 1 In the case of CPU 944 access to memory bank 1 2 In the case of CPU 944 access to memory bank 2 * Transfer a block byte by byte (number of bytes 2,9+ 0 to 255). End address source: ACCUM 2 n(1,7 End address target: ACCUM 2 +*) * When accessing the I/O area, the relevant timeouts for each byte access must be added. ** +2x ready delay time of the referenced I/O modules System Operations for organization blocks (OB) for function blocks (FB) for program blocks (PB) for sequence blocks (SB) Operation Permissible Operands (STL) 1 RLO depend. Typical 2 RLO affected Execution Time 3 RLO reloaded in sec. 1 2 3 CPU 941 Function CPU 942 CPU 943 CPU 944 Load and Transfer Oprations (cont.) T RS N N N 75 75 75 75 Transfer a word to the system data range. N N N 105 105 105 105 Jump randomly within a function block (jump displacement: - 32768 to+32767). Jump Operation JUR Arithmetic Operations ADD BF N N N 57 57 57 57 Add byte constant (fixed point) to ACCUM 1. ADD KF N N N 90 90 90 90 Add fixed-point constant (word) to ACCUM 1. N N N 174* 174* 174* 174* Process via a formal operand (indirectly). The number of the formal operand is in ACCUM 1. STS N N N 50 50 50 50 Stop operation. Program processing is interrupted immediately after this operation. TAK N N N 80 80 80 80 Swap the contents of ACCUM 1 and ACCUM 2. Other Operations DI Formal oper. I, Q, F, T, C * plus execution time of the substituted operation Machine Code Listing Explanation of the Indices a + byte address b + bit address c + parameter address d + timer number e + constant f + block number g + word address h + number of shifts i + relative jump address k + register address l + block length in bytes m + jump displacement (16 bits) n + value o + counter number Machine Code B0 B1 B2 L Operation B3 R L Operand L R L R R 0 0 0 0 NOP 0 0 1 0 0 CFW 0 2 0d 0d L 0 3 0l 0l TNB 0 4 0d 0d FR 0 5 0 0 BEC 0 6 0c 0c FR= 0 7 0c 0c A= 0 8 0 0 IA 0 8 8 0 RA 0 9 0 0 CSW 0 A 0a 0a L FY 0 B 0a 0a T FY 0 C 0d 0d LC T 0 D 0i 0i JO= T T Machine Code B0 B1 B2 L Operation B3 R L Operand L R L R R 0 E 0c 0c LC= 0 F 0c 0c O= 1 0 8 2 BLD 130 1 0 8 3 BLD 131 1 0 8 4 BLD 132 1 0 8 5 BLD 133 1 0 F F BLD 255 1 1 0n 0n I 1 2 0a 0a L FW 1 3 0a 0a T FW 1 4 0d 0d SF T 1 5 0i 0i JP= 1 6 0c 0c SFD= 1 7 0c 0c S= 1 9 0n 0n D 1 C 0d 0d SE T 1 D 0f 0f JC FB 1 E 0c 0c SEC= 1 F 0c 0c == 2 0 0f 0f C 2 1 2 0 >F 2 1 4 0 =F DB Machine Code B0 B1 L B2 R L Operation B3 R L Operand L R R 2 1 C 0 <=F 2 2 0g 0g L DL 2 3 0g 0g T DL 2 4 0d 0d SR T 2 5 0i 0i JM= 2 6 0c 0c SR= 2 7 0c 0c AN= 2 8 0e 0e L KB 2 A 0g 0g L DR 2 B 0g 0g T DR 2 C 0g 0d SS T 2 D 0i 0i JU= 2 E 0c 0c SSU= 2 F 0c 0c ON= 3 0 0 1 0e 0e 0e 0e L KC 3 0 0 2 0e 0e 0e 0e L KT 3 0 0 4 0e 0e 0e 0e L KF 3 0 1 0 0e 0e 0e 0e L KS 3 0 2 0 0e 0e 0e 0e L KY 3 0 4 0 0e 0e 0e 0e L KH 3 0 8 0 0e 0e 0e 0e L KM 3 2 0g 0g L DW 3 3 0g 0g T DW 3 4 0d 0d SP T 3 5 0i 0i JN= 3 6 0c 0c SP= Machine Code B0 L B1 R L B2 R L Operation B3 R L Operand R 3 7 0c 0c RB= 3 C 0d 0d R T 3 D 0f 0f JU FB 3 E 0c 0c RD= 3 F 0c 0c LW= 4 0 0 0k LIR 4 1 0 0 AW 4 2 0o 0o L C 4 4 0o 0o FR C 4 5 0i 0i JZ= 4 6 0c 0c L= 4 8 0 0k TIR 4 9 0 0 OW 4 A 0a 0a L IB 4 A 8a 0a L QB 4 B 0a 0a T IB 4 B 8a 0a T QB 4 C 0o 0o LC C 4 D 0f 0f JC OB 4 E 0g 0g DO FW 5 0 0e 0e ADD BF 5 1 0 0 XOW 5 2 0a 0a L IW 5 2 8a 0a L QW 5 3 0a 0a T IW 5 3 8a 0a T QW Maschinen-Code B0 B1 B2 L Operation B3 L R L R 5 4 0o 0o CD C 5 5 0f 0f JC PB 5 8 0 0 ADD KF 5 9 0 0 -F 5 C 0o 0o S C 5 D 0f 0f JC SB 6 1 0h 0h SLW 6 2 0g 0g L RS 6 3 0g 0g T RS 6 5 0 0 BE 6 5 0 1 BEU 6 6 0c 0c T= 6 8 0 B LDI A1 6 8 0 F TDI A1 6 8 2 B LDI A2 6 8 2 F TDI A2 6 9 0h 0h SRW 6 C 0o 0o CU C 6 D 0f 0f JU OB 6 E 0g 0g DO DW 7 0 0 0 STS 7 0 0 2 TAK 7 0 0 3 STP 7 0 0 B 0m 0m 0m 0m JRA 7 0 1 5 C 0 0o 0o TB C 7 0 1 5 8 0 0o 0o TBN C 0e R 0e L Operand 0e R 0e Machine Code B0 B1 B2 Operation B3 Operand L R L R L R L R 7 0 1 5 4 0 0o 0o SU C 7 0 1 5 0 0 0o 0o RU C 7 0 2 5 C 0 0d 0d TB T 7 0 2 5 8 0 0d 0d TBN T 7 0 2 5 4 0 0d 0d SU T 7 0 2 5 0 0 0d 0d RU T 7 0 4 6 C 0b 0g 0g TB D 7 0 4 6 8 0b 0g 0g TBN D 7 0 4 6 4 0b 0g 0g SU D 7 0 4 6 0 0b 0g 0g RU D 7 0 5 7 C 0b 0g 0g TB RS 7 0 5 7 8 0b 0g 0g TBN RS 7 0 5 7 4 0b 0g 0g SU RS 7 0 5 7 0 0b 0g 0g RU RS 7 2 0a 0a L PB/PY* 7 3 0a 0a T PB/PY* 7 5 0f 0f JU PB 7 6 0c 0c DO= 7 8 0 5 7 9 0 0 +F 7 A 0a 0a L PW 7 B 0a 0a T PW 7 C 0o 0o R C 7 D 0f 0f JU SB 7 E 0 0 DI 0 0 0f 0f * PY in the case of S5-DOS programmers G DB Machine Code B0 B1 B2 L Operation B3 R L Operand L R L R R 8 0b 0a 0a A F 8 8b 0a 0a O F 9 0b 0a 0a S F 9 8b 0a 0a = F A 0b 0a 0a AN F A 8b 0a 0a ON F B 0b 0a 0a R F B 8 0o 0o A C B 9 0o 0o O C B A 0 0 A( B B 0 0 O( B C 0o 0o AN C B D 0o 0o ON C B F 0 0 ) C 0b 0a 0a A I C 0b 8a 0a A Q C 8b 0a 0a O I C 8b 8a 0a O Q D 0b 0a 0a S I D 0b 8a 0a S Q D 8b 0a 0a = I D 8b 8a 0a = Q E 0b 0a 0a AN I E 0b 8a 0a AN Q E 8b 0a 0a ON I Machine Code B0 B1 B2 L Operation B3 R L Operand L R L R R E 8b 8a 0a ON Q F 0b 0a 0a R I F 0b 8a 0a R Q F 8 0d 0d A T F 9 0d 0d O T F A 0i 0i JC= F B 0 0 O F C 0d 0d AN T F D 0d 0d ON T F F F F NOP 1 Alphabetical Index of Operations Operation Page Operation Page A 6, 48, 49 FR 28, 42, 45 A( 6, 48 FR= 28, 42 A= 24, 42 G 20, 47 ADD 40, 45, 46 I 34, 43 AN 6, 48, 49 IA 34, 42 AN= 24, 44 IRA 40, 46 AW 24, 45 JC 20, 43, 45, 46 BE 20, 46 JC= 32, 49 BEC 20, 42 JM= 34, 44 BEU 20, 46 JN= 34, 44 BLD 130 22, 43 JO= 34, 42 BLD 131 22, 43 JP= 34, 43 BLD 132 22, 43 JU 18, 20, 45-47 BLD 133 22, 43 JU= 32, 44, 47 BLD 255 22, 43 JZ= 32, 45 C 20, 43 L 8, 10, 30, 42-47 CD 16, 46 L= 30, 45 CFW 32, 42 LC 12, 42, 45 CSW 32, 42 LC= 30, 43 CU 16, 46 LDI 38, 46 D 34, 43 LIR 38, 45 DI 40, 47 LW= 30, 45 DO 36, 45, 46 NOP 0 22, 42 DO= 36, 47 NOP 1 22, 49 Operation Page Operation Page O 6, 43, 48, 49 SSU= 30, 44 O( 6, 48 STP 22, 46 O= 24, 43 STS 40, 46 ON 6, 24, 48, 49 SU 26, 38, 47 ON= 6, 44 T 12, 14, 40, 42-47 OW 24, 45 T= 30, 46 R 6, 16, 45-49 TAK 40, 46 RA 34, 42 TB 24, 26, 46, 47 RB= 26, 45 TBN 26, 46, 47 RD= 28, 45 TDI 38, 46 RU 26, 38, 47 TIR 38, 45 S 6, 16, 26, 46, 48 TNB 38, 42 S= 26, 43 XOW 24, 45 SE 14, 43 ) 6,48 SEC= 28, 43 = 6,48 SF 16, 43 == 28, 43 SFD= 30, 43 +F 16, 47 SLW 32, 46 -F 16, 46 SP 14, 44 !=F 16, 43 SP= 28, 44 >F 18, 43 SR 14, 44 >=F 18, 43 SR= 28, 44 >0 Result 0 0 Comparison Operations Shift Operations Conversion Operations ACCUM 2 shifted = ACCUM 1 Bit =0 ACCUM 2 < - ACCUM 1 ACCUM 2 shifted Bit > ACCUM 1 =0 - Result <0 Result >0 Siemens AG AUT E1114B Postfach 1963 Werner-von-SiemensStr. 50 D-92209 Amberg Fed. Rep. of Germany Should you come across any printing errors when reading this publication, we would ask you to inform us using this form. We would also welcome any suggestions you may have for improvement. From: Name Company/Department Address Telephone Publication: Programmable Controller SIMATIC S5-115U (CPU 941/942/943/944) Reference Guide Order No.: 6ES5 997-7LA21 Suggestions/Corrections: Siemens AG Automation Group Industrial Automation Systems Postfach 4848, 8500 Nurnberg 1 (c) Siemens AG 1992 Subject to change without prior notice Siemens Aktiengesellschaft Order No. 6ES5 997-7LA21 Printed in the Fed. Rep. of Germany