Skip to content

Commit

Permalink
V RF.01.21 (2016-05-18)
Browse files Browse the repository at this point in the history
- The last column and row of the heat bed/work part scan did not find their way into the heat bed/work part compensation matrix.
  - Improved rounding of the x/y positions within the first row/column of the compensation matrix.
- In case both extruders were heated up before the heat bed scan, only the first extruder was turned off at the end of the scan.
- Adding of support for M3117.
  - This command can be used in order to set a status text which is not overwritten by M117.
  - M3117 makes M3110 obsolete, thus M3110 is not supported anymore.
- In case the Z-compensation is active, "Cmp" is displayed at the status display right to the current z-value.
- Adding of support for an alternative mode for the displayed z-value.
  - In operating mode "print", the menu entry "Configuration" - "General" - "Z Scale" can be used in order to determine whether the displayed z-value shall be counted from z-min or from the surface of the heat bed.
  - In operating mode "mill", the menu entry "Configuration" - "General" - "Z Scale" can be used in order to determine whether the displayed z-value shall be counted from the determined z-origin or from the surface of the work part.
- In case an error or a warning is detected by the firmware, an according error/warning information can be displayed directly at the display.
  - The status information is displayed until it is acknowledged via a button (or until it is overwritten by a following status information).
  - An eventually ongoing print/mill operation is not interrupted/delayed through a displayed status information.
  - Additional information can be provided via the log of the connected PC application (Repetier-Host).
- In case FEATURE_EMERGENCY_Z_STOP is active, the strain gauge values are not examined anymore while the print/mill operation is paused.
  - During this pause, someone might want to clean the extruder or to exchange the used tool of the miller. Such operations can bring high forces onto the strain gauge, in which case an emergency z block was possible.
- In case the z-origin at the beginning of a mill operation was not searched at the x/y start position of the work part scan, the determined z offset could be wrong.
- In case the firmware processes a long-lasting operation, it can notify an attached PC application via "busy:" packets. As a result, the PC application knows that the firmware is still alive and can avoid unnecessary timeouts.
- Adding of support for multiple (up to 9) heat bed z-compensation matrices.
  - Possible use cases are different heat bed z-compensation matrices for different beds and/or different heat bed z-compensation matrices for different filaments/temperatures.
  - The active heat bed z-compensation matrix can be chosen via M3009.
- Adding of support for a more precise heat bed scan.
  - This more precise mode waits longer after heating up of the heating bed and extruders and it determines the static offset in z-direction which is caused by the changing length of the extruder at the printing temperature.
  - The menu entries "Configuration" - "Z Calibration" - "Scan PLA/ABS" perform the scan with predefined temperature profiles for PLA/ABS.
  - M3010 can be called with the S1 (PLA) or S2 (ABS) parameters now in order to start the scan with predefined temperature profiles for PLA/ABS.
- The G-codes M3030, M3031, M3032, M3033, M3040, M3041, M3042, M3050, M3051, M3052, M3053, M3054 and M3055 are available also in operating mode "mill" now.
- G0/G1 commands are allowed to overdrive Z-min now.
  - The overdrive is limited through Z_OVERRIDE_MAX and allows G0/G1 to decrease the height of the first layer even in case Z-min is active already.
  - An example use case can appear in case the calibration line is printed with a bigger height (e.g. 0.35 mm) than the first layer (e.g. 0.1 mm) - in such a scenario, the active z-compensation could drive the heat bed upwards so that Z-min is active already.
- The mode of the movement via the "Position X/Y/Z" menus can be configured now.
  - Within these menus, the right menu button can be pressed in order to switch the mode between "Single Steps", "Single Move", "1 mm", "10 mm" and "50 mm".
  - The mode which is chosen within the "Position Z" menu is applied also to the "Heat Bed up" and "Heat Bed down" hardware buttons.
- The speed of the PWM for the fans has been changed from ~15 to ~122 Hz.
- The maximal length in x direction has been changed to 230 mm for the milling mode.
- M3006 and M3146 support the Z parameter now which allows to configure the static z-offset in [mm].
- M3007 and M3008 support the Z parameter now which allows to configure the z-compensation scope in [mm].
- The codepage of all .cpp and .h files has been changed so that also characters like ° and µ can be used without warnings from the Arduino IDE.
- Improved description of all RF-specific M-codes within RF.h.
- M3013 P1 and M3153 P1 can be used now in order to output the z-offsets from the current z-compensation matrix in [mm] (instead of the default unit [steps]).
- The firmware has sent "Start" via USB instead of "start" after its startup, which could cause problems with applications like OctoPrint.
- Single moves into z-direction via the hardware buttons could continue although the button was released already.
- Minor clean-ups.
  • Loading branch information
RF1000 committed May 18, 2016
1 parent d4b598d commit 8cca515
Show file tree
Hide file tree
Showing 74 changed files with 14,331 additions and 7,153 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@ Based on Repetier-Firmware - the fast and user friendly firmware.

The firmware is compiled and downloaded with Arduino V 1.6.5.

## Version RF.01.19 (2016-04-04)
## Version RF.01.21 (2016-05-18)

* This is the development branch on base of the RF.01.10 stable release.

Expand Down
100 changes: 58 additions & 42 deletions RF1000/Repetier/Commands.cpp
@@ -1,4 +1,4 @@
/*
/*
This file is part of the Repetier-Firmware for RF devices from Conrad Electronic SE.
Repetier-Firmware is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -33,38 +33,37 @@ void Commands::commandLoop()
#ifdef DEBUG_PRINT
debugWaitLoop = 1;
#endif

GCode::readFromSerial();
GCode::readFromSerial();
GCode *code = GCode::peekCurrentCommand();
UI_MEDIUM; // do check encoder
UI_MEDIUM; // do check encoder

if(code)
{
{
#if DEBUG_COMMAND_PEEK
Com::printFLN( PSTR( "commandLoop(): peek" ) );
#endif // DEBUG_COMMAND_PEEK

#if SDSUPPORT
if(sd.savetosd)
{
if(!(code->hasM() && code->M == 29)) // still writing to file
{
sd.writeCommand(code);
}
else
{
sd.finishWrite();
}
if(sd.savetosd)
{
if(!(code->hasM() && code->M == 29)) // still writing to file
{
sd.writeCommand(code);
}
else
{
sd.finishWrite();
}
#ifdef ECHO_ON_EXECUTE
code->echoCommand();
code->echoCommand();
#endif
}
else
}
else
#endif
Commands::executeGCode(code);
code->popCurrentCommand();
}
Printer::defaultLoopActions();
Commands::executeGCode(code);
code->popCurrentCommand();
}
Printer::defaultLoopActions();
}

} // commandLoop
Expand Down Expand Up @@ -108,6 +107,10 @@ void Commands::waitUntilEndOfAllMoves()
if( g_nFindZOriginStatus ) bWait = 1;
#endif // FEATURE_FIND_Z_ORIGIN

#if FEATURE_TEST_STRAIN_GAUGE
if( g_nTestStrainGaugeStatus ) bWait = 1;
#endif // FEATURE_TEST_STRAIN_GAUGE

while( bWait )
{
#if FEATURE_WATCHDOG
Expand All @@ -116,6 +119,7 @@ void Commands::waitUntilEndOfAllMoves()

GCode::readFromSerial();
Commands::checkForPeriodicalActions();
GCode::keepAlive( Processing );
UI_MEDIUM;

bWait = 0;
Expand All @@ -124,6 +128,10 @@ void Commands::waitUntilEndOfAllMoves()
#if FEATURE_FIND_Z_ORIGIN
if( g_nFindZOriginStatus ) bWait = 1;
#endif // FEATURE_FIND_Z_ORIGIN

#if FEATURE_TEST_STRAIN_GAUGE
if( g_nTestStrainGaugeStatus ) bWait = 1;
#endif // FEATURE_TEST_STRAIN_GAUGE
}

} // waitUntilEndOfAllMoves
Expand Down Expand Up @@ -221,6 +229,7 @@ void Commands::printCurrentPosition()
Com::printFLN(PSTR(";z="),(float)Printer::directPositionTargetSteps[Z_AXIS]*Printer::invAxisStepsPerMM[Z_AXIS],2);
Com::printFLN(PSTR("*"));
*/

} // printCurrentPosition


Expand Down Expand Up @@ -672,9 +681,9 @@ void Commands::executeGCode(GCode *com)
#if FEATURE_WATCHDOG
HAL::pingWatchdog();
#endif // FEATURE_WATCHDOG

