User Tools

Site Tools


the_quimdc_object_dictionary

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
the_quimdc_object_dictionary [2017/01/10 15:20] – [O.D. layout] mounimethe_quimdc_object_dictionary [2023/01/25 13:19] – [O.D. layout] Add gpio publish freq pdekeyzer
Line 1: Line 1:
 +====== The QuimDC Object Dictionary ======
  
 +----
 +===== How to add a parameter =====
 +
 +All the parameters are added to the Object Dictionary (O.D.) in board/quimdc/od_factory.c file. **Beware to check the max size of OD** defined by MAX_NUM_OD_ENTRIES in common/lib/can/od.h.
 +
 +----
 +
 +
 +===== O.D. layout =====
 +
 +Note: When setting/reading GPIOs, use this table to link their name to their ID:
 +^ GPIO Name  ^ ID ^
 +| CA_R | 0         |
 +| CA_L | 1         |
 +| CB_R | 2         |
 +| CB_L | 3         |
 +| CQR | 4         |
 +| CQL | 5         |
 +
 +Index profile is inspired by this [[http://www.elmomc.com/support/manuals/MAN-CAN402IG.pdf|specification]] and this {{canopenod.pdf|official specification}}.
 +
 +
 +^ Index  ^ Sub-index ^ Attribute ^ Type   ^ Name                                     ^
 +| 0x1000 | 0         | RO        | UINT32 | Device type                              |
 +| 0x1010 | 0         | WO        | VOID   | Save parameters to flash                 |
 +| 0x1011 | 0         | WO        | VOID   | Load parameters from flash                 |
 +| 0x411A | 0         | WO        | VOID   | Erase flash                 |
 +| 0x2000 | 0         | RW        | INT32  | Motor Watchdog (ms)               |
 +| 0x2040 | 1         | RO        | INT32  | Current Motor 1 (mA)         |
 +| :::    | 2         | RO        | INT32  | Current Motor 2 (mA)         |
 +| 0x200C | 0         | RW        | INT32  | Emergency stop (uint8_t flag_id)               |
 +| 0x3333 | 0         | RW        | INT32  | Operational Mode Manager (0 => leave, 1 => enter)    |
 +| 0x4000 | 1         | RW        | INT32  | Speed PID, P Motor 1                     |
 +| :::    | 2         | RW        | INT32  | Speed PID, P Motor 2                     |
 +| 0x4001 | 1         | RW        | INT32  | Speed PID, I Motor 1                     |
 +| :::    | 2         | RW        | INT32  | Speed PID, I Motor 2                     |
 +| 0x4002 | 1         | RW        | INT32  | Speed PID, D Motor 1                     |
 +| :::    | 2         | RW        | INT32  | Speed PID, D Motor 2                     |
 +| 0x4003 | 1         | RW        | INT32  | Speed PID, Do Motor 1                    |
 +| :::    | 2         | RW        | INT32  | Speed PID, Do Motor 2                    |
 +| 0x4004 | 1         | RW        | INT32  | Speed PID, Fixed Point Divider Motor 1                 |
 +| :::    | 2         | RW        | INT32  | Speed PID, Fixed Point Divider Motor 2                 |
 +| 0x4005 | 1         | RW        | INT32  | Speed PID, Anti Wu Limit Motor 1                 |
 +| :::    | 2         | RW        | INT32  | Speed PID, Anti Wu Limit Motor 2                 |
 +| 0x4010 | 1         | RW        | INT32  | Current PID, P Motor 1                   |
 +| :::    | 2         | RW        | INT32  | Current PID, P Motor 2                   |
 +| 0x4011 | 1         | RW        | INT32  | Current PID, I Motor 1                   |
 +| :::    | 2         | RW        | INT32  | Current PID, I Motor 2                   |
 +| 0x4012 | 1         | RW        | INT32  | Current PID, D Motor 1                   |
 +| :::    | 2         | RW        | INT32  | Current PID, D Motor 2                   |
 +| 0x4013 | 1         | RW        | INT32  | Current PID, Do Motor 1                  |
 +| :::    | 2         | RW        | INT32  | Current PID, Do Motor 2                  |
 +| 0x4014 | 1         | RW        | INT32  | Current PID, Fixed Point Divider Motor 1               |
 +| :::    | 2         | RW        | INT32  | Current PID, Fixed Point Divider Motor 2               |
 +| 0x4015 | 1         | RW        | INT32  | Current PID, Anti Wu Limit Motor 1                 |
 +| :::    | 2         | RW        | INT32  | Current PID, Anti Wu Limit Motor 2                 |
 +| 0x4020 | 1         | RW        | INT32  | Position PID, P Motor 1                  |
 +| :::    | 2         | RW        | INT32  | Position PID, P Motor 2                  |
 +| 0x4021 | 1         | RW        | INT32  | Position PID, I Motor 1                  |
 +| :::    | 2         | RW        | INT32  | Position PID, I Motor 2                  |
 +| 0x4022 | 1         | RW        | INT32  | Position PID, D Motor 1                  |
 +| :::    | 2         | RW        | INT32  | Position PID, D Motor 2                  |
 +| 0x4023 | 1         | RW        | INT32  | Position PID, Do Motor 1                 |
 +| :::    | 2         | RW        | INT32  | Position PID, Do Motor 2                 |
 +| 0x4024 | 1         | RW        | INT32  | Position PID, Fixed Point Divider Motor 1              |
 +| :::    | 2         | RW        | INT32  | Position PID, Fixed Point Divider Motor 2              |
 +| 0x4025 | 1         | RW        | INT32  | Position PID, Anti Wu Limit Motor 1                 |
 +| :::    | 2         | RW        | INT32  | Position PID, Anti Wu Limit Motor 2                 |
 +| 0x4100 | 1         | RW        | FLOAT32| Resistance Motor 1 (mOhm)                 |
 +| :::    | 2         | RW        | FLOAT32| Resistance Motor 2 (mOhm)                 |
 +| 0x4101 | 1         | RW        | FLOAT32| Kv Motor 1 (Rpm/V)                       |
 +| :::    | 2         | RW        | FLOAT32| Kv Motor 2 (Rpm/V)                       |
 +| 0x4102 | 1         | RW        | INT32  | Ticks per Turn Motor 1 (Tick/Turn)       |
 +| :::    | 2         | RW        | INT32  | Ticks per Turn Motor 2 (Tick/Turn)       |
 +| 0x4103 | 1         | RW        | INT32  | Nominal Voltage Motor 1 (mV)                  |
 +| :::    | 2         | RW        | INT32  | Nominal Voltage Motor 2 (mV)                  |
 +| 0x4105 | 1         | RW        | INT32  | Position speed period Motor 1 (ms)                  |
 +| :::    | 2         | RW        | INT32  | Position speed period Motor 2 (ms)                  |
 +| 0x4106 | 1         | RW        | INT32  | BEMF Compensation Motor 1 [0/1]                 |
 +| :::    | 2         | RW        | INT32  | BEMF Compensation Motor 2 [0/1]                  |
 +| 0x4107 | 1         | RW        | INT32  | Minimal Speed Motor 1 (Ticks/second)                  |
 +| :::    | 2         | RW        | INT32  | Minimal Speed Motor 2 (Ticks/second)                  |
 +| 0x4108 | 1         | RW        | INT32  | Free Wheel GPIO ID Motor 1 [0,5] (see table above)                 |
 +| :::    | 2         | RW        | INT32  | Free Wheel GPIO ID Motor 2 [0,5] (see table above)                  |
 +| 0x4109 | 1         | RW        | INT32  | Homing GPIO ID Motor 1 [0,5] (see table above)             |
 +| :::    | 2         | RW        | INT32  | Homing GPIO ID Motor 2 [0,5](see table above)                 |
 +| 0x410A | 1         | RW        | INT32  | Positive limit switch GPIO ID Motor 1 [0,5] (see table above)|
 +| :::    | 2         | RW        | INT32  | Positive limit switch GPIO ID Motor 2 [0,5] (see table above)|
 +| 0x410B | 1         | RW        | INT32  | Negative limit switch GPIO ID Motor 1 [0,5] (see table above)|
 +| :::    | 2         | RW        | INT32  | Negative limit switch GPIO ID Motor 2 [0,5] (see table above)|
 +| 0x410C | 1         | RW        | INT32  | Positive limit switch GPIO inversion Motor 1 [0/1]|
 +| :::    | 2         | RW        | INT32  | Positive limit switch GPIO inversion Motor 2 [0/1]|
 +| 0x410D | 1         | RW        | INT32  | Negative limit switch GPIO inversion Motor 1 [0/1]|
 +| :::    | 2         | RW        | INT32  | Negative limit switch GPIO inversion Motor 2 [0/1]|
 +| 0x410E | 1         | RW        | INT32  | Homing GPIO inversion Motor 1 [0/1]                  |
 +| :::    | 2         | RW        | INT32  | Homing GPIO inversion Motor 2 [0/1]                  |
 +| 0x410F | 1         | RW        | INT32  | Max Position error Motor 1 (Ticks)                  |
 +| :::    | 2         | RW        | INT32  | Max Position error Motor 2 (Ticks)                  |
 +| 0x4110 | 1         | RW        | INT32  | PWM Offset Motor 1  [-128, 128]            |
 +| :::    | 2         | RW        | INT32  | PWM Offset Motor 2  [-128, 128]          |
 +| 0x4111 | 1         | RW        | INT32  | Acceleration Period Motor 1 (Seconds)                  |
 +| :::    | 2         | RW        | INT32  | Acceleration Period Motor 2 (Seconds)                  |
 +| 0x4112 | 1         | RW        | INT32  | Deceleration limit Motor 1 (Ticks/second²)                  |
 +| :::    | 2         | RW        | INT32  | Deceleration limit Motor 2 (Ticks/second²)                  |
 +| 0x4113 | 1         | RW        | INT32  | Acceleration limit Motor 1 (Ticks/second²)                  |
 +| :::    | 2         | RW        | INT32  | Acceleration limit Motor 2 (Ticks/second²)                  |
 +| 0x4114 | 1         | RW        | INT32  | Max Current Motor 1 (mA)                  |
 +| :::    | 2         | RW        | INT32  | Max Current Motor 2 (mA)                  |
 +| 0x4115 | 1         | RW        | INT32  | Max Speed Motor 1 (Ticks/second)                  |
 +| :::    | 2         | RW        | INT32  | Max Speed Motor 2 (Ticks/second)                  |
 +| 0x4116 | 1         | RO        | INT32  | Get actual PWM of Motor 1                  |
 +| :::    | 2         | RO        | INT32  | Get actual PWM of Motor 2                   |
 +| 0x4117 | 1         | RO        | INT32  | Is Homing Done on Motor 1  (0=homing not done/1=homing done)|
 +| :::    | 2         | RO        | INT32  | Is Homing Done on Motor 2  (0=homing not done/1=homing done)|
 +| 0x4118 | 1         | WO        | INT32  | Do Homing on Motor 1 with indicated speed (Ticks/second)|
 +| :::    | 2         | WO        | INT32  | Do Homing on Motor 2 with indicated speed (Ticks/second)|
 +| 0x4119 | 1         | RW        | INT32  | Set Ref PWM Motor 1[-128,128]|
 +| :::    | 2         | RW        | INT32  | Set Ref PWM Motor 2[-128,128]|
 +| 0x4200 | 1         | RO        | INT32  | Read position reached Motor 1 (See note below) |
 +| :::    | 2         | RO        | INT32  | Read position reached Motor 2 (See note below) |
 +| 0x4202 | 1         | RO        | INT32  | Read GPIO values (See note below) |
 +| 0x6010 | 1         | RO        | INT32  | Digital Input External Encoder 1            |
 +| :::    | 2         | RO        | INT32  | Digital Input External Encoder 2            |
 +| 0x6011 | 0         | RO        | INT32  | Read Level of GPIO CA_R                |
 +| :::    | 1         | RO        | INT32  | Read Level of GPIO CA_L       |
 +| :::    | 2         | RO        | INT32  | Read Level of GPIO CB_R     |
 +| :::    | 3         | RO        | INT32  | Read Level of GPIO CB_L     |
 +| :::    | 4         | RO        | INT32  | Read Level of GPIO CQR    |
 +| :::    | 5         | RO        | INT32  | Read Level of GPIO CQL     |
 +| 0x6012 | 0         | RO        | INT32  | Read motor driver fault status [0]       |
 +| 0x6013 | 0         | WO        | INT32  | Put board to sleep [1]          |
 +| 0x6014 | 0         | WO        | INT32  | Reset board [1]           |
 +| 0x6015 | 0         | WO        | INT32  | Reset motor driver [1]                 |
 +| 0x6060 | 1         | RW        | INT32  | Control Loop Function Motor 1            |
 +| :::    | 2         | RW        | INT32  | Control Loop Function Motor 2            |
 +| 0x6063 | 1         | RO        | INT32  | Motor Position 1 (Tick)         |
 +| :::    | 2         | RO        | INT32  | Motor Position 2 (Tick)         |
 +| 0x6078 | 1         | RW        | INT32  | Reference/Target Current Motor 1 (mA)         |
 +| :::    | 2         | RW        | INT32  | Reference/Target Current Motor 2 (mA)         |
 +| 0x607A | 1         | RW        | INT32  | Reference/Target Position Motor 1 (Tick)         |
 +| :::    | 2         | RW        | INT32  | Reference/Target Position Motor 2 (Tick)         |
 +| 0x607E | 1         | RW        | INT32  | Polarity Motor 1 (Tick)         |
 +| :::    | 2         | RW        | INT32  | Polarity Motor 2 (Tick)         |
 +| 0x607F | 1         | RW        | INT32  | Pwm Duty Max 1 ([0, 127])         |
 +| :::    | 2         | RW        | INT32  | Pwm Duty Max 2 ([0, 127])         |
 +| 0x6080 | 1         | WO        | INT32  | Reset Position Motor 1 [0]         |
 +| :::    | 2         | WO        | INT32  | Reset Position Motor 2 [0]         |
 +| 0x60F0 | 1         | RW        | INT32  | PWM Motor 1 ([-128, 128])         |
 +| :::    | 2         | RW        | INT32  | PWM Motor 2 ([-128, 128])         |
 +| 0x60FF | 1         | RW        | INT32  | Reference/Target Speed Motor 1 (Tick/s)         |
 +| :::    | 2         | RW        | INT32  | Reference/Target Speed Motor 2 (Tick/s)         |
 +| 0x6100 | 1         | RO        | INT32  | Motor Speed 1 (Tick/s)         |
 +| :::    | 2         | RO        | INT32  | Motor Speed 2 (Tick/s)         |
 +| 0x6200 | 1         | RW        | INT32  | GPIO PDO publish freq (Hz)         |
 +
 +==== Notes ====
 +
 +As the entry 0x4200 (Read position reached) is essentially designed to be used for PDOs, it has a specific structure
 +^ Byte 0  ^ Byte 1 ^ Byte 2 ^ Byte 3 ^ Byte 4 ^ Byte 5 ^ Byte 6 ^ Byte 7 ^
 +| position reached (0/1) | 0x00 | 0x00 |  Position in ticks  |||||
 +
 +The entry 0x4202 PDO structure is the following:
 +^ Byte 0  ^ Byte 1 ^ Byte 2 ^ Byte 3 ^ Byte 4 ^ Byte 5 ^ Byte 6 ^ Byte 7 ^
 +| Motor 1 positive limit switch level (0/1) | Motor 1 negative limit switch level (0/1) | Motor 1 homing limit switch level (0/1) |  Motor 2 positive limit switch level (0/1)  | Motor 2 negative limit switch level (0/1) | Motor 2 homing limit switch level (0/1) | 0x00 | 0x00 |
the_quimdc_object_dictionary.txt · Last modified: 2023/02/09 12:09 by pdekeyzer