Multiply Instruction in Ladder Logic

KronoTech

PLC

Ladder Logic

Basic

Counters

Timer

Arithmetic

ADD

SUB

MUL

DIV

DDV

Comparison

Functions

Trig Functions

RSLogix 5000

Structured Text

HMI

Instruments

>

MUL - Multiply

Use the MUL instruction to multiply one value (source A) by another (source B) and place the result in the destination. Source A and Source B can either be constant values or addresses that contain values, however Source A and Source B cannot both be constants.

Example 1

Equation: N7:51 = N7:50 * 1000

Ladder Logic Solution

Source A = N7:50 = 12345 , Source A = 1000, Destination = N7:51 = 24232(why..)

MUL - SLC 500 Beginners Guide

Math Register: When N7:50 = 12345 this will generate a value > 32767 this will generate an overflow status bit. But we will still get a valid result in the math register. We have to make sure to clear the minor error generate before we get a major error.

MUL - SLC 500 Beginners Guide

Example 2

Equation: F8:52 = N7:52 * F8:50 (F is for floating points).

Ladder Logic Solution

Source A = N7:52 = 10 , Source B = F8:50 = 1.234, Destination = F8:52 = 12.34

MUL - SLC 500 Beginners Guide

Notice how we mixed Integer (N) numbers with floating (F) numbers.

Example 3

Equation: N7:52 = F8:52 * F8:54 (12 = 1.23 * 10.0)

Ladder Logic Solution

Source A = F8:53 = 1.23, Source B = F8:54 = 10.0, Destination = N7:52=12

MUL - SLC 500 Beginners Guide

Notice how the value of two floats got truncated with the use of integer (N).

Quick Links

PLC Languages

Ladder Logic
Function Block
Structure Text
SFC
Mnemonic

Ladder Logic

Basic
Counters
Timer
Arithmetic
Comparison
Functions
Trig Functions

Instruments

Switches

HMI

Advantages
Alarms
Trends

Other

Bottle Application