7 can object emission, 1 the emit function, 2 the emcy function – ElmoMC SimplIQ Software Manual User Manual

Page 35: Can object emission -6

Advertising
background image

SimplIQ

Software Manual

4BThe

SimplIQ

User Programming Language

MAN-SIMSW (Ver. 1.4)

5-6

ƒ

Any floating-point type operand is converted to an integer.

5.4.7

CAN Object Emission

5.4.7.1 The Emit Function

The emit(n) function emits the n TPDO (Can Transmit Process Data Object) subject to the
following restrictions:
ƒ

The drive supports CAN communication.

ƒ

The CAN communication state is operational.

ƒ

n equals 1, 3 or 4.

ƒ

The corresponding TPDO has its transmission type set to 254.

ƒ

The corresponding TPDO is mapped to valid signals.

The emit(n) function returns 1 if successful and 0 if it does not succeed in emitting a TPDO.
It returns immediately after the TPDO is placed in the CAN transmitter queue. The actual
emission of the TPDO may be delayed.

5.4.7.2 The EMCY Function

The EMCY function issues an emergency message from a user program. It is valid only for
drives that support CAN controllers.

Syntax:
EMCY(x)
where x is an error code (integer 4 bytes in length) defined by the user.

The EMCY() function always returns 0.

When the EMCY( ) function is called, the emergency message is transmitted only if bit

6 of object 0x2F20 (request by user program EMCY function) is set to 1. Refer to the
object 0x2F20 section in the Elmo CANopen Implementation Manual.

When the program reaches a location at which an emergency is specified, the CAN
emergency object (EMCY) is sent. The emergency object data is according to CiA DS301,
with its 8 bytes of data as follows:

Byte Contents

Remarks

0

Emergency error code

0xFF01 - device specific

1
2 Error

register

(object 0x1001)

0x80 - manufacturer specific

3

Used only for PT/PVT motion,
manufacturer error codes

0

4

Manufacturer-specific error field

Error code defined by user as
argument of EMCY function

5
6
7

Advertising