Introduction

Add to My manuals
704 Pages

advertisement

Introduction | Manualzz

Chapter

6

Compute/Math Instructions

(CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS)

Introduction

If You Want To

evaluate an expression add two values subtract two values multiply two values divide two values determine the remainder after one value is divided by another calculate the square root of a value take the opposite sign of a value take the absolute value of a value

The compute/math instructions evaluate arithmetic operations using an expression or a specific arithmetic instruction.

Use This Instruction

CPT

ADD

SUB

MUL

DIV

MOD

SQR

SQRT

(3)

NEG

ABS

Available In These Languages

relay ladder structured text

(1) relay ladder structured text

(2) function block relay ladder structured text

(2) function block relay ladder structured text

(2) function block relay ladder structured text

(2) function block relay ladder structured text

(2) function block relay ladder structured text function block relay ladder structured text

(2) function block relay ladder structured text function block

See Page

248

252

255

258

261

266

270

274

277

(1)

There is no equivalent structured text instruction. Use other structured text programming to achieve the same result. See the description for the instruction.

(2)

There is no equivalent structured text instruction. Use the operator in an expression.

(3)

Structured text only.

You can mix data types, but loss of accuracy and rounding error might occur and the instruction takes more time to execute. Check the S:V bit to see whether the result was truncated.

247 Publication 1756-RM003K-EN-P - July 2008

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

247

advertisement

Related manuals

advertisement

Table of contents