From fc1e658f15bbb8d4497d189e79b43fab4b964839 Mon Sep 17 00:00:00 2001 From: John Hansen Date: Sun, 13 Mar 2011 23:36:50 +0000 Subject: Added position regulation mode (Nicolas Schodet) git-svn-id: https://mindboards.svn.sourceforge.net/svnroot/mindboards/lms_nbcnxc/branches/version_131@37 c9361245-7fe8-9947-84e8-057757c4e366 --- AT91SAM7S256/Source/c_output.iom | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'AT91SAM7S256/Source/c_output.iom') diff --git a/AT91SAM7S256/Source/c_output.iom b/AT91SAM7S256/Source/c_output.iom index f6191bf..989a0c4 100644 --- a/AT91SAM7S256/Source/c_output.iom +++ b/AT91SAM7S256/Source/c_output.iom @@ -52,9 +52,10 @@ enum // Constant related to RegMode enum { - REGULATION_MODE_IDLE, - REGULATION_MODE_MOTOR_SPEED, - REGULATION_MODE_MOTOR_SYNC + REGULATION_MODE_IDLE = 0, + REGULATION_MODE_MOTOR_SPEED = 1, + REGULATION_MODE_MOTOR_SYNC = 2, + REGULATION_MODE_MOTOR_POS = 4, }; typedef struct @@ -76,15 +77,16 @@ typedef struct UBYTE Overloaded; /* R - True if the motor has been overloaded within speed control regulation */ SBYTE SyncTurnParameter; /* RW - Holds the turning parameter need within MoveBlock */ UBYTE Options; - UBYTE SpareTwo; - UBYTE SpareThree; + SBYTE MaxSpeed; /* RW - Maximum speed for absolute regulation, or 0 for no limit */ + SBYTE MaxAcceleration; /* RW - Maximum acceleration for absolute regulation, or 0 for no limit */ }OUTPUT; typedef struct { OUTPUT Outputs[NO_OF_OUTPUTS]; - UBYTE PwnFreq; // use for frequency of checking regulation mode + UBYTE RegulationTime; /* RW - Interval between regulation computations */ + UBYTE RegulationOptions; /* RW - Options for regulation, see REGOPTION_* */ }IOMAPOUTPUT; -- cgit v1.2.3