Configure External Trigger on 3.1.1
-
I'm a little lost how to set up external trigger on 3.1.1 .
I've looked at :- https://duet3d.dozuki.com/Wiki/Using_M581_-_External_Triggers_and_Building_a_Control_Panel
Can't workout which P value a should be using , I want to use the e0_stop .
M581 P? T1 S1 R1 ;
M950 P? C"e0_stop"This my config.g
; Endstops M574 X2 S1 P"!xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y2 S1 P"!ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S2 ; Z-Probe M558 P9 C"^zprobe.in" H2 F100 T8000 A5 ; set Z probe type to bltouch and the dive height + speeds M950 S0 C"exp.heater7" ; create servo pin 0 for BLTouch G31 P500 X-45 Y-6 Z2.98 ; set Z probe trigger value, offset and trigger height M557 X55:295 Y55:295 S60 ; define mesh grid .. 30 , 60 , 80 ; Bed adjustment screw locations M671 X-30:380 Y0:0 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4092 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S150 ; set temperature limit for heater 0 to 150C M308 S1 P"e0temp" Y"thermistor" T100000 B4092 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"fan2" Q500 ; create fan 2 on pin fan2 and set its frequency M106 P2 S1 H1 T45 ; set fan 2 value. Thermostatic control is turned on ; Tools M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
-
Use the J parameter with M950 rather than "P"
https://duet3d.dozuki.com/Wiki/Gcode#Section_M950_Create_heater_fan_or_GPIO_servo_pin
Then the "P" in M581 refers to the "J" in M950
https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later -
So it looks like this ? .
M581 P1 T1 S1 R1 ;
M950 J1 C"e0_stop"I have read your link before I was just totally confused by them.
-
M950 before M581
-
@bearer
Is this how it works ?
ignore the heating / thermistor settings , But I have used :-
M950 S0 C"exp.heater7" for the bltouch so need to use pin 1 for my trigger ? .
So do I use J/s2 and p2 next time , servo or input pin ? -
I think M950 has its own series of numbering for inputs, outputs, fans, heaters etc; but can't test to confirm right now.
The config tool generates S0 for bltouch, H0 for heater and F0 for fans at least, but not sure about the whole extent.
-
The mixes of letters can sometimes be confusing. A P in one command can refer to a J in another command. It's important to match the thing being created to the thing being used in another.
For the BLtouch the M950 S is creating a servo index number that gets referred to by the M280 P servo control command. So S0 = P0.
For the trigger you're creating the M950 J is creating the input pin and in M581 the P is the input to watch. So J0 = P0 in this case.
When in doubt, check the gcode wiki for the gcode you're trying to use to see what the parameters are referring to.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M950_Create_heater_fan_or_GPIO_servo_pin
https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later
@peter247 said in Configure External Trigger on 3.1.1:
M581 P1 T1 S1 R1 ;
M950 J1 C"e0_stop"This should be correct, but you just need to move the M950 command to be above the M581 command because the input pin needs to exist before the trigger can monitor it.
-
So if I've used the p0 for the bltouch servo , can I still use p0 for a trigger input ?
-
Yes, they are different things.
-
@bearer said in Configure External Trigger on 3.1.1:
I think M950 has its own series of numbering for inputs, outputs, fans, heaters etc; but can't test to confirm right now.
Correct. In M950, heaters, fans, sensors, GpIn ports and GpOut/servo ports all have their own numbering sequences.