Hello Guest it is April 18, 2024, 08:01:07 PM

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

0 Members and 1 Guest are viewing this topic.

Help with activating m3, m4, m5 when condition is met
« on: April 13, 2010, 12:37:55 AM »
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 13, 2010, 12:39:39 AM by omegasea21 »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help with activating m3, m4, m5 when condition is met
« Reply #1 on: April 13, 2010, 02: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, 10:29:09 PM »
Thank you so much!!!