Hello Guest it is May 16, 2021, 11:00:55 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - seanwmurph

Pages: 1
Hey Everyone! Yes this is my first post but I like to think I've searched the forum high and low for an answer with no luck. If I'm mistaken, my apologies.

So I have inductive proximity sensors on my machine along with very high count digital encoders with a zero pulse. What I'd like to do for homing is have the machine move until it triggers the proximity sensor and then reverses direction until the next zero pulse is triggered and then call that position home. I've been working the VB script editor with a few ideas I had to do so but I'm not real confident in them. I'm not too familiar with computer programming, but i'm also not completely useless at it.

What I would like to work (paraphrased pseudo code):

' Move Z incrementally up until proximity sensor is hit
While (proximity switch off)
     code("G91 G01 Z10. F20")

While (zero pulse input not active)
     code("G91 G01 Z-.05 F.01")
DoButton(24) 'define as home position

My biggest concern is that in the first while statement it won't continue checking to see the if switch is hit or not. Has anybody tried this? Next weekend I should be able to try it but it'd be nice to know a little more before just hoping it doesn't crash.

The other thing I considered was making the incremental axis move very small so it keeps outputting a new move while the switch is not hit, but that seems to very reliably crash Mach3....

I know the ActivateSignal() command but as far as i can tell that doesn't work for motors.. Does anybody know of a method to move a motor through a script command and not gcode? Or does anybody know a better approach to this? I am certainly willing to accept the possibility i'm overcomplicating this.

Any help is much appreciated! Thanks in advance!

Pages: 1