    KronoTech RSLogix 5000 Ladder Logic Structured Text HMI Search Contact us

# Multiply Instruction in Ladder Logic

KronoTech

PLC

Basic

Counters

Timer

Arithmetic

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

Source A = N7:50 = 12345 , Source A = 1000, Destination = N7:51 = 24232(why..) 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. #### Example 2

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

Source A = N7:52 = 10 , Source B = F8:50 = 1.234, Destination = F8:52 = 12.34 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) 