OUTPUT for Saftey Door while Printing

edited November 2017 in Repetier-Firmware
Hello,
i need some tips how to configurate Repetier so that a Door closes while Printing

I use this RADDS Board 



Am i able to configurate the Start G-Code, Pause G-Code and End G-Code so that if the print starts there is a Command in the
Start G-Code which says Servo PWM1 = 1 
And when the End G-Code is started it should do Servo PWM 1 = 0

Is there an option to do something like that?
Or should i use another Pin on the Board?

Best regards

Comments

  • You really open a door using a servo?
    Use

    - M340 P<servoId> S<pulseInUS> R<autoOffIn ms>: servoID = 0..3, Servos are controlled by a pulse with normally between 500 and 2500 with 1500ms in center position. 0 turns servo off. R allows automatic disabling after a while.

    to control if assuming servo is configured correctly. Firmware has no function to automaticaly open/close doors, but you could add it with our event system.

  • no, i want to use the Servo Pin as a Output for an Door Lock Mechanism because of Saftey Reasons.

    so can i configurate the M340 Pin so that if the Start G-Code is executed the first Servo Pin gives a 1 Signal?
  • why don´t you use the already implemened safety door Switch?


    it´s a Input stopping the Printer when door is not closed

  • how to use it? i cant find that :)
  • use Repetier-Firmware configuration tool for version 1.0.0dev / section Endstops


  • found it thank you :)
  • Added a door switch in Version 1.0.1, latest firmware.  Get error when compiling at Line 67 in commands.cpp  at this location (see below).  

    Compile Error:
    sketch\Commands.cpp: In static member function 'static void Commands::checkForPeriodicalActions(bool)':

    Commands.cpp:67: error: 'LaserDriver' has not been declared

                 LaserDriver::changeIntensity(0);

                 ^

    exit status 1
    'LaserDriver' has not been declared

    Code:
    void Commands::checkForPeriodicalActions(bool allowNewMoves) {
        Printer::handleInterruptEvent();
        EVENT_PERIODICAL;
    #if defined(DOOR_PIN) && DOOR_PIN > -1
        if(Printer::updateDoorOpen()) {
            if(Printer::mode == PRINTER_MODE_LASER) {
                LaserDriver::changeIntensity(0);
            }
        }
    #endif

    Somehow getting past  if(Printer::mode == PRINTER_MODE_LASER) even though I don't have SUPPORT_LASER in Configuration Tool checked.    
  • That was written with laser in mind, so if you hav eno laser it should look like this

    #if defined(DOOR_PIN) && DOOR_PIN > -1

        if(Printer::updateDoorOpen()) {

    #if defined(SUPPORT_LASER) && SUPPORT_LASER

            if(Printer::mode == PRINTER_MODE_LASER) {

                LaserDriver::changeIntensity(0);

            }

    #endif

        }

    #endif


    so it does not call the laser off function.
  • Using your online configuration tool, I leave the box for SUPPORT_LASER unchecked and Default Printer Mode indicates Fused Filament Fabrication.  Compiles fine and printer runs parts with no errors.  When I go into Door Open configuration under Mechanics tab and include switch information, I get the aforementioned compiler error every time.  I am using an Arduino Due with RADDS.  I have tried this with other computers and always get the same results.  Simply changing the Door Open to Not Installed eliminates the error. I agree with you that the program looks correct and the line LaserDriver::changeIntensity(); should not be executed but it is in this configuration.  I have not gone through all of the code yet to figure it out.  
  • Did you try my modification that should solve the compile error? It adds the changeIntensity code only if a laser is compiled in.
  • OK.  I put in the changes and it eliminated the compilation error.  Thanks!  
Sign In or Register to comment.