Add ADD

Dest = A + B.

TagAfter two scans
PartsA2
PartsB3
Total5

How it works

While the rung is true, writes Source A + Source B to the destination each scan. A fault, such as a divide by zero, leaves the destination unchanged.

How it's used

Use ADD to total values or to count up by any step.

TagValue
GoodParts40
BadParts2
Total42
BatchSize42
BatchDone1

Total is 42, which reaches the batch size.

Operands

OperandData typeRead or write
ADINT, REAL or a numberReads
BDINT, REAL or a numberReads
DestDINT, REALWrites

Common mistakes

  • Adding past the largest DINTA result too big for Dest is a fault and Dest is not changed.

Learn it in a lesson

Related