Hello Guest it is April 25, 2024, 11:28:20 AM

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.


Messages - stirling

1691
This is why I provided the link in my earlier post. It's all discussed and explained there. I'll reproduce a little here. Tweakie is on the right lines but in detail: while isMoving() wend actually causes the VB thread to WAIT for the mach thread to SIGNAL the VB thread that it has finished doing the last thing it was asked by VB to do.

As I said in the linked thread, isMoving() would have perhaps been better named MachIsBusy() as it actually has nothing to do with whether anything is actually moving.

without this synchronisation of the two asynchronous threads (Mach and VB) the DRO could be read by the VB before Mach has actually updated it.

Any VB "command" to Mach should be seen as a REQUEST: as in "can you do this as soon as possible?" - NOT a COMMAND as in "do it now". Any VB that continues without waiting for Mach to say "OK - I've done it" is unreliable.

Ian

1692
General Mach Discussion / Re: home switch and limit switch problem
« on: February 06, 2010, 12:11:43 PM »
Hood - thanks - as I said - allways willing to learn.

Do you *still* not have to make sure that you're at the correct side of home before you do a "ref all home" though?

Ian

1693
General Mach Discussion / Re: home switch and limit switch problem
« on: February 06, 2010, 11:32:03 AM »
Hi hightechkey

Ok I understand.

Let me see if I can convince you that even if Mach did what you wanted it would be a little pointless.

Suppose the limit did work as you wanted in your example. What would happen? Your axis would hit the limit and stop. You'd then have to jog off the limit and go to the other side of your home switch and then home again. You might as well have jogged to the correct side in the first place and then homed.

FWIW I've never really been able to see any advantage of having a "dedicated" home switch as opposed to a home/limit combination. The whole point is just to reference to a known position - it doesn't really matter what or where that position is.

I'd be intrigued to know why you have this setup - allways willing to learn.

Ian

Hood posted just as I was reviewing this (Hi Hood - how's it going?)

I can see where you're going but afraid I still can't see the point. Clearly I'm missing something. The thing is - how long do you make those trigger arms? and what's the overall purpose?

1694
Since the plate offset has never been zero, didn't the "while isMoving() ... wend: just get executed?  If so, what difference could a G4 make - i.e., shouldn't the G4 just be deleted then?
Sorry I don't understand what you mean.

In the following code snippet:

   If PlateOffset <> 0 Then
      Call SetDro (2, PlateOffset)   'set the Z axis DRO to  plate thickness
      Code "G4 P0.25"       'Pause for Dro to update.
      ZNew = PlateOffset + .25
      Code "G0 Z" &ZNew       'put the Z retract height you want here
      Code "(Z axis is now zeroed)"    'puts this message in the status bar
   End If

The Z axis DRO MUST be allowed to finish updating before the Z axis is commanded to move by "G0 Z" & ZNew, otherwise the DRO and hence Mach's notion of Z WILL be wrong. The "G4 P0.25" does NOT guarantee this but a "while isMoving()" DOES.

Ian

1695
General Mach Discussion / Re: Alphacam
« on: February 04, 2010, 12:14:20 PM »
artecnc (Hmmmmm... interesting user name)

You should see the toolpath IF Mach is able to interpret it successfully. Otherwise you'll see no toolpath and Mach will report the (first) error on the Status: line (bottom left of screen)

Ian

1696
General Mach Discussion / Re: Stepper Motors moving with no input.
« on: February 04, 2010, 12:00:39 PM »
does this happen when your controler is on but your PC is off?

Ian

1697
General Mach Discussion / Re: home switch and limit switch problem
« on: February 04, 2010, 11:59:20 AM »
High Tech Key

can you explain WHY you want the limit switches to work while you are homing?

Ian

1698
The line
Code "G4 P0.25"       'Pause for Dro to update.
is also better replaced with
while isMoving()
wend

For a discussion of why - see http://www.machsupport.com/forum/index.php/topic,12764.0.html which although titled "G4 versus sleep" also deals with G4 versus while isMoving().

Cheers

Ian

1699
I'm wondering (actually have been for a long time now) whether it's maybe time this issue received some attention. The forum is littered with similar reports of the probe not stopping on contact. I KNOW there are issues with issuing a G31 from VB which is why I moved my probing routines code into a dll where they were way more reliable. Even then though I've had probes not stopping in gcode based basic bed o nails and such.

Ian

1700
what happens if you do a g31 from the MDI or from gcode? - does it stop then?