![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I've been looking up G-code info on the web and slowely getting some ideas on how to run my machine with G code. Anyhow I only run the X and Z axis and only one motor turns at a time. Right now I run my system with its own on board servo command mode but it has limits that I need to find a way to avoid. For what I do the torque setting will always be the same. Velocity and the # of steps is about all that changes. My motion profile looks some thing like this: X steps 1000 CW Vel 100 Z steps 30000 CCW Vel 500 Z steps 30000 CW Vel 50 Time delay 2 min.. no motion X steps 1000 CW Vel 100 Z steps 10000 CCW Vel 500 Z steps 10000 CCW Vel 100 Z steps 10000 CCW Vel 500 Time delay 30 sec.. no motion Z steps 30000 CW Vel 50 Time delay 2 min.. no motion X steps 1000 CCW Vel 100 This is the basic motions that I run. Each motion has a fixed acceleration profile to it as well.. In other words if I want to change velocity going from point A to point B my current system veiws this as another motion profile. As in accelerat to speed, decelerat,stop ( milliseconds ) accelerat to new speed ... so on and so on. This is a pitfal I would like to get away from and hope that G-code makes this possable. Any input would be great! Bill |
|
#2
| ||||
| ||||
| I'm not really sure what you want. Anyway some basics: (1) If you want more than one axis to move at the same time, put both commands on the same line. G01 X-5.0 Z-1.5 F50 Breakdown of above code: (A) G01 (Linear Interpolation) (B) X-5.0 Z-1.5 (Move the "X" & "Z" axis the specified distance) (C) F50 ("F" stands for Feed, so the Feed here is equal to 50 mm/in a minute) -------------------------------------------------------------------------- If you want to pause a program with no axis movement: G4 F120 (A) G4 (Dwell Time) (B) F120 (Pause for 120 seconds) -------------------------------------------------------------------------- Sample: X (Distance to travel (+/-)) F100 Z (Distance to travel (+/-)) F500 Z (Distance to travel (+/-)) F50 G4 F120 (Time delay 2 min.. no motion) X (Distance to travel (+/-)) F100 Z (Distance to travel (+/-)) F500 Z (Distance to travel (+/-)) F100 Z (Distance to travel (+/-)) F500 G4 F30 (Time delay 30 sec.. no motion) Z (Distance to travel (+/-)) F50 G4 F120 (Time delay 2 min.. no motion) X (Distance to travel (+/-)) F100 -------------------------------------------------------------------------- WARNING This is just a sample , I have NO idea what your machine/control setup is, Run at your own risk ![]() Plus an actual program has more code. .
__________________ Free DXF Files - Vectorink.com - myDXF.blogspot.com |
|
#3
| ||||
| ||||
| Bill.Also see your first post on the related subject. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#4
| |||
| |||
| Thanks guys for the input!.. this helps me. For some more detail of the motors I use, they each have there own on board controller, They where fast and easy to get up and running and required very little brain power on my part. Anyhow my machine only moves on the X and Z axis. All it does is dip a part in a selection of chemical tanks. Only one motor needs to run at any one time. NEVER at the same time like one needs for a router. I'll study some more on the web and come up with some more focused questions if you folks don't mind. Bill |
|
#6
| ||||
| ||||
------------------------------------------------------------------------
(B) To rotate a motor counter-clockwise use the ( - ) Example: G01 X+5.0 F50 G01 Z-1.5 F50 (The sample would make the "X" motor spin clockwise, and the "Z" motor would spin counter-clockwise) Again, I believe some controls don't require you to use " + " (an option) while others do require it. As far as the negitive sign ( - ), I think all controls require you to use that. So the sample above, could also look like this: G01 X5.0 F50 G01 Z-1.5 F50 Notice the ( + ) missing from (X+5.0) If your just starting out, with g-code I would recommend keeping the ( + ) & ( G01 ), to keep the program as clear to you as possible. Again as far as what way a motor spins clockwise/counter-clockwise would all depend on how your machine is built ( If the above doesn't work for your setup, try reversing them ( - ) & ( + ) in your code. Keep your ( F ) very low when practicing, your code. Then when you get the path correct, crank up your Feed. Just be cautious at first ![]() .
__________________ Free DXF Files - Vectorink.com - myDXF.blogspot.com |
|
#8
| ||||
| ||||
You could use the same examples and switch the Linear, and instead have a rotary axis such as "A axis". Then it would be in degree. Example: G01 A-360 F50 ("A" would rotate counter-clockwise, 360 degree, at a Feed rate of 50 mm/inch a minute) ------------------------------------------------------------------------- Just curious , do you have any photos of your setup? ![]() .
__________________ Free DXF Files - Vectorink.com - myDXF.blogspot.com |
|
#9
| |||
| |||
| Just curious , do you have any photos of your setup? Right now no.. its 3000 pounds, 50+ sq ft of floor space and 7 feet tall. Lots of pumps, heaters, ventelators and a low tech load lock to keep the nasty stuff inside and away from the operator. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |