CANFD:
Memory Control Table 1. Details of control table
The information and control parameters of the module itself form a one-dimensional control table, which is stored in the RAM and Flash of the control chip respectively.
When the system is powered on, the control chip reads the control table from Flash to RAM. During the operation of the module, the user reads and writes the control table in RAM to obtain the module status or control the module.
If the user writes 1 to the "Save Data to Flash Flag" in the table, the control chip copies the contents of the present RAM table to Flash to realize power-off saving. The contents of the control table are shown below:
Address | Designation | Command | Authority | Initial value |
---|---|---|---|---|
0x00 | Reserved | Reserved | -- | 0x1314 |
0x01 | SYS_ID | Driver ID | -- | 1 |
0x02 | SYS_MODEL_TYPE | Driver model: 2:J14, 3:J17, 4:J20, 5:J25, 6:gripper | R | Consistent with program compilation |
0x03 | SYS_FW_VERSION | Firmware version, for example, 0x0102 stands for the version 1.2 | R | -- |
0x04 | SYS_ERROR | Error code | R | -- |
0x05 | SYS_VOLTAGE | System voltage (0.01 V) | R | -- |
0x06 | SYS_TEMP | System temperature (0.1°C) | R | -- |
0x07 | SYS_REDU_RATIO | Reduction ratio | R | Consistent with program compilation 80/100 |
0x08 | SYS_BPS_CANFD_BRT | CANFD arbitration field Baud rate: 0-250k, 1-500k, 2-1M | R/W | 0 |
0x09 | SYS_BPS_CANFD_DATA | CANFD data field Baud rate: 0-250k, 1-500k, 1-2M, 2-3M, 4M, 5M | R/W | 2 |
0x0a | SYS_ENABLE_DRIVER | Enable the driver flag, 1: enable, 0: disable. (Do not issue any command until 5 ms later after disabling the driver) | R/W | 0 |
0x0b | SYS_ENABLE_ON_POWER | Power-on to enable the driver flag, 1: enable; 0: disable. | R/W | 1 |
0x0c | SYS_SAVE_TO_FLASH | Save data to Flash flag, 1: Save, 0: Not save. Save under the disabled state. (Do not issue a command until 50 ms later after sending Save to Flash) | R/W | 0 |
0x0d | SYS_DEMA_ABSPOS | Automatically calibrate the absolute position flag, 1: Calibrate; 0: Not calibrate | R/W | 0 |
0x0e | SYS_SET_ZERO_POS | Set the current position to zero point flag, 1: Set; 0: Not set | R/W | 0 |
0x0f | SYS_CLEAR_ERROR | Clear the error flag, 1: Clear, 0: Not clear | R/W | 0 |
0x10 | CUR_CURRENT_L | Current current low 16 bits (mA) | R | 0 |
0x11 | CUR_CURRENT_H | Current current high 16 bits (mA) | R | -- |
0x12 | CUR_SPEED_L | Current joint speed low 16 bits (RPM, with a resolution of 0.02 RPM) | R | -- |
0x13 | CUR_SPEED_H | Current joint speed high 16 bits (RPM, with a resolution of 0.02 RPM) | R | -- |
0x14 | CUR_POSITION_L | Current position low 16 bits (units), with an accuracy of 0.0001° | R | -- |
0x15 | CUR_POSITION_H | Current position high 16 bits (units), with an accuracy of 0.0001° | R | -- |
0x16 | Reserved | -- | -- | -- |
0x17 | Reserved | |||
0x18 | Robotic arm calibration completed flag | 0: Not calibrated, 1: Under calibration, 2: Calibration completed | 0 | |
0x19 | Reserved | Reserved | -- | -- |
0x1A | Reserved | Reserved | -- | -- |
0x1B | Reserved | Reserved | -- | -- |
0x1C | Reserved | Reserved | -- | -- |
0x1D~ 0x1f | Reserved | Reserved | -- | -- |
0x20 | Reserved | Reserved | -- | -- |
0x21 | Reserved | Reserved | -- | -- |
0x22 | Reserved | Reserved | -- | -- |
0x23 | Reserved | Reserved | -- | -- |
0x24 | Reserved | Reserved | -- | -- |
0x25 | Reserved | Reserved | -- | -- |
0X26~0X29 | Reserved | Reserved | -- | -- |
0X2A | MOT_MODEL_ID0 | Globally unique ID of module: 15:0 | R | |
0X2B | MOT_MODEL_ID1 | Globally unique ID of module: 31:16 | R | |
0X2C | MOT_MODEL_ID2 | Globally unique ID of module: 47:32 | R | |
0X2D | MOT_MODEL_ID3 | Globally unique ID of module: 63:48 | R | |
0X2E | MOT_MODEL_ID4 | Globally unique ID of module: 79:64 | R | |
0X2F | MOT_MODEL_ID5 | Globally unique ID of module: 95:80 | R | |
0x30 | TAG_WORK_MODE | Work mode: 0-open loop, 1-current mode, 2-speed mode, 3-position mode | R/W | 3 |
0x31 | TAG_OPEN_PWM | Duty ratio in open loop mode (0−100) | R/W | 0 |
0x32 | TAG_CURRENT_L | Target current low 16 bits (mA) | R/W | 0 |
0x33 | TAG_CURRENT_H | Target current high 16 bits (mA) | R/W | 0 |
0x34 | TAG_SPEED_L | Target joint speed low 16 bits (RPM, with a resolution of 0.002 RPM) | R/W | 0 |
0x35 | TAG_SPEED_H | Target joint speed high 16 bits (RPM, with a resolution of 0.002 RPM) | R/W | 0 |
0x36 | TAG_POSITION_L | Target position low 16 bits (units), with an accuracy of 0.0001° | R/W | 0 |
0x37 | TAG_POSITION_H | Target position high 16 bits (units), with an accuracy of 0.0001° | R/W | 0 |
0X38 | TAG_SERVO_FLAG | Target state servo 1. Servo control command fed back by default. 2. Servo control command followed by the target current, speed and position, as shown in 4.4. After power-on, the program forcibly rewrites this register to 0. | R/W | 0 |
0X39 | The stored value is the position loop following coefficient, with valid values ranging from 0 to 100 and a default value of 0. | R/W | 0 | |
0x3A~ 0x3f | Reserved | Reserved | -- | -- |
0x40 | LIT_MAX_CURRENT | Maximum current (mA) | R/W | -- |
0x41 | LIT_MAX_SPEED | Maximum joint speed (RPM, with a resolution of 0.01 RPM) | R/W | 3000 |
0x42 | LIT_MAX_ACC | Maximum joint acceleration (0.1 rpm/s) | R/W | 5000 |
0x43 | LIT_MAX_DEC | Maximum joint deceleration (0.1 rpm/s) | ||
0x44 | LIT_MIN_POSITION_L | Minimum position low 16 bits (units), with an accuracy of 0.0001° | R/W | -- |
0x45 | LIT_MIN_POSITION_H | Minimum position high 16 bits (units), with an accuracy of 0.0001° | R/W | -- |
0x46 | LIT_MAX_POSITION_L | Maximum position low 16 bits (units), with an accuracy of 0.0001° | R/W | -- |
0x47 | LIT_MAX_POSITION_H | Maximum position high 16 bits (units), with an accuracy of 0.0001° | R/W | -- |
0X48 | Reserved | Reserved | -- | -- |
0X49 | IAP_FLAG | IAP updates flag position online 0-Not update | R/W | |
0x4a | Reserved | Reserved | -- | -- |
0x4B | LIT_MAX_POS_DIFF_L | The maximum allowable following error low 16 bits, with an accuracy of 0.0001° | R/W | —— |
0x4C | LIT_MAX_POS_DIFF_H | The maximum allowable following error high 16 bits, with an accuracy of 0.0001° | R/W | —— |
0x4D~0x4E | Reserved | Reserved | -- | -- |
0X4F | Reserved | Reserved | -- | -- |
0x50 | SEV_PARAME_UPDATE | 1: Update to the servo program. 0: Not update | R/W | 0 |
0x51 | SEV_CURRENT_P | Current loop P parameter | R/W | -- |
0x52 | SEV_CURRENT_I | Current loop I parameter | R/W | -- |
0x53 | SEV_CURRENT_D | Current loop D parameter | R/W | -- |
0x54 | SEV_SPEED_P | Current loop P parameter | R/W | -- |
0x55 | SEV_SPEED_I | Speed loop I parameter | R/W | -- |
0x56 | SEV_SPEED_D | Speed loop D parameter | R/W | -- |
0x57 | SEV_SPEED_DS | Speed P dead zone | R/W | -- |
0x58 | SEV_POSITION_P | Position loop P parameter | R/W | -- |
0x59 | SEV_POSITION_I | Position loop I parameter | R/W | -- |
0x5a | SEV_POSITION_D | Position loop D parameter | R/W | -- |
0x5b | SEV_POSITION_DS | Position P dead zone | R/W | -- |
0x5c | Reserved | Reserved | -- | -- |
0x5D | Reserved | Reserved | -- | -- |
0x5E | Reserved | Reserved | -- | -- |
0x5F | Reserved | Reserved | -- | -- |
0X60 | Reserved | Reserved | -- | -- |
0X61 | Reserved | Reserved | -- | -- |
0X62 | Reserved | Reserved | -- | -- |
0X63~0X6F | Reserved | Reserved | -- | -- |
0X70 | Reserved | Reserved | -- | -- |
0x71 | Reserved | Reserved | -- | -- |
0x72 | Reserved | Reserved | -- | -- |
0x73 | Reserved | Reserved | -- | -- |
0x74 | Reserved | Reserved | -- | -- |
0x75 | Reserved | Reserved | -- | -- |
0x76 | Reserved | Reserved | -- | -- |
0x77 | Reserved | Reserved | -- | -- |
0x78 | ERROR | Error code | R | 0 |
0x79~0x7f | Reserved | Reserved | -- | -- |
0x80 | Reserved | Reserved | -- | -- |
0x81 | Reserved | Reserved | -- | -- |
0x82 | Reserved | Reserved | -- | -- |
0x83 | Reserved | Reserved | -- | -- |
0x84 | Reserved | Reserved | -- | -- |
0x85 | Reserved | Reserved | -- | -- |
0x86 | Reserved | Reserved | -- | -- |
0x87 | Reserved | Reserved | -- | -- |
0x88 | Reserved | Reserved | -- | -- |
0x89 | Reserved | Reserved | -- | -- |
0x8A | Reserved | Reserved | -- | -- |
0x8B | Reserved | Reserved | -- | -- |
0x8C | Reserved | Reserved | -- | -- |
0x8D | Reserved | Reserved | -- | -- |
0x8E | Reserved | Reserved | -- | -- |
0X8F | Reserved | Reserved | -- | -- |
0X90 | Reserved | Reserved | -- | -- |
0x91 | Reserved | Reserved | -- | -- |
Note:
- After the ID is successfully set, it is necessary to de-energize and then restart the joint. The module will conduct communication with the new ID.
- The parameters of the three closed loops have been set before leaving the factory. No re-adjustment is required if not necessary.
2. Additional notes on the control table
2.1 Description of flags
There are 6 flag variables in total, whose values can only be 1 or 0, and other values are invalid.
See the table below for more details.
Address | Definition | Description |
---|---|---|
0x0a | Enable the driver flag | 1: Enable the driver; 0: Disable the driver and open the phase-locked relay. |
0x0b | Power-on to enable the driver flag | 1: The driver is enabled and works in the given mode after power-on; 0: The driver is not enabled after power-on. |
0x0c | Save data to Flash flag | 1: The chip writes the control table in the current RAM into Flash, and the system automatically resets. |
0x0d | Automatically calibrate the absolute position flag | 1: The driver will calibrate the absolute position sensor (digital potentiometer) according to the value of the encoder, and save the calibrated data to Flash. The module must be currently under no load, and can work stably in the position servo mode and in the enabled state; otherwise, unpredictable consequences will be caused. The system automatically resets. |
0x0e | Set the current position to zero point flag | 1: Save the current position as the zero point, which will take effect immediately. After the data is saved to Flash, the saved position will be used as the zero point after power-on next time. The system automatically resets. |
0x0f | Clear error flag | 1: Attempt to clear the current error. The system automatically resets. |
2.2 Description of units
For 10-joint and 30-joint, the unit of the target current and the actual feedback current is mA;
For 60-joint, the unit of the target current and the actual feedback current is 2 mA;
The unit of feedforward current of all joints is 2 mA;
The unit of target speed at the joint output end is 0.002 RPM;
The unit of actual speed at the joint output end is 0.002 RPM;
The unit of feedforward speed at the joint output end is 0.002 RPM;
The unit of target position and actual feedback position at the joint output end is 0.0001°;
The unit of voltage is 0.01 V;
The unit of system temperature is 0.1°C.
2.3 Description of work modes
The module can work in four modes, namely the open loop mode, current mode, speed mode, and position mode. The module can switch among the four modes by changing the TAG_WORK_MODE field (0x30) in the control table.
- The open loop mode directly controls the duty ratio of the driver output to the motor, which is prone to danger and therefore is not recommended.
- The current mode controls the target output current (torque) of the motor.
- The speed mode controls the output speed of motor. It is not recommended unless the module can rotate in a whole circle.
- The position module controls the motor servo position.
The target duty ratio, current, speed, and position in the 0x3* field only work when the module is in the corresponding work mode. The maximum current, maximum speed, and maximum acceleration/deceleration in fields 0x40 to 0x46 are valid in the current, speed, and position modes, and the minimum/maximum position is valid only in the position servo mode, which specifies that the target value for the position servo cannot be set beyond this range.
If the set target position is less than the minimum value or exceeds the maximum value, the module will only move to the minimum or maximum value. If the module is out of range when the driver is enabled, it will automatically move to the minimum/maximum value.
3. Error code
The error code has 16 bits, and each bit represents a type of error. If an error occurs, the corresponding bit will be displayed as 1. If an unrecoverable error occurs, the module will automatically enter the driver disabled state, and users need to write 1 to the "Clear Error Flag" field (0x0f) to clear the error.
The meaning of each error bit is as follows:
Bit | Definition | Description |
---|---|---|
0x0001 | FOC rate too high | FOC rate too high |
0x0002 | Overvoltage | Over voltage |
0x0004 | Undervoltage | Under voltage |
0x0008 | Over-temperature | Over temperature |
0x0010 | Startup failure | Startup failed |
0x0020 | Encoder error | Loss of zero position |
0x0040 | Overcurrent | Over current |
0x0080 | Software error | Software Error |
0x0100 | Temperature sensor error | Temperature sensor error flag |
0x0200 | Position out-of-limit error | Current/target position beyond the limit |
0x0400 | Illegal joint ID | Illegal joint ID |
0x0800 | Position tracking error out-of-limit | The difference between target position and current position beyond the threshold |
0x1000 | Current detection error | Current sensor detection error during power-on |
0x2000 | Brake failure | Failed to release the brake |
0x4000 | Position command step | Position command step warning |
0x8000 | Multi-revolution data loss | Multi-revolution data loss |