Siemens PLC Programming Instruction Set: Become an Expert!

1. Bit Logic Instructions

1.1 -||- Normally Open Contact (Address) 1.2 -|/|- Normally Closed Contact (Address) 1.3 XOR Bitwise XOR 1.4 -|NOT|- Signal Flow Inversion 1.5 -( ) Output Coil 1.6 -(#)- Intermediate Output 1.7 -(R) Coil Reset 1.8 -(S) Coil Set 1.9 RS Reset-Set Trigger 1.10 RS Set-Reset Trigger 1.11 -(N)- RLO Falling Edge Detection 1.12 -(P)- PLO Rising Edge Detection 1.13 -(SAVE) Save RLO to BR Memory 1.14 MEG Address Falling Edge Detection 1.15 POS Address Rising Edge Detection

2. Comparison Instructions 2.1 CMP?I Integer Comparison 2.2 CMP?D Double Integer Comparison 2.3 CMP?R Real Number Comparison

3. Conversion Instructions 3.1 BCD_IBCD Code Conversion to Integer 3.2 I_BCD Integer Conversion to BCD Code 3.3 I_DINT Integer Conversion to Double Integer 3.4 BCD_DIBCD Code Conversion to Double Integer 3.5 DI_BCD Double Integer Conversion to BCD Code 3.6 DI_REAL Double Integer Conversion to Floating Point Number 3.7 INV_I Integer’s Binary Complement 3.8 INV_DI Double Integer’s Binary Complement 3.9 NEG_I Integer’s Binary Two’s Complement 3.10 NEG_DI Double Integer’s Binary Two’s Complement 3.11 NEG_R Floating Point Number Negation 3.12 ROUND Round to Double Integer 3.13 TRUNC Truncate to Integer as Double Integer 3.14 CEIL Round Up 3.15 FLOOR Round Down

4. Counter Instructions 4.1 S_CUD Increment/Decrement Count 4.2 S_CU Increment Counter 4.3 S_CD Decrement Counter 4.4 -(SC) Set Initial Value of Counter 4.5 -(CU) Increment Counter Coil 4.6 -(CD) Decrement Counter Coil

5. Data Block Instructions 5.1 -(OPN) Open Data Block: DB or DI

6. Logic Control Instructions 6.1 -(JMP) Unconditional Jump 6.2 -(JMP) Conditional Jump 6.3 -(JMPN) Jump if Not 6.4 LABEL Label

7. Integer Arithmetic Operations Instructions 7.1 ADD_I Integer Addition 7.2 SUB_I Integer Subtraction 7.3 MUL_I Integer Multiplication 7.4 DIV_I Integer Division 7.5 ADD_DI Double Integer Addition 7.6 SUB_DI Double Integer Subtraction 7.7 MUL_DI Double Integer Multiplication 7.8 DIV_DI Double Integer Division 7.9 MOD_DI Return Remainder of Double Integer

8. Floating Point Arithmetic Operations Instructions

8.1 Basic Instructions 8.1.1 ADD_R Real Number Addition 8.1.2 SUB_R Real Number Subtraction 8.1.3 MUL_R Real Number Multiplication 8.1.4 DIV_R Real Number Division 8.1.5 ABS Floating Point Absolute Value Calculation

8.2 Extended Instructions 8.2.1 SQR Floating Point Square 8.2.2 SQRT Floating Point Square Root 8.2.3 EXP Floating Point Exponential Calculation 8.2.4 LN Floating Point Natural Logarithm Calculation 8.2.5 SIN Floating Point Sine Calculation 8.4.6 COS Floating Point Cosine Calculation 8.2.7 TAN Floating Point Tangent Calculation 8.2.8 ASIN Floating Point Inverse Sine Calculation 8.2.9 ACOS Floating Point Inverse Cosine Calculation 8.2.10ATAN Floating Point Inverse Tangent Calculation

9. Assignment Instructions 9.1 MOVE Assignment

10. Program Control Instructions 10.1 -(Call) Call FC/SFC from Coil (No Parameters) 10.2 CALL_FB Call FB from Block 10.3 CALL_FC Call FC from Block 10.4 CALL_SFB Call SFB from Block 10.5 CALL_SFC Call SFC from Block 10.6 -(MCR<) Main Control Relay On 10.7 -(MCR>) Main Control Relay Off 10.8 -(MCRA) Main Control Relay Start 10.9 -(MCRD) Main Control Relay Stop 10.10 -(RET) Return

11. Shift and Loop Instructions

11.1 Shift Instructions11.1.1 SHR_I Integer Right Shift11.1.2 SHR_DI Double Integer Right Shift11.1.3 SHL_W Word Left Shift11.1.4 SHR_W Word Right Shift11.1.5 SHL_DW Double Word Left Shift11.1.6 SHR_DW Double Word Right Shift

11.2 Loop Instructions11.2.1 ROL_DW Double Word Left Loop11.2.2 ROR_DW Double Word Right Loop

12. Status Bit Instructions12.1 OV -||- Overflow Exception Bit12.2 OS -||- Storage Overflow Exception Bit12.3 UO -||- Unordered Exception Bit12.4 BR -||- Exception Bit Binary Result12.5 ==0-||- Result Bit Equals “0”12.6 <>0-||- Result Bit Not Equal “0”12.7 >0-||- Result Bit Greater Than “0”12.8 <0-||- Result Bit Less Than “0”12.9 >=0-||- Result Bit Greater Than or Equal to “0”12.10 <=0-||- Result Bit Less Than or Equal to “0”

13. Timer Instructions13.1 S_PULSE Pulse S5 Timer13.2 S_PEXT Extended Pulse S5 Timer13.3 S_ODT On Delay S5 Timer13.4 S_ODTS Retentive On Delay S5 Timer13.5 S_OFFDT Off Delay S5 Timer13.6 -(SP) Pulse Timer Coil13.7 -(SE) Extended Pulse Timer Coil13.8 -(SD) On Delay Timer Coil13.9 -(SS) Retentive On Delay Timer Coil13.10 -(SF) Off Delay Timer Coil

14. Word Logic Instructions14.1 WAND_W Word AND Operation 14.2 WOR_W Word OR Operation 14.3 WAND_DW Double Word AND Operation 14.4 WOR_DW Double Word OR Operation 14.5 WXOR_W Word XOR Operation 14.6 WXOR_DW Double Word XOR Operation

Source: Industrial Control Help

Business Cooperation: 010—88379790 ext. 802, 822

Disclaimer: This article is a network reprint, and the copyright belongs to the original author. However, due to numerous reprints, it is impossible to confirm the true original author, so only the source of reprint is indicated. If any videos, images, or text used in this article involve copyright issues, please inform us as soon as possible, and we will confirm the copyright based on the proof you provide and pay remuneration according to national standards or delete the content immediately! The content of this article represents the author’s views and does not represent this public account’s endorsement of their views or responsibility for their authenticity.

Leave a Comment