Skip to content

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:

AddressDesignationCommandAuthorityInitial value
0x00ReservedReserved--0x1314
0x01SYS_IDDriver ID--1
0x02SYS_MODEL_TYPEDriver model: 2:J14, 3:J17, 4:J20, 5:J25, 6:gripperRConsistent with program compilation
0x03SYS_FW_VERSIONFirmware version, for example, 0x0102 stands for the version 1.2R--
0x04SYS_ERRORError codeR--
0x05SYS_VOLTAGESystem voltage (0.01 V)R--
0x06SYS_TEMPSystem temperature (0.1°C)R--
0x07SYS_REDU_RATIOReduction ratioRConsistent with program compilation 80/100
0x08SYS_BPS_CANFD_BRTCANFD arbitration field Baud rate: 0-250k, 1-500k, 2-1MR/W0
0x09SYS_BPS_CANFD_DATACANFD data field Baud rate: 0-250k, 1-500k, 1-2M, 2-3M, 4M, 5MR/W2
0x0aSYS_ENABLE_DRIVEREnable the driver flag, 1: enable, 0: disable. (Do not issue any command until 5 ms later after disabling the driver)R/W0
0x0bSYS_ENABLE_ON_POWERPower-on to enable the driver flag, 1: enable; 0: disable.R/W1
0x0cSYS_SAVE_TO_FLASHSave 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/W0
0x0dSYS_DEMA_ABSPOSAutomatically calibrate the absolute position flag, 1: Calibrate; 0: Not calibrateR/W0
0x0eSYS_SET_ZERO_POSSet the current position to zero point flag, 1: Set; 0: Not setR/W0
0x0fSYS_CLEAR_ERRORClear the error flag, 1: Clear, 0: Not clearR/W0
0x10CUR_CURRENT_LCurrent current low 16 bits (mA)R0
0x11CUR_CURRENT_HCurrent current high 16 bits (mA)R--
0x12CUR_SPEED_LCurrent joint speed low 16 bits (RPM, with a resolution of 0.02 RPM)R--
0x13CUR_SPEED_HCurrent joint speed high 16 bits (RPM, with a resolution of 0.02 RPM)R--
0x14CUR_POSITION_LCurrent position low 16 bits (units), with an accuracy of 0.0001°R--
0x15CUR_POSITION_HCurrent position high 16 bits (units), with an accuracy of 0.0001°R--
0x16Reserved------
0x17Reserved
0x18Robotic arm calibration completed flag0: Not calibrated, 1: Under calibration, 2: Calibration completed0
0x19ReservedReserved----
0x1AReservedReserved----
0x1BReservedReserved----
0x1CReservedReserved----
0x1D~ 0x1fReservedReserved----
0x20ReservedReserved----
0x21ReservedReserved----
0x22ReservedReserved----
0x23ReservedReserved----
0x24ReservedReserved----
0x25ReservedReserved----
0X26~0X29ReservedReserved----
0X2AMOT_MODEL_ID0Globally unique ID of module: 15:0R
0X2BMOT_MODEL_ID1Globally unique ID of module: 31:16R
0X2CMOT_MODEL_ID2Globally unique ID of module: 47:32R
0X2DMOT_MODEL_ID3Globally unique ID of module: 63:48R
0X2EMOT_MODEL_ID4Globally unique ID of module: 79:64R
0X2FMOT_MODEL_ID5Globally unique ID of module: 95:80R
0x30TAG_WORK_MODEWork mode: 0-open loop, 1-current mode, 2-speed mode, 3-position modeR/W3
0x31TAG_OPEN_PWMDuty ratio in open loop mode (0−100)R/W0
0x32TAG_CURRENT_LTarget current low 16 bits (mA)R/W0
0x33TAG_CURRENT_HTarget current high 16 bits (mA)R/W0
0x34TAG_SPEED_LTarget joint speed low 16 bits (RPM, with a resolution of 0.002 RPM)R/W0
0x35TAG_SPEED_HTarget joint speed high 16 bits (RPM, with a resolution of 0.002 RPM)R/W0
0x36TAG_POSITION_LTarget position low 16 bits (units), with an accuracy of 0.0001°R/W0
0x37TAG_POSITION_HTarget position high 16 bits (units), with an accuracy of 0.0001°R/W0
0X38TAG_SERVO_FLAGTarget 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/W0
0X39The stored value is the position loop following coefficient, with valid values ranging from 0 to 100 and a default value of 0.R/W0
0x3A~ 0x3fReservedReserved----
0x40LIT_MAX_CURRENTMaximum current (mA)R/W--
0x41LIT_MAX_SPEEDMaximum joint speed (RPM, with a resolution of 0.01 RPM)R/W3000
0x42LIT_MAX_ACCMaximum joint acceleration (0.1 rpm/s)R/W5000
0x43LIT_MAX_DECMaximum joint deceleration (0.1 rpm/s)
0x44LIT_MIN_POSITION_LMinimum position low 16 bits (units), with an accuracy of 0.0001°R/W--
0x45LIT_MIN_POSITION_HMinimum position high 16 bits (units), with an accuracy of 0.0001°R/W--
0x46LIT_MAX_POSITION_LMaximum position low 16 bits (units), with an accuracy of 0.0001°R/W--
0x47LIT_MAX_POSITION_HMaximum position high 16 bits (units), with an accuracy of 0.0001°R/W--
0X48ReservedReserved----
0X49IAP_FLAGIAP updates flag position online 0-Not updateR/W
0x4aReservedReserved----
0x4BLIT_MAX_POS_DIFF_LThe maximum allowable following error low 16 bits, with an accuracy of 0.0001°R/W——
0x4CLIT_MAX_POS_DIFF_HThe maximum allowable following error high 16 bits, with an accuracy of 0.0001°R/W——
0x4D~0x4EReservedReserved----
0X4FReservedReserved----
0x50SEV_PARAME_UPDATE1: Update to the servo program. 0: Not updateR/W0
0x51SEV_CURRENT_PCurrent loop P parameterR/W--
0x52SEV_CURRENT_ICurrent loop I parameterR/W--
0x53SEV_CURRENT_DCurrent loop D parameterR/W--
0x54SEV_SPEED_PCurrent loop P parameterR/W--
0x55SEV_SPEED_ISpeed loop I parameterR/W--
0x56SEV_SPEED_DSpeed loop D parameterR/W--
0x57SEV_SPEED_DSSpeed P dead zoneR/W--
0x58SEV_POSITION_PPosition loop P parameterR/W--
0x59SEV_POSITION_IPosition loop I parameterR/W--
0x5aSEV_POSITION_DPosition loop D parameterR/W--
0x5bSEV_POSITION_DSPosition P dead zoneR/W--
0x5cReservedReserved----
0x5DReservedReserved----
0x5EReservedReserved----
0x5FReservedReserved----
0X60ReservedReserved----
0X61ReservedReserved----
0X62ReservedReserved----
0X63~0X6FReservedReserved----
0X70ReservedReserved----
0x71ReservedReserved----
0x72ReservedReserved----
0x73ReservedReserved----
0x74ReservedReserved----
0x75ReservedReserved----
0x76ReservedReserved----
0x77ReservedReserved----
0x78ERRORError codeR0
0x79~0x7fReservedReserved----
0x80ReservedReserved----
0x81ReservedReserved----
0x82ReservedReserved----
0x83ReservedReserved----
0x84ReservedReserved----
0x85ReservedReserved----
0x86ReservedReserved----
0x87ReservedReserved----
0x88ReservedReserved----
0x89ReservedReserved----
0x8AReservedReserved----
0x8BReservedReserved----
0x8CReservedReserved----
0x8DReservedReserved----
0x8EReservedReserved----
0X8FReservedReserved----
0X90ReservedReserved----
0x91ReservedReserved----

