Hello Guest it is July 20, 2019, 08:08:18 AM

Author Topic: Mach3 non-maching  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

Mach3 non-maching
« on: March 18, 2011, 01:15:38 PM »
Hi to everyone in this community.

I'd like to hear advice about whether or not Mach3 could be used for controlling 2 steppers in the following scenario:

Stepper #1 - rotating a turntable in selectable 30-60 degree increments and pausing for a determined amount of time at each stop.
Stepper #2 - While #1 is stopped, very slowly rotating through approximately 120 degrees with the rotation speed selectable. After rotation it would reverse rapidly to a home position
The sequence would be stepper #1 rotate to position, halt, and stepper #2 to rotate slowly through it's predetermined angle. Then stepper #2 would rotate to the next increment and stepper #2
would again rotate through the same arc as previously. This sequence would repeat through 360 degrees.

This endeavor is to operate an accurate laser scanner, if anyone is interested.

I have the facility to create 3D models  and convert to NC via DeskProto if that would create the proper code or I could stagger through creating native G code
to achieve the instructions. I write stagger because it would be learning it from basically scratch.

Any suggestions would be most appreciated. I'll bet someone out there has already done this or something very similar???

Thank you for any and all replies.....
Re: Mach3 non-maching
« Reply #1 on: March 18, 2011, 06:01:16 PM »
Hi.

That should be pretty easy with normal Gcode programmed as rotary axis and a dwell time for the pause.

Like
A30
G04 P...(P for the pause in ms or second)
A60 g04 P...  The programmed angle will depend if you are in incremental mode or absolute mode.

And same thing for the second stepper.

Jeff

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 non-maching
« Reply #2 on: March 18, 2011, 06:40:49 PM »
I think it may be even simpler in the G Code as you would not even need the G4, well thats if I am understanding
Code to me would be
G1A60F100  (or whatever feed and angle you wanted)
G1B120F10
G0B0
G1A??  etc etc

Hood
Re: Mach3 non-maching
« Reply #3 on: March 18, 2011, 07:12:25 PM »
Thanks very much Ostie01 and Hood.

 I think you've pointed me in the right direction.
After a little pondering, I believe Mach3 requires a xml file designed for the driver and motors it's expected to command? If so, are these readily available from the board suppliers/mfg'rs or do they have to be assembled from the specs for the board and motor?

Any recommendations for a 2-3 stepper board that might have an accessible xml?

Pouring hot and heating up......

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 non-maching
« Reply #4 on: March 18, 2011, 07:18:48 PM »
The xml is a file that Mach produces for your setup cofigurateion and is not really something you need to get froma third party. When you alter the settings in Mach for such things as ports and pin setup for Inputs, Outputs, motor settings, in fact almost every setting,Mach writes that to the xml. It means that you can save it as a backup (in fact Mach does it for you as well)

Some places that sell complete setups will send an xml as it will mean you dont have to configure Mach yourself but normally when you buy bits to make your own system you will do the config yourself.

If the motors are fairly small (3amp or less steppers) then the G540 is getting an excellent reputation.
Hood