Help to configure I/0 pins for M7 control
-
I have a 24v solenoid wired to out1 on a Duet3 6HC. I currently have it set to turn on/off in the start.g and stop.g.
I would like to get rid of this and have it controlled by the Fusion360 post processor nc file with the M7 command.
How do I set this up in my config.g file. I can't find any information on how to allocate that I/O pin to the M7 command. I assume its a M950 line, but I don't know what the correct labels/names are for M7 allocations.
Thanks!
-
-
-
@fcwilt Its a CNC command that turns Cooling on and off. It's not listed in the REPRAP Dictionary, however from what I have found, it is a valid command. Its just specific to CNC and doesn't have a purpose with FFF, so its not listed.
-
@shanian79 I figured it out. The M7/M9 commands are not supported. However when Duet gets these commands, it looks for a .sys macro of that name and executes it if there is one.
For example, I added and M7 and M9 macro to my sys folder.
When Duet gets an M7 command, it executes the M7 macro with M42 that turns on the solenoid wired to out1. M9 turns it off.
M7 file in .sys folder
M42 P0 S0 ; turn the valve off -
@shanian79 said in Help to configure I/0 pins for M7 control:
@fcwilt Its a CNC command that turns Cooling on and off. It's not listed in the REPRAP Dictionary, however from what I have found, it is a valid command. Its just specific to CNC and doesn't have a purpose with FFF, so its not listed.
Well there are other CNC specific commands listed - I would have thought if M7 was supported it would have been listed as well.
As you have found M7 is not directly supported but you can create a file M7.g and put the needed code there.
Frederick
-
To be clear: if you want to implement the M7 command, create a macro file in /sys on the SD card called:
M7.g
That file will be executed whenever the M7 command is executed. In RRF 3.3 and later you can also pick up parameters that were given with the M7 command.