![]() | |
| 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 am testing my axis motors and would like to run a burn-in test. I have been reading the forums and googling my morning away trying to figure out how to write a simple g-code loop. In short I am trying to cycle one axis from point "A" to "B" and back a few dozen times. as hard as i try, I am still not getting the finer points of writing g-code. Would anyone be willing to assist? Carl |
|
#4
| |||
| |||
| Ok perhaps I should explain it another way. Right now I am testing the hardware I will be making a cnc with, I have not made the machine yet, just have the electronics. I would like to make sure the electronics are good before investing a lot of time making a machine for this set of motors and controllers only to find they are bad. So for now, it is just a controller (single) wired to a motor, connected to a acme screw. The stepper motor is clamped to the table and can turn the rod and move the acme nut. I just want to run the nut from one end to another a number of times to ensure all the electronics are good. Currently connected to a lpt port on an old desktop running TurboCNC. I can run the motor each direction with turbocnc using the arrow keys, but I would like to automate this process. Please let me know if this is not a bit more clear. Carl |
|
#5
| |||
| |||
| For TurboCNC try: #1=100 ; set how many times to loop N1000 G01 X[#1] Y[#1 ] ; insert your code here ... ... ... #1=#1-1 ; decrement loop counter IF #1 GT 0 M97 O1000 ; if still loops to do, goto line N1000 G01 X0 Y0 ;loop finished The G01 lines are just sample code, replace them with your own code. M97 is an unconditional GOTO line Nxxxx. Note that M97 uses Oxxxx for the destination line number, not Nxxxx |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Noobie Router Mount Question | Saaismail | DIY-CNC Router Table Machines | 2 | 10-19-2011 07:06 PM |
| Complete Noobie Noob Question | markg71 | General Metalwork Discussion | 4 | 04-24-2009 11:00 AM |
| a noobie question | justCNCit | General Electronics Discussion | 7 | 08-18-2007 09:35 AM |
| linear bearings noobie question | s_a_black | Open Source CNC Machine Designs | 1 | 04-25-2007 08:24 PM |
| Simple Question Simple Answer ? | p3t3rv | Stepper Motors and Drives | 6 | 02-16-2006 09:00 AM |