Sync

Sync

CANopen SYNC protocol handler.

The synchronization (SYNC) protocol follows a producer-consumer structure that provides a basic network synchronization mechanism. There should be at most one sync producer on the network at a time.

Constructor

new Sync(eds)

Source:
Implements:
See:
  • CiA301 "Synchronization object (SYNC)" (ยง7.2.5)
Parameters:
Name Type Description
eds Eds

Eds object.

Members

cobId :number

Description:
  • Get object 0x1005 - COB-ID SYNC.

Source:
Deprecated:

Get object 0x1005 - COB-ID SYNC.

Type:
  • number

cobId :number

Description:
  • Set object 0x1005 - COB-ID SYNC.

Source:
Deprecated:

Set object 0x1005 - COB-ID SYNC.

Type:
  • number

cyclePeriod :number

Description:
  • Get object 0x1006 - Communication cycle period.

Source:
Deprecated:

Get object 0x1006 - Communication cycle period.

Type:
  • number

cyclePeriod :number

Description:
  • Set object 0x1006 - Communication cycle period.

Source:
Deprecated:

Set object 0x1006 - Communication cycle period.

Type:
  • number

generate :boolean

Description:
  • Get object 0x1005 [bit 30] - Sync generation enable.

Source:
Deprecated:

Get object 0x1005 [bit 30] - Sync generation enable.

Type:
  • boolean

generate :boolean

Description:
  • Set object 0x1005 [bit 30] - Sync generation enable.

Source:
Deprecated:

Set object 0x1005 [bit 30] - Sync generation enable.

Type:
  • boolean

overflow :number

Description:
  • Get object 0x1019 - Synchronous counter overflow value.

Source:
Deprecated:

Get object 0x1019 - Synchronous counter overflow value.

Type:
  • number

overflow :number

Description:
  • Set object 0x1019 - Synchronous counter overflow value.

Source:
Deprecated:

Set object 0x1019 - Synchronous counter overflow value.

Type:
  • number

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:

start()

Description:
  • Start the module;

Source:
Implements:
Fires:

stop()

Description:
  • Stop the module.

Source:
Implements:
Fires:

write(counter)

Description:
  • Service: SYNC write.

Source:
Parameters:
Name Type Default Description
counter number | null null

sync counter;

Fires:

Events

sync

Description:
  • A Sync object was received.

Source:
Type:
  • number