input pin enable/disable by gcode functionallity

17 views
Skip to first unread message

Simon S

unread,
Sep 6, 2019, 4:22:25 AM9/6/19
to Smoothie-Dev
Hi!

I am looking for the folloiwing functionallity. Lets assume I have the following input configured:

>switch.suspend.enable true >switch.suspend.input_pin 1.30^ >switch.suspend.output_on_command suspend

I want to mute/unmute this pin from my gcode.
Something like a config like this:

>switch.suspend.input_mute_command M777
>switch.suspend.input_unmute_command M778

And in my gcode:
G0 X100
M777 ; now the switch is active and can trigger a suspend
G0 X1000 ; do something that I want to watch
M778 ; now the switch is inactive and can not trigger a suspend
G0 X100

Just as a basic example. The use case could be the conditional monitoring of
different peripherals such as a spindle or a laser beam.

I checked the Switch module but it looks like it does not support that yet.

One could use the input_on_command for the gcode definition whenever there is only an input.

Is this functionality of general interest?
I can work out a patch for that, otherwise I will just hack it into in my fork.

And one more thing: Could it be that the config naming is mixed up?
input_on_command will set an output on a given gcode
output_on_command will execute a command on input change

Simon

Arthur Wolf

unread,
Sep 6, 2019, 4:25:53 AM9/6/19
to Simon S, Smoothie-Dev
Definitely, don't mix up command names, give things the right name.
It's the first time ever I hear about this feature, so I don't expect wide wanting of it.
Can you tell us *what for* you need this, so we can know more about this?
At this point, the best is probably for you to implement this in a fork, and to link to your fork from the third-party page, and see if it attracts interest.

--
You received this message because you are subscribed to the Google Groups "Smoothie-Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothie-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smoothie-dev/e5c39904-61bc-454a-90f6-bf6459ba33c7%40googlegroups.com.


--
Courage et bonne humeur.

Simon S

unread,
Sep 7, 2019, 2:13:29 PM9/7/19
to Smoothie-Dev
Hi!

The previous idea with the muting did not cover my use case in full detail, I hat to create a switch "watchdog".

The idea is to be able to watch any external signal that it keeps a certain value
but with having a timeout and thus allowing short periods of time where the signal becomes invalid.


Simon

Arthur Wolf

unread,
Sep 7, 2019, 2:18:48 PM9/7/19
to Simon S, Smoothie-Dev
So, adding features to switch such as input, watchers, timers, repeaters etc is something I'd love to try to do in v2, but we definitely don't have the room in v1. Please feel free to do this in your own branch and link to it though, this is definitely something useful to some.

--
You received this message because you are subscribed to the Google Groups "Smoothie-Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothie-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages