cmdMO_CFGIndex

Command Code:

The Packet:

Description:

This command is only available on BrainStem modules with the motion control feature.

The cmdMO_CFG command is used to set or retrieve motion control configuration parameters.  If no parameter data is included in the packet, a reply packet is sent reporting the current value for the requested parameter.

Parameters:

Specifying PID Factors

The scaling factors for the P, I, and D terms use a signed fixed-point representation.  The lower 5 bits are fractional.  The most significant bit is the sign bit.  The middle 10 bits are the integer part of the value.  Some examples of this numbering scheme are shown below.

Hex Value Factor
0x0001 0+1/32 (0.031)
0x0010 0+1/2 (0.500)
0x001F 0+31/32 (0.969)
0x0020 1+0/32 (1.000)
0x007A 3+26/32 (3.813)
0x0C80 100+0/32 (100.000)
0x7FFF 1023+31/32 (1023.969)

Velocity vs.  Position Control

In a velocity control mode, the result of the PID equation is added to the current PWM output.  In a position control mode, the result of the PID equation becomes the new PWM output.  The two types of feedback produce different results.  It is up to the user to pick the best control mode for an application.  In general, a velocity control mode is required when a 0 error should create a 0 change in the current output and a position control mode is required when a 0 error should create a 0 output.


version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado.  All rights reserved.