Add additional pin output for switch control
-
Hello,
We have some modix big 60 machines. They have a separate bed heater so it is not controlled from the duet 2 motherboard. For firmware 2.0 I had a relay switch running off of pin 62. The macro to change the switch looked like this.
M300 S1222 P444 ;
M42 P62 S255This no longer does the same function.
How can I do the same thing in the new firmware?Thank you
-
@djthuma Use M950 with the "P" parameter to configure the pin https://docs.duet3d.com/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-or-gpioservo-pin
-
I see the M950 command. But how should it be formatted?
I was using pin 62 to activate the switch.
If i have the M950 command in the config file written like this.
M950 P62 C"spi.cs7"
(is that correct, would that configure pin 62?)Then a macro file that activated the switch when triggered.
M300 S1222 P444;
M42 P62 S.5This is how I have it this minute, and it is not correctly working. I am getting an error ( Error:in file macro line 5: M42: 'P' too high )
thanks for the help so far
-
@djthuma said in Add additional pin output for switch control:
I see the M950 command. But how should it be formatted?
I was using pin 62 to activate the switch.
If i have the M950 command in the config file written like this.
M950 P62 C"spi.cs7"
(is that correct, would that configure pin 62?)Then a macro file that activated the switch when triggered.
M300 S1222 P444;
M42 P62 S.5This is how I have it this minute, and it is not correctly working. I am getting an error ( Error:in file macro line 5: M42: 'P' too high )
thanks for the help so far
Read the documentation some more https://docs.duet3d.com/User_manual/Reference/Gcodes#m42-switch-io-pin
Once you have created the GPIO port using M950, you then refer to that port using M42 - not the pin number.