Hello Guest it is September 21, 2019, 07:54:33 AM

Author Topic: Bridgeport Knee Mill Conversion?  (Read 159153 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: Bridgeport Knee Mill Conversion?
« Reply #420 on: September 02, 2016, 03:39:03 PM »
My code works fine for me every time, opens the tool table and the value is there. Suggest you test initially by using the Encoder DRO (oemdro100) and see if you still have issues, if not then likely using the axis DRO is the problem.

Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Bridgeport Knee Mill Conversion?
« Reply #421 on: September 02, 2016, 03:42:50 PM »
Thats what i suspected but i ruled that out by removing the DRO stuff from the macro and just telling it to write 5 as the offset - it would not even do this.

When i was messing with my automatic version before, it still did not show the new value in the table unless it was loaded, unloaded and loaded again?

Something odd going on here, will try again after a reboot in the morning.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: Bridgeport Knee Mill Conversion?
« Reply #422 on: September 02, 2016, 03:45:15 PM »
Take it you are using a version other than 066?
Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Bridgeport Knee Mill Conversion?
« Reply #423 on: September 02, 2016, 03:53:32 PM »
I think it was 062 i was previously advised to run.

Just been messing about on my laptop setup - that exhibited the same behaviour whereby the value was not shown in the table until reloaded.

I added a SLEEP 1000 between the Gcode being written and the DoOEMButton(121) and it works perfectly every time.

Will try this tomorrow on the machine but it seems it needs a small delay there?
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: Bridgeport Knee Mill Conversion?
« Reply #424 on: September 02, 2016, 05:19:52 PM »
Not needed on mine but think scripts can run differently depending on the computer.

Hood

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: Bridgeport Knee Mill Conversion?
« Reply #425 on: September 02, 2016, 05:54:22 PM »
Here is a screen capture video of what I was talking about in Mach4.
https://www.youtube.com/watch?v=pA8xeSCTlCA

Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Bridgeport Knee Mill Conversion?
« Reply #426 on: September 03, 2016, 03:50:20 AM »
Has Mach4 got CV yet or S-Curve acceleration, I hear thats pretty useful??

I would try it but just not as confident in it as i am with Mach3.

Yes this could well be a PC thing, these are Dell Optiplex Gxx boxes and i've read different things about compatibility but if the fix works then :)
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Bridgeport Knee Mill Conversion?
« Reply #427 on: September 03, 2016, 03:59:47 AM »
Macros run in their own asynchronous thread.

Your "code" call simply buffers the line of gcode and the "main" Mach3 thread will execute it when its good and ready.

Meanwhile the macro has continued and executed the line to show the table. At this point, the gcode may or may not have finished (or for that matter even started) running.

This is why your sleep call is correcting things - but this is not the correct way to do it.

You need a while isMoving() after the code call to synchronise the threads.

That said - using the gcode interpreter to do this is a bit naff.

Lookup SetToolParam in the macro reference.

Here's the line though if you just want to wack it in place of the "code" call.

SetToolParam Tool, 2, GetOEMDRO(803)

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Bridgeport Knee Mill Conversion?
« Reply #428 on: September 03, 2016, 04:08:43 AM »
Ooh, that would explain it nicely, i did not know it worked through the buffer.

I will certainly try that code instead, thanks
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Bridgeport Knee Mill Conversion?
« Reply #429 on: September 03, 2016, 06:18:23 AM »
Now we're getting there :)

The SetToolParam version works perfectly with no messing or pauses.

I will stick a bit of video up on the 'tube and a link later.

It's fast, easy, simple - just what is needed.

One oddity - after running the macro once and ok'ing the tool-table etc, the macro will not run again unless the Stop button is pressed?
I tried putting an "End" command on the last line but no change, i added a DoOEMButton(1003) and it works perfectly.
No idea whats going on there but hey-ho ;)
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives