CANopen Object Dictionary Entry Definition

This block creates an object dictionary entry.

Block ID

CANopen OD Entry Definition

Library

motohawk_canopen_lib

Description

This block creates an object dictionary entry with unique index and subindex. It provides an interface to write or read a value, which could be used in blocks that send or receive CANopen messages.

Internal / External Object Dictionary
Object dictionary entry could be defined as internal or external.

Which ports are available differ depending on selected internal/external option.

Port configurations :
Ports are available only when data source in definition script is set to a value of 2. When data source is set to a constant (1) or a data store (3) there are no inputs or outputs.

The input supplies the object dictionary entry with a value that would be sent to another CANopen instance.
Output ports supply values that have been received from another CANopen instance and Data Available parameter indicates that new data has been received.

Object dictionary definition script
Object dictionary script must be defined by following structure format :

objdb.name = 'EXT_OD_6000_00';
objdb.is_external_od_entry = true;
objdb.index = hex2dec('6000');
objdb.sub_index = 0;
objdb.description = 'Battery Status';
objdb.units = '';
objdb.data_type = 'UNSIGNED8';
objdb.data_source = 2;
objdb.entry_access_type = 'RO';
objdb.data_default = 1;
objdb.data_datastore_name = '';
objdb.transform.numerator = 1;
objdb.transform.denominator = 1;
objdb.transform.offset = 0;
objdb.transform.minimum = 0;
objdb.transform.maximum = 1;
objdb.transform.saturate = true;

Object dictionary definition script examples are included with the CANopen block set. Suggested arrangement is to have all object dictionary entries associated with the same CANopen instance in a single file. However it is possible to organize it differently as long as resulting structure, which is used as a OD definition parameter, has the same format as the above example.

Description of script parameters (if not marked as optional, parameter is mandatory):

Block Parameters

Parameter Field Values Comments/Description
CANopen Instance Reference String Name of associated CANopen instance definition.
OD Definition String Evaluates to OD entry definition specified in the example script.