Hello Guest it is May 13, 2021, 03:17:42 AM

Author Topic: Z axis changes direction incorrectly on rebuild lathe. Mach4 windows 10  (Read 828 times)

0 Members and 1 Guest are viewing this topic.


My final exam in school is to make a cnc-lathe move in the correct direction. When I press the z axis and release the button instantly, then press it again, the axis will move in the opposite direction which obviously isn't correct. But when I move the axis on a low feed rate the axis moves correctly. I have a customized profile but I'm not sure if some of the settings are correct or not.

Here is a list of the components im using.

IO card, also the plugin for mach4 on the same link.

Manual for the IO card

2 drive modules that sends and recieves signals from the IO card and sends them to the morors.

power supply

Also using a 5V power supply for the ETH IO card.

Optoisolated IO card that connects to the ETH IO card.

Appreciate any help or feedback you can give, also please answer any questions about the setup if you think I forgot to mention something. Thank you!

Offline ger21

  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Measure the direction signal voltage at the drive.

2010 Screenset

JointCAM Dovetail and Box Joint software

Offline reuelt

  •  487 487
    • View Profile
What power supply did you use  for the "Optoisolated IO card"? If unregulated PSU is used, you will need at least 9V preferebly 12V and connect to the other power supply port.

What are the settings on the 8 switches at the CWD556 drivers?
Current must match the motor max. current rating per phase and microsteps should be 0 (200steps/rev) or 4 (800steps/rev) or 8 (1600steps per rev).

8 microsteps (1600steps per rev) is usually used.
"the gift of God is eternal life through Jesus Christ our Lord"

Offline MN300

  •  243 243
    • View Profile
I don't think the following is involved in your main problem but it should be of interest.

From page 18 of the UC400ETH manual,
Ethernet communication is isolated and power is not transmitted on the network on the
ethernet cable and therefor the UC400ETH board needs an external 12 to 24Volts DC
powersupply to be connected to the plug type green 2 pole power terminal on the side of the
I am assuming you have the LPT-CNC-H plugged into the UC400ETH.
This would seem to say that the opto-isolator board is redundant unless you are isolating the 2 UC400ETH ports from each other.

Also the schematic of the LPT-CNC-H opto board show the earth and ground, and the +5V and VDD5V are jumpered together by zero ohm resistors R30 and R31.
Unless those resistors are removed and two separate powers used, the board is just a buffer.

The power-in terminal called 9V to 12V on some documentation and +24 on the schematic connects to a voltage regulator that provides 5V to the PC side of the circuit. The earth terminal seems to be associated with that supply input, you could verify this by using an ohmmeter to show a connection from the earth terminal to an earth pin on the DB25 connector.

The IO to the machine is powered by the VDD5V terminal and probably the GND terminal. There is no regulator on this side so you would need to connect to a 5 volt supply.

I think you could remove the opto board and run successfully. If you want isolation between the stepper drives and the rest of the IO then you would have to take the steps mentioned above.