Hello Guest it is March 28, 2024, 02:40:53 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.


Messages - stirling

81
General Mach Discussion / Re: Skip Tool-change if tool is loaded?
« on: September 04, 2016, 09:45:03 AM »
Just trying to teach a man to fish etc.

82
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 04, 2016, 09:38:57 AM »
OK, Done and it seems to work ok, I still have to press stop before the macro will run again though.

Now what :)

previously you said:

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 ;)

Hey-ho indeed - I strongly suggest you/we get to the bottom of WHY - rather than just appling a kludge and moving on.

83
You're doing what's known in the business as "thrashing".

You're moving from one thing to the other without REALLY understanding what you're doing and getting more and more frustrated. The final resort of all "thrashers" is to blame the system.

I'm really surprised and a little pissed to be honest that I'm spending time trying to narrow down what's amiss in your other thread and instead of working with me your off pissing about with a system that you KNOW has problems.

Take a break - have a coffee or a smoke or whatever and then concentrate on ONE thing at a time. Move logically from one step to the next and you'll get there. Carry on thrashing and you'll continue your journey up your own rear end.

84
General Mach Discussion / Re: Skip Tool-change if tool is loaded?
« on: September 04, 2016, 07:27:25 AM »
maybe - but why use guesswork?

Make a copy of your existing M6Start macro and create a new one consisting solely of your proposed addition (with msgbox output to give you some debug feedback) and you test it.

e.g. you might do something like this:

If GetSelectedTool() = GetCurrentTool() then
  msgbox "tools are the same"
else
  msgbox "tools are different"
end if

If you're happy it does what you want you mod your existing one. But you KEEP the copy until you're 100% sure you're good. Then you can easily start from a known point if you need to.

85
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 04, 2016, 05:01:54 AM »
OK - moving on.

Taking out the chaf from your macropump code it resolves to the one single functional line of:

SetOemDRO 803, GetUserDRO(1502)/60.06041

I'm assuming that user DRO 1502 is updated somehow to contain the real time position (in encoder position) of the slider. Is that correct?

So FUNCTIONALLY, all the macropump code does is divide that by your scaling value and pop it into the A axis DRO.

Moving on to your button macro. Again, removing all the chaf, all it does is copy the A axis DRO into the tool table for a given tool.

So, if we (for the time being) fix it to tool 1. Your button code can be resolved to 1 line:

SetToolParam 1, 2, GetOEMDRO(803)

So use these two one liners for your macropump code and for your button code.

Then do your tool slider thing, press the button and then manually open the tool table and get back with the results.

Oh - one more question:

In post #411 Hood said:

And then I also have the zero button which just pulses the Index input on the Enc module.

What does "pulsing the Index input" actually do?
Why does Hood do it?
I don't see anywhere where you do it?

86
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 04, 2016, 04:27:52 AM »
OK - not quite the exact answer I was looking for but anyway - so it doesn't actually do anything FUNCTIONAL - it's purely cosmetic. Is that correct?

87
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 04, 2016, 03:48:48 AM »
NO - really? LOL - work with me here Dave. What does it ACTUALLY do? Does it turn a light on? ring a bell? make the tea? What is ACTUALLY achieved by flipping bit 5 on or off?

88
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 03, 2016, 02:01:09 PM »
I don't have a csmio thingy so what does setting/clearing bit 5 of index 90 actually do?

89
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« on: September 03, 2016, 11:49:53 AM »
Dave - do me a favor and turn your phone on its side - It's like trying to watch TV through a fence.

Post your pump macro and button macro and I'll take a look at the issues you posted in reply #430.

90
General Mach Discussion / Re: Bridgeport Knee Mill Conversion?
« 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)