The Sync Object is broadcast periodically by the Sync Producer. Permissible value for SYNC is 0 or 1. The Emergency message is triggered by the occurrence of a device internal error situation. Permissible value for Emergency is 0 or 1. A Service Data Object (SDO) reads from entries or writes to entries of the Object Dictionary. SDO server is implemented on all CANopen devices. Permissible value for SDO sever is 0 or 1. A Service Data Object (SDO) reads from entries or writes to entries of the Object Dictionary. SDO client is usually a master device in a CANopen network. Permissible value for SDO client is 0 or 1. Process Data Objects (PDOs) are mapped to a single CAN frame using up to 8 bytes of the data field to transmit application objects. Each PDO has a unique identifier and is transmitted by only one node, but it can be received by more than one (producer/consumer communication). Permissible value for RPDO is 0 to 16. For larger value Max Index must be changed. Process Data Objects (PDOs) are mapped to a single CAN frame using up to 8 bytes of the data field to transmit application objects. Each PDO has a unique identifier and is transmitted by only one node, but it can be received by more than one (producer/consumer communication). Permissible value for TPDO is 0 to 16. For larger value Max Index must be changed. NMT master can send CANopen NMT command, which can start, stop or reset nodes. Trace is used for recording variables. bit 0-15: Device profile number bit 16-31: Additional information bit 0: generic error bit 1: current bit 2: voltage bit 3: temperature bit 4: communication error (overrun, error state) bit 5: device profile specific bit 6: Reserved (always 0) bit 7: manufacturer specific bit 0-31: Not used by stack (available for user) Number of Errors bit 0-7: Zero can be written to erase error history Standard Error Field bit 0-15: Error code as transmited in the Emergency object bit 16-31: Manufacturer specific additional information bit 0-10: COB-ID for SYNC object bit 11-29: set to 0 bit 30: 1(0) - node generates (does NOT generate) SYNC object bit 31: set to 0 bit 0-31: period of SYNC transmission in µs (0 = no transmission, no checking) bit 0-31: window leghth after SYNC when PDOS must be transmited in µs, (0 = not used) Name of the manufacturer as string Name of the hardware version as string Name of the software version as string. Writing value 0x65766173 ('s','a','v','e' from LSB to MSB) into this location stores all ROM variables into EEPROM. Writing value 0x64616F6C ('l','o','a','d' from LSB to MSB) into this location restores all ROM and EEPROM variables after reset. (After reset read form EEPROM is not performed, so default values are used.) bit 0-10: COB-ID bit 11-30: set to 0 for 11 bit COB-ID bit 31: 0(1) - node uses (does NOT use) Emergency object bit 0-15: Inhibit time of emergency message in 100µs max sub-index Consumer Heartbeat Time bit 0-15: Heartbeat consumer time in ms (0 = node is not monitored) bit 16-23: Node ID bit 24-31: set to 0 bit 0-15: Heartbeat producer time in ms (0 = disable transmission) max sub-index Vendor-ID bit 0-31: Assigned by CiA Product code bit 0-31: Manufacturer specific Revision number bit 0-15: Minor revision num. (CANopen behavior has not changed) bit 16-31: Major revision number (CANopen behavior has changed) Serial number bit 0-31: Manufacturer specific If value is zero, then SYNC message is transmitted with data length 0. If Value is from 2 to 240, then SYNC message has one data byte, which contains the counter. Other values are reserved. If error is detected and operating NMT state is NMT operational, this object defines behavior of the device. Value definition for all subindexes: 0x00 - if operational, switch to NMT pre-operational 0x01 - do nothing 0x02 - switch to NMT stopped 01 - Communication error - bus off or Heartbeat consumer error. 02 - Communication other error (critical errors - see 'Error status bits') except CAN bus passive but including bus off or Heartbeat consumer. 03 - Communication passive - any communication error including CAN bus passive. 04 - Generic error (critical errors - see 'Error status bits'). 05 - Device profile error - bit 5 in error register is set. 06 - Manufacturer specific error - bit 7 in error register is set. 0x1200 SDO server parameter max sub-index COB-ID client to server (Receive SDO) bit 0-31: 0x00000600 + Node ID COB-ID server to client (Transmit SDO) bit 0-31: 0x00000580 + Node ID 0x1201 - 0x127F SDO server parameter max sub-index COB-ID client to server (Receive SDO) bit 0-10: COB_ID bit 11-30: Set to 0 bit 31*: 0(1) - node uses (does NOT use) SDO COB-ID server to client (Transmit SDO) bit 0-31: same as previous Node-ID of the SDO client bit 0-7: Node ID (optional) 0x1280 - 0x12FF SDO client parameter max sub-index COB-ID client to server (Transmit SDO) bit 0-10: COB_ID bit 11-30: Set to 0 bit 31: 0(1) - node uses (does NOT use) SDO COB-ID server to client (Receive SDO) bit 0-31: same as previous Node-ID of the SDO server 0-7: Node ID 0x1400 - 0x15FF RPDO communication parameter max sub-index COB-ID bit 0-10: COB-ID for PDO, to change it bit 31 must be set bit 11-29: set to 0 for 11 bit COB-ID bit 30: 0(1) - rtr are allowed (are NOT allowed) for PDO bit 31: 0(1) - node uses (does NOT use) PDO Transmission type value = 0-240: reciving is synchronous, process after next reception of SYNC object value = 241-253: not used value = 254: manufacturer specific value = 255: asynchronous 0x1400 - 0x15FF RPDO communication parameter (see description for 0x1400) 0x1400 - 0x15FF RPDO communication parameter (see description for 0x1400) 0x1400 - 0x15FF RPDO communication parameter (see description for 0x1400) 0x1400 - 0x15FF RPDO communication parameter (see description for 0x1400) 0x1600 - 0x17FF RPDO mapping parameter (To change mapping, 'Number of mapped objects' must be set to 0) Number of mapped objects mapped object (subindex 1...8) bit 0-7: data length in bits bit 8-15: subindex from OD bit 16-31: index from OD 0x1600 - 0x17FF RPDO mapping parameter (see description for 0x1600) 0x1600 - 0x17FF RPDO mapping parameter (see description for 0x1600) 0x1600 - 0x17FF RPDO mapping parameter (see description for 0x1600) 0x1600 - 0x17FF RPDO mapping parameter (see description for 0x1600) 0x1800 - 0x19FF TPDO communication parameter max sub-index COB-ID bit 0-10: COB-ID for PDO, to change it bit 31 must be set bit 11-29: set to 0 for 11 bit COB-ID bit 30: 0(1) - rtr are allowed (are NOT allowed) for PDO bit 31: 0(1) - node uses (does NOT use) PDO Transmission type value = 0: transmiting is synchronous, specification in device profile value = 1-240: transmiting is synchronous after every N-th SYNC object value = 241-251: not used value = 252-253: Transmited only on reception of Remote Transmission Request value = 254: manufacturer specific value = 255: asinchronous, specification in device profile inhibit time bit 0-15: Minimum time between transmissions of the PDO in 100µs. Zero disables functionality. compatibility entry bit 0-7: Not used. event timer bit 0-15: Time between periodic transmissions of the PDO in ms. Zero disables functionality. SYNC start value value = 0: Counter of the SYNC message shall not be processed. value = 1-240: The SYNC message with the counter value equal to this value shall be regarded as the first received SYNC message. 0x1800 - 0x19FF TPDO communication parameter (see description for 0x1800) 0x1800 - 0x19FF TPDO communication parameter (see description for 0x1800) 0x1800 - 0x19FF TPDO communication parameter (see description for 0x1800) 0x1800 - 0x19FF TPDO communication parameter (see description for 0x1800) 0x1A00 - 0x1BFF TPDO mapping parameter. (To change mapping, 'Number of mapped objects' must be set to 0). Number of mapped objects mapped object (subindex 1...8) bit 0-7: data length in bits bit 8-15: subindex from OD bit 16-31: index from OD 0x1A00 - 0x1BFF TPDO mapping parameter (see description for 0x1A00) 0x1A00 - 0x1BFF TPDO mapping parameter (see description for 0x1A00) 0x1A00 - 0x1BFF TPDO mapping parameter (see description for 0x1A00) 0x1A00 - 0x1BFF TPDO mapping parameter (see description for 0x1A00) Only bit 2 is implemented. bit 0: 0(1) - device is not (is) NMT master bit 1: 0(1) - if bit3=0, start explicitly assigned (all) nodes bit 2: 0(1) - automaticaly enter (DO NOT automaticaly enter) the operational state on bootup bit 3: 0(1) - NMT master may (may not) start nodes automatically bit 4: 0(1) - if monitored node fails heartbeat handle that (all) node(s) bit 5: 0(1) - flying master process not (yes) supported bit 6: 0(1) - use bit 4 (ignore bit 4, stop all nodes) bit 7-31: reserved, set to 0 Error Status Bits indicates error conditions inside stack or inside application. Specific bit is set by CO_errorReport() function, when error occurs in program. It can be reset by CO_errorReset() function, if error is solved. Emergency message is sent on each change of any Error Status Bit. If critical bits are set, node will not be able to stay in operational state. For more information see file CO_Emergency.h. Default error status bits are: Communication or protocol errors from driver (informative): 00 - ERROR_NO_ERROR - Error Reset or No Error. 01 - ERROR_CAN_BUS_WARNING - CAN bus warning. 02 - ERROR_RXMSG_WRONG_LENGTH - Wrong data length of received CAN message. 03 - ERROR_RXMSG_OVERFLOW - Previous received CAN message wasn't processed yet. 04 - ERROR_RPDO_WRONG_LENGTH - Wrong data length of received PDO. 05 - ERROR_RPDO_OVERFLOW - Previous received PDO wasn't processed yet. 06 - ERROR_CAN_RX_BUS_PASSIVE - CAN receive bus is passive. 07 - ERROR_CAN_TX_BUS_PASSIVE - CAN transmit bus is passive. Communication or protocol errors from driver (critical): 08 - ERROR_08_reserved - (reserved) 09 - ERROR_09_reserved - (reserved) 0A - ERROR_CAN_TX_BUS_OFF - CAN transmit bus is off. 0B - ERROR_CAN_RXB_OVERFLOW - CAN module receive buffer has overflowed. 0C - ERROR_CAN_TX_OVERFLOW - CAN transmit buffer has overflowed. 0D - ERROR_TPDO_OUTSIDE_WINDOW - TPDO is outside SYNC window. 0E - ERROR_CAN_CONFIGURATION_FAILED - Configuration of CAN module CAN failed (Rx or Tx). 0F - ERROR_0F_reserved - (reserved) Communication or protocol errors (informative): 10 - ERROR_NMT_WRONG_COMMAND - Wrong NMT command received. 11 - ERROR_SYNC_EARLY - SYNC message was too early. 12 - ERROR_12_reserved - (reserved) 13 - ERROR_13_reserved - (reserved) 14 - ERROR_14_reserved - (reserved) 15 - ERROR_15_reserved - (reserved) 16 - ERROR_16_reserved - (reserved) 17 - ERROR_17_reserved - (reserved) Communication or protocol errors (critical): 18 - ERROR_SYNC_TIME_OUT - SYNC message timeout. 19 - ERROR_SYNC_LENGTH - Unexpected SYNC data length 1A - ERROR_PDO_WRONG_MAPPING - Error with PDO mapping. 1B - ERROR_HEARTBEAT_CONSUMER - Heartbeat consumer timeout. 1C - ERROR_HEARTBEAT_CONSUMER_REMOTE_RESET - Heartbeat consumer detected remote node reset. 1D - ERROR_1D_reserved - (reserved) 1E - ERROR_1E_reserved - (reserved) 1F - ERROR_1F_reserved - (reserved) Generic errors (informative): 20 - ERROR_20_reserved - (reserved) 21 - ERROR_21_reserved - (reserved) 22 - ERROR_22_reserved - (reserved) 23 - ERROR_23_reserved - (reserved) 24 - ERROR_24_reserved - (reserved) 25 - ERROR_25_reserved - (reserved) 26 - ERROR_26_reserved - (reserved) 27 - ERROR_27_reserved - (reserved) Generic errors (critical): 28 - ERROR_WRONG_ERROR_REPORT - Wrong parameters to <CO_errorReport()> function. 29 - ERROR_ISR_TIMER_OVERFLOW - Timer task has overflowed. 2A - ERROR_MEMORY_ALLOCATION_ERROR - Unable to allocate memory for objects. 2B - ERROR_GENERIC_ERROR - Generic error, test usage. 2C - ERROR_MAIN_TIMER_OVERFLOW - Mainline function exceeded maximum execution time. 2D - ERROR_INTERNAL_STATE_APPL - Error in application software internal state. 2E - ERROR_2E_reserved - (reserved) 2F - ERROR_2F_reserved - (reserved) Manufacturer specific errors: Manufacturer may define its own constants up to index 0xFF. Of course, he must then define large enough buffer for error status bits (up to 32 bytes). if(WRITING){ UNSIGNED8 var = *((UNSIGNED8*)dataBuff); if(var < 1) return 0x06090032L; //Value of parameter written too low. if(var > 127) return 0x06090031L; //Value of parameter written too high. } CAN Node ID is CANopenNode specific variable. It sets node-ID for device on CANopen network. Node-ID can be set on other ways too, for example with DIP switches. More advanced solution is use of LSS. Valid values are from 1 to 127: if(WRITING){ UNSIGNED16 var; memcpySwap2((UNSIGNED8*)&var, (UNSIGNED8*)dataBuff); if(!(var == 10 || var == 20 || var == 50 || var == 125 || var == 250 || var == 500 || var == 800 || var == 1000)) return 0x06090030L; //Invalid value for the parameter } CAN Bit-Rate is CANopenNode specific variable. It sets CAN Bit-Rate for device on CANopen network. Valid values are in [kbps]: 10, 20, 50, 125, 250, 500, 800, 1000 SYNC Counter is incremented each time, SYNC message is received or transmitted. SYNC Time is incremented each timer period and reset to zero, each time SYNC is received or transmitted. Power on Counter counts total microcontroller resets in it's lifetime. Variable is an example of EEPROM usage. if(WRITING){ UNSIGNED16 var; memcpySwap2((UNSIGNED8*)&var, (UNSIGNED8*)dataBuff); if(!((subIndex == 3 || subIndex == 5) && var == 0)) return 0x06090030; //Invalid value for parameter } Internal performance of the microcontroller. cycles per second - cycle frequency of internal timer. timer cycle time - current timer cycle time in percent of timer period. timer cycle max time - maximum timer cycle time in percent of timer period. main cycle time - current mainline function cycle time in percent of timer period. main cycle max time - maximum mainline function cycle time in percent of timer period. Current temperature on device in 0,1°C. Current voltage on device in 0,1V. Vartiable is free to use by application. Vartiable is free to use by application. Vartiable is free to use by application. Variable is stored to internal baterry powered SRAM. Variable displays current time. String - returns current time as string. Epoch time ms - Milliseconds since unix epoch (1.1.1970, 00:00:00, UTC). It is calculated as base + offset. Base is calculated on startup of program and offset increments continuously since then. 'Epoch time offset ms' overflows each 49,7 days. 'Epoch time base ms' is recalculated in case of overflow or in case of write to 'Epoch time offset ms'. It is rounded to one minute. Trace is used for recording variables. See also Trace. Size - Maximum number of trace records in circular buffer. By reading it returns actual buffer size (If zero, malloc may had been failed at startup). By writing it sets the size, which will be valid after next reboot. (It is necessary to store parameters before (0x1010).) Axis no - If value is different than zero, trace is enabled. Value is informative and describes group of traces (Multiple traces can belong to single axis.). By reading it returns zero if trace is disabled or if it is not configured properly. When trace is enabled, internal buffer is cleared. Name - name of the trace as a string (informative). Color - color of the trace as a string (informative). Map - Map to variable in object dictionary, similar as PDO map(two bytes of index, one byte of subindex and 1 byte of bitlength. It's value will be copied to trace.value in case index and subindex are correct. If map index and subindex is zero, RPDO may be mapped to trace.value, for example. Valid values of map.bitlength is 08, 10 or 20 or 00, which indicates 8-bit, 16bit, 32-bit or default-size variable. Trace must be disabled, if mapping is written (Axis no set to 0). Format - If first bit is zero, then value is used as signed integer otherwise as unsigned integer. If format is 0 or 1, text points are generated for time and value: "123;321\n140;345\n..." If format is 2 or 3, binary data is generated: 4-byte timestamp and 4-byte value. If format is 4 or 5, SVG path is generated: "M123,321H140V345...". Trigger - 0=disabled, 1=rising edge, 2=falling edge, 3=both edges. Threshold - If integer value passes threshold (based on trigger setting), time is recorded into 'trigger time'. This object controls, how many trace objects (beginning from index 0x2401) are enabled. If zero, all traces are disabled. Trace is used for recording variables. See also Trace config. Size - Number of current records in buffer. Value - Latest value. If traceConfig.map (index and subindex) is valid, then mapped variable will be copied here. Min, Max - Minimum and maximum value. Plot - SVG path generated from the values from circular buffer. For time axis is used Time->'Epoch time offset ms'. When Plot is read, internal buffer is emptied. Trigger time - If integer value passes 'TraceConfig->threshold', then time is recorded into this variable. Digital inputs from hardware. Digital outputs on hardware. Analogue inputs from hardware. The integer value is left adjusted. Analogue outputs on hardware. The integer value is left adjusted. CANopenNode CANopenNode CANopenNode is an open source software stack used for serial communication of multiple devices over the CAN/CANopen Network.