Hello Guest it is March 28, 2024, 07:49:49 AM

Author Topic: Quick conversion of code from linear to angular movement  (Read 13478 times)

0 Members and 1 Guest are viewing this topic.

Re: Quick conversion of code from linear to angular movement
« Reply #10 on: August 23, 2007, 07:22:06 PM »
Whako,

No, I just want to change all the Y moves to angular moves for my rotary axis.  I post my code from a CAM software containing let say some ones name.  The codes is all linear moves.  Now I want to replace all my Y movements in this program with A and change the value based on the previous formula to angular values.  I know that there is a similar function in the Maxnc control software, I was certain that Mach would have a similar type of converter.  I also remember coming across some software years back that would convert linear moves to angular moves. 

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #11 on: August 23, 2007, 09:26:50 PM »
Hey Alex,
    This may not be the best way, but would trick Mach into doing it. It would require you to change your steps per in motor tuning everytime you changed the diameter of the part. Just do the math once though and your code, if it reads y, that would be ok too. Your a axis would be wired as the y.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #12 on: August 24, 2007, 04:16:44 AM »
The answer is, of course, a computer program to read the code and convert it - which you could easily do if you had the necessary program - say one of the Basics in you machine.

I may be way off the mark here, but looking at the tutorials and writing script, could you do something similar here and write one of your own  M codes which has a script underlying it.

The equation for your A move is  A=360 M / Pi D, where M is the move to make and D is the diameter of your piece.

Instead of calling G1, call  M *** whatever. The script takes in the code to move M*** X0 Y10 Z0 and rewrites this as G1 X0 A??? Z0. You have no other input because the script takes values from what is already in Mach3. You would need to go through your code to alter the necessary lines from G1 to M*** but other than that you do not have to do anything.

You can also write in little checks such as what happens if the diamemetr is too small to accomodate the move.

Once the script is posted, it should do for anything else you want to write.
Not me driving the engine - I'm better looking.

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #13 on: August 24, 2007, 05:01:05 AM »
OK, I get it, it is really simple what you want to do. The guys at www.torchmate.com do something similar with their software/hardware. You could implement it in hardware with your work clamped in the rotary axis, by switching a selector switch you could switch the step pulses from the y axis to the rotary axis, or by implementing a third axis in Mach3. This will mean that your cad must take care of the post to the particular axis. You do not want to convert your code to angular, it will be the normal xy code. The Lazer manufacturers like Biostronic did the same as a pipe cutting attachment. They just transfer the one axis to a rotary axis. Now depending on how your rotary axis is configured and driven, you might have to change the steps per unit setting as Chaoticone (Is he really chaotic  :D) said. But if you have a closed loop system with servo's and encoders, your encoder could roll on the top of the tube. Similar to the decoiler sheetmetal cutting equipment.

Whacko
Nothing's impossible

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #14 on: August 24, 2007, 06:24:47 AM »
Quote
(Is he really chaotic :D)

Yup. If you don't belive it, ask my wife.  ;D

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #15 on: August 24, 2007, 10:13:10 AM »
Hehe! That makes two of us! Is my avatar visible? Or does your firewall block the image?

Whacko
Nothing's impossible

vmax549

*
Re: Quick conversion of code from linear to angular movement
« Reply #16 on: August 24, 2007, 10:29:26 AM »
You don't need a switch, Mach has a "swapaxis" software function like I said in the beginning,

(;-) TP
« Last Edit: August 24, 2007, 10:31:30 AM by vmax549 »

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #17 on: August 24, 2007, 01:21:53 PM »
You are right, but if need be it can be "hotwired"! That's my forte and downfall! Hacking can be fun!

Whacko
Nothing's impossible
Re: Quick conversion of code from linear to angular movement
« Reply #18 on: August 24, 2007, 06:30:45 PM »
vmax549,
Please describe where to find this "swapaxis" software function.  Step by step please.

Thank you,
Alex
Re: Quick conversion of code from linear to angular movement
« Reply #19 on: August 24, 2007, 11:48:39 PM »
I managed to find my old Maxnc disk with an exe application for converting Y movements to A angular moves.  Converted my linear code in a split second.  It would be nice to have a similar application in mach3.   If anyone is interested it's called Ncto4ax.exe.  It first asks for file name, then diameter and it's done.

Thank you for all your inputs and amazing support,
Alex