Hello Guest it is March 19, 2024, 05:53:48 AM

Author Topic: Retrieving position after an e-stop or other position loss  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

Retrieving position after an e-stop or other position loss
« on: December 07, 2018, 10:57:34 AM »
Hello,

I'm building my first system using Mach software. It's a custom unit designed and built in house.
I'm using the warp9 ess board and MACH3 now, tho I'm open to mach4 if it makes more sense.
I've got it built and wired up, it's running well.

The drives are Automation direct sureservo units, the 2kw units. They're actually rebranded delta drives, from what I can tell. Fairly basic, but they do have modbus multi-drop communication and can spit out the motor's actual current position, which leads me to my query...

My question is: Can I have mach3/4 read the actual position of the drives after an e-stop or other position error event where mach would otherwise have lost position certainty due to coasting? I'd like to recover from an e-stop/etc without needing to re-home.
Is this a feature that's already written, and/or would it be reasonable for me to add if it isn't?

Thank you
Re: Retrieving position after an e-stop or other position loss
« Reply #1 on: December 07, 2018, 11:40:37 AM »
Hi,
that sounds feasible. I use Mach4 and can see how such a thing might be coded in Lua using Mach4s modularity. I would guess you
could do the same in Mach3 with VB but I don't know VB well and can't garuntee it.

Whether this would work will be determined by the encoder on the servo. If it is a multiturn encoder then yes it could work but if its a
single turn then no it wont.

You say that the servos are rebranded Delta servos? The latest design servos from Delta are the A3 series and they have a 24bit absolute multiturn
encoder. Thus 8 bits could be used for the complete number of turns (from reference) for a maximum of 256 whole turns and still have 16 bits for angular
position within one turn.

I am surprised that Delta have allowed their flagship servo design be rebranded.

Can you post the details of the encoder fitted to your servos?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Retrieving position after an e-stop or other position loss
« Reply #2 on: December 07, 2018, 12:03:26 PM »
The encoders on the motors are incremental 2500ppr encoders. Standard stuff.
The drive can output the value of current position from powerup. Not at all absolute, but that's not a problem.

I just want to update mach software with the actual position the system wound up in after a position loss event. probably only a few hundred pulses off maximum.
Re: Retrieving position after an e-stop or other position loss
« Reply #3 on: December 07, 2018, 12:10:29 PM »
Hi,
looking at the material on the Medium Inertia 2kW SureServo website suggests that the encoder is a 2500 line incremental encoder.

You cannot retrieve position from an incremental encoder in the manner you suggest, it must be an absolute encoder.
Absolute encoders are the generation after these SureServo types. And even an absolute encoder can only give you angular position
within one turn. Multiturn encoders are required for your application, so two generations advanced on what you have.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Retrieving position after an e-stop or other position loss
« Reply #4 on: December 07, 2018, 12:13:45 PM »
Since the drive is tracking the encoder starting at powerup, why would it matter?

What I imagine is that on startup, after enabling, the mach software would query the drive to determine position and store that as an offset. Ideally it's all zeroes, but just in case it isn't.

Then, upon subsequent enables (after loss of enable due to estop/etc), the system would re-query and shift mach's internal known position by the amount the drives differ from mach's expectations.
Re: Retrieving position after an e-stop or other position loss
« Reply #5 on: December 07, 2018, 12:48:22 PM »
Hi,

Quote
Since the drive is tracking the encoder starting at powerup, why would it matter?
But is it....or more importantly do you have access to it?. You are suggesting that there is an internal accumulator that you can read?
Does that accumulator cover multiple revolutions?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Retrieving position after an e-stop or other position loss
« Reply #6 on: December 07, 2018, 12:50:12 PM »
Yes, it does. It provides the number of accumulated pulses since startup. Same as any other digital encoded servo amplifier.
Re: Retrieving position after an e-stop or other position loss
« Reply #7 on: December 07, 2018, 12:56:57 PM »
Hi,
well then if you can read the accumulator then you should be able to do as you propose.

Servo drives with battery backed absolute encoders can report to the controller actual position at the time the drive
powers up, and can therefore maintain reference between sessions. That is not what you are proposing though is it?


Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Retrieving position after an e-stop or other position loss
« Reply #8 on: December 07, 2018, 12:59:13 PM »
I don't care about between sessions, though that might be nice, and I guess there's no reason not to do that if the drive were backed (it is not).

I want to preserve position when the machine is moved not under mach control, such as during an e-stop event or position loss event due to over-torque and drive disabling.

What methods does mach software have for updating position based on an external reference?
Re: Retrieving position after an e-stop or other position loss
« Reply #9 on: December 07, 2018, 01:17:23 PM »
Hi,

Quote
What methods does mach software have for updating position based on an external reference?

That might be a little trickier. It has been some while since I used Mach3 so I can't be 100% that the situation is the same as it is
in Mach4 but to the best of my knowledge it is the case.

The only way to change machine coordinates in Mach is to either move the machine OR reference it.

You might have thought that:

Quote
LUA Syntax:
rc = mc.mcAxisSetMachinePos(
      number mInst,
      number axis,
      number val)

From the API would set the machine position, ie the machine coordinates, but I have tried using it and failed. This is from the same API note:
Quote
Parameters: Parameter Description
mInst         The controller instance.
axis            The axis ID.
val             The desired axis position to apply a fixture offset.

So when I did try it was the fixture offset that changed not the machine coordinates at all.

If there is another way of doing it I don't know what it is , maybe someone else can chime in.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'