Note:

  1. 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.
  2. 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.

AddressDefinitionDescription
0x0aEnable the driver flag1: Enable the driver; 0: Disable the driver and open the phase-locked relay.
0x0bPower-on to enable the driver flag1: The driver is enabled and works in the given mode after power-on; 0: The driver is not enabled after power-on.
0x0cSave data to Flash flag1: The chip writes the control table in the current RAM into Flash, and the system automatically resets.
0x0dAutomatically calibrate the absolute position flag1: 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.
0x0eSet the current position to zero point flag1: 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.
0x0fClear error flag1: 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.

  1. 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.
  2. The current mode controls the target output current (torque) of the motor.
  3. The speed mode controls the output speed of motor. It is not recommended unless the module can rotate in a whole circle.
  4. 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:

BitDefinitionDescription
0x0001FOC rate too highFOC rate too high
0x0002OvervoltageOver voltage
0x0004UndervoltageUnder voltage
0x0008Over-temperatureOver temperature
0x0010Startup failureStartup failed
0x0020Encoder errorLoss of zero position
0x0040OvercurrentOver current
0x0080Software errorSoftware Error
0x0100Temperature sensor errorTemperature sensor error flag
0x0200Position out-of-limit errorCurrent/target position beyond the limit
0x0400Illegal joint IDIllegal joint ID
0x0800Position tracking error out-of-limitThe difference between target position and current position beyond the threshold
0x1000Current detection errorCurrent sensor detection error during power-on
0x2000Brake failureFailed to release the brake
0x4000Position command stepPosition command step warning
0x8000Multi-revolution data lossMulti-revolution data loss