Pdo

Pdo

CANopen PDO protocol handler.

The process data object (PDO) protocol follows a producer-consumer structure where one device broadcasts data that can be consumed by any device on the network. Unlike the SDO protocol, PDO transfers are performed with no protocol overhead.

Constructor

new Pdo(eds)

Source:
Implements:
See:
  • CiA301 "Process data objects (PDO)" (ยง7.2.2)
Parameters:
Name Type Description
eds Eds

Eds object.

Methods

addReceive(cobId, entries, args)

Description:
  • Create a new RPDO communication/mapping parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the RPDO.

entries Array.<DataObject>

entries to map.

args object

optional arguments.

Properties
Name Type Attributes Default Description
type number <optional>
254

transmission type.

inhibitTime number <optional>
0

minimum time between writes.

eventTime number <optional>
0

how often to send timer based PDOs.

syncStart number <optional>
0

initial counter value for sync based PDOs.

addTransmit(cobId, entries, args)

Description:
  • Create a new TPDO communication/mapping parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the TPDO.

entries Array.<DataObject>

entries to map.

args object

optional arguments.

Properties
Name Type Attributes Default Description
type number <optional>
254

transmission type.

inhibitTime number <optional>
0

minimum time between writes.

eventTime number <optional>
0

how often to send timer based PDOs.

syncStart number <optional>
0

initial counter value for sync based PDOs.

getReceive(cobId) → {DataObject|null}

Description:
  • Get a RPDO communication parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the RPDO.

Returns:

the matching entry.

Type
DataObject | null

getTransmit(cobId) → {DataObject|null}

Description:
  • Get a TPDO communication parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the TPDO.

Returns:

the matching entry.

Type
DataObject | null

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:

removeReceive(cobId)

Description:
  • Remove a RPDO communication/mapping parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the RPDO.

removeTransmit(cobId)

Description:
  • Remove a TPDO communication/mapping parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
cobId number

COB-ID used by the TPDO.

start()

Description:
  • Start the module.

Source:
Implements:
Fires:

stop()

Description:
  • Stop the module.

Source:
Implements:
Fires:

write(cobId)

Description:
  • Service: PDO write

Source:
Parameters:
Name Type Description
cobId number

mapped TPDO to send.

Fires:

Events

pdo

Description:
  • New Pdo data is available.

Source:
Properties:
Name Type Description
cobId number

object identifier.

transmissionType number

transmission type.

inhibitTime number

minimum time between updates.

dataObjects Array.<DataObject>

mapped objects.

Type:
  • object