- Posts: 32
- Thank you received: 0
How to monitor an IO input continuously (for momentary switch probe protection)
- nick.smith
- Topic Author
- Offline
- Junior Member
-
Less
More
2 years 6 months ago #298070
by nick.smith
How to monitor an IO input continuously (for momentary switch probe protection) was created 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?
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?
Code:
O<probeopen> CALLĀ
M3 S1000
Code:
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
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
2 years 6 months ago #298084
by tommylight
Replied by tommylight on topic How to monitor an IO input continuously (for momentary switch probe protection)
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.
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.
Please Log in to join the conversation.
Time to create page: 0.132 seconds
