How to monitor an IO input continuously (for momentary switch probe protection)

More
12 Apr 2024 15:17 - 12 Apr 2024 15:21 #298070 by nick.smith
I'm trying to implement momentary switch-based probe protection. If the probe isn't in its carrier, the spindle won't spin.

I have it working with a subroutine, but this requires a CALL in each program and doesn't protect against manual MDI entry.

Anyone know how to monitor the IO board inputs continuously?
O<probeopen> CALLĀ 

M3 S1000
o<probeopen> sub

M66 P3 L3 Q.1

O100 IF [#5399 LT 0]
	M01 (SWITCH OPEN, PROBE NOT IN CARRIER, EXITING)
	M5
	M30
O100 END IF

o<probeopen> endsub
Last edit: 12 Apr 2024 15:21 by nick.smith.

Please Log in or Create an account to join the conversation.

More
12 Apr 2024 16:54 #298084 by tommylight
Just the spindle?
An and2 component wired before spindle.on should do just fine.
That is all in hal.
So the spindle runs only if the probe trigger is closed and spindle is commnded from hal.
The following user(s) said Thank You: nick.smith

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.112 seconds
Powered by Kunena Forum