View Full Version : Turbocnc direction signal help?

04-12-2007, 08:32 AM

I'm using Turbocnc and have noticed that the X axis drive from Motion Control Products that I'm using for my pcb router is a little funny. The problem I've got is that if I do the follow code:

G00 X0.400 F90
G01 Z-2 F40
G01 Y10
G01 Z2 F40
G00 X0.400 F90

The last X move above sometimes makes the machine axis move the other way. I.e. I expected it to move the same X direction as the first gcode statement. I have noticed it's a little random, happens more often if I go into jog mode, press Alt-M to zero axis. I should also say I'm working in mm units, increment mode, left those op codes out.

Ok so I call MCP and they tell to increase the time that the DIR signal is setup proior to the step pulse, should be 2uS as per datasheet (min).

So how'd I setup this up in turbocnc?

If I can't do this - is it possible that I've wired the motor wrong as it's the hardest to turn by hand when not powered. When all drives are disabled with power on they're all easy as pie to turn by hand. :)



04-12-2007, 08:43 AM
Look for pulse width in the settings. I don't remember exactly where it's set at, but it's in there.

04-12-2007, 10:24 AM

I've seen only a single pulse width setting per axis under the Axis configuration page but it's my understanding that this is the step pulse width?

Actually it's not clear, if this is the direction setup period prior to step or if its the step pulse width or something else? Also no units are specified, i've got 20 in there now so it could be 20 fried eggs or 20 uS.

Lastly, I just tried to run a long file about 4hours worth of cutting. I wrote a php script to check that the GCODE coord's are within workable bounds. I set the machine running and all looked well 1.5hours in, came back 2hours only to find the engraving bit sunk 4mm into the workholding wood and a Z axis limit stop hit. Maybe this problem is effecting the other drives...

http://aycu39.webshots.com/image/13918/2000388087793617418_th.jpg (http://allyoucanupload.webshots.com/v/2000388087793617418)

I'm running off a laptop and I've checked the LPT port voltage is TTL (5volts) as I know some output 3volts or whatever. Could my laptop be switching into some sort of power save mode thats effecting moving movement?

I know if I shut the lid of the laptop once running I get a small jitter of movement.


04-12-2007, 10:39 AM
You're right, it's the step pulse, in microseconds. I don't believe TurboCNC has a setting that you need, because the direction is just toggled high or low, depending on the direction you're traveling. It's not a "pulsed" signal like the steps are.

If you program it in absolut mode, does it do the same thing?

04-12-2007, 11:14 AM

Thanks for confirming the field is to do with the step pulse width. I've not created GCODE to engrave using ABS coord's. I'll have to change my php script that I wrote to convert an image to GCODE. Thing is the position information on screen showed the tip to be raised in the clearance plane, about 2mm, however it physically wasn't as can be seen from my pic.

Looking at Turbo CNC's pages online your right as I can't seem to find a parameter to allow a delay period for direction changes. Again looking at the datasheet for the drives, it's clear I need a 2uS delay minimum before the step pulses start. All else fails I could get out my scope and check the actual signals.

Do you know if any other CAM software out there allows this feature? I can't be the only guy using MCP drives. Actually I'm sure someone must be using the same drives with turbocnc even?

Unlike the Gecko's that have a fault output, these have fault LED's, which are in side my machine so I can't see'em if theres been some sort of problem. Also I think the LED's go out once the fault is clear so if I have a power problem, which is sorted by a drive going into fault mode - it may well come out of fault mode. Thus the LED could flicker and I'd not be any the wiser - maybe someone knows better as I've only just built the thing.

(... who's thinking what now... )

04-12-2007, 12:58 PM
Mach3 lets you set a delay for changing direction in addition to the step pulse width

04-17-2007, 01:12 PM
I thought I saw a setting in TurboCNC to let you set a delay befor a direction change too.....

Yep. Just checked it's under Config -- General Config -- Reverse Axis Delay.:)