Ethercat installation summary

More
3 years 2 months ago #278407 by maghis
Not confusing at all, I'm sw eng by trade :)
Thanks for sharing, could be a refactoring opportunity.

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #282793 by geo01005

Ok, I'll do some reading before continuing.

As an update, it looks like I'm pretty close.
The only changes I applied so fare are to the cia402 component:
- I wait for the ECT60 to confirm homing
Code:
if (home) { opmode = OPMODE_HOMING; if (opmode_homing) { controlword |= (home << 4); } } - I lie with the current position to linuxcnc during homing [code]//home states if (opmode_homing) { // hack pos_fb = pos_cmd; stat_homed = ((statusword >> 10) & 1) && ((statusword >> 12) & 1); stat_homing = !stat_homed && !((statusword >> 10) & 1); } Current tested behavior is: - I press "home all" - joint sets cia402 home (joint.0.index-enable => cia402.0.home) - the drive follows the homing sequence and finds the edge of the home sensor - the drive exits the homing mode - at that point, the next "write all" sends again the current pos_cmd and the drive moves back to the position before the homing started I'll study homing.c - I was hoping to find a solution that didn't involve rebuilding linuxcnc (I'm running off of the 2.8.1 raspberry pi image right now).
[/code]
 
So I picked up where you left off here. I decided to ignore the following error issue and just set the following error limits to a large value and focus on the jumping after homing.

I removed the "
Code:
[code]pos_fb = pos_cmd;" and still noticed jumping. After looking at some Halscope traces it became apparent that the drive was being put back into cyclic position mode before the position register was cleared from homing. I made a small change in order of a few lines of code forcing the homing procedure in the drive to finish before setting the drive back to position mode. 
[/code]
Code:
  // OP Mode   // set to position mode   if (stat_voltage_enabled && !home ) {     opmode = OPMODE_CYCLIC_POSITION;   }   // set velo mode   if (stat_voltage_enabled && !pos_mode && !home) {     opmode = OPMODE_CYCLIC_VELOCITY;   }     // reset home command     if (home && (stat_homed && !stat_homed_old) && opmode_homing) {     home = 0;     }

This works well, and the motor no longer jumps. I then decided to make a hacky solution for the following error. I added a couple of input pins to the CIA402 component to store the standard following error parameters from the INI file, and a couple of output pins to set the current following error. The component keeps the output pins equal to the input pins except during homing. During homing the output following error pins are set to a high value, 1e38. 

Then you just connect up the following error output pins to the following error pins and result is Linuxcnc ignoring following error during homing, but not at other times without modifying the Linuxcnc code. 

you can see the example config attached. I changed the CIA402 component name to CIA402JAG just to I could do side by side comparison of the two components on my system.

What do you think? To hacky?
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #282824 by endian
hello guys,

check my for ds402.comp from post  where is all of that jumping implemented ... it will not work for cia402 setup drivers... it should be great inspiration for f_error etc.... on single place. there are difference in binary PDOs values between old ds402 and new cia402 standard

before starting homing at rise edge you have to setup single scan pos_cmd = pos_feedback and after homing when it is finishing at folling edge the same .. and switching modes betwen homing and csp are done after driver position feedback value will be less then f_error and there will be no f?error trigger or jumping during it.. 

regards Slav

Please Log in or Create an account to join the conversation.

More
3 years 1 week ago #283790 by jimwhiting
Hi,

So working on from geo's updates, plus some of foxington's state machine code to stop the following error I changed the cia402 code to try and get it homing on my Leadshine EL8 drives. The issue I was having is that the home pin was being cleared instantly - The logic checks on the status registers where not correct for my drives and instantly deactivated the home pin. So I've had to make some pretty nasty code to get it into the homing state and then detect when it is finished and clear the home at the end. Anyhow, with all that done it will now home using the drives internal procedure.

However... I now run into "j0 end of move in home state 18" if I'm too far (too much time) from the end of the homing sequence which from examining the code is the timer running out in the homing code. Any ideas on how to prevent that without rebuilding linuxcnc?

Thanks,

Jim.

Please Log in or Create an account to join the conversation.

More
3 years 1 week ago #283798 by rodw
Replied by rodw on topic Ethercat installation summary
The best way would be to do the homing in a custom homecomp (HOMEMOD) rather than home on the cia402 component.
The following user(s) said Thank You: mehdidadash

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #284530 by mehdidadash
Hi Rodw
do you know anybody that has done homing in ethercat using Homemod ? 

Please Log in or Create an account to join the conversation.

Time to create page: 0.166 seconds
Powered by Kunena Forum