Hello Guest it is April 25, 2024, 04:50:13 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 - scotho

Pages: 1
1
General Mach Discussion / Re: Manual chipbreaking script?
« on: October 15, 2011, 04:43:09 PM »
Hi,

I THINK if I had spare stock to test drill dozens of holes I could speed things up considerably. CNC only follows instructions, so at least on my homebuilt beast CNC can never detect and react to a hole that is not yet centered, or to a fixture that is beginning to flex, or tooling that is starting to vibrate, etc. That is where the human touch -- watching, listening, and compensating can make such dramatic decreases in cutting time. Actually, if I could afford the luxury of a drill press and a high helix cobalt bit, I wouldn't mind competing with a low-end CNC machine.

Getting back on topic, does anyone know if motor tuning, i.e. acceleration/deceleration is saved with each screenset? I THINK I may be able to reduce dwell by making a screenset just for manual drilling with minimal deceleration settings. Just a thought I will soon test.

Still, can someone THINK of a way to detect actual time of motion stopped? isMoving appears not to work in a script that didn't initiate the movement.

All the best, and think different,
Scott

2
General Mach Discussion / Re: Manual chipbreaking script?
« on: October 15, 2011, 04:48:40 AM »
>The main question would be why would you want to do a manual process on a CNC machine that emulated an auto process.
>Why not just type in the code to drill a hole?

It all depends on the hardware one is using. Mine is coolant free, has limited leadscrew torque, and limited rigidity.
My handwritten code that is conservative enough to drill a 3/8" hole in 1-3/4" 6061 without crashing takes well over an hour.
But with the 'look and feel' method I can center drill and deep drill the same stock without a tool change in a couple of minutes.

>BUT just in case, I don't think you can emulate what you want via a script AND run it as a MANUAL function. It would require
>functions that may  not exist and time delay problems that do exist.

I wrote a script in AutoHotKey which when holding down alt-d does a mouseDown on the Jog Z-- button, and when alt-d is released, the Jog Z-- button is released. Then the AutoHotKey script immediately executes a user button VBscript that tries to wait for the movement to stop before executing the G-code to retract the Z-axis by 0.030" or so. The only problem is that the While-isMoving-Wend sequence doesn't seem to work. I have to use a sleep (475) to ensure the motion has stopped before executing the retract code.
Maybe 'isMoving' only knows of motions initiated in the same script. If anyone knows how to detect when motion has stopped, I would sure like to know. The 475 dwell is a bit long for my liking, but it ensures the retract executes every time, not just most of the time.

The bottom line is... the time delay problems you mentioned still exist.

All the best,
Scott

3
General Mach Discussion / Manual chipbreaking script?
« on: October 14, 2011, 05:56:35 PM »
Hi,

I was wondering how a script could be written to define a key which would jog the z-axis down when the keydown occurs, and retract a predefined amount when the keyup occurs. I would want to use this for manual drilling. I'm currently using pageDown and pageUp keys, but too much pause is required between pressing the two keys.

Thanks for any help,
Scott

4
Here is the script I used in macropump.m1s.
I get a flashing LED showing the script is running,
but nothing I do reads the current rpm
(from the spindle pulse) into the RPM variable.
I do not understand the Mach3 style of documentation.
How do I get the rpms into the RPM variable?

This script worked when it was defined as a button
script in my screenset. I can't remember whether I
used GetRPM() or GetOEMDRO(39) or something
else.

'file: macropump.m1s

Option Explicit
Dim RpmDRO, DiameterDRO, RPM, SFM
RpmDRO = 39
DiameterDRO = 105

While GetUserLED(1001)
  RPM = GetRPM()
  'or RPM = GetOEMDRO(RpmDRO)
  SFM = 0.2618 * RPM * GetOEMDRO(DiameterDRO)
  RPM = Int(RPM / 50) * 50
  SFM = Int(SFM / 5) * 5

  'display RPMs in increments of 50
  SetUserDRO(1000, RPM)

  'display SFM in increments of 5
  SetUserDRO(1001, SFM)

  'flash an LED to show that script is running
  if GetUserLED(1002) then
    SetUserLED(1002, 0)
  else
    SetUserLED(1002, 1)
  end if

  Sleep(1000)
Wend

Thanks for any additional help,
Scott


5
General Mach Discussion / Re: How to make a Script PERSISTANT?
« on: November 21, 2010, 05:44:25 PM »
Thanks!

I will give it a try.

--Scott

6
General Mach Discussion / How to make a Script PERSISTANT?
« on: November 21, 2010, 05:25:43 PM »
Hello,

I wrote a script which uses GetRPM(), then calculates and displays the RPM's in increments of 50 on a UserDRO.
I use a 'start' button to run the script (in a semi-hard loop), and a 'stop' button to terminate the loop.

I would like the script to be able to run before loading g-code.
I would like the script to run after pressing system 'stop' or 'reset'.
I would like the script to Always be running unless I tell it to stop.

How can this be achieved?

Thanks for any suggestions,
Scott.

Pages: 1