Saftey Door Switches for BIG printers
-
@CR3D said in Saftey Door Switches for BIG printers:
@dc42 But is there a Object Model for the inputs at itself?
Yes, in RRF 3.1 they can be found in sensors.gpIn[x] where x is the GpIn number you assigned in M950 (the J parameter).
-
Solved!
I created the switches like following in the config.g:
; Custom Safety Settings ; Open Door Switch M950 J0 C"!1.io0.in" M950 J1 C"!1.io1.in" M950 J2 C"!1.io2.in" ; Emergency Stop M950 J3 C"!1.io3.in"
And at the homeall.g I used the conditional commands:
; homeall.g ; called to home all axes if sensors.gpIn[0].value==1 & sensors.gpIn[1].value==1 & sensors.gpIn[2].value==1 & sensors.gpIn[3].value==1 ;If the Doors are closed and the emergency stop is released -> Homing M106 P0 S0 ; Part cooling Fan off G91 ; relative positioning G1 H2 Z10 F6000 ; lift Z relative to current position G1 H1 X-650 Y550 U650 F5000 ; first pass XYU G1 H2 X5 Y-5 U-5 F6000 ; go back a few mm G1 H1 X-20 Y20 U20 F360 ; second pass XY G90 ; absolute positioning G1 X270 Y170 U460 F20000 ; first bed probe point -> move X to the middle of the Bed, U outside and home Z G30
Now if the doors are open or the emergency stop is active the printer will not move
Thank you for your help!
Regards Christian (CR-3D)
-
are you still having a trigger to react to the doors being opend mid-print, or is that wired together with the e-stop?
-
@bearer
In RRF2.05 I made this with M581 to call Trigger 0:
I planned like this:
; Open Door Switch M950 J0 C"!1.io0.in" M950 J1 C"!1.io1.in" M950 J2 C"!1.io2.in" M581 P"!1.io0.in" T0 C0 M581 P"!1.io1.in" T0 C0 M581 P"!1.io2.in" T0 C0 ; Emergency Stop M950 J3 C"!1.io3.in" M581 P"!1.io3.in" T0 C0
-
gotcha, was wondering if you went with the slow down option and if so how you approached it - and if the time delay between the trigger and the speed reduction was acceptable with feed rate override f.ex.
-
@bearer
before I have not found a way to listen to the protected ...
how do I then implement it?
Right now I'm opposing to stop everything. The reduction of the protected would be the best solution!
-
I'm not sure how you'd go about it but I supect you'd set a M581 trigger for one flank to say trigger1.g that include
;trigger1.g - called when doors open M220 S20 ;cancel T1 M581 P"nil" T1 C0 ;and arm T2 M581 P"1.io0.in" T2 C0 M581 P"1.io1.in" T2 C0 M581 P"1.io2.in" T2 C0
and in trigger2.g you set it back to 100 and change the trigger back to the original
;trigger2.g - called when doors close M220 S100 ;cancel T2 M581 P"nil" T2 C0 ;and arm T1 M581 P"!1.io0.in" T1 C0 M581 P"!1.io1.in" T1 C0 M581 P"!1.io2.in" T1 C0
or something to that effect that causes the trigger to change function so it can respond differently to opening and closing.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M220_Set_speed_factor_override_percentage
I suppose you could refactor it to use only trigger1.g and use conditional logic to check if the sensors.GpIn[n] is high or low as well.
-
@bearer
Ok this sounds good! Thank you
But this will work for a running Print or always?
For example if the printer is homed, someone opens the door and moves the axes manually. Will this also be slowed down? -
hmm, docs doesn't specify so I'd presume its valid for all moves, but it'll probably be some amount of time between the switch triggering and command getting applied to the moves in the queue.
if you test it and find
M220
to not do the trick, you could also look into changing the actual speed limit withM203
. -
Hi all...
I tested the example from @bearer and it works for the first step...
There are still a few small things:
1). I get an error message when I call trigger2.g and trigger3.g! Shown here in the picture
Here the code:
; trigger2.g ;called wenn door was closed and gets opend M220 S20 ;cancel T2 M581 P"nil" T2 ;and arm T3 M581 P1 S0 T3 R0 M581 P2 S0 T3 R0 M581 P3 S0 T3 R0
;trigger3.g - called when doors close M220 S100 ;cancel T3 M581 P"nil" T3 ;and arm T1 M581 P1 S1 T2 R0 M581 P2 S1 T2 R0 M581 P3 S1 T2 R0
it seems to have something to do with the "nile". Why does this error appear?
as I said but it currently works when I open the door the speed decreases and when I close the door it increases again
2). can you improve the response time? That he does this immediately and not only when the buffer is empty? similar to the emergency stop?
Thank you!
-
@CR3D said in Saftey Door Switches for BIG printers:
can you improve the response time? That he does this immediately and not only when the buffer is empty?
not sure if M25 (pause) is faster with respect to response time? i.e. pause, change speed and resume, but it might be subject to the same latency and/or not affect the moves already planned.
-
@bearer
No I meant if you can speed up the response time of command M581 a little?
Otherwise I am very happy with the function now!
Any ideas about the error message with the ""?
-
The error message is misleading; however if you read https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later you will see that the line
M581 P"nil" T3
is not valid in RRF 3.01RC2 and later. If you want to delete trigger 3, use:
M581 T3 P-1
-
whops, i'm clearly outdated.
anyways i don't think the delay is in the trigger and M581, its likely M220 waiting for moves already planned to finish before the new speed is applied?
-
@dc42 Thank you!
@bearer Yes I think this too!
-
@dc42 Hello everyone, I'm experiencing the same issue as CR3D. My setup consists of a Duet3 6XD mainboard and two 3HC boards, using the following firmware (RepRapFirmware for Duet 3 MB6XD 3.4.5). The I0 pins are on the second 3HC board (adress 2) I've made the same settings in the config.g as described here. In the homeall.g, I've implemented the same meta command, but without success. I'm getting undefined errors. Could this be due to the higher firmware version? If so, how should I integrate this? ```
config.g
homeall.gBest regards
Fabian
. -