Emcy

Emcy

CANopen EMCY protocol handler.

The emergency (EMCY) protocol follows a producer-consumer structure where emergency objects are used to indicate CANopen device errors. An emergency object should be transmitted only once per error event.

This class implements the EMCY write service for producing emergency objects.

Constructor

new Emcy(eds)

Source:
Implements:
See:
  • CiA301 "Emergency object" (ยง7.2.7)
Parameters:
Name Type Description
eds Eds

Eds object.

Members

cobId :number

Description:
  • Get object 0x1014 - COB-ID EMCY.

Source:
Deprecated:

Get object 0x1014 - COB-ID EMCY.

Type:
  • number

cobId :number

Description:
  • Set object 0x1014 - COB-ID EMCY.

Source:
Deprecated:

Set object 0x1014 - COB-ID EMCY.

Type:
  • number

inhibitTime :number

Description:
  • Get object 0x1015 - Inhibit time EMCY.

Source:
Deprecated:

Get object 0x1015 - Inhibit time EMCY.

Type:
  • number

inhibitTime :number

Description:
  • Set object 0x1015 - Inhibit time EMCY.

Source:
Deprecated:

Set object 0x1015 - Inhibit time EMCY.

Type:
  • number

register :number

Description:
  • Get object 0x1001 - Error register.

Source:
Deprecated:

Get object 0x1001 - Error register.

Type:
  • number

register :number

Description:
  • Set object 0x1001 - Error register.

Source:
Deprecated:

Set object 0x1001 - Error register.

Type:
  • number

valid :boolean

Description:
  • Get object 0x1014 [bit 31] - EMCY valid.

Source:
Deprecated:

Get object 0x1014 [bit 31] - EMCY valid.

Type:
  • boolean

valid :boolean

Description:
  • Set object 0x1014 [bit 31] - EMCY valid.

Source:
Deprecated:

Set object 0x1014 [bit 31] - EMCY valid.

Type:
  • boolean

Methods

init()

Description:
  • Initialize the device and audit the object dictionary.

Source:
Deprecated:

receive(message)

Description:
  • Call when a new CAN message is received.

Source:
Implements:
Parameters:
Name Type Description
message object

CAN frame.

Properties
Name Type Description
id number

CAN message identifier.

data Buffer

CAN message data;

Fires:

setHistoryLength(length)

Description:
  • Configures the number of sub-entries for 0x1003 (Pre-defined error field).

Source:
Deprecated:
  • Use Eds#setHistoryLength instead.
Parameters:
Name Type Description
length number

how many historical error events should be kept.

start()

Description:
  • Start the module.

Source:
Implements:
Fires:

stop()

Description:
  • Stop the module.

Source:
Implements:
Fires:

write(…args)

Description:
  • Service: EMCY write.

Source:
Parameters:
Name Type Attributes Description
args object <repeatable>

arguments.

Properties
Name Type Attributes Description
code number

error code.

info Buffer <optional>

error info.

Events

emergency

Description:
  • An emergency message was received.

Source:
Properties:
Name Type Description
cobId number

message identifier.

em EmcyMessage

message object.

Type:
  • object