Hello Guest it is April 18, 2021, 11:32:36 PM

Author Topic: Write a brain to detect when an input turns off (falling-edge detection)  (Read 260 times)

0 Members and 1 Guest are viewing this topic.


I'm using mach3 on a windows XP PC with a parallel port. I'm new to writing brains, and I'm trying to figure out how to make one output run when an input turns on (easy enough), but then a different output run when the input turns off (like when a limit switch turns off).

I'm using the fourth axis limit switch pin on a GeckoDrive G540, but it won't be configured as a limit switch; it's instead just serving as input (it will not home anything or e-stop the machine).

So, how would I write a brain to do this? So far I can run things when the switch turns on, but not when it turns off. Is it possible, or do I just need to hijack another input pin?