Hello Guest it is April 19, 2024, 03:12:41 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 - Osker

Pages: 1 2 3 4 5 »
1
Interesting idea.  I will look into that.

Dan

2
Gary,

Don't assume that you will have a problem using the equipment you have.  For threading I used a 420 oz/in stepper without problems.  The key is to balance spindle RPM and federate so that tool load is within the steppers useable torque curve.  It takes a little trial and error to find that sweet spot, but once there you should be fine.  As you eluted to, production time is not critical for most of us doing hobby CNC work.  A larger stepper should allow higher feed rates, and higher RPM, but that is not the issue for many of us.  

Threading was the driver for me.  With the Sherline motor spindle RPM would change as tool loading would change. That resulted in inconsistent threads.  My initial solution was to use a 420 oz/in stepper for threading and the Sherline motor the rest of the time.  420 oz/in was chosen simply because I had it.  Eventually, I tired of swapping back and forth and decided to use a stepper full time.  I went with the 1805 oz/in stepper to get a broader torque curve, not simply more torque.  


Dan    

3
Gary,

I am driving the spindle with an 1805 oz/in stepper motor using an MA860H stepper drive.  The MA860H is rated for 18-80V AC or 24-110V DC.  DC power supplies in the 100+V range get pricey, so I am using an AC step up/down converter.  Not an advertisement but I am using a Rock Stone Power 1000 Watt step up/down converter, available from Amazon for around $60.  On the back of the unit one can select from various AC input levels.  I select 200V, which is the lowest step down voltage input, and plug the unit into an 110V AC outlet.  My AC is normally around 120V.  120/200 yields a stepdown factor of 0.6.  0.6 times 120V yields an output of 72V.  Still within the acceptable AC range of the MA860H.  For clarity, the MA860H plugs into the 110V output, not the 220V.   I have been using this setup for two or three years and have had no problems.   It is my understanding that stepper drivers which run directly off of 110V AC have become affordable.  Eliminating the cost of step up/down could make them even more attractive.

Dan    

 

4
Craig,

I should have posted an update for others who may be having a similar problem.  The problem was that Mach4 requires the spindle speed to be specified using G97 S__ M3.  Where S specifies the spindle RPM.  That was not the case in Mach3 and a G97 command is not used in the sample code provided in the Mach4 documentation.  I had copied the Mach4 code, expecting it to work as written.  Did not happen.  I found the problem when the PoKeys support tech sent me the code they use to test their threading algorithm.  Once I added the G97 command to my code, the lathe synchronized as expected.  Just another "Gotcha".

Regarding spindle speeds when threading, I have a Sherline lathe and drive the spindle using an high-torque NEMA 34 stepper motor.  The stepper is controlled by a PIC microcontroller, which handles among other things producing the step and direction signals . The PIC has a numerically controlled oscillator peripheral that is used to generate the step frequencies.  As one would expect from using a stepper, spindle speed is constant and is unaffected by tool loading.  Well, almost unaffected.  The stepper can be stalled at normal turning speeds.

The following link is to a small video demonstrating turning stainless steel with the stepper conversion.  https://www.youtube.com/watch?v=jWd7hNQuNxc

The following link is to a small video demonstrating threading with the stepper conversion.    https://www.youtube.com/watch?v=i20c5PwtPBM&t=20s


Dan

5
Has anyone successfully configured MACH4 and a PoKeys57CNC to do threading with a single index pulse per revolution?  I have found videos demonstrating threading with a PoKeys57CNC and Mach4.  However, an encoder is being used versus a single index pulse. 

The PoKeys57CNC manual indicates that it will do threading with either an index pulse or an encoder.  My index pulse generator is fairly typical.  A slotted IR sensor, an encoder disk with a single hole, and a microprocess for doing a little signal conditioning.  I have enabled threading; checked the box for using ultra-fast encoders, and checked the box for lathe(index).  The RPM DRO in Mach4 displays the correct RPM, so I think it reasonable to conclude that index pulse is being seen.  I have looked at the Index Pulse signal with an oscilloscope and it is a reasonably clean asymmetrical square wave.  The signal high is +4V, the low is essentially zero.  At 300 RPM the high pulse is about 8ms.     

I copied the threading example code from the Mach4 Lathe manual.  When the code is loaded the displayed tool path appears correct and there are no error messages.  After clicking Cycle Start, the X & Z axis move to their respective start positions.  When the G76 code line is processed, nothing happens.  It is as if either Mach4 or the PoKeys57CNC is waiting to synchronize on the index pulse.

