Difference between revisions of "CANopen Protocol"

From SoftMC-Wiki
Jump to: navigation, search
(Added explanation about bus cycle)
Line 33: Line 33:
 
'''Synchronization'''<br>
 
'''Synchronization'''<br>
 
Each bus cycle softMC broadcasts SYNC message to the devices and then sends to every slave a TX PDO(s) that contains control word, target position and optional digital otputs. MC expects that all the devices will send its TX PDO with the status word and the position feedback before the next SYNC.<br>
 
Each bus cycle softMC broadcasts SYNC message to the devices and then sends to every slave a TX PDO(s) that contains control word, target position and optional digital otputs. MC expects that all the devices will send its TX PDO with the status word and the position feedback before the next SYNC.<br>
Bus cycle is triggered by a hardware timer therefore SYNC messages are sent to the slaves with low jitter that should not exceed 50 usecs.<br>
+
Bus cycle is triggered by a hardware timer therefore SYNC messages are sent to the slaves with low jitter that should not exceed 70 usecs.<br>
Devices shall lock their PLLs to the softMC SYNC cycle and tolerate SYNC jitter of up to 50 usecs.
+
Devices shall lock their PLLs to the softMC SYNC cycle and tolerate SYNC jitter of up to 100 usecs.<br>
 +
'''Bus cycle example:<br>'''
 +
<Start cycle><br>
 +
MasterTPDO1<br>
 +
MasterTPDO2<br>
 +
Dummy message<br>
 +
SYNC<br>
 +
..<br>
 +
..<br>
 +
Device1 TDPDO1<br>
 +
Device1 TDPDO2<br>
 +
..<br>
 +
DeviceN TDPDO1<br>
 +
DeviceN TDPDO2<br>
 +
<Start cycle><br>

Revision as of 09:59, 24 July 2014

CANOpen protocol

softMC provides a number of categories of services that allow operation of CANOpen device.

  • Upload and Download service objects

Application can read(upload) from or write (download) to device CANopen service data objects using either segmented or expedite SDO upload/download mechanism.
Those functions are implemented in CANOPEN.LIB

bus[0].phase = 0 ' put CAN device to PREOP mode
bus[0].phase = 4 ' put CAN device to OP mode

  • Configuration of motion objects

SoftMC requires DS402 compliant digital drive that supports following modes of operation and objects

  • Mandatory Cyclic Synchronous Position mode (so-called opmode 8)
  • Optional Cyclic Synchronous Torque mode mode

PDO map-able objects
Device shall provide following objects, object numbers may be different from standard.

  • Control Word - object 0x6040.0
  • Status Word - object 0x6041.0
  • 32-bit Target position - object 0x607a.0
  • 32-bit Position feedback - object 0x6064.0
  • Optional Digital Inputs and Outputs

PDO mapping and association between above mentioned objects and internal data structures of softMC is shown in the example Program_Examples:CANOpen:DS402_CAN_Drive_Setup
corresponding firmware function are listed in Category:CANOpen:Firmware-Functions
Synchronization
Each bus cycle softMC broadcasts SYNC message to the devices and then sends to every slave a TX PDO(s) that contains control word, target position and optional digital otputs. MC expects that all the devices will send its TX PDO with the status word and the position feedback before the next SYNC.
Bus cycle is triggered by a hardware timer therefore SYNC messages are sent to the slaves with low jitter that should not exceed 70 usecs.
Devices shall lock their PLLs to the softMC SYNC cycle and tolerate SYNC jitter of up to 100 usecs.
Bus cycle example:
<Start cycle>
MasterTPDO1
MasterTPDO2
Dummy message
SYNC
..
..
Device1 TDPDO1
Device1 TDPDO2
..
DeviceN TDPDO1
DeviceN TDPDO2
<Start cycle>