Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Sccues on May 02, 2016, 07:54:40 PM

Title: A axis operation in Mach4
Post by: Sccues on May 02, 2016, 07:54:40 PM
I recently made the switch to Mach4 and I've noticed a difference in the way Mach4 handles an A axis move in comparison to what my Mach3 does.  For example if I started at A zero and typed the MDI code "G00 A3600" Mach3 would rapid 10 full revolutions and Mach4 just sits there, since A0 is the same position as A3600.  The A value doesn't have to be divisible by 360.  It works this way and moves only to the equalent end position regardless of the value I enter.  The problem is there are times when I would like to turn multiple times around.  Is there something I am missing in the configuration file or is this just how the new version works and it can't be changed or forced to behave differently.  Thanks
Title: Re: A axis operation in Mach4
Post by: Steve Stallings on May 02, 2016, 08:52:44 PM
Look on the "General" page tab under Configure > Mach4 and you will see a section
in the bottom right quadrant labeled "Rotary Axes". There is a check box for each
rotary axis to enable or disable rollover.
Title: Re: A axis operation in Mach4
Post by: Sccues on May 02, 2016, 08:56:22 PM
Yeah, I have rollover A selected when this happens.  Is there anything else that needs to be configured?  It's moving accurately and reading out in degrees, it just doesn't behave like Mach 3 did.
Title: Re: A axis operation in Mach4
Post by: Steve Stallings on May 02, 2016, 10:00:23 PM
Not trying to be picky, but have you tried it without A axis enabled for rollover? My
understanding was the the rollover function causes the requested destination to
"roll over" into the space mapped by 0 to 360 degrees. I have not actually tried
any of this myself. Unfortunately this option is not documented in the current
manuals.
Title: Re: A axis operation in Mach4
Post by: Tweakie.CNC on May 03, 2016, 01:48:35 AM
I recently made the switch to Mach4 and I've noticed a difference in the way Mach4 handles an A axis move in comparison to what my Mach3 does.  For example if I started at A zero and typed the MDI code "G00 A3600" Mach3 would rapid 10 full revolutions and Mach4 just sits there, since A0 is the same position as A3600.  The A value doesn't have to be divisible by 360.  It works this way and moves only to the equalent end position regardless of the value I enter.  The problem is there are times when I would like to turn multiple times around.  Is there something I am missing in the configuration file or is this just how the new version works and it can't be changed or forced to behave differently.  Thanks

You are not missing anything in the config. Rotary axis is just one of those things that has yet to be sorted out.

Tweakie.
Title: Re: A axis operation in Mach4
Post by: $cott on May 05, 2016, 10:10:40 PM
Has the rotary A-axis been sorted out yet for Mach4?  Is there documentation on how to set up the A-axis for degrees in Mach4?  I am trying to run a direct drive on the A-axis and can not get the stepper to turn in degrees accurately when i give say A90 (90 degrees) or any other.

 My stepper driver has the ability to micro step from 400 to 25600 pulses/rev.  Can anyone give me some direction as to how to set MACH4 properly to give best accuracy with direct drive?