GCode::readFromSerial();
Commands::checkForPeriodicalActions();
GCode::keepAlive( Processing );
}
break;
}
Expand All @@ -688,7 +697,7 @@ void Commands::executeGCode(GCode *com)
Printer::unitIsInches = 0;
break;
}
case 28: //G28 - Home all Axis one at a time
case 28: // G28 - Home all axes one at a time
{
if(!isHomingAllowed(com))
{
Expand Down Expand Up @@ -1089,6 +1098,7 @@ void Commands::executeGCode(GCode *com)
printedTime = currentTime;
}
Commands::checkForPeriodicalActions();
GCode::keepAlive( WaitHeater );
#if RETRACT_DURING_HEATUP
if (actExtruder == Extruder::current && actExtruder->waitRetractUnits > 0 && !retracted && dirRising && actExtruder->tempControl.currentTemperatureC > actExtruder->waitRetractTemperature)
{
Expand Down Expand Up @@ -1122,7 +1132,7 @@ void Commands::executeGCode(GCode *com)
#endif // FEATURE_EXTENDED_BUTTONS || FEATURE_PAUSE_PRINTING
}

UI_CLEAR_STATUS;
showIdle();
previousMillisCmd = HAL::timeInMilliseconds();
break;
}
Expand Down Expand Up @@ -1176,6 +1186,7 @@ void Commands::executeGCode(GCode *com)
codenum = HAL::timeInMilliseconds();
}
Commands::checkForPeriodicalActions();
GCode::keepAlive( WaitHeater );
}

#if FEATURE_EXTENDED_BUTTONS || FEATURE_PAUSE_PRINTING
Expand All @@ -1184,7 +1195,7 @@ void Commands::executeGCode(GCode *com)
#endif // HAVE_HEATED_BED
}

