Hi
I would like my Smoothieboard to execute following Gcode after one of my input pins goes HIGH:
G91 G1 F40 X10
I connected my sensor to pin 1.30 and I wrote following code in config file:
switch.sensor1.enable true
switch.sensor1.inut_pin 1.30
switch.sensor1.output_on_command G91_G1_F40_X10
However, after putting HIGH state to this pin nothing happens. When I send this Gcode with Pronterface it works without any problems. I tried therefore to trigger it with some other command. I used M106 to do it (because I don’t use it anywhere else in my config file):
switch.sensor1.enable true
switch.sensor1.input_on_command M106
switch.sensor1.output_on_command G91_G1_F40_X10
After sending M106 with Pronterface also nothing happens. The last thing that I have done was trying at least to get HIGH state on my output pin when I send a command. So I changed previous code to this:
switch.sensor1.enable true
switch.sensor1.input_on_command M106
switch.sensor1.input_off_command M107
switch.sensor1.output_pin 1.30
This time when I was sending M106 and M107 by Pronterface, I was getting HIGH and LOW state in pin 1.30.
Could anyone explain me why it works with output_pin but doesn’t want to work with output_on_command? I tried also writing my Gcode in different forms like:
G91_G1_F40_X10
G91G1F40X10
G91 G1 F40 X10
but none of them worked.
Imported from wikidot