Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: rileyknox on May 31, 2018, 10:25:07 PM

Title: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: rileyknox on May 31, 2018, 10:25:07 PM
Just got a ESS to replace a pokeys57cnc but now I can't seem to figure out how to setup to motor feedback from the Clearpaths.  I have found examples of how to wire everything up and get it set up in Mach3 to stop the system if the motors error out but I can't seem to find out how to do this in Mach4 with the ESS.  The pokeys57cnc had dedicated motor error inputs to handle this and I don't want to run the machine without having this setup in case the motors have an issue.  Any help would be much appreciated. 
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 01, 2018, 03:20:09 AM
Hi,
the ESS does not have dedicated inputs for motor faults.

I would suggest you hook each motor fault line to one of the available general purpose inputs INPUT1 through INPUT64. Thereafter Mach can read each signal
with a suitable entry in the signal library table and Estop or CycleStop as you see fit.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 04, 2018, 07:48:15 AM
Riley,

Do you have a BOB with your ESS?

If you figure out how to do this on a "normal" input and program it in Mach4, I'd appreciate seeing how you do it. I have a PMDX-126/ESS and Steve Stallings (PMDX) said the Gecko ERR/RST inputs on the PMDX-126 are backwards for what the Clearpath wants so those won't work with Clearpath's HLFB unless you "reverse" the signal. So..........I have four Clearpath SDSK's wired and working but with no error monitoring, HLFB singals not attached to anything.

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 04, 2018, 04:54:25 PM
Hi,
you could do it several ways.

If you have spare inputs, hook the HLFB lines to them and have Mach monitor them and react accordingly.

You could combine a HLFB line with a limit switch. The Idea being that a motor fault causes a 'limit'
event and shuts Mach down.

You could use a small transistor or a MOSFET to invert the signal and then attach it to the ERR/RST inputs

You could combine (diodes probably sufficient) all the HLFB lines and hook them to your Estop inpt.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 05, 2018, 04:31:47 AM
Hi,
I've been reading both the Clearpath manual and the PMDX-126 manual.

I imagine you wish to have HLFB assigned as 'In Position Range', in which case it is active when the servo is within position range
whereas the PMDX-126 would regard this state as a fault, exactly as Steve has said. A single transistor and a couple of resistors could invert the signal.
How's your electronic skills? This is certainly not hard to do but you would end up with a small piece of veroboard with the dozen or so components
on it. Perfectly doable but a bit messy.

My training/job is electronics so if you wish to do something along those lines I could help.

Another alternative is to use spare inputs. The PMDX-126 can access a second port, I believe with a PMDX-108 expansion board. While PMDX gear has an unsurpassed
reputation for functionality I find myself becoming confused while reading it all. I'm sure I would pick it up if I had the hardware in front of me and I could experiment with it.

My suggestion is however to get another BoB, probably a C10 at $23.00. There is another thread running at the moment where gaining some more inputs with an ESS is the
topic of conversation:

http://www.machsupport.com/forum/index.php/topic,37395.msg256291.html#msg256291 (http://www.machsupport.com/forum/index.php/topic,37395.msg256291.html#msg256291)

Any of those boards, the C10 is a cost effective one, could be plugged into port3 of the ESS and you can have an extra 13 inputs and five outputs, without in any way disturbing
or restricting future expansion of the PMDX-126.

It is sheer luxury to have spare inputs without having to concern yourself with combining signals and risk one signal swamping another and all of that. You could comfortably attach each HLFB
to its own input. If you want to invert the signal you can do so programmatically within the ESS plugin which is rather more elegant than having a little homemade circuit board dangling from your BoB.
Mach could very easily monitor the inputs and react in what you deem a suitable manner. Further if you have one input for each axis you'd know which axis had faulted and could post and/or log the
error. If you had three or four axes that would still leave 9-10 inputs free available for other purposes. All that for $23.00, pretty good value addition I would have thought.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 05, 2018, 06:10:49 AM
My electronics skills, I would say, are pretty good, but circuit design isn't among them, so when Steve told me about this signal reversing I figured it was beyond me. He said a transistor or relay. I can certainly solder and build stuff someone else designed, but I've never been able to really "understand" how it all works!!

