Hello Guest it is March 29, 2024, 09:54:01 AM

Author Topic: HOME with absolute encoders  (Read 1626 times)

0 Members and 1 Guest are viewing this topic.

HOME with absolute encoders
« on: July 07, 2020, 10:12:12 AM »
I am planning on retrofitting a lathe with DMM servo motors with multi-turn absolute encoders. I consider running it with Mach4.

Is it possible to configure Mach4 to HOME with absolute encoders?

I know LinuxCNC can do that with the HOME_ABSOLUTE_ENCODER configuration setting. I am really trying to avoid using LinuxCNC for this machine and run it with a user-friendly controller such as Mach4.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: HOME with absolute encoders
« Reply #1 on: July 16, 2020, 04:44:20 PM »
It would be motion controller dependent.  What motion controller are your going to use?  Some motion controller home ABS encoders just like they would INC encoders.  Others let you define the home position in the plugin configuration and when you home, it just goes to that position. 

Steve
Re: HOME with absolute encoders
« Reply #2 on: July 16, 2020, 05:03:16 PM »
I spoke with the DMM support and turned out the solution is rather simple. The homing coordinates are set in the drive and the homing command is triggered by a simple pulse to one of the drive pins. All of that is done completely independently from the CNC controller (Match4 in this case). The only thing you need to do in Mach4 is to Zero the coordinates after the homing is complete.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: HOME with absolute encoders
« Reply #3 on: July 16, 2020, 05:47:17 PM »
That still is probably not going to work without some help from the motion controller.  The motion controller will have to define the 0 machine coordinate keep track of the offset.  Mach does none of that.  Mach's positions are whatever the motion controller tells Mach. 

Steve
Re: HOME with absolute encoders
« Reply #4 on: July 17, 2020, 10:54:54 AM »
steve
is it must be with motion controler?
if you add any external software that when turn on ,read position from driver and update mach
is it ca also work?

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: HOME with absolute encoders
« Reply #5 on: July 17, 2020, 12:50:05 PM »
It must be the motion controller plugin.  What else would report positions to Mach?  If external software reported a position and then the motion controller reported a position, which one is correct?  It would be a split brain type of thing. 

As to the original homing issue, I don't think the solution HAS to use the DMM provided home routines.  Most motion controllers can home the ABS motor like it would an INC motor with switches.  Some motion controllers may allow for the switch-less homing of ABS motors.  The OP just needs to research which controller is right for him.

Steve
Re: HOME with absolute encoders
« Reply #6 on: July 19, 2020, 03:39:32 AM »
steve
do you mean controler will export the position only when turn on mach ? or can on real time? so if there any different between what mach think should be and what actual controller send can stop and alarm? not for pid just as second security
thks
yaakov

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: HOME with absolute encoders
« Reply #7 on: July 24, 2020, 06:20:33 PM »
Mach depends on the controller to send machine position information.  This is done at startup and any time the machine is moved outside of Mach's direction.  Homing is a motion controller function, so the controller must update Mach with the new positions after each axes has been homed and call an API function called mcMotionSync().  This synchronizes the controller's position to Mach.   Mach will then use that position to plan any future trajectories.  If The controller then follows the trajectory movement data, both mach and the controller should have the same notion of the position after the trajectory has been executed.  Meanwhile, the position DROs are showing what the controller is reporting. 

There are times that Mach may synchronize the planner positions to what the controller is reporting.  One such instance is when the user presses cycle start to run MDI or a file.  Mach takes the last reported position from the motion controller and updates its' planner with that position. 

Mach runs on Windows, so the positions can never be updated in real-time.  The real-time portion of the system can be the motion controller or the digital servo drives.  For analog servos, the position loop is closed on the controller (A Galil, for instance).  If the following error is too great, the controller should shut things down and inform Mach.  For digital servos, the position loop is closed on each drive.  If the following error is too great, the drives must fault to inform Mach that there is a problem executing the movements.  For a stepper system, well...  that is open loop anyway. 

Mach will never keep a following error, so there will never be secondary security.  Because Mach depends on the motion controller to update the positions.  Mach doesn't know if they are correct, it just accepts them.  But secondary security isn't needed because the primary security of the motion controller/drives should be what everything else depending on.  It the motion controller detects a following error that is too great or the drives fault out because of a following error, the rest of the system will stop. 

Steve