Run motors forward regulated and reset counters with PID factors.
Run the specified outputs forward using the specified regulation mode. Specify proportional, integral, and derivative factors.
- Parameters
-
outputs | Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. |
pwr | Output power, 0 to 100. Can be negative to reverse direction. |
regmode | Regulation mode, see Output port regulation mode constants. |
reset | Position counters reset control. It must be a constant, see Tachometer counter reset flags. |
p | Proportional factor used by the firmware's PID motor control algorithm. See PID constants. |
i | Integral factor used by the firmware's PID motor control algorithm. See PID constants. |
d | Derivative factor used by the firmware's PID motor control algorithm. See PID constants. |
- Examples:
- ex_onfwdregexpid.nxc.