I don't know if I need to use ClearPath's "In Position Range" or what, but what I want is if a servo faults for any reason, estop Mach4. Kind of like the Gecko ERR/RST works, so perhaps the way to go is the signal reversal route and simply use the PMDX-126 ERR/RST. See here, AN004, for how the Gecko ERR/RST works, but perhaps you know that.   http://www.pmdx.com/AppNotes

I have a PMDX-108 Input in my system now with only two, I think, inputs being used. I think I have 6 more to use. So how would I do that, IF the signal reversal thing is beyond me? I don't think it IS beyond me as long as someone can explain how to do it!!

Thanks,
Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 05, 2018, 10:38:39 AM
Hi,
'In Position Range' is Clearpaths equivalent of 'following error' so is the required fault monitoring mode.
A simple transistor/resistor inverter or even an IC inverter would work. I'll post a circuit diagram later.

If you have spare inputs in the ESS by virtue of the PMDX-108 then may I suggest using those, at least as an experiment. It will cost
nothing other than some time to code it.

The procedure is:
1) Hook the HLFB line of each motor to its own input pin
2) In the ESS plugin Pins Config assign three input pins, maybe HLFB_X, HLFB_Y, HLFB_Z
3) In the ESS plugin Input Signals page assign the three input pins to three gen purpose inputs say INPUT3, INPUT4 and INPUT5
4) In the Signal Library put code to monitor the three inputs.

I'll post some code shortly.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 05, 2018, 10:49:36 AM
Hi,
on  Machs machine diagnostics page you should see in the Inputs Panel LEDs corresponding to INPUT3, INPUT4, and INPUT5.
If you cause each HLFB line to activate you should see the LEDs change state. This confirms the PMDX-108/126, the ESS and Machs input assigments.
My suggestion is to use the Active High/Low setting in the ESS Pins Config page such that the input LEDs are ON when the HLFB is in fault mode.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 05, 2018, 11:22:05 AM
Hi,
try this code, it goes in the Sig Library Table at the top of the screen load script:
Code: [Select]
[mc.ISIG_INPUT3]=function(state)
if (state==1) then
mc.mcCntlEStop(inst)
mc.mcCntlSetLastError(inst,'X axis HLFB asserted')
else
mc.mcCntlSetLastError(inst,'X axis HLFB de-asserted')
end
end

[mc.ISIG_INPUT4]=function(state)
if (state==1)then
mc.mcCntlEStop(inst)
mc.mcCntlSetLastError(inst,'Y axis HLFB asserted')
else
mc.mcCntlSetLastError(inst,'Y axis HLFB de-asserted')
end
end
[mc.ISIG_INPUT5]=function(state)
if (state==1)then
mc.mcCntlEStop(inst)
mc.mcCntlSetLastError(inst,'Z axis HLFB asserted')
else
mc.mcCntlSetLastError(inst,'Z axis HLFB de-asserted')
end
end
Note I haven't tested it. Note also I just caused an HLFB to cause an Estop. Is this what you want.... you could have it CycleStop instead. You
might also want to include code to record the current Gcode line number so once you fix the cock-up you can restart your code. I used the
Status Line to tell whats happening, you could in addition, or instead of, add it to the log. Really the possibilities are endless.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 06, 2018, 04:21:51 AM
Hi,
this is a quick sketch of an inverter.

I perceive some problems with it however. If for whatever reason any of the three HLFB inputs de-asserts itself it will propagate an ERR and so Mach will Estop.
If the HLFB de-asserts because it has lost the plot and no longer following its input this is exactly what it supposed to do. What happens however if for instance you turn
the power off to that servo. The HLFB will de-assert itself, not as a result of a following error but a power fault. Worse this will be an enduring Estop event, each time you attempt
to Enable Mach it will immediately fault because one or more of the servos is unpowered.

Is this what you want?

It occurs to me that this is a nuisance fault and I suspect that as you were powering up Mach and the servos there would be multiple occasions where one or more HLFB de-asserts
itself and cause an Estop.

This comes about because the Geckos when they fault go active high, whereas the Clearpaths are inactive high in fault condition AND various other conditions among them  being unpowered.
No amount of fiddling with the circuit diagram is going to change it.