UI_CLEAR_STATUS;
showIdle();
previousMillisCmd = HAL::timeInMilliseconds();
break;
}
Expand All @@ -1209,10 +1220,15 @@ void Commands::executeGCode(GCode *com)
codenum = HAL::timeInMilliseconds();
}
Commands::checkForPeriodicalActions();
for(uint8_t h=0;h<NUM_TEMPERATURE_LOOPS;h++) {
GCode::keepAlive( WaitHeater );

for( uint8_t h=0; h<NUM_TEMPERATURE_LOOPS; h++ )
{
TemperatureController *act = tempController[h];
if(act->targetTemperatureC>30 && fabs(act->targetTemperatureC-act->currentTemperatureC)>1)
if( act->targetTemperatureC > 30 && fabs( act->targetTemperatureC-act->currentTemperatureC ) > 1 )
{
allReached = false;
}
}
}
}
Expand Down Expand Up @@ -1518,19 +1534,19 @@ void Commands::executeGCode(GCode *com)
#ifdef RAMP_ACCELERATION
case 201: // M201
{
if(com->hasX()) Printer::maxAccelerationMMPerSquareSecond[0] = com->X;
if(com->hasY()) Printer::maxAccelerationMMPerSquareSecond[1] = com->Y;
if(com->hasZ()) Printer::maxAccelerationMMPerSquareSecond[2] = com->Z;
if(com->hasE()) Printer::maxAccelerationMMPerSquareSecond[3] = com->E;
if(com->hasX()) Printer::maxAccelerationMMPerSquareSecond[X_AXIS] = com->X;
if(com->hasY()) Printer::maxAccelerationMMPerSquareSecond[Y_AXIS] = com->Y;
if(com->hasZ()) Printer::maxAccelerationMMPerSquareSecond[Z_AXIS] = com->Z;
if(com->hasE()) Printer::maxAccelerationMMPerSquareSecond[E_AXIS] = com->E;
Printer::updateDerivedParameter();
break;
}
case 202: // M202
{
if(com->hasX()) Printer::maxTravelAccelerationMMPerSquareSecond[0] = com->X;
if(com->hasY()) Printer::maxTravelAccelerationMMPerSquareSecond[1] = com->Y;
if(com->hasZ()) Printer::maxTravelAccelerationMMPerSquareSecond[2] = com->Z;
if(com->hasE()) Printer::maxTravelAccelerationMMPerSquareSecond[3] = com->E;
if(com->hasX()) Printer::maxTravelAccelerationMMPerSquareSecond[X_AXIS] = com->X;
if(com->hasY()) Printer::maxTravelAccelerationMMPerSquareSecond[Y_AXIS] = com->Y;
if(com->hasZ()) Printer::maxTravelAccelerationMMPerSquareSecond[Z_AXIS] = com->Z;
if(com->hasE()) Printer::maxTravelAccelerationMMPerSquareSecond[E_AXIS] = com->E;
Printer::updateDerivedParameter();
break;
}
Expand Down Expand Up @@ -1776,12 +1792,12 @@ void Commands::executeGCode(GCode *com)
int S = com->S;
if ( S >= 800 && S <= 2200 )
{
Com::printFLN( PSTR( " 1. Servo Value [uS] = "), S );
Com::printFLN( PSTR( " 1. servo value [uS] = "), S );
OCR5A = 2*S;
}
else
{
Com::printFLN( PSTR( " 1. Servo Value out of range ") );
Com::printFLN( PSTR( " 1. servo value out of range ") );
}
}
break;
Expand All @@ -1793,12 +1809,12 @@ void Commands::executeGCode(GCode *com)
int S = com->S;
if ( S >= 800 && S <= 2200 )
{
Com::printFLN( PSTR( " 2. Servo Value [uS] = "), S );
Com::printFLN( PSTR( " 2. servo value [uS] = "), S );
OCR5B = 2*S;
}
else
{
Com::printFLN( PSTR( " 2. Servo Value out of range ") );
Com::printFLN( PSTR( " 2. servo value out of range ") );
}
}
break;
Expand All @@ -1810,12 +1826,12 @@ void Commands::executeGCode(GCode *com)
int S = com->S;
if ( S >= 800 && S <= 2200 )
{
Com::printFLN( PSTR( " 3. Servo Value [uS] = "), S );
Com::printFLN( PSTR( " 3. servo value [uS] = "), S );
OCR5C = 2*S;
}
else
{
Com::printFLN( PSTR( " 3. Servo Value out of range ") );
Com::printFLN( PSTR( " 3. servo value out of range ") );
}
}
break;
Expand Down
2 changes: 1 addition & 1 deletion RF1000/Repetier/Commands.h
@@ -1,4 +1,4 @@
/*
/*
This file is part of the Repetier-Firmware for RF devices from Conrad Electronic SE.
Repetier-Firmware is free software: you can redistribute it and/or modify
Expand Down
16 changes: 12 additions & 4 deletions RF1000/Repetier/Communication.cpp
@@ -1,4 +1,4 @@
/*
/*
This file is part of the Repetier-Firmware for RF devices from Conrad Electronic SE.
Repetier-Firmware is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -50,8 +50,8 @@ FSTRINGVALUE(Com::tExpectedLine,"Error:expected line ")
FSTRINGVALUE(Com::tGot," got ")
FSTRINGVALUE(Com::tSkip,"skip ")
FSTRINGVALUE(Com::tBLK,"BLK ")
FSTRINGVALUE(Com::tStart,"Start")
FSTRINGVALUE(Com::tStartWatchdog,"Start Watchdog")
FSTRINGVALUE(Com::tStart,"start") // do not change "start" to "Start" because some applications might not be able to detect "Start" as "start"
FSTRINGVALUE(Com::tStartWatchdog,"start Watchdog")
FSTRINGVALUE(Com::tPowerUp,"PowerUp")
FSTRINGVALUE(Com::tExternalReset,"External Reset")
FSTRINGVALUE(Com::tBrownOut,"Brown out Reset")
Expand Down Expand Up @@ -233,6 +233,7 @@ FSTRINGVALUE(Com::tEPRXTravelAcceleration,"X-axis travel acceleration [mm/s^2]")
FSTRINGVALUE(Com::tEPRYTravelAcceleration,"Y-axis travel acceleration [mm/s^2]")
FSTRINGVALUE(Com::tEPRZTravelAcceleration,"Z-axis travel acceleration [mm/s^2]")
FSTRINGVALUE(Com::tEPRZOffset,"Z-Offset [um]")
FSTRINGVALUE(Com::tEPRZMode,"Z Scale")
FSTRINGVALUE(Com::tEPROPSMode,"OPS operation mode [0=Off,1=Classic,2=Fast]")
FSTRINGVALUE(Com::tEPROPSMoveAfter,"OPS move after x% retract [%]")
FSTRINGVALUE(Com::tEPROPSMinDistance,"OPS min. distance for fil. retraction [mm]")
Expand Down Expand Up @@ -269,7 +270,7 @@ FSTRINGVALUE(Com::tEPRCaseLightsMode,"case lights mode [0=off, 1=on]")
FSTRINGVALUE(Com::tEPR230VOutputMode,"230V output mode [0=off, 1=on]")
FSTRINGVALUE(Com::tEPROperatingMode,"operating mode [1=print, 2=mill]")
FSTRINGVALUE(Com::tEPRZEndstopType,"Z endstop type [1=single, 2=circuit]")
FSTRINGVALUE(Com::tEPRHotendType,"Hotend type [2=V1, 3=V2 single, 3=V2 dual]")
FSTRINGVALUE(Com::tEPRHotendType,"Hotend type [2=V1, 3=V2 single, 4=V2 dual]")
FSTRINGVALUE(Com::tEPRMillerType,"Miller type [1=one track, 2=two tracks]")
FSTRINGVALUE(Com::tEPRRGBLightMode,"RGB Light mode [0=off, 1=white, 2=color, 3=manual]")
FSTRINGVALUE(Com::tEPRFET1Mode,"FET1 mode [0=off, 1=on]")
Expand Down Expand Up @@ -300,8 +301,11 @@ FSTRINGVALUE(Com::tCreationFailed,"Creation failed")
FSTRINGVALUE(Com::tSDErrorCode,"SD errorCode:")
#endif // SDSUPPORT

#if FEATURE_OUTPUT_FINISHED_OBJECT
FSTRINGVALUE(Com::tOutputObjectPrint,OUTPUT_OBJECT_SCRIPT_PRINT)
FSTRINGVALUE(Com::tOutputObjectMill,OUTPUT_OBJECT_SCRIPT_MILL)
#endif // FEATURE_OUTPUT_FINISHED_OBJECT

FSTRINGVALUE(Com::tUnmountFilamentWithHeating,UNMOUNT_FILAMENT_SCRIPT_WITH_HEATING)
FSTRINGVALUE(Com::tUnmountFilamentWithoutHeating,UNMOUNT_FILAMENT_SCRIPT_WITHOUT_HEATING)
FSTRINGVALUE(Com::tMountFilamentWithHeating,MOUNT_FILAMENT_SCRIPT_WITH_HEATING)
Expand All @@ -311,6 +315,10 @@ FSTRINGVALUE(Com::tMountFilamentWithoutHeating,MOUNT_FILAMENT_SCRIPT_WITHOUT_HEA
FSTRINGVALUE(Com::tFindZOrigin,FIND_Z_ORIGIN_SCRIPT)
#endif // FEATURE_FIND_Z_ORIGIN

#if FEATURE_TEST_STRAIN_GAUGE
FSTRINGVALUE(Com::tTestStrainGauge,TEST_STRAIN_GAUGE_SCRIPT)
#endif // FEATURE_TEST_STRAIN_GAUGE


void Com::printWarningF(FSTRINGPARAM(text))
{
Expand Down
7 changes: 6 additions & 1 deletion RF1000/Repetier/Communication.h
@@ -1,4 +1,4 @@
/*
/*
This file is part of the Repetier-Firmware for RF devices from Conrad Electronic SE.
Repetier-Firmware is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -261,6 +261,7 @@ class Com
FSTRINGVAR(tEPRXOffset)
FSTRINGVAR(tEPRYOffset)
FSTRINGVAR(tEPRZOffset)
FSTRINGVAR(tEPRZMode)
FSTRINGVAR(tEPRStabilizeTime)
FSTRINGVAR(tEPRRetractionWhenHeating)
FSTRINGVAR(tEPRDistanceRetractHeating)
Expand Down Expand Up @@ -314,6 +315,10 @@ class Com
FSTRINGVAR(tFindZOrigin)
#endif // FEATURE_FIND_Z_ORIGIN

#if FEATURE_TEST_STRAIN_GAUGE
FSTRINGVAR(tTestStrainGauge)
#endif // FEATURE_TEST_STRAIN_GAUGE

static void printNumber(uint32_t n);
static void printWarningF(FSTRINGPARAM(text));
static void printInfoF(FSTRINGPARAM(text));
Expand Down

0 comments on commit 8cca515

Please sign in to comment.