I am running the most current versions of Mach4 and the PoKeys plugins.  Other than the threading issue, the lathe works as one would expect.  Any suggestions for what to try will be appreciated.

Dan

6
Mach4 General Discussion / Re: Mach4 Function Primer
« on: May 24, 2018, 01:13:27 PM »
Thanks for the suggestions and the links.  I am running a licensed copy of Mach4.  I will try using wxmessagebox.

Dan

7
Mach4 General Discussion / Re: Mach4 Function Primer
« on: May 21, 2018, 04:36:56 PM »
Craig,

Thanks for the assistance.  I will check out the API document as well as continue digging through the forum and posted videos.  I do agree with others, the documentation is lacking, but that has been the history with ArtSoft and Machx software.  As Willie Nelson philosophized in the movie Barborosa, "What cannot be changed must be endured".

I have ordered the CNC Programming Handbook.  Hopefully, that will shed a little more light.


Dan

8
Mach4 General Discussion / Mach4 Function Primer
« on: May 21, 2018, 11:57:38 AM »
I am migrating from Mach3 to Mach4 and have several M functions that need to be re-written to work with Mach4.  After looking at several code examples and DazTheGas videos (which are very informative)  my progress is still painfully slow.  ls there a primer for using the common functions called in Mach4 scripting and the general logic behind them?  In the absence of a primer, it would be helpful if the following code from the Lua examples was explained.  No need to explain what a function is, declaration of variables,  or the use of if then statements.  just what the functions are doing.  I see the function mc.mcGetInstance() used in a lot of Mach4 macros. I  assume that is polling some register and code execution depends of the result, but what are the possible results?


The macros I use emulate  G77:  Variables are defined in Gcode for start and stop axis positions, feed rates, and cutting depth per pass.  A macro is then called which executes until the final depth is achieved.  Nothing major, but it does reduce code.
  
I am not looking to be taught how to fish, just to bait the hook.
 
local inst = mc.mcGetInstance()
local a,b
function GCodeExecute(GCodeString)
   local rc = mc.mcCntlGcodeExecuteWait(inst, GCodeString) --This is the standard function call for executing gcode. it waits for motor feedback before continuing in the file.
   if rc ~= mc.MERROR_NOERROR then return "GCode failed", false end
end

a,b = GCodeExecute("G0 X1 Y2.5 Z3.5")
if b == true then
   mc.mcCntlSetLastError(inst, "Motion Succeeded")
else
   mc.mcCntlSetLastError(inst, a)
end
--You can even incorporate variables into the function call.
local travelxdistance = 1.45
a,b = GCodeExecute("G1 X"..travelxdistance.."Y0")--You can concatenate to the end of the gcode string using '..'
if b == true then
   mc.mcCntlSetLastError(inst, "Motion Succeeded")
else
   mc.mcCntlSetLastError(inst, a)
end

9
Found the problem.  The X Current DRO was configured as read only.  

For those who may have a similar problem I corrected it by:

1) load the Mach4Lathe profile.  
2) Open the screen editor.  (Operator/ Edit Screen)
3)  Position cursor over the X axis DRO and Click the left mouse button
4) Within the X Current control panel move the cursor to the Editor Box
5) The box to the right of the Editor likely shows "Read Only"
6) Left click in that box to show its dropdown menu
7) Select In Place
8) Exit the screen editor and accept save changes

10
There may be an issue with the most recent MACH4Lathe profile within MACH4 Hobby (4.2.0.3804).   I am not able to edit the position of the X axis using keyboard input.  The profile appears to load normally.  All axes move when jogged, and the respective current position updates within the DRO.  The current positon in the Z axis can be edited using the keyboard.  However, I am unable to edit the X axis using the same procedure as used when editiong the Z axis.  
 
To edit a current positon I:
 
1) Use the mouse to position the cursor within the X current position box.

2) Left mouse click

3) Nothing happens when in the X DRO, but when in the Y DRO the values highlight and can be edited using the keyboard and the DRO updates when enter is pressed.  Pretty much what one expects.

Using the screen editor, I looked at the settings for the two DROs to see if there was a setting that could be toggled to enable the X DRO to be edited.  Did not see one.

Editing the current position for all theree axes appears to be working normally within the new MACH4Mill profile.  Any suggestions for what can be done to correct this will be appreciated.


Regards,

Dan


Pages: 1 2 3 4 5 »