Hi Rainer,
I have tracked down my following error to control.c . My solution was going to
try to just ignore the following error while homing but was unsure how to do
it. I dug around the files you sent me and found (in control.c)
if (get_homing(joint_num) && (joint->flag & HOME_AUTOHOMING_SERVO))
{
// ignore following errors when servosystem does autohoming
}else
{
/* check for excessive following error */
Seems like that should do it, but for some reason the HOME_AUTOHOMING_SERVO
flag is not recognized. I added a debugging line to see if the flag was there
If (joint->flag & HOME_AUTOHOMING_SERVO){
printf("Flag = HOME_AUTO");
}
Nothing in the terminal...
In mot_priv.h
360: #define GET_JOINT_AUTOHOME_FINISHED_FLAG(joint) ((joint)->flag &
EMCMOT_JOINT_AUTOHOMED_BIT ? 1 : 0)
361: #define SET_JOINT_AUTOHOME_FINISHED_FLAG(joint,fl) if (fl) (joint)->flag
|= EMCMOT_JOINT_AUTOHOMED_BIT; else (joint)->flag &=
~EMCMOT_JOINT_AUTOHOMED_BIT;
I'm a little lost as to how you are using the pins and the flag in conjunction
to ignore the following error. I thought the pins were used mostly to interact
with the servo? And if you can use the flag in homing.c , how does one pass it
to control.c ?Could this be caused by changes in 2.9 and how the flags are used?
Kind regards,
Dan
-----Original Message-----
From: Rainer Stelzer <[email protected]>
Sent: October 19, 2021 1:21 PM
To: EMC developers <[email protected]>
Subject: Re: [Emc-developers] more convenient homing for machines with limit
switches and reference switch.
Hi Dan,
I had similar issues when:
- a PID controller is involved,
- a PID input value jumps (as it is the case for the positioning PID controller
when new location is set at the home position) and
- the order of the hal function calls are not correct.
Example:
I recently noticed that when using M19 spindle orientation.
Works perfectly after startup.
Tested dozens of positions to tune the PID.
But after the spindle made some hundred revolutions and the spindle stops to
orient for toolchange, the PID controller generates a big jump.
The reason was, that the orient component calculated a new set position by
taking the actual position before the call to the hardware interface was done.
So the PID saw a giant difference on the feedback and the command input and
acted accordingly with a giant output.
It was only for one servo-thread period, but depending on your PID setup, this
can cause a significant spike.
This is really a tricky issue, esp. when you are focused on PID tuning and this
kind of side effects come into play .
BTW:
Because the functions are called in the order they are added by "addf", i make
ONE hal file with all hal components in use, where they are loaded and
published to the system by addf.
(the logic wiring is done in further hal files) This makes it easier to have a
eye on the call order, rather than distributing them over several hal files.
hope this helps
cheers
Rainer
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers