Hello Guest it is April 16, 2024, 03:50:34 PM

Author Topic: Feed rate override switch  (Read 4851 times)

0 Members and 1 Guest are viewing this topic.

Feed rate override switch
« on: October 26, 2011, 12:32:24 PM »
Hello all, I have searched for an answer to this for awhile and have come up empty.

I have posted this in both Brains and VB to get both opinions.

I have a 16 position binary switch ( 4 pins - 1,2,4,8). I have the pins set to Input #1,2,3 and 4. The way this switch works is pin 1 = 1, pin 2 = 2, pin 1 and pin 2 = 3 and so on tell you get 16 (counting all pins off as a position).

I need to find a way to have this control my feedrate over ride, plus my rapid override at the same time. I'm not sure if the best way would be with a Brain or in VB - Macropump. The most important thing is that the switch works fast.

I don't have a problem writing it up in my Macropump, just need a little guidance on the code.

This is what I was think for the layout, just not sure about the DRO for the FRO:

If IsActive(INPUT1) = False And
IsActive(INPUT2) = False And
IsActive(INPUT3) = False
IsActive(INPUT4) = False Then
SetOEMDRO(0, 0) <--- Needs to set the DRO to 0%
End If

If IsActive(INPUT1) And
IsActive(INPUT2) = False And
IsActive(INPUT3) = False
IsActive(INPUT4) = False Then
SetOEMDRO(0, 0) <--- Needs to set the DRO to 10%
End If


So on and so forth, tell I get all 16 positions set.


Any help would be GREAT!! :)


Thanks,

Aero
« Last Edit: October 26, 2011, 12:36:13 PM by Aeroshade »
Re: Feed rate override switch
« Reply #1 on: October 27, 2011, 01:17:50 PM »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Feed rate override switch
« Reply #2 on: October 27, 2011, 02:01:05 PM »
SOmething along these lines may work. This would be only 1 rung on the ladder for ALL 6 switches off then it sets the DRO to 0.0000
Re: Feed rate override switch
« Reply #3 on: October 27, 2011, 04:58:30 PM »
I tried that, but for some reason for it reads the largest %. This is how I set it up:

input 1 - invert
input 2 - invert
                              and - formula=0 - OEMDRO 821
input 3 - invert
input 4 - invert


input 1 - pass
input 2 - invert
                              and - formula=10 - OEMDRO 821
input 3 - invert
input 4 - invert



input 1 - invert
input 2 - pass
                              and - formula=20 - OEMDRO 821
input 3 - invert
input 4 - invert



input 1 - pass
input 2 - pass
                              and - formula=30 - OEMDRO 821
input 3 - invert
input 4 - invert



When I enable it, it sets my FRO DRO to 30%, and no matter what I switch it to it stays at 30%.


HELP :)


Aero

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Feed rate override switch
« Reply #4 on: October 27, 2011, 06:31:55 PM »
Then your inputs are not match to the brain correctly. IF they were then only the combinations of inputs it saw would activate the output. Try it with a value not just the pass /invert method.

Did you RUN the brain to test the output values based on the inputs. I normall y test each rung as I build it to VERIFY it is working correctly. THEN rebuild the tree with all the rungs.

(;-) TP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
fun times