Anycubic Vyper filament sensor

hi i have a problem with filament sensor while im using repetier server, when the filament run out the printer starts to emit a bip noise but in the console i cant see any message and the printer goes on. how can i configure the server to recognize the sensor signal and pause the printing?
im using repetier server 1.3.0 and the firmware of the printer is marlin 2.4.5
thx

Comments

  • Hello.
    It seems that a lot of printers nowadays doesn't report filament runout to the host anymore. 
    Could you tell me the results from The G-Code command M412?
  • M412 returns 
    echo:Filament runout ON
  • Looking into recent marlin version M412 implementation looks like this:
    /**
    * M412: Enable / Disable filament runout detection
    *
    * Parameters
    * R : Reset the runout sensor
    * S<bool> : Reset and enable/disable the runout sensor
    * H<bool> : Enable/disable host handling of filament runout
    * D<linear> : Extra distance to continue after runout is triggered
    */
    void GcodeSuite::M412() {
    if (parser.seen("RS"
    TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, "D")
    TERN_(HOST_ACTION_COMMANDS, "H")
    )) {
    #if ENABLED(HOST_ACTION_COMMANDS)
    if (parser.seen('H')) runout.host_handling = parser.value_bool();
    const bool seenR = parser.seen_test('R'), seenS = parser.seen('S');
    if (seenR || seenS) runout.reset();
    if (seenS) runout.enabled = parser.value_bool();
    #if HAS_FILAMENT_RUNOUT_DISTANCE
    if (parser.seen('D')) runout.set_runout_distance(parser.value_linear_units());
    }
    else {
    SERIAL_ECHO_START();
    SERIAL_ECHOPGM("Filament runout ");
    serialprint_onoff(runout.enabled);
    #if HAS_FILAMENT_RUNOUT_DISTANCE
    SERIAL_ECHOPAIR(" ; Distance ", runout.runout_distance(), "mm");
    #if ENABLED(HOST_ACTION_COMMANDS)
    SERIAL_ECHOPGM(" ; Host handling ");
    serialprint_onoff(runout.host_handling);
    SERIAL_EOL();
    }
    }

    So I would expect it to return  "; Host handling ON or OFF" in addition. Only if firmware reports to host we can react on it. 
    M412 S1 H1

    would enable host handling of runout and report it to host. If you have marlin sources you can recompile them with
    HOST_ACTION_COMMANDS enabled and then adding M412 S1 H1 to connection commands would enable the sensor.

    Alternatively you need a sensor that is e.g. connected with pi gpio pin and query from that as shown in our gpio tuotial on our homepage docs.
  • So I would anticipate that it should return "; Host dealing with ON or OFF" also. Provided that firmware reports to have we can respond on it.
    M412 S1 H1

    would empower have treatment of runout and report it to have. On the off chance that you have marlin sources you can recompile them with
    HOST_ACTION_COMMANDS empowered and afterward adding M412 S1 H1 to association orders would empower the sensor.
    Thanks.
    Movers and Packers in Bangalore
  • i downloaded the source code of vyper firmware 2.4.5 and in configuration_adv.h
    i found this
    //#define HOST_ACTION_COMMANDS
    #if ENABLED(HOST_ACTION_COMMANDS)
      //#define HOST_PROMPT_SUPPORT
      //#define HOST_START_MENU_ITEM  // Add a menu item that tells the host to start
    #endif

    now i think i have to remove // to abilitate this functions but when i try to create a .hex  with visual studio i dont have eny environment to choose, if i use arduino ide returns several errors, seems im not able to do this things...
  • You only have to change
    //#define HOST_ACTION_COMMANDS
    into
    #define HOST_ACTION_COMMANDS

    I guess. Inside the #if ENABLED you can add further options for hosts like adding prompt support. You could add that as we support prompts as well, but with that feature it is not necessary.

    Where can I find the sources? Not really sure what you mean with " i dont have eny environment to choose" - I would have expected if it was configured for vyper already that you just hit the checkbox to compile. 

    Do you have platformio installed in visual studio code? If so everything normally installs automatically.

  • edited February 2022
    https://github.com/ANYCUBIC-3D/Vyper/releases/tag/vyper-v2.4.5
    i cannot build firmaware after changing the function because visual studio doesnt show me the option i dont know why
    with platformio gives me errors and with auto build marlin no option to buildù

    platformio seems can not recognize the board in the source code:

    > Executing task: C:\Users\Utente\.platformio\penv\Scripts\platformio.exe debug <

    Processing ac_tri_f1 (platform: ststm32@~10.0; board: ac_tri_f103re; framework: arduino)
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Error: Unknown board ID 'ac_tri_f103re'
    The terminal process "C:\Users\Utente\.platformio\penv\Scripts\platformio.exe 'debug'" terminated with exit code: 1.

    Terminal will be reused by tasks, press any key to close it.
  • Have you seen this docs:

    https://github.com/ANYCUBIC-3D/Vyper/wiki

    i started with it but comfortable is differently. I have original stm32 solution and there as described in docs the board is missing. You need to replace it as described in docs with this
    https://github.com/ANYCUBIC-3D/framework-arduinoststm32_vyper

    I think and then it should work. No idea why they do not add the missing files to marlin sources as marlin did already for several other boards.
  • still giving me the same error
    Unknown board ID 'ac_tri_f103re'
  • ok i got it!
    i did exactly as the guide tells but it didnt work so i unistalled platformio and installed it again and when i uploaded all the libraries he created a copy of the folder framework-arduinoststm32@"something" i copied the .jason board even in this folder and voilà.
    tested the new firmware seems to work but now i've to work on telling the printer what to do when filament runs out. i think ill be back soon.
    thx for help
  • edited February 2022
    ok i need more help...
    now when the filament runs out the nozzle stop there on the current layer, i want just to move z up from there.
    another problem is that when i recover the printing the printer goes in home axis and i dont want that, i want just stay there and restart to printing.
    in rescue panel i see some code in "run on connect" and "procedure" maybe i have to change this code but dunno exactly which code i have to put on it.
    just remove Z value?
    thx
  • Ok first congratulations  to compilation. Sounds like marlin is now issuing a message to cause server to pause. Does the gui switch to filament change? Did you check log on what happens exactly? Does server show print as paused and you see now continue button? Just to be sure it is server pausing and not marlin.
    Next is to check you event dependent gcodes in Printer Configuration->G-Codes->Event dependent. There are 3 parts important:
    1. "Run on connect"- Here you activate host pausing on runout: M412 S1 H1
    2. "Run on pause" - If this is empty print will stop just where head is. Add at least a move to a parking place of your choice - normally such that it is away from print and bed is best accessible and maybe add some retraction to reduce oozing
    G92 E0
    G1 E-3 F2000
    G1 X0 Y200 F12000
    3. "Run on continue" - this is executed before the print continues and before server moves head back to last print position. That is where I guess you have homing x and y, also that is sometimes good. Especially if motors got disabled and you might have moved head during filament change. You can of course remove it and home manually if you see you moved head.

    The rescue settings have nothing to do with your pause problems. Rescue kicks in when printer looses usb connection or complete system crashes due to power outage. It then offers to continue a print at some position you select.
  • edited February 2022
    this is what i can see in the console when the filament runs out:

    Recv:10:51:09.675: //action:prompt_end
    Recv:10:51:09.678: //action:prompt_begin FilamentRunout T0
    Recv:10:51:09.681: //action:prompt_show
    Recv:10:51:09.684: //action:paused filament_runout 0

    and pops a window filament runout T0
    i click ok and switch to rescue and i can continue the printing

    but nozzle still remain there on run out filament
    and there is another problem bed and nozzle stop to heating afther filament run out
  • Nice - one more new variant to report filament runout. Why keep it the same over all versions:-(

    The prompt command cause the server to show a small dialog that is more or less empty just headline  "FilamentRunout T0" - makes not much sense.
    //action:paused mean stop job for some reason but do NOT send any extra commands. See
    https://reprap.org/wiki/G-code#Action_commands
    And since it reference octoprint docs
    https://docs.octoprint.org/en/master/features/action_commands.html?highlight=action
    paused
    When this command is received from the printer, OctoPrint will pause a current print job but without triggering any GCODE scripts or sending SD print control commands to the printer. This might be interesting for firmware that wants to signal to OctoPrint that a print should be paused but without any control interference from OctoPrint, e.g. in case of a filament change fully managed by the firmware.

    This solution is still a firmware controlled filament change just with prompt to host.

    I think instead of

      //#define HOST_PROMPT_SUPPORT

    you have set 

    #define HOST_PROMPT_SUPPORT

    in firmware. That added prompt support. Please try disabling prompt support. That way it makes no sense. In an other marlin version I had seen the prompt asking to change filament which made more sense. But doing nothing and allowing nothing except continue is not really useful.

  • #define HOST_PROMPT_SUPPORT is already enabled i think
    the code in visual studio is this:
    #define HOST_ACTION_COMMANDS
    #if ENABLED(HOST_ACTION_COMMANDS)
      #define HOST_PROMPT_SUPPORT
      #define HOST_START_MENU_ITEM  // Add a menu item that tells the host to start

  • a ok i have to disable it my mistake
  • YES! now its ok thank you very much for help
Sign In or Register to comment.