1 / 20

PLC Math Instructions

10. PLC Math Instructions. Objectives. Program the add instruction in the PLC ladder logic diagram. Program the subtract instruction in the PLC ladder logic diagram. Program the multiply instruction in the PLC ladder logic diagram.

dawson
Download Presentation

PLC Math Instructions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 10 PLC Math Instructions

  2. Objectives • Program the add instruction in the PLC ladder logic diagram. • Program the subtract instruction in the PLC ladder logic diagram. • Program the multiply instruction in the PLC ladder logic diagram. • Program the divide instruction in the PLC ladder logic diagram.

  3. Addition • Add (ADD) instructionhas three operands: • Two operands hold source data (Source A and Source B), which are added together. • Either both sources can be registers or one source can be a register while the other one is a number. • Third operand is the destination.

  4. Addition (Cont.) • Add instruction for Allen-Bradley SLC 500 series PLC displayed in block format.

  5. Description of Status Bits

  6. Subtraction • Subtract (SUB) instruction has three operands: • Two operands, Source A and Source B, hold the source data. • Content of Source B is subtracted from Source A. • Result is placed in the destination.

  7. Subtraction (Cont.) • Subtract instruction for the Allen-Bradley SLC 500 series PLC displayed in block format.

  8. Multiplication • Multiply (MUL) instruction has three operands: • Two operands hold the source data (Source A and Source B). • Either both sources can be registers, or one source can be a register while the other one is a number. • Destination must be a register.

  9. Multiplication (Cont.) • Multiply instructions in SLC 500 series PLCs displayed in block format.

  10. Division • Divide (DIV) instruction has three registers: • Two registers hold the source data (Source A and Source B). • Either both sources can be registers or one source can be a register while the other one is a number. • Destination must be a register.

  11. Division (Cont.) • Divide instructions in SLC 500 series PLCs displayed in block format.

  12. Advanced Math Instructions • Advanced math instructions are used to perform mathematical computations.

  13. Advanced Math Instructions (Cont.) • Compute (CPT) instruction may be used to solve mathematical equations.

  14. Advanced Math Instructions Example • Given the following equation, you can use the CPT instruction to solve it. Y = (A × (ln B) × eC) + (tan D)

  15. Advanced Math Instructions Example (Cont.) • First assign floating point register locations for the parameters in the equation. • Note that integer registers such as N7:0 hold integer numbers. • Floating point registers such as F8:0 hold a real number that has both integer and fractional part.

  16. Advanced Math Instructions Example (Cont.) • Assigned registers are: A = F8:0 B = F8:1 C = F8:2 D = F8:3 Y = F8:4

  17. Advanced Math Instructions Example (Cont.) • Normally open contact I:1/0 is closed, equation in CPT instruction block calculated. • Result is placed in floating point register four (F8:4).

  18. PLC Ladder Logic Diagram

  19. Commonly Used Math Instructions

More Related