Baldor MIN1853 manual Arithmetic Operands and Equations, Boolean Operators, AO15=VOLTAGE + Error

Models: MIN1853

1 109
Download 109 pages 43.26 Kb
Page 88
Image 88

Arithmetic Operands and Equations

Addition (+), subtraction (–), multiplication (*), and division (/) are easily performed. Expressions may only contain one operand. Complex equations require multiple statements. Variables and fixed point numbers may be mixed in arithmetic equations. All user arithmetic and variable storage uses 32 bit integer and fractional representation. The + and – symbols have a dedicated button on the keypad. Pressing the button will change between the two. The *, /, and = are accessed with the Alpha+0+ ... keystrokes.

Example:

(X)=(Y)*10

(AO15=(VOLTAGE) + (ERROR)

Examples of incorrect use:

(X)=1+2–3

This statement is incorrect because it has more than

 

one operand.

(Length)=(Total)*0.3125

This statement is incorrect because it has more than

 

four decimal places.

Instead, you should use:

(X)=1

 

(X)=(X)+2

or (X)+=2

(X)=(X)–3

or (X)–=3

and

 

(Length)=(Total)*3.125

Multiply the significant figures

(Length)=(Length)*.01

Then move the decimal place

or

 

(Length)=(Total)/32

32 bit storage of fractional decimal number

Boolean Operators

Boolean operators & and perform their respective bitwise Boolean functions on immediate or variable parameters. As an example, isolate a specific bit from an SD response to determine if axis #1 drive is enabled. This corresponds to a bit #5 (10000) Binary, (16) Integer in the SD response. The example program segment is written as follows:

(DRIVE STAT)=(SD1)&16 IF(DRIVE STAT)=16 MS,1“Drive Enabled” EB

The 16 corresponds to an integer weight of bit #5 (10000).

MN1853

Keypad Programming 6-29

Page 88
Image 88
Baldor MIN1853 manual Arithmetic Operands and Equations, Boolean Operators, AO15=VOLTAGE + Error