linuxcnc+ethercat drives the AKD servo motor it cannot be moved

More
30 Jun 2021 07:51 - 30 Jun 2021 07:56 #213316 by wang
hi everyone

linuxcnc+ethercat drives the AKD servo motor. After configuring ini, xml, hal files, it cannot be moved and the following deviation level fault occurs.
I think that because the motor cannot be rotated, but the position command can be executed, there is a deviation between the two (F439 follow-up deviation level fault)


Below is my configuration file
xml
Warning: Spoiler!


ini
Warning: Spoiler!



hal
Warning: Spoiler!


I know my configuration is a bit simple, because I am a novice and need some help

At present, I can use the axis interface of linuxcnc to control the switch of AKD through ethercat, but I cannot control the motor rotation freely.
Last edit: 30 Jun 2021 07:56 by wang.

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

More
30 Jun 2021 09:01 #213321 by db1981
Hi,

is linuxcnc showing the correct position if you turn the motor shaft by hand (scaling...)

please show your complete halfile.
The following user(s) said Thank You: wang

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

More
30 Jun 2021 09:09 #213322 by wang
No, rotate the motor manually, linuxcnc has no feedback
The above hal is my completed hal file

I am a newbie and look forward to your guidance

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

More
30 Jun 2021 10:50 - 30 Jun 2021 10:52 #213327 by db1981
hi,

you have to move this lines:

loadusr -W lcec_conf /home/qxh-wyk/linuxcnc-dev/configs/sim/axis/deltaPos.xml
loadrt lcec

addf lcec.read-all servo-thread
addf lcec.write-all servo-thread

to the core_sim.hal. At the actual placement in your hal structure, the values from ethercat are not recognized by linuxcnc's motion part...

put "addf lcec.read-all servo-thread" as the first line in front of all others addf's commands. and "addf lcec.write-all servo-thread" as the last.


read here : forum.linuxcnc.org/24-hal-components/223...er?start=1270#212470
Last edit: 30 Jun 2021 10:52 by db1981.
The following user(s) said Thank You: wang

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

More
30 Jun 2021 11:04 #213328 by wang
Thank you for your guidance, I will try it, thank you very much

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

More
30 Jun 2021 11:33 - 30 Jun 2021 11:36 #213332 by wang
hi

According to your guidance I will
loadusr -W lcec_conf /home/qxh-wyk/linuxcnc-dev/configs/sim/axis/deltaPos.xml
loadrt lcec addf
lcec.read-all servo-thread

These lines are moved to core_sim.hal
addf lcec.write-all servo-thread
Is still placed in deltaPos.hal


Although the rotation is not controlled, it is obvious that the shaft is braked. This is different from the previous feeling. Thank you for your guidance.

For single-axis testing, should I click this plus sign to see if the motor turns
 
Attachments:
Last edit: 30 Jun 2021 11:36 by wang.

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

More
30 Jun 2021 11:39 #213334 by wang
By the way, my operating environment is
Ubuntu16.04+manually build linuxcnc2.9

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

More
30 Jun 2021 19:40 #213357 by wang
The following is part of the results of dmesg, whether there is an error that caused the motor to be unable to control the rotation
 

File Attachment:

File Name: dmesg.txt
File Size:44 KB
Attachments:

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

More
30 Jun 2021 20:11 #213363 by db1981
dmesg reads ok ....

i think its an scaling problem.
do you get position feedback if you start linuxcnc (do not enable the motor) and turn the shaft by hand?

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

More
30 Jun 2021 20:30 #213367 by db1981
normaly scaling should be so:

-reading (posfeedback)
scale = 0.001 (1000 incs = 1 Machine Unit)
inside lcec : sint_to_float -> raw_value; raw_value * scale =hal_value

-writing (pos command)
scale = 1000 (1 Machine Unit = 1000 incs [enc_counts])
inside lcec : hal_value * scale = raw_value; raw_value ->float_to_sint

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

Time to create page: 0.133 seconds
Powered by Kunena Forum