Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: picoworm on October 29, 2014, 08:29:28 AM
-
Hi everyone,
I need to implement something like next:
-------------------
gcode("G0X400")
while IsActive(INPUT1)
sleep(10)
wend
StopMotion() ;// Here I need to stop execution of GCode immediately
---------------------
What command stops motion?
-
Hi,
DoButton(3)
here: http://www.machsupport.com/Mach3Wiki/index.php?title=Main_Page
is a documentation.
Regards Thomas
-
I'm guessing this is a classic case of the XY problem (http://xyproblem.info). Can you describe what it is you want to do rather than how you think you might do it?
-
I'm guessing this is a classic case of the XY problem (http://xyproblem.info).
I like that ! Powerful advise.
Thanks Ian,
Russ
-
Cheers Russ. I remember a thread a ways back that started very similar to this one. He asked how to stop a limit switch taking Mach into reset. Turned out after a long and frustrating thread the guy was trying to rewrite limits to work like a probe because he didn't realize that probe existed. Just trying to avoid that here if it's similar.
Ian
-
In this case, the simple answer would be to use one of the Limit inputs, rather than Input 1. No code would be needed at all.
-
Hi Guys,
as long we dont know, what picoworm is trying to do,
it's only a look into the "cristal ball".
my "cristal ball" is out of order, because the lamp is
broken, and nobody is around to change the lamp.
Regards Thomas
-
Thanks to TPS, all works. But I need to make a pause after dobutton(3) before start new code("").
I used sleep(100) for it
As about other replies:
I am making my own referencing procedure.
All I need is jogon and jogoff, but unfortunately this functions do nothing on my machine.
Looking the internet do not give me any answer about this problem, so to finish my job, I need to use something else to do Jog.
-
hello picoworm,
don't want to interupt you in your own way of making a reference sequence,
but all this VB stuff will be to slow for what ever you try to do.
hope i can make me understand in my bad german english.
Regards Thomas
-
I my case, precise referencing is done by probe function (g31). I multiplex the probe input to 3 servomotor's encoder zero pulse using external logic.
But before precise referencing, I need to move to HOME switch, then move back from it.
Today I finished my work. It works fine. Repeatability on my 2500 lines encoder and 5mm ballscrew is less than 2um.
I am glad that mach3 can do industrial referencing, it is bad that this function is not inside mach3 and need to be done using such tricks.
-
Some Mach3 motion controllers have Index homing built in.
-
See what I mean about X Y?
Y = How to stop gcode("") by activation of signal?
whereas
X = How do I get Mach to do index homing?
-
X Y Z, does not matter.
I have got my answer. Next time when I will ned to stop motion I will know how to do it.
-
Ah well that's OK then - screw the folks who wasted their time eh?