8 expressions, Expressions -7 – ElmoMC SimplIQ Software Manual User Manual

Page 36

Advertising
background image

SimplIQ

Software Manual

4BThe

SimplIQ

User Programming Language

MAN-SIMSW (Ver. 1.4)

5-7

Example:
The following code sends an EMCY from a routine in two cases: timeout (error code 1) or
out-of-range (error code 2):

if (isTimeOut) // Check if timeout occurred

EMCY(1); // Issue EMCY with error code 1

end

if (isOutOfRange) // Check if out of range

EMCY(2); // Issue EMCY with error code 2

end

If a timeout occurs, the

SimplIQ

drive sends an EMCY with the following data:

Byte Contents

Remarks

0

Emergency error code

01

1 FF
2

Error register - 0x80 (manufacturer specific) 80

3 Not

used

0

4

Manufacturer-specific error field
(1 for timeout)

01

5 0
6 0
7 0

If an out-of-range occurs, the

SimplIQ

drive sends an EMCY with the following data:

Byte Contents

Remarks

0

Emergency error code

01

1 FF
2

Error register - 0x80 (manufacturer specific) 80

3 Not

used

0

4

Manufacturer-specific error field
(2 for out-of-range)

02

5 0
6 0
7 0

Note that the user error code and the emergency error code are formatted in the messages
starting with the least significant bit.

5.4.8

Expressions

An expression is a combination of operands (parameters) and operators that is evaluated as
a single value. Expressions are used with immediate numbers, drive commands, and drive
and global user-program variables. This section describes the different types of expressions.

Advertising