The only solution then is to apply some logic which permits a genuine HLFB following fault to cause an Estop but prevents nuisance Estops. In which case the ERR/RST input is not useful as it always
causes an Estop. The best way to apply that sort of logic is to use the programming capability of Mach, but if you are going to do that then why bother with this wee inverter cicuit, just do the whole
damn thing in software along the lines of my previous post.

I think you will have to read and understand the various HLFB modes, the reverse logic will have implications as the machine is powered up that does not occur with positive logic of the Geckos.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 06, 2018, 05:22:30 AM
Hi,
just noticed a mistake with the bias and load resistors.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 06, 2018, 08:28:01 AM
Thanks for all the effort you've put into this, Craig. I'll ponder it all but I'm leaning toward and simpler input solution. BTW, I have 4 axes, not three, not that that matters!!

My physical Estop button has two contacts, one to the PMDX-126 and one to the ClearPath power supply. I also have a latching relay on the power supply input, I press a momentary button to activate the power supply. I can start the PS either before or after Mach4 is running, doesn't matter. But if, like you say, the ClearPath's are "de-asserted" and Mach4 is started first, I can understand there might be an issue.

I won't have time in the very near future to get at this, but definitely will get to it. Reading your advice, I'm leaning toward the inputs/programming method and not trying to use the Gecko ERR/RST input/outputs.

Thanks again,

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Chaoticone on June 06, 2018, 09:36:18 AM
I have used the enable ready signals of drives in a daisy chain, one ready signal goes to the next enable. That whole circuit controls a SS relay whos controlled contacts are in the estop loop.
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Chaoticone on June 06, 2018, 09:52:40 AM
I posted this example before but can't find it now.
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Dusty91 on June 09, 2018, 11:38:36 PM
Hi,

I am using clearpaths with pmdx-126 and ESS. I have the HLFB lines wired in series to a single input on the PMDX-126. The input I believe is configured as active high on ESS, red arrow up, and mapped to input 0 in mach.
The following code is used in the signal script of your screen set. The code just activates a cycle stop if the HLFB is tripped. I have had the HLFB trip quite a few times and the machine has always stopped as desired.


-------------------------
-- HLFB Error --
-------------------------
if (sig == mc.ISIG_INPUT0) and (state == 1) then
    local inst = mc.mcGetInstance()
    mc.mcCntlCycleStop(inst)
    mc.mcCntlSetLastError(inst, "HLFB Servo Error");
end

SignalTable = {
    [mc.ISIG_INPUT0] = function (on_off)
        if (on_off == 1) then
            mc.mcCntlCycleStop(inst)
            mc.mcCntlSetLastError(inst, "HLFB Servo Error");
        end
    end
}
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 12:09:25 AM
Hi Dusty,
given the number of circumstances that HLFB can trigger other than a fault I think your choice to have it CycleStop is better than Estop. Otherwise
your machine would Estop all the time....a real PITA

I'm a bit bemused by this piece of code:
Quote
if (sig == mc.ISIG_INPUT0) and (state == 1) then
    local inst = mc.mcGetInstance()
    mc.mcCntlCycleStop(inst)
    mc.mcCntlSetLastError(inst, "HLFB Servo Error");
end
I presume you have it in the PLC script so it reads the signal repeatedly? If that is the case its redundant.
The entry in the Signal Library should do the job on it own. Every time a one of Machs signals changes state the Signal Library table is scanned
to see if the signal which has changed is a signal of interest, in this case ISIG_INPUT0.

I note also that you hooked all your HLFBs in series so that you could squeeze it down to one input. Is there any particular reason to do so.....the ESS when suitably
equipped with BoBs offer us swags of inputs....is there any need to economise?

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 10, 2018, 08:17:50 AM
Following with interest!

Isn't the serial wiring of the HLFB signals what Brett was alluding to when he said "daisy chain"?

And, is it not simpler to have, in my case FOUR, drives wired to one input, one set of code, or is there some reason to use 4 inputs and 4X the code just because you have these inputs available? What is to be gained with the multiple input method?

Dusty, where IS your code in the screen set?

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 08:27:42 AM
Hi,

