aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source/d_output.h
diff options
context:
space:
mode:
authorNicolas Schodet2011-01-29 00:54:42 +0100
committerNicolas Schodet2011-01-29 21:30:28 +0100
commit2e902f85f4ec36837e293dab5505c68816422844 (patch)
tree650028c5f6c743db9ca21fb60b749f7736394ef0 /AT91SAM7S256/Source/d_output.h
parent97d5163de1aaa4f053cc2c29642a9ef41167d66c (diff)
add option to disable saturation in regulation intermediary values
When computing PID, the output code limit the value of P and I participation. This is a problem as this introduces non-linearities and limits the efficiency of P and I terms.
Diffstat (limited to 'AT91SAM7S256/Source/d_output.h')
-rw-r--r--AT91SAM7S256/Source/d_output.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/AT91SAM7S256/Source/d_output.h b/AT91SAM7S256/Source/d_output.h
index 8ad656b..ca81ecf 100644
--- a/AT91SAM7S256/Source/d_output.h
+++ b/AT91SAM7S256/Source/d_output.h
@@ -54,6 +54,9 @@
#define MOTOR_RUN_STATE_RAMPDOWN 0x40
#define MOTOR_RUN_STATE_HOLD 0x60
+// Constants related to Regulation Options
+#define REGOPTION_NO_SATURATION 0x01 // Do not limit intermediary regulation results
+
enum
{
@@ -77,6 +80,7 @@ void dOutputResetBlockTachoLimit(UBYTE MotorNr);
void dOutputResetRotationCaptureCount(UBYTE MotorNr);
void dOutputSetPIDParameters(UBYTE MotorNr, UBYTE NewRegPParameter, UBYTE NewRegIParameter, UBYTE NewRegDParameter);
void dOutputSetRegulationTime(UBYTE NewRegulationTime);
+void dOutputSetRegulationOptions(UBYTE NewRegulationOptions);
void dOutputRegulateMotor(UBYTE MotorNr);
void dOutputCalculateRampUpParameter(UBYTE MotorNr, ULONG NewTachoLimit);