NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
void PosRegEnable ( byte  output,
byte  p = PID_3,
byte  i = PID_1,
byte  d = PID_1 
)
inline

Enable absolute position regulation with PID factors.

Enable absolute position regulation on the specified output. Motor is kept regulated as long as this is enabled. Optionally specify proportional, integral, and derivative factors.

Warning
This function requires the enhanced NBC/NXC firmware version 1.31+
Parameters
outputDesired output port. Can be a constant or a variable, see Output port constants.
pProportional factor used by the firmware's PID motor control algorithm. See PID constants. Default value is PID_3.
iIntegral factor used by the firmware's PID motor control algorithm. See PID constants. Default value is PID_1.
dDerivative factor used by the firmware's PID motor control algorithm. See PID constants. Default value is PID_1.
Examples:
ex_PosReg.nxc.