kopia lustrzana https://github.com/evil-mad/EggBot
Version 3.0.1_222: Added new Value parameter values to SP command, allowing pen to be raised immediately. Updated ebb.html with new information.
rodzic
9f0a43e869
commit
6dc0aa5e22
EBB_firmware/app.X
dist/EBBv13_with_bootloader/production
nbproject
docs
Plik diff jest za duży
Load Diff
Plik binarny nie jest wyświetlany.
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -40,6 +40,7 @@
|
|||
<word>Fosc</word>
|
||||
<word>init</word>
|
||||
<word>microstep</word>
|
||||
<word>ms</word>
|
||||
<word>paramters</word>
|
||||
<word>Prescale</word>
|
||||
<word>refactor</word>
|
||||
|
|
|
@ -292,22 +292,24 @@ void RCServo2_S2_command (void)
|
|||
return;
|
||||
}
|
||||
|
||||
RCServo2_Move(Duration, Pin, Rate, Delay);
|
||||
RCServo2_Move(Duration, Pin, Rate, Delay, TRUE);
|
||||
|
||||
print_line_ending(kLE_OK_NORM);
|
||||
}
|
||||
|
||||
// Function to set up an RC Servo move. Takes Duration, RPn, and Rate
|
||||
// and adds them to the motion control fifo.
|
||||
// and adds them to the motion control FIFO.
|
||||
// <Position> is the new target position for the servo, in 83uS units. So
|
||||
// 32,000 is 3ms. To turn off a servo output, use 0 for Duration.
|
||||
// 32,000 is 3 ms. To turn off a servo output, use 0 for Duration.
|
||||
// <RPn> is the PPS RP# number for the pin that you want to use as the output
|
||||
// (See schematic for a list of each RPn number for each GPIO pin.)
|
||||
// <Rate> is how quickly to move to the new position. Use 0 for instant change.
|
||||
// Unit is 83uS of pulse width change every 24ms of time.
|
||||
// <Delay> is how many milliseconds after this command is excuted before the
|
||||
// Unit is 83uS of pulse width change every 24 ms of time.
|
||||
// <Delay> is how many milliseconds after this command is executed before the
|
||||
// next command in the motion control FIFO is executed. 0 will run the next
|
||||
// command immediatly.
|
||||
// command immediately.
|
||||
// <AddToFIFO> Set to TRUE to add move to FIFO or FALSE to have move take effect
|
||||
// immediately. If FALSE, <Delay> is ignored.
|
||||
// This function will allocate a new channel for RPn if the pin is not already
|
||||
// assigned to a channel. It will return the channel number used when it
|
||||
// returns. If you send in 0 for Duration, the channel for RPn will be de-
|
||||
|
@ -319,8 +321,8 @@ UINT8 RCServo2_Move(
|
|||
UINT16 Position,
|
||||
UINT8 RPn,
|
||||
UINT16 Rate,
|
||||
UINT16 Delay
|
||||
)
|
||||
UINT16 Delay,
|
||||
BOOL AddToFIFO)
|
||||
{
|
||||
UINT8 i;
|
||||
UINT8 Channel;
|
||||
|
@ -371,46 +373,105 @@ UINT8 RCServo2_Move(
|
|||
SetPinLATFromRPn(RPn, 0);
|
||||
}
|
||||
|
||||
// Wait until we have a free spot in the FIFO, and add our new
|
||||
// command in
|
||||
while(gFIFOLength >= gCurrentFIFOLength)
|
||||
;
|
||||
|
||||
// If the pin we're controlling is B1 (the normal servo output) then
|
||||
// always make sure to turn power on and start the countdown timer
|
||||
// for that servo port. (issue #144)
|
||||
if (RPn == 4u)
|
||||
if (AddToFIFO == TRUE)
|
||||
{
|
||||
RCServoPowerIO = RCSERVO_POWER_ON;
|
||||
gRCServoPoweroffCounterMS = gRCServoPoweroffCounterReloadMS;
|
||||
// Wait until we have a free spot in the FIFO, and add our new
|
||||
// command in
|
||||
while(gFIFOLength >= gCurrentFIFOLength)
|
||||
;
|
||||
|
||||
// If the pin we're controlling is B1 (the normal servo output) then
|
||||
// always make sure to turn power on and start the countdown timer
|
||||
// for that servo port. (issue #144)
|
||||
if (RPn == 4u)
|
||||
{
|
||||
RCServoPowerIO = RCSERVO_POWER_ON;
|
||||
gRCServoPoweroffCounterMS = gRCServoPoweroffCounterReloadMS;
|
||||
}
|
||||
|
||||
if (!bittst(TestMode, TEST_MODE_DEBUG_BLOCK_FIFO_NUM))
|
||||
{
|
||||
// Now copy the values over into the FIFO element
|
||||
FIFOPtr[gFIFOIn].Command = COMMAND_SERVO_MOVE;
|
||||
FIFOPtr[gFIFOIn].m.sm.DelayCounter = HIGH_ISR_TICKS_PER_MS * (UINT32)Delay;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoChannel = Channel;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoRPn = RPn;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoPosition = Position;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoRate = Rate;
|
||||
|
||||
// Check that DelayCounter doesn't have a crazy high value (this was
|
||||
// being done in the ISR, now moved here for speed)
|
||||
if (FIFOPtr[gFIFOIn].m.sm.DelayCounter > HIGH_ISR_TICKS_PER_MS * (UINT32)0x10000)
|
||||
{
|
||||
// Ideally we would throw an error to the user here, but since we're in
|
||||
// the helper function that's not so easy. So we just set the delay time
|
||||
// to zero and hope they notice that their delays aren't doing anything.
|
||||
FIFOPtr[gFIFOIn].m.sm.DelayCounter = 0;
|
||||
}
|
||||
|
||||
gFIFOIn++;
|
||||
if (gFIFOIn >= gCurrentFIFOLength)
|
||||
{
|
||||
gFIFOIn = 0;
|
||||
}
|
||||
gFIFOLength++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bittst(TestMode, TEST_MODE_DEBUG_BLOCK_FIFO_NUM))
|
||||
else
|
||||
{
|
||||
// Now copy the values over into the FIFO element
|
||||
FIFOPtr[gFIFOIn].Command = COMMAND_SERVO_MOVE;
|
||||
FIFOPtr[gFIFOIn].m.sm.DelayCounter = HIGH_ISR_TICKS_PER_MS * (UINT32)Delay;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoChannel = Channel;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoRPn = RPn;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoPosition = Position;
|
||||
FIFOPtr[gFIFOIn].m.sm.ServoRate = Rate;
|
||||
// We need to 'do all the stuff' that the ISR does to cause the servo
|
||||
// move to begin, right here and now.
|
||||
|
||||
// Check that DelayCounter doesn't have a crazy high value (this was
|
||||
// being done in the ISR, now moved here for speed)
|
||||
if (FIFOPtr[gFIFOIn].m.sm.DelayCounter > HIGH_ISR_TICKS_PER_MS * (UINT32)0x10000)
|
||||
// Check to see if we should change the state of the pen
|
||||
if (bittstzero(gUseRCPenServo))
|
||||
{
|
||||
// Ideally we would throw an error to the user here, but since we're in
|
||||
// the helper function that's not so easy. So we just set the delay time
|
||||
// to zero and hope they notice that their delays aren't doing anything.
|
||||
FIFOPtr[gFIFOIn].m.sm.DelayCounter = 0;
|
||||
}
|
||||
// If the pin we're controlling is B1 (the normal servo output) then
|
||||
// always make sure to turn power on and start the countdown timer
|
||||
// for that servo port. (issue #144)
|
||||
if (RPn == 4u)
|
||||
{
|
||||
RCServoPowerIO = RCSERVO_POWER_ON;
|
||||
gRCServoPoweroffCounterMS = gRCServoPoweroffCounterReloadMS;
|
||||
}
|
||||
|
||||
gFIFOIn++;
|
||||
if (gFIFOIn >= gCurrentFIFOLength)
|
||||
{
|
||||
gFIFOIn = 0;
|
||||
// If the user is trying to turn off this channel's RC servo output
|
||||
if (0u == Position)
|
||||
{
|
||||
// Turn off the PPS routing to the pin
|
||||
*(gRC2RPORPtr + gRC2RPn[Channel - 1]) = 0;
|
||||
// Clear everything else out for this channel
|
||||
gRC2Rate[Channel - 1] = 0;
|
||||
gRC2Target[Channel - 1] = 0;
|
||||
gRC2RPn[Channel - 1] = 0;
|
||||
gRC2Value[Channel - 1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, set all of the values that start this RC servo moving
|
||||
gRC2Rate[Channel - 1] = Rate;
|
||||
gRC2Target[Channel - 1] = Position;
|
||||
gRC2RPn[Channel - 1] = RPn;
|
||||
if (gRC2Value[Channel - 1] == 0u)
|
||||
{
|
||||
gRC2Value[Channel - 1] = Position;
|
||||
}
|
||||
}
|
||||
|
||||
// If this servo is the pen servo (on g_servo2_RPn)
|
||||
if (RPn == g_servo2_RPn)
|
||||
{
|
||||
// For non-FIFO moves, we ONLY allow moving to g_servo2_min (i.e. up)
|
||||
// and never down. In the ISR version of this code, we check to see
|
||||
// what our destination position is to decide to record going up
|
||||
// or down. Here we just need to record going up.
|
||||
PenState = PEN_UP;
|
||||
SolenoidState = SOLENOID_OFF;
|
||||
if (gUseSolenoid)
|
||||
{
|
||||
PenUpDownIO = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
gFIFOLength++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#define RCSERVO2_H
|
||||
#include "GenericTypeDefs.h"
|
||||
#include "Compiler.h"
|
||||
#include "ebb.h"
|
||||
|
||||
#define MAX_RC2_SERVOS 8u // While there are 24 RPn pins, we never need more than 8 servos at once
|
||||
#define INITAL_RC2_SLOTS 8u // Initial number of RC2 slots (determines repeat rate of pulses)
|
||||
|
@ -72,9 +73,12 @@ extern UINT16 gRC2Value[MAX_RC2_SERVOS];
|
|||
extern UINT8 gRC2RPn[MAX_RC2_SERVOS];
|
||||
extern UINT16 gRC2Target[MAX_RC2_SERVOS];
|
||||
extern UINT16 gRC2Rate[MAX_RC2_SERVOS];
|
||||
extern near UINT8 gUseRCPenServo;
|
||||
extern PenStateType PenState;
|
||||
extern SolenoidStateType SolenoidState;
|
||||
|
||||
void RCServo2_Init(void);
|
||||
void RCServo2_S2_command(void);
|
||||
UINT8 RCServo2_Move(UINT16 Position, UINT8 RPn, UINT16 Rate, UINT16 Delay);
|
||||
UINT8 RCServo2_Move(UINT16 Position, UINT8 RPn, UINT16 Rate, UINT16 Delay, BOOL AddToFIFO);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -151,7 +151,7 @@ volatile UINT16 g_StepperDisableTimeoutS; // Seconds of no motion before m
|
|||
volatile UINT16 g_StepperDisableSecondCounter; // Counts milliseconds up to 1 s for stepper disable timeout
|
||||
volatile UINT16 g_StepperDisableCountdownS; // After motion is done, counts down in seconds from g_StepperDisableTimeoutS to zero
|
||||
|
||||
const rom char st_version[] = {"EBBv13_and_above EB Firmware Version 3.0.1_221"};
|
||||
const rom char st_version[] = {"EBBv13_and_above EB Firmware Version 3.0.1_222"};
|
||||
|
||||
#pragma udata ISR_buf = 0x100
|
||||
volatile unsigned int ISR_A_FIFO[16]; // Stores the most recent analog conversions
|
||||
|
|
|
@ -302,14 +302,6 @@
|
|||
// in the SL and QL commands.
|
||||
#define SL_STORAGE_SIZE 32u
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SOLENOID_OFF = 0,
|
||||
SOLENOID_ON,
|
||||
SOLENOID_PWM
|
||||
} SolenoidStateType;
|
||||
|
||||
|
||||
// This is the FIFO that stores the motion commands. It spans multiple RAM
|
||||
// banks from 0x600 through 0xDFF (length 0x800 or 2048d), and must only be
|
||||
// accessed via pointer.
|
||||
|
@ -333,7 +325,7 @@ static near UINT8 AxisActive[NUMBER_OF_STEPPERS]; // LSb set if an axis is n
|
|||
|
||||
near DriverConfigurationType DriverConfiguration;
|
||||
// LSb set to enable RC Servo output for pen up/down
|
||||
static near UINT8 gUseRCPenServo;
|
||||
near UINT8 gUseRCPenServo;
|
||||
// LSb set to enable red LED lit when FIFO is empty
|
||||
volatile near UINT8 gRedLEDEmptyFIFO;
|
||||
// LSb set when user presses the PRG or alternate PRG button
|
||||
|
@ -405,11 +397,11 @@ static UINT8 nib;
|
|||
MoveCommandType CurrentCommand;
|
||||
|
||||
unsigned int DemoModeActive;
|
||||
static SolenoidStateType SolenoidState;
|
||||
SolenoidStateType SolenoidState;
|
||||
static unsigned int SolenoidDelay;
|
||||
|
||||
// track the latest state of the pen
|
||||
static PenStateType PenState;
|
||||
PenStateType PenState;
|
||||
|
||||
static unsigned long NodeCount;
|
||||
unsigned char QC_ms_timer;
|
||||
|
@ -1812,7 +1804,7 @@ void parse_SC_packet (void)
|
|||
gUseSolenoid = TRUE;
|
||||
bitclrzero(gUseRCPenServo);
|
||||
// Turn off RC signal on Pen Servo output
|
||||
RCServo2_Move(0, g_servo2_RPn, 0, 0);
|
||||
RCServo2_Move(0, g_servo2_RPn, 0, 0, FALSE);
|
||||
}
|
||||
// Use just RC servo
|
||||
else if (Para2 == 1u)
|
||||
|
@ -3800,10 +3792,15 @@ void parse_TP_packet(void)
|
|||
|
||||
// Set Pen
|
||||
// Usage: SP,<State>,<Duration>,<PortB_Pin><CR>
|
||||
// <State> is 0 (for goto servo_max) or 1 (for goto servo_min)
|
||||
// <State> is
|
||||
// 0 : goto servo_max using a command put into FIFO (servo pen down)
|
||||
// 1 : goto servo_min using a command put into FIFO (servo pen up)
|
||||
// 2 : goto servo_min but skip the FIFO and just force a move immediately
|
||||
// 3 : goto servo_min, skip the FIFO, and also set servo_max to servo_min
|
||||
// (this prevents any remaining servo moves in the FIFO from having any effect)
|
||||
// <Duration> is how long to wait before the next command in the motion control
|
||||
// FIFO should start. (defaults to 0mS)
|
||||
// Note that the units of this parameter is either 1ms
|
||||
// Note that the units of this parameter is in units of milliseconds
|
||||
// <PortB_Pin> Is a value from 0 to 7 and allows you to re-assign the Pen
|
||||
// RC Servo output to different PortB pins.
|
||||
// This is a command that the user can send from the PC to set the pen state.
|
||||
|
@ -3845,9 +3842,9 @@ void parse_SP_packet(void)
|
|||
Pin = DEFAULT_EBB_SERVO_PORTB_PIN;
|
||||
}
|
||||
|
||||
if (State > 1u)
|
||||
if (State > 3u)
|
||||
{
|
||||
State = 1;
|
||||
State = 3;
|
||||
}
|
||||
|
||||
// Set the PRn of the Pen Servo output
|
||||
|
@ -3856,7 +3853,7 @@ void parse_SP_packet(void)
|
|||
{
|
||||
// if we are changing which pin the pen servo is on, we need to cancel
|
||||
// the servo output on the old channel first
|
||||
RCServo2_Move(0, g_servo2_RPn, 0, 0);
|
||||
RCServo2_Move(0, g_servo2_RPn, 0, 0, FALSE);
|
||||
// Now record the new RPn
|
||||
g_servo2_RPn = Pin + 3;
|
||||
}
|
||||
|
@ -3869,34 +3866,77 @@ void parse_SP_packet(void)
|
|||
|
||||
// Internal use function -
|
||||
// Perform a state change on the pen RC servo output. Move it up or move it down
|
||||
// <NewState> is either PEN_UP or PEN_DOWN.
|
||||
// <NewState> is
|
||||
// PEN_DOWN : Add move to FIFO to start servo towards servo_max
|
||||
// PEN_UP : Add move to FIFO to start servo towards servo_min
|
||||
// PEN_UP_IMMEDIATE : Start servo moving towards servo_min, not on FIFO
|
||||
// PEN_UP_IMMEDIATE_CLEAR : Start servo moving towards servo_min, not on FIFO, and set servo_max = servo_min
|
||||
// <CommandDuration> is the number of milliseconds to wait before executing the
|
||||
// next command in the motion control FIFO
|
||||
// next command in the motion control FIFO. Only applies if <NewState> is 0 or 1.
|
||||
//
|
||||
// This function uses the g_servo2_min, max, rate_up, rate_down variables
|
||||
// This function uses the g_servo2_min (servo_min), g_servo2_max (servo_max), rate_up, rate_down variables
|
||||
// to schedule an RC Servo change with the RCServo2_Move() function.
|
||||
//
|
||||
void process_SP(PenStateType NewState, UINT16 CommandDuration)
|
||||
{
|
||||
UINT16 Position;
|
||||
UINT16 Rate;
|
||||
BOOL UseFIFO;
|
||||
UINT8 i;
|
||||
|
||||
if (NewState == PEN_UP)
|
||||
{
|
||||
Position = g_servo2_min;
|
||||
Rate = g_servo2_rate_up;
|
||||
UseFIFO = TRUE;
|
||||
}
|
||||
else if (NewState == PEN_UP_IMMEDIATE)
|
||||
{
|
||||
Position = g_servo2_min;
|
||||
Rate = g_servo2_rate_up;
|
||||
UseFIFO = FALSE;
|
||||
}
|
||||
else if (NewState == PEN_UP_IMMEDIATE_CLEAR)
|
||||
{
|
||||
Position = g_servo2_min;
|
||||
Rate = g_servo2_rate_up;
|
||||
UseFIFO = FALSE;
|
||||
g_servo2_max = g_servo2_min;
|
||||
|
||||
// Need to turn off high priority interrupts briefly here. We need to stop
|
||||
// any changes to the FIFO, then walk through every command currently
|
||||
// in the FIFO. If that command is a servo move, we have to re-write it's
|
||||
// position target to be g_servo2_min (all the way up). This will then
|
||||
// prevent any remaining servo moves in the FIFO from moving the pen down.
|
||||
INTCONbits.GIEH = 0; // Turn high priority interrupts off
|
||||
|
||||
for (i=0; i < COMMAND_FIFO_MAX_LENGTH; i++)
|
||||
{
|
||||
if (FIFOPtr[i].Command == COMMAND_SERVO_MOVE)
|
||||
{
|
||||
// Check to make sure we only modify moves of the pen servo output
|
||||
if (FIFOPtr[i].m.sm.ServoRPn == g_servo2_RPn)
|
||||
{
|
||||
FIFOPtr[i].m.sm.ServoPosition = g_servo2_min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Re-enable interrupts
|
||||
INTCONbits.GIEH = 1; // Turn high priority interrupts on
|
||||
}
|
||||
else
|
||||
{
|
||||
Position = g_servo2_max;
|
||||
Rate = g_servo2_rate_down;
|
||||
UseFIFO = TRUE;
|
||||
}
|
||||
|
||||
RCServoPowerIO = RCSERVO_POWER_ON;
|
||||
gRCServoPoweroffCounterMS = gRCServoPoweroffCounterReloadMS;
|
||||
|
||||
// Now schedule the movement with the RCServo2 function
|
||||
RCServo2_Move(Position, g_servo2_RPn, Rate, CommandDuration);
|
||||
RCServo2_Move(Position, g_servo2_RPn, Rate, CommandDuration, UseFIFO);
|
||||
}
|
||||
|
||||
// Enable Motor
|
||||
|
|
|
@ -105,10 +105,20 @@
|
|||
|
||||
typedef enum
|
||||
{
|
||||
PEN_DOWN = 0,
|
||||
PEN_UP
|
||||
PEN_DOWN = 0,
|
||||
PEN_UP = 1,
|
||||
PEN_UP_IMMEDIATE = 2,
|
||||
PEN_UP_IMMEDIATE_CLEAR = 3
|
||||
} PenStateType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SOLENOID_OFF = 0,
|
||||
SOLENOID_ON,
|
||||
SOLENOID_PWM
|
||||
} SolenoidStateType;
|
||||
|
||||
|
||||
// Defines for the CommandType BYTE in the MoveCommandType
|
||||
// Note that three USB commands (SM, XM HM) are
|
||||
// all the same and represented by one command value.
|
||||
|
|
|
@ -2350,6 +2350,8 @@
|
|||
<code>SC,5,<i>Servo_Max</i></code> Set the maximum value for the RC servo output position. <i>Servo_Max</i> may be in the range 1 to 65535, in units of 83.3 ns intervals. This sets the "Pen Down" position.
|
||||
<br />
|
||||
Default: 16000 (1.33 ms) on reset.
|
||||
<br />
|
||||
If the <code>SP,3</code> command is sent to the EBB, this <i>Servo_Max</i> value will be set equal to the <i>Servo_Min</i> value.
|
||||
</li>
|
||||
<li>
|
||||
<code>SC,8,<i>Maximum_S2_Channels</i></code> Sets the number of RC servo PWM channels, each of <i>S2_Channel_Duration_MS</i> before cycling back to channel 1 for S2 command. Values from 1 to 8 are valid for <i>Maximum_S2_Channels</i>.
|
||||
|
@ -2530,11 +2532,11 @@
|
|||
<li><span style="font-weight: bold;">Response (future mode):</span> <code>SP<NL></code></li>
|
||||
<li><span style="font-weight: bold;">Response (legacy mode; default):</span> <code>OK<CR><NL></code></li>
|
||||
<li><span style="font-weight: bold;">Firmware versions:</span> All (with changes)</li>
|
||||
<li><span style="font-weight: bold;">Execution:</span> Added to FIFO motion queue</li>
|
||||
<li><span style="font-weight: bold;">Execution:</span> Added to FIFO motion queue for some parameter values, not added to FIFO motion queue for others</li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Arguments:</span>
|
||||
<ul>
|
||||
<li><i>Value</i> is either 0 or 1, indicating to raise or lower the pen.</li>
|
||||
<li><i>Value</i> is either 0, 1, 2 or 3.</li>
|
||||
<li><i>Duration</i> (optional) is an integer from 1 to 65535, which gives a delay in milliseconds.</li>
|
||||
<li><i>PortB_Pin</i> (optional) is an integer from 0 through 7.</li>
|
||||
</ul>
|
||||
|
@ -2543,11 +2545,13 @@
|
|||
<span style="font-weight: bold;">Description:</span>
|
||||
<p>This command instructs the pen to go up or down.</p>
|
||||
<ul>
|
||||
<li>When a <i>Value</i> of 1 is used, the servo will be moved to the <i>Servo_Min</i> value (as set by the "SC,4" command).</li>
|
||||
<li>When a <i>Value</i> of 0 is used, the servo will be moved to the <i>Servo_Max</i> value (as set by the "SC,5" command below).</li>
|
||||
<li>When a <i>Value</i> of 0 is used, a servo move will be added to the FIFO motion queue which will move the servo to the <i>Servo_Max</i> position (as set by the <code>SC,5</code> command below, which is normally the pen-down position).</li>
|
||||
<li>When a <i>Value</i> of 1 is used, a servo move will be added to the FIFO motion queue which will move the servo to the <i>Servo_Min</i> position (as set by the <code>SC,4</code> command below, which is normally the pen-up position).</li>
|
||||
<li>When a <i>Value</i> of 2 is used, the servo will be immediately start a move to the <i>Servo_Min</i> position (as set by the <code>SC,4</code> command), bypassing the FIFO motion queue. The <i>Duration</i> parameter is ignored if present.</li>
|
||||
<li>When a <i>Value</i> of 3 is used, the servo will be immediately start a move to the <i>Servo_Min</i> position (as set by the <code>SC,4</code> command), bypassing the FIFO motion queue. The value of <i>Servo_Max</i> will also be set equal to <i>Servo_Min</i>, and any servo commands currently in the FIFO motion queue will have their target positions set to <i>Servo_Min</i>. This not only immediately begins lifting the pen off the paper, but it also prevents any queued servo moves from lowering the pen back down onto the paper. The <i>Duration</i> parameter is ignored if present.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that conventionally, we have used the <i>Servo_Min</i> ("SC,4") value as the 'Pen up position', and the <i>Servo_Max</i> ("SC,5") value as the 'Pen down position'.
|
||||
Note that conventionally, we have used the <i>Servo_Min</i> (<code>SC,4</code>) value as the 'Pen up position', and the <i>Servo_Max</i> (<code>SC,5</code>) value as the 'Pen down position'.
|
||||
</p>
|
||||
<p>
|
||||
The <i>Duration</i> argument is in milliseconds. It represents the total length of time between when the pen move is started, and when the next command will be executed. Note that this is not related to how fast the pen moves, which is set with the <code><a href="#SC">SC</a></code> command. Rather, it is an intentional delay of a given <i>Duration</i>, to force the EBB not to execute the next command (often an <code><a href="#SM">SM</a></code>) for some length of time, which allows the pen move to complete and possibly some extra settling time before moving the other motors.
|
||||
|
@ -2568,7 +2572,10 @@
|
|||
<code>SP,1<CR></code> Move pen-lift servo motor to <i>servo_min</i> position.
|
||||
</li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Version History:</span> Unchanged since firmware 2.2.4
|
||||
<span style="font-weight: bold;">Version History:</span> Added in firmware 2.2.4
|
||||
</li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Version History:</span> <i>Value</i> parameter values of 2 and 3 added in version 3.0.1.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue