Hello Guest it is March 01, 2026, 11:40:08 AM

Author Topic: Help with activating m3, m4, m5 when condition is met  (Read 6278 times)

0 Members and 1 Guest are viewing this topic.

Help with activating m3, m4, m5 when condition is met
« on: April 12, 2010, 11:37:55 PM »
Hello, what is the easiest way to do the following. I can't seem to get it to work.

Activate spindle relay Clockwiise - M3
Stop sprindle (M5) when freedrate DRO > 19 (feedrate DRO  is 821)
If input 1 (port 0, pin 6) is active then Activate spindle CCW - M4
Stop sprindle (M5) when freedrate DRO < 2

Any help would greatly be appreciated!
« Last Edit: April 12, 2010, 11:39:39 PM by omegasea21 »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help with activating m3, m4, m5 when condition is met
« Reply #1 on: April 13, 2010, 01:31:41 AM »
Easiest way is to write a macropump to do what you want. I am not the best at VB but something like this should work

Spindle = GetOemDRO(821)

If Spindle >19 Then
Code("M5")
If IsActive(InPut1) Then
Code("M4")
If Spindle <2 Then
Code("M5")
End If
End If
End If
Re: Help with activating m3, m4, m5 when condition is met
« Reply #2 on: April 13, 2010, 09:29:09 PM »
Thank you so much!!!