Quote
What is to be gained with the multiple input method
Using one input per drive would allow you tell which drive faulted.

Quote
and 4X the code just because you have these inputs available
Four or five lines of code per input is hardly a big effort

Quote
you have these inputs available
Why not use them...they are after all available...or were you planning to use them for something else?

Craig



Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 08:38:01 AM
Hi,
just as a matter of interest if each phototransistor is on with a saturation voltage of 0.25V then four in series will put the input to your BoB a 1V.
That's awfully close, or maybe even greater, than the TTL low threshold voltage.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Steve Stallings on June 10, 2018, 09:09:39 AM
.... and that is why PMDX has not recommended the approach of wiring the HLFB signals in series.
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Dusty91 on June 10, 2018, 10:50:36 AM
Tom, I have the code in the signal script. Have a look at the screen editor manual in the docs folder or your Mach4 directory if you have some trouble finding it.

Craig, The code is in the signal script only. Nothing in the plc. I'm not sure if every line I posted is required. I pulled the code from page 12 and 13 of the scripting manual about three years ago. The SignalTable portion may be redundant.
Good point about the voltage. That is not something I considered. I am running three motors and checked the voltage to be 1.4V normal and 4.8v when tripped.
I currently have all the inputs saturated on the pmdx-126. Do you know any lone BoBs that can be hooked up the the third port of the ESS for expansion?

Dustin

Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 11:02:18 AM
Hi,
various recommendations have been made but the C10 at $23.00 looks like the most cost effective suggestion thus far.

If three HLFB signals in series amount to 1.4V then you must have zero noise margin.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 10, 2018, 11:04:22 AM
People FAR more knowledgeable then I have weighed in, I'll be going the separate input route when I to this, seeing as I have them available!!

Dustin, do you have something one the SECOND port of the ESS/PMDX-126? I have a PMDX-108 Input on there with only 2 or 3 used, so enough left to hook the HLFB's up and code them separately. You could use any small BOB, like a CNC4PC C10 for using the ESS 3rd port.

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 11:14:45 AM
Hi Dusty,
the Signal Script is the code that runs each time one of Machs signals change state. You can put code there OR you put an entry in the Signal Library Table in
the screen load script. You don't need both.

My preference would be to put entries, one per input, in the Signal Library Table. Note the Signal Library Table is already there, you will just be adding some
more table entries rather than constructing the table from scratch.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Chaoticone on June 10, 2018, 11:28:32 AM
Quote
And, is it not simpler to have, in my case FOUR, drives wired to one input

Works great for me.

But don't forget, in my example multiple inputs are wired to and controlling a solid state relay, not a single input on your BOB (big difference).Another benefit of using a relay is its easy to flip the logic if needed. The drives can supply the + or 0 volts to the relay. All things must be considered in each individual case. I'm just sharing what I have done. Craig and Steve have valid points. It has to be done right to work right and what is right for one may not be right for another.

I want an e stop triggered anytime any drive has any error. It doesn't matter what that error was. The folks that will be in charge of fixing it know how to use the diagnostic LEDs on the drives. In other circumstances it might be nice to have the ability to tell Mach what drive failed (and why) so Mach could tell the operator...... if you have available inputs to use for this. I/O is what makes a machine intelligent. I rarely have any extra I/O and often not as much as I would like. But at some point you have to weigh out cost versus reward, set priorities and roll with it. I don't think I would sacrifice any I/O I wanted on a personal hobby machine. I don't think the cost to expand I/O on a single machine could possibly be worth me being dissatisfied in my hobby. But when the machines are not being used for hobby, multiples are built, existing systems\protocols are in place, cost of production, etc.  have to be considered things can change drastically. Everything really is a trade off.
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Dusty91 on June 10, 2018, 11:50:47 AM
Craig, Thanks, I will look into the c10. That would probably account for the occasional random stop. Enough to stop the machine but not enough to trigger any actual faults.

Tom, I just checked and the code does work without the SignalTable portion. Just use the following and change mc.ISIG_INPUT0 for whatever inputs you use.

-----
if (sig == mc.ISIG_INPUT0) and (state == 1) then
    local inst = mc.mcGetInstance()
    mc.mcCntlCycleStop(inst)
    mc.mcCntlSetLastError(inst, "HLFB Servo Error");
