Hello Guest it is April 20, 2024, 02:06:06 AM

Author Topic: ESS + Mach4 + Clearpath = Motor error input goes where?  (Read 7702 times)

0 Members and 1 Guest are viewing this topic.

ESS + Mach4 + Clearpath = Motor error input goes where?
« 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. 
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #1 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline thosj

*
  •  532 532
    • View Profile
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #2 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
--
Tom
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #3 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #4 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

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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline thosj

*
  •  532 532
    • View Profile
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #5 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
--
Tom
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #6 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
« Last Edit: June 05, 2018, 10:43:48 AM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #7 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #8 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: ESS + Mach4 + Clearpath = Motor error input goes where?
« Reply #9 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'