Ethercat - newbie guidelines

More
08 Jan 2022 00:04 #231079 by rodw
Replied by rodw on topic Ethercat - newbie guidelines

Thanks for this info.
Then it seems to be quite similar to the implementation of my amps in combination with the generic driver :)

Can you share your config? I did quite a bit of rework on the cia402.comp component and can now get my drives to home and rehome  consistently but if left to travel too far, I get following errors. I am not sure why because we are setting the pos-fb = pos-cmd in the component while homing so there should not be anything to complain about.

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

More
08 Jan 2022 15:24 #231129 by db1981
Replied by db1981 on topic Ethercat - newbie guidelines
strange,

check the following error from the joint with halscope while homing, it should be every time zero.
if not , add modes_of_operation and the home bit to check if something happens during homing.
The following user(s) said Thank You: rodw

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

More
08 Jan 2022 22:47 #231188 by rodw
Replied by rodw on topic Ethercat - newbie guidelines
Well this is strange, pos-cmd and pos-fb track each other yet the following error grows
 
I have not added a pid or anything but this point to some hal parts missing. Any ideas?
Attachments:

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

More
08 Jan 2022 22:55 #231189 by 3radfahrer

Thanks for this info.
Then it seems to be quite similar to the implementation of my amps in combination with the generic driver :)
Can you share your config? I did quite a bit of rework on the cia402.comp component and can now get my drives to home and rehome  consistently but if left to travel too far, I get following errors. I am not sure why because we are setting the pos-fb = pos-cmd in the component while homing so there should not be anything to complain about.


do you try to home with an internal homing-procedure of your drive? or does linuxcnc handle the homing-procedure?

please find attached the files of my config. please keep in mind, that for this configuration I home on a signal, that comes via ecat from my amp. the signal is generated by a magnetic switch, that is attached to the amp.
attached is also a diagram of the statemachine I have to pass through. The transitions are in the comments in the configs. The image is from the technosoft CoE manual
Attachments:
The following user(s) said Thank You: rodw

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

More
08 Jan 2022 23:17 #231195 by rodw
Replied by rodw on topic Ethercat - newbie guidelines
Thanks for that much appreciated.
I am trying to uses Dominic's cia402.comp and home using linuxcnc's index homing. 
I have revised the component to make it work for my drive and shared my version on his cia402 component thread.
I was thinking afterwards, that I may not have correctly scaled the linuxcnc homing velocities to agree with the drive settings So I will try changing some ini file settings.
 

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

More
08 Jan 2022 23:43 #231199 by rodw
Replied by rodw on topic Ethercat - newbie guidelines
Ok, added a home_velocity as well as a latch velocity.
The following errors stop but when the home switch is triggered, the drive stops but Linuxcnc does not know this and it continues with position commands (I think) and a following error occurs eventually. The drive does not actually home internally until the home switch clears again but now it does not home and motion continues if the home switch is cleared. The home switch is attached to the internal input on the drive, I suspect Linuxcnc needs to receive a home switch signal which it is not receiving yet. Odd. It should not need it when homing to an index.

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

More
09 Jan 2022 01:31 #231206 by rodw
Replied by rodw on topic Ethercat - newbie guidelines
So my current thinking about this is to modify homing.c by overriding joint  home_state to start at
HOME_INDEX_SEARCH_START

This should bypass any movement commands during homing and just set the home_index to true
Then if the component supresses pos-fb until the drive is homed, Linuxcnc might never know the motor moved during homing.

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

More
09 Jan 2022 08:51 #231223 by db1981
Replied by db1981 on topic Ethercat - newbie guidelines
the halscope screenshot is strange, the f error in this case has to be zero. this is not ethercat or cia related. I have to think about that .

at the otherside, i think you should test your drives homing manually first.
disconnect it from the joint / axis.

Use manually setp commands to do the test:

-first set the pos-cmd to the value of the pos-fb, if both are not zero after startup.
-set the enable pin to 1
-setp the home pin to 1
-drive should do his homing, if finished the home pin should be false.

another question: did you already set your min and max limits for the axis? if the driven way at home latch searching gets bigger then the distance beetween min and max limits another internal lcnc error is raised.
The following user(s) said Thank You: rodw

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

More
09 Jan 2022 09:21 #231225 by db1981
Replied by db1981 on topic Ethercat - newbie guidelines
found the error:

your change to the cia comp does not realy work....

you have to think in rt / plc programming.

-first you last switch case does never get action, because you are clearing home in the step before, but the whole switch statement is only executed if home is true...

- pos_fb = pos cmd does not work at this place . you have put it in the write function , this function is executed at thread end. at the next thread start pos_fb is readed again.

related to that motion , pids, etc. is placed between the read and write function, motion never gets noticed of your overwritten pos_fb. you have to place this in the cia read funciton.

if (stat_homing [or an flag you set in your switch]) {
pos_fb = pos_cmd;
}

Note:
If you start halscope after lcnc start and did it not hardcoded in the hal. Halscope is placed at the end of the threat cycle. So halscope did read your pos_fb, but it is not the same value motion has seen....

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

More
09 Jan 2022 11:09 #231235 by rodw
Replied by rodw on topic Ethercat - newbie guidelines
Thanks, I get what you are saying so I'll revise the code when I have some time.

I did make some changes to homing.c but have not fully tested it. The intent was to not have any moves while homing  if HOME_EXTERNAL=TRUE for the joint.
My commit to my test repo branch shows what I changed
github.com/rodw-au/linuxcnc/commit/0ae7b...03860c47a2526bf6e46b

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

Time to create page: 0.137 seconds
Powered by Kunena Forum