Reading & Changing Operating Parameters at Runtime

TABLE 20. Operating Modes Register Definition

Bit

1

0

Function

0:Speed Mode

1:Position Mode

0:Analog Feedback

1:Encoder Feedback

Read/Change PID Values

Address: ^82 - P1 ^83 - I1 ^84 - D1 ^85 - P2 ^86 - I2 ^87 - D2

Access: Read/Write

Effective: Instantly

The Proportional, Integral and Derivative gain for each channel can be read and changed on- the-fly. This function also provides a mean for setting different PID values for each channel. Actual Gain value is the value contained in the register divided by 8. Changes take effect at the controller’s next 16ms iteration loop. After reset, these bits get initialized according to the configuration contained in Flash.

PWM Frequency Register

Address: ^88

Access: Read/Write

Effective: Instantly

The controller’s default 16kHz PWM Frequency can be changed to a higher value in fine increments. This feature may be used to reduce the interference in case the controller’s PWM frequency harmonics are too close to the radio receiver’s frequency. The value can be changed at any time and takes effect immediately. The frequency is:

15,625 Hz * 255 / Register Value

The controller’s default frequency provides the best efficiency and should be changed only if absolutely required and only if operating the controller in RS232 or Analog modes. Changes to the PWM frequency will affect the RS232 watchdog timer and PID may need re-tuning.

The controller automatically reverts to the default 16kHz PWM frequency after reset.

Controller Status Register

Address:

^89

Access:

Read Only

Effective:

Instantly

AX500 Motor Controller User’s Manual

121

Page 121
Image 121
RoboteQ AX500 manual Read/Change PID Values, PWM Frequency Register, Controller Status Register