Scott
Title: Re: A axis operation in Mach4
Post by: bob_at_pmdx on May 06, 2016, 01:25:21 AM
Taking info from your related post on our forums (http://www.pmdx.com/PMDX-Forums/index.php?topic=266.0) - Is this like a glue extruder, where the motor is always going to spin one direction to apply glue?  If so, make sure to disable "rollover" as in step (1) below.  It should be disabled by default, but check to make sure.  If rollover is enabled and you issue a "G0A30" followed by "G0A300", the 2nd move will be backwards through 0 degrees to 300 (actually -60 degrees).

I'm at home and don't have a motor to verify this with, but have you tried this:

(1) Go to the "Configure" menu and select "Mach".  On the "General" tab in the lower right corner make sure the "Rollover A" box in un-checked.

(2) I tried these motor tuning parameters:
- set your motor driver for 1/8th step (1600 steps/rev)
- In Mach, set "steps/unit" to 4.444 (i.e. 1600/360 = 4.444 steps/degree)
- set velocity to 21600 units/minute (60 RPM * 360 degrees/rev, just a number I pulled out of thin air, change this for whatever a realistic velocity is for your machine)
- set acceleration to 500 units/sec^2 (again, a number I pulled out of thin air)

For me, entering a "G0A30" in the MDI box results in the SmartBOB generating 133 step pulses, which is (30/360)*1600 or as close to 30 degrees as  you can get with 1/8 step resolution.  Try this (with realistic velocity and accel params) and tell me what you get.

[EDIT] If you don't get the expected results, in addition to telling us how far the motor actually moved, also tell us which version of Mach4 and the SmartBOB plug-in you are running (both are available on the SmartBOB configuration dialog or the SmartBOB diagnostics dialog (go to the "Diagnostics" menu and select "PMDX SmartBOB").

Bob
Title: Re: A axis operation in Mach4
Post by: $cott on May 06, 2016, 09:19:28 PM
Bob,

Thanks for your input for my problem.  When i test with the settings you suggested and I enter a G-Code of A0A90 say ....  the stepper only moves maybe 2 or 3 degrees.
I have checked to make sure my driver is set at 1600 steps per revolution. 

Scott
Title: Re: A axis operation in Mach4
Post by: $cott on May 06, 2016, 09:20:09 PM
Oops that  G-Code G0A90
Title: Re: A axis operation in Mach4
Post by: bob_at_pmdx on May 06, 2016, 11:52:34 PM
Then you enter "G0A90" and the motor only moves a small bit, what does the DRO for the A axis say?  Does it end up displaying some number close to 90?

Try slowing the max velocity WAY down and see what happens.  For example, set the max velocity to 2160 (6 RPM) and accel to 100.

What breakout board and/or motor driver is your PMDX-411 connected to?

And finally, please post your Machine.ini file (otherwise I'll end up asking a bunch of very basic questions about your configuration).  Or create a "profile package" and post that (you will have to change the file extension from ".m4prof" to ".zip" in order to upload it).  To create this, go to the "Help" menu and select "support" and then "Package Current Profile".

Bob
Title: Re: A axis operation in Mach4
Post by: $cott on May 07, 2016, 12:38:41 PM
Bob,
I tried again this morning and it is working fine now with the first settings you gave me.  I am a bit confused but i am pleased to have it working as expected now.  Does the system need to be reset at times?  Also i noticed if the Roll Over is checked in the MACH4 setup it seem to get the weird operation!  I believe i can now write the G-Code I need to do to get my glue machine up and running now.

Setup:
Stepper connected to round disk mount, were I attach a light to and then i want to apply silicon through a EFD 7000 glue dispenser.  I basically will control the speed and rotation of the disk while controlling the EFD unit to hopefully apply the silicon very evenly every time on a LED light we manufacture.

Gear:
Driver: DM542
Stepper: 23HS243M made by Act-Motor (quite over kill for my application but i did not have to buy anything)
Breakout Board: DB25-1205 like on Micro Robtics Site Part# OT382
All Connected to: PMDX-411

Thank you for being so helpful!!  As for the Roll Over option I believe there is an issue still there maybe.

Thanks
Scott
Title: Re: A axis operation in Mach4
Post by: bob_at_pmdx on May 08, 2016, 12:44:28 AM
As far as Mach4 and the PMDX-411 are concerned, you shouldn't need to reset/restart them periodically.  A wild guess here but could it be possible that the microstep settings on your driver didn't "take" until power was cycled on it???  The manual for the DM542 doesn't explicitly say whether the DIP switch setting take effect immediately or require a power cycle to take effect.

If you have "rollover" enabled, Mach4 will limit the motor's rotation to a single 360 degree range. If you move to 30 degrees, then move to 300, it will NOT continue if the positive direction.  It will instead go backwards through 0 degrees, then to 359, 358, etc. until it gets to 300.  I believe for your application you need to disable "rollover".

Bob
Title: Re: A axis operation in Mach4
Post by: Sccues on May 08, 2016, 07:38:07 PM
Disabling the rollover A option fixed my problem.  It's working like I would expect it to now.

Thanks