Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Stev on May 18, 2020, 11:56:08 AM

Title: Mach 4 setting up software I/O.
Post by: Stev on May 18, 2020, 11:56:08 AM
Hi I'm trying to figure out how to setup the mach 4 system and the whole setting up the I/O is confusing, I'm using this stepper motor and driver kit from eBay. https://www.ebay.com/itm/151796936792
I'm using a UC100 motion controller.

The pictures here show what I have absolutely no clue on what to do.
Don't know what pin is for what, don't know what exactly to enable or don't.

Thanks for any help.(https://i.ibb.co/RzbR6Nw/20200517-190938.jpg) (https://ibb.co/r40Dp3r)

(https://i.ibb.co/tQXVm8p/20200517-190945.jpg) (https://ibb.co/rFsD742)
Title: Re: Mach 4 setting up software I/O.
Post by: TOTALLYRC on May 18, 2020, 08:49:22 PM
Go to your Mach4 Hobby folder on your C: drive and open the folder called Docs. Lots of great information that explains how to do what you need to do.
Once you have read the manuals 3 or 4 times, please get back to us with the wiring diagrams for the stepper drives and the Breakout board you are using.
 A wiring diagram for the UC100 motion controller would also be helpful.


Mike
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 19, 2020, 12:58:05 PM
Here's the wiring diagram, I don't have an emergency stop or limit switches installed yet.

The manuals I've went over multiple times already and they don't directly say what to do in the output and input signals, how do I know what pin goes to what motor? How do you assign keys?

(https://i.ibb.co/1fzqHH4/s-l1600.png) (https://ibb.co/FbHwGGd)
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 19, 2020, 06:09:58 PM
I figured out the pin outputs I guess, but when I hit any of the jog buttons the program closes.

 :-\(https://i.ibb.co/dcxkvyY/20200519-170112-HDR.jpg) (https://ibb.co/thFY65r)
(https://i.ibb.co/BL8FjP3/20200519-170100.jpg) (https://ibb.co/TczdRT2)
(https://i.ibb.co/jLfBN9M/20200519-170128.jpg) (https://ibb.co/P5j3Lsh)
(https://i.ibb.co/WBZ0bbv/20200519-170117.jpg) (https://ibb.co/F82XSS4)
(https://i.ibb.co/xgjtrGK/20200519-170133.jpg) (https://ibb.co/LgtXs6D)
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 19, 2020, 09:58:36 PM
Hi,
if I understand you are using a UC100?

A UC100 is limited to one ports worth of IO, so pins 1,2-9,14,16 and 17 are outputs while pins 10,11,12,13 and 15 are inputs.

You have barley enough outputs for step and direction  outputs to six motors and that does not allow any output pins for the spindle
nor enable pins.

Second issue you have (in your screen shot) you have assigned X++, X--, Y++,Y-- etc as OUTPUTS????? Limit switches are
INPUTS to Mach, not outputs.

Your step/direction signal are Mach outputs, if you scroll down the OutputSignal page you will find the Step/Direction outputs to each motor.

To be honest I think that you are too IO limited with a UC100, you need an Ethernet SmoothStepper or a UC300.

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 19, 2020, 11:36:22 PM
Quote
Your step/direction signal are Mach outputs, if you scroll down the OutputSignal page you will find the Step/Direction outputs to each motor.

Which part exactly in the output signal page? There's nothing that says step/direction.
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 20, 2020, 01:03:38 AM
Hi,
OK, they are not on the Mach Control plugin OutputSignals page so they must be on the UC100 plugin page.
Can you post a screen shot of the settings page/pages of the UC100 plugin?

I use the ESS and that will no doubt be different.

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 20, 2020, 10:57:21 AM
(https://i.ibb.co/QMjvs71/Screen-Hunter-01.png) (https://imgbb.com/)
(https://i.ibb.co/CzzFgRC/Screen-Hunter-02.png) (https://imgbb.com/)
(https://i.ibb.co/SXVyLWV/Screen-Hunter-03.png) (https://imgbb.com/)
(https://i.ibb.co/QvMRcVC/Screen-Hunter-04.png) (https://imgbb.com/)
<a target='_blank' href='https://imgbb.com/'>image hosting[/url]
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 20, 2020, 11:37:50 AM
Hi,
OK you have in the UC100 plugin assigned the output pins 2-6 as motor outputs for
motors 0-3.

In your previous post you have assigned pins 2-7 as X, Y an Z limits and homes????
Firstly limits and homes are inputs....not outputs.

In Machs Control plugin on the OutputSignals page clear all the assignmements you have made
(X++,X--,Y++,Y--,Z++,Z--,XHome,YHome,ZHome).

That should allow you to control three motors. How do you want to controll the others?

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 20, 2020, 12:02:43 PM
Hi,
OK you have in the UC100 plugin assigned the output pins 2-6 as motor outputs for
motors 0-3.

In your previous post you have assigned pins 2-7 as X, Y an Z limits and homes????
Firstly limits and homes are inputs....not outputs.

In Machs Control plugin on the OutputSignals page clear all the assignmements you have made
(X++,X--,Y++,Y--,Z++,Z--,XHome,YHome,ZHome).

That should allow you to control three motors. How do you want to controll the others?

Craig

I thought those outputs were for assigning the pins to tell which way the motors should go.
 X++ = Pin2
 X-- = Pin3

The program shows its jogging but none of my motors are actually moving?

(https://i.ibb.co/ZBZvXpC/Screen-Hunter-06.png) (https://ibb.co/6HdGw75)
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 20, 2020, 03:28:33 PM
Hi,
clear all the outputs in the Mach Control plugin OutputSignals page.

What you are doing is assigning pin 2 as Output#1 in one plugin and as X Step in the UC100 plugin.
So which plugin has control of the state of the pin? If the UC100 motion plugin requests that pin 2
pulse on and off to cause the motor to work and yet the Control plugin commands Output#1 to be 0,
who wins?

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 20, 2020, 03:30:39 PM
Hi,
next question, do your drivers have an enable input?

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 20, 2020, 03:57:18 PM
Yes my driver's have enable inputs, I didn't know how to wire it up and thought those were just optional by what the schematic said.

(https://i.ibb.co/RGFX20P/20200520-144852.jpg) (https://ibb.co/HLSc7zY)
Title: Re: Mach 4 setting up software I/O.
Post by: joeaverage on May 21, 2020, 02:26:36 AM
Hi,
the enables of all your drivers will have to be wired up.

Its traditional to use an output of the controller as an enable output and that output would enable ALL
your drivers. In your case you are so limited with the UC100 you may have to forgoe the enable contol
and wire thrm direct to a 5V supply to enable each driver.

Craig
Title: Re: Mach 4 setting up software I/O.
Post by: Tweakie.CNC on May 21, 2020, 05:25:11 AM


From the data sheet the manufacturers of the drives say that if you are not going to be using the Enable inputs then they do not need to be connected.

Tweakie.
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 21, 2020, 09:22:08 AM
So I have to wire the ENABLE+(+5V) to my +5VDC power supply and ENABLE-(ENB) to a output on the controller?
Title: Re: Mach 4 setting up software I/O.
Post by: Tweakie.CNC on May 21, 2020, 09:48:24 AM
So I have to wire the ENABLE+(+5V) to my +5VDC power supply and ENABLE-(ENB) to a output on the controller?

If you want to use the Enable / Disable function then Yes.
If, on the other hand, you do not want to use the Enable / Disable function then leave them unconnected.

Tweakie.
Title: Re: Mach 4 setting up software I/O.
Post by: Steve Stallings on May 21, 2020, 12:52:23 PM
Motor drivers with step and direction inputs typically use the unfortunate industry convention of calling an input ENABLE when in reality applying an active signal to this input will DISABLE the driver. Don't like it, but there is nothing we can do about it. If you don't need to disable the driver, you can leave this input not connected.
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 21, 2020, 01:04:06 PM
Do I wire anything up or not? I'm getting mixed information here.
Title: Re: Mach 4 setting up software I/O.
Post by: Steve Stallings on May 21, 2020, 01:26:53 PM
To say that the WANTAI DQ542MA user manual is confusing and poorly written is an understatement.

I am almost certain that if you do not need a DISABLE function, you do not need any connections to the ENBL+ or the ENBL- terminals. Certainly powering up the system without these connections will not harm anything, so just try it.
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 21, 2020, 02:20:22 PM
To say that the WANTAI DQ542MA user manual is confusing and poorly written is an understatement.

I am almost certain that if you do not need a DISABLE function, you do not need any connections to the ENBL+ or the ENBL- terminals. Certainly powering up the system without these connections will not harm anything, so just try it.

Try what I've already been doing?
Which is not having any connections to the enable terminals?
Title: Re: Mach 4 setting up software I/O.
Post by: Steve Stallings on May 21, 2020, 03:40:48 PM
Yes, but there are other issues that may exist.

The Wantai DB25-1206 breakout board is also confusing. It is set up to require TWO power supplies. If you are using a single power supply, you need to install two jumpers at JN1 and JN2 next to the terminal strips for power input. If you attempt to use a single power supply without these jumpers installed, part of the board does not have power and will not work.
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 21, 2020, 06:03:56 PM
im not understanding what signals to establish and enable
Heres a video screenshot of the input settings for the UC100
https://vimeo.com/421282176 (https://vimeo.com/421282176)
and the output settings
https://vimeo.com/421282952 (https://vimeo.com/421282952)

Found out my motors are holding torque but my led is green?

(https://i.ibb.co/2PSjZh1/Screen-Hunter-09.png) (https://ibb.co/Y8Xt0QF)
Title: Re: Mach 4 setting up software I/O.
Post by: Tweakie.CNC on May 22, 2020, 04:25:59 AM
Do I wire anything up or not? I'm getting mixed information here.

If it's any help, I have a machine with the Enable / Disable connections on the drivers wired up and in 15 years I have never had the need to use the Disable function.
If you think you may want to use the Enable / Disable then by all means wire it up but I doubt you will ever use the function unless you have a specialist application. My advice would be to leave those terminals unconnected but the decision is yours.

Tweakie.
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 22, 2020, 12:22:28 PM
I figured out that the wiring schematic is absolutely wrong, I learned from a YouTube video on how I corrected it, I couldn't get my motors to move at all in mach4 but I got them moving in mach3 I'll make a wiring schematic and share later today.

Thanks for any and all help!
Title: Re: Mach 4 setting up software I/O.
Post by: Stev on May 23, 2020, 07:27:54 PM
Different drivers pictured but my wiring is the same and it worked!

(https://i.ibb.co/kqtc66n/Screenshot-2020-05-23-182421.png) (https://ibb.co/CVf0ssd)