aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source/d_output.h
diff options
context:
space:
mode:
authorNicolas Schodet2011-01-29 00:54:42 +0100
committerNicolas Schodet2011-02-09 00:55:55 +0100
commit9ac9938748901f8f6f6f73fa751349cdcc1dcd27 (patch)
tree6b198f534018d2f2ecb7fe1887b942c5a49ac7ca /AT91SAM7S256/Source/d_output.h
parentf3318727e0dc26e08157e9dd4e22ccbe29edc851 (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 1c24db0..41b1cfc 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);