NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
Output module functions

Functions for accessing and modifying output module features. More...

Functions

void SetMotorPwnFreq (byte n)
 Set motor regulation frequency.
 
void SetMotorRegulationTime (byte n)
 Set regulation time.
 
void SetMotorRegulationOptions (byte n)
 Set regulation options.
 
void OnFwdSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
 Run motors forward synchronised with PID factors.
 
void OnFwdSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
 Run motors forward synchronised and reset counters with PID factors.
 
void OnRevSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
 Run motors backward synchronised with PID factors.
 
void OnRevSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
 Run motors backward synchronised and reset counters with PID factors.
 
void OnFwdRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
 Run motors forward regulated with PID factors.
 
void OnFwdRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
 Run motors forward regulated and reset counters with PID factors.
 
void OnRevRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
 Run motors reverse regulated with PID factors.
 
void OnRevRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
 Run motors backward regulated and reset counters with PID factors.
 
void Off (byte outputs)
 Turn motors off.
 
void OffEx (byte outputs, const byte reset)
 Turn motors off and reset counters.
 
void Coast (byte outputs)
 Coast motors.
 
void CoastEx (byte outputs, const byte reset)
 Coast motors and reset counters.
 
void Float (byte outputs)
 Float motors.
 
void OnFwd (byte outputs, char pwr)
 Run motors forward.
 
void OnFwdEx (byte outputs, char pwr, const byte reset)
 Run motors forward and reset counters.
 
void OnRev (byte outputs, char pwr)
 Run motors backward.
 
void OnRevEx (byte outputs, char pwr, const byte reset)
 Run motors backward and reset counters.
 
void OnFwdReg (byte outputs, char pwr, byte regmode)
 Run motors forward regulated.
 
void OnFwdRegEx (byte outputs, char pwr, byte regmode, const byte reset)
 Run motors forward regulated and reset counters.
 
void OnRevReg (byte outputs, char pwr, byte regmode)
 Run motors forward regulated.
 
void OnRevRegEx (byte outputs, char pwr, byte regmode, const byte reset)
 Run motors backward regulated and reset counters.
 
void OnFwdSync (byte outputs, char pwr, char turnpct)
 Run motors forward synchronised.
 
void OnFwdSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
 Run motors forward synchronised and reset counters.
 
void OnRevSync (byte outputs, char pwr, char turnpct)
 Run motors backward synchronised.
 
void OnRevSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
 Run motors backward synchronised and reset counters.
 
void RotateMotor (byte outputs, char pwr, long angle)
 Rotate motor.
 
void RotateMotorPID (byte outputs, char pwr, long angle, byte p, byte i, byte d)
 Rotate motor with PID factors.
 
void RotateMotorEx (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop)
 Rotate motor Ex.
 
void RotateMotorExPID (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop, byte p, byte i, byte d)
 Rotate motor Ex with PID factors.
 
void ResetTachoCount (byte outputs)
 Reset tachometer counter.
 
void ResetBlockTachoCount (byte outputs)
 Reset block-relative counter.
 
void ResetRotationCount (byte outputs)
 Reset program-relative counter.
 
void ResetAllTachoCounts (byte outputs)
 Reset all tachometer counters.
 
void SetOutput (byte outputs, byte field1, variant val1,..., byte fieldN, variant valN)
 Set output fields.
 
variant GetOutput (byte output, const byte field)
 Get output field value.
 
byte MotorMode (byte output)
 Get motor mode.
 
char MotorPower (byte output)
 Get motor power level.
 
char MotorActualSpeed (byte output)
 Get motor actual speed.
 
long MotorTachoCount (byte output)
 Get motor tachometer counter.
 
long MotorTachoLimit (byte output)
 Get motor tachometer limit.
 
byte MotorRunState (byte output)
 Get motor run state.
 
char MotorTurnRatio (byte output)
 Get motor turn ratio.
 
byte MotorRegulation (byte output)
 Get motor regulation mode.
 
bool MotorOverload (byte output)
 Get motor overload status.
 
byte MotorRegPValue (byte output)
 Get motor P value.
 
byte MotorRegIValue (byte output)
 Get motor I value.
 
byte MotorRegDValue (byte output)
 Get motor D value.
 
long MotorBlockTachoCount (byte output)
 Get motor block-relative counter.
 
long MotorRotationCount (byte output)
 Get motor program-relative counter.
 
byte MotorOutputOptions (byte output)
 Get motor options.
 
byte MotorMaxSpeed (byte output)
 Get motor max speed.
 
byte MotorMaxAcceleration (byte output)
 Get motor max acceleration.
 
byte MotorPwnFreq ()
 Get motor regulation frequency.
 
byte MotorRegulationTime ()
 Get motor regulation time.
 
byte MotorRegulationOptions ()
 Get motor regulation options.
 
void PosRegEnable (byte output, byte p=PID_3, byte i=PID_1, byte d=PID_1)
 Enable absolute position regulation with PID factors.
 
void PosRegSetAngle (byte output, long angle)
 Change the current value for set angle.
 
void PosRegAddAngle (byte output, long angle_add)
 Add to the current value for set angle.
 
void PosRegSetMax (byte output, byte max_speed, byte max_acceleration)
 Set maximum limits.
 

Detailed Description

Functions for accessing and modifying output module features.