end
-----

Side note, from my experience if one of your motors trips you will have to disable and enable mach to restart the motor. And its best to re-home the machine afterward.

The pmdx-126 is connected to ports 1 and 2 of the ESS but only has 9 inputs. My home switches are wired separately so all axis can be homed at the same time. + limits are wired in series. Three auxiliary buttons, HLFB, and a touch probe for tool length. Plus a dedicated estop.

Dustin
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 10, 2018, 02:49:27 PM
Hi,
that works if you put it in the Signal Script but this works if you put in in the Signal Library Table:

[mc.ISIG_INPUT0]= function(state)
    if (state==1) then
          mc.mcCntlCycleStop(inst)
          mc.mcCntlSetLastError(inst, "HLFB Servo Error")
    end
end

Add this to the SigLib table at the top of the screen load script.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 11, 2018, 10:42:53 PM
Dustin,

You might look into a PMDX-108 Input. You're not using the ESS port 2 now, right, even though it's connected? The 108-Input goes between the PMDX-126 and the ESS and adds inputs from port 2 pins 2-9. A bit more than a C10, but very nice and keeps it in the PMDX family!!!

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 19, 2018, 09:36:00 AM
Thanks to Craig, I got the HLFB's working on my PMDX-108 Input, Port 2 Pins 6-9. Code like Craig's but adjusted for the Inputs I used, 4 sections of code, one for each axis so I can easily tell which axis errored.

That said, soon as I moved two of the 4 axes I got the error. I hooked the USB cable to the ClearPath's and started their software. I have the ClearPaths set to 6400 counts per rev. which in my system equates to 96000 counts per unit (Inch for me) on X/Y, 153,000 counts per inch on A, and 78222.22222 on Z. The count error was set to 10 in the ClearPath software, a default, I guess. That's ~ .0001" on X/Y/Z, .000065 on A, so I set them to 100 and everything seems OK.

That made me wonder if there's some magic following error percentage one should use, like 1.5%, which is what I have, approximately, arrived at by guess and by gosh? Or something else?

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 19, 2018, 01:18:53 PM
Hi Tom,
kool. Did you put code in the SigLib table or code in the Signal script?

You have discovered the great conundrum about servos....do I make the following error window very small but then have to restrict velocity/acceleration of my projected moves
so that they don't fault....OR....set the following window wider and accept a less accurate trajectory with sufficient tolerance to employ useful velocity/acceleration toolpaths?

There is a branch of mechanical engineering that concerns itself with this tradeoff but it is intensely mathematical. Unless you have University level mathematical ability AND considerable
fortitude to follow/understand the maths involved don't go there.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 19, 2018, 03:19:58 PM
Hi,
if you stand back a bit from your system consider this:

If you issue a step change in position to your machine it will attempt to drive to the new location. If you have set the following error window wide enough that it doesn't
fault at least! The machine will approach its new location and may overshoot and the return for another go.

In classical control engineering parlance that behavior is described by two numerical variables:
OmegaN(atural) which is a measure of the speed of the response of your axis, generally the faster the better and
Zeta the damping figure, 0 is no damping and the machine overshoots wildy, 1 is slightly overdamped and it doesn't overshoot at all, and 0.7071 damping is considered optimal.

These two figures will allow you to calculate the maximum following error for any given input. You may have seen these figures of merit when talking about a servos PID ability.
and its closely related. The dynamics of the servo will be changed by the mass and friction of the axis that the servo is bolted into. Thus if you can calculate OR measure
the dynamics of your axis you can determine the absolute error for any given input. As it turns out calculating it is not easy unless you have very good and extensive
information about your servo/axis. Measuring it is a realistic alternative but will require a sophisticated setup.

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: Dusty91 on June 19, 2018, 07:18:28 PM
Hey Tom,

Glad to here you got it working.

Unrelated question. Assuming your fourth motor is not for a fourth axis, how did you go about tuning the slave motor? I've been considering upgrading to a dual drive for my X but was not sure how the tuning portion worked.

Thanks
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 19, 2018, 08:58:16 PM
Hi,
I have a second hand Allen Bradley servo I use for a spindle motor. It has tuning software installed on my PC
to program the drives EPROM.

Amgonst the many many features of the software is a 'scope'. It allows you to follow various variables against
time for instance. Given that I use my servo as a spindle I've never really played with it. As a position
servo you can cause it to display position error (actual encoder count vs programmed position) in time.
It updates at the servo refresh rate, about 20kHz, so is hardly a 'high bandwidth oscilloscope' but none the less
provides a very useful visual indication of following error, all for the sake of a few keystrokes to program/set it up.

I don't know whether Teckincs have provided a similar facility for their Clearpath servos. Such a facility would go a long
way to answering your query about following error window verses positional accuracy. Note that such a display would
include the effects of the mass of the axis and its friction. Very useful and informative.

Years ago when I was at University studying this stuff much of the gear was analogue (resolvers, synchros, storage scopes
and some very groovy long stroke LDVT's), and while digital offer a few wrinkles of it own the principles of feedback
control remain the same. The gear was all expensive, often many many times the value of the servos and amps!

Craig
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 20, 2018, 08:11:52 AM
Hey Tom,

Glad to here you got it working.

Unrelated question. Assuming your fourth motor is not for a fourth axis, how did you go about tuning the slave motor? I've been considering upgrading to a dual drive for my X but was not sure how the tuning portion worked.

Thanks

Sorry I can't offer up any help, my 4th axis is a 4th axis. I have a knee mill, Z is the quill and A is the knee. I simply, (well, not TOO simply), use the knee for tool length offsetting.

That said, I have seen, somewhere, something about tuning a slave axis. I can't recall where, but read it somewhere. You might try support@teknic.com, they're responsive but due to their large array of available servos they have a difficult time understanding YOUR problem!!

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: thosj on June 20, 2018, 08:46:27 AM
I don't know whether Teckincs have provided a similar facility for their Clearpath servos.

ClearPath DOES have exactly this. Hook a USB cable to the drive, start their software, MANY, MANY selectable options for the "scope." I've discovered that this runs fine while Mach is running and controlling the servo. The problem here will be the dummy (me!) watching the software!!! I was smart enough to figure out Auto Tune, and how to set the error mode, and now, to figure out the following error setting, but the rest seems pretty complicated to me.

I got the ClearPath servos to get away from this PID tuning. The Gecko's have pots and I could never get the Z motor to not buzz all the time, over 8 years of reading posts on how to do it. I actually replaced the encoder, drive, and motor and couldn't get it. I tried CNCDrive servo drives with software PID tuning, but manual, and couldn't get the PID set AT ALL, finally returned all 4 and gave up. Bought ONE ClearPath for the Z, a PS and for future expansion, a Power4-HUB, and it worked flawlessly after Auto Tune. Thought about it for approximately 3 seconds and bought 3 more, done with buzzing servos. My system is WAY better than it's ever been, Mach acceleration higher, top speed higher, NO buzzing/screeching. I could perhaps squeeze more out of it, but I'm happy with it the way it is and I'll tell you, I'm inclined to stop chasing it and just enjoy.

OH, and the mechanics of my system did NOT change, same ball screws, same belt ratio's, everything the same since the Geckos were first installed in 2009 when I converted the machine.

Tom
Title: Re: ESS + Mach4 + Clearpath = Motor error input goes where?
Post by: joeaverage on June 20, 2018, 09:27:33 AM
Hi,
AC servos are the next generation of servos by comparison to DC servos. The smarts provided by the manufacturer for tuning is the proof of the pudding.
Make no mistake PID tuning is in there, its just that you haven't had to concern yourself with it.

To make use of the scope what you need to do is either expand the following error window greatly or even turn it off. Go to Mach and icrease the acceleration of your X axis to something
very high, in effect infinite. Then if you issue an MDI:
G0 X100
then the X axis will attempt to move to the programmed location very quickly and will only be limited by the maximum speed the servo can accelerate. If you have the scope 'on' to
observe you will see the following error of the axis. As you decrease the acceleration of the X axis in Machs tuning page the following error will reduce. When it reduces to what you determine is
acceptable, lets say 0.05mm then you have established the maximum acceleration your X axis can achieve and you can set your following error window to just accommodate it.

Craig