Joint 0 following error. Error on axis 0, command number X

More
8 years 10 months ago #102997 by AndrewHsasku
I am trying to develop my configuration.
At the moment I am having problem with error
Code:
Joint 0 following error
printed in linuxCNC and
Code:
Error on axis 0, command number X
printed in terminal.
No idea what I miss in .ini/.hal/.c. Projects uses trivkins and pid. FERROR for each axis is set to 1. LinuxCNC is installed on VirtualBox. When starting I also receive an error
Code:
Unexpected realtime delay on task 1
. Latency is nearly 1s (nothing strange when it is installed on virtual machine).
What would be a reason of this error: something missed or just latency?

Please Log in to join the conversation.

More
8 years 10 months ago #102999 by BigJohnT
You can't run LinuxCNC from a Virtual Box as it's not real time.

JT

Please Log in to join the conversation.

More
8 years 10 months ago #103004 by PCW
If you are just testing the driver and don't care about motion behaviour you can loop back the
commanded position to the feedback position and avoid following error faults

Please Log in to join the conversation.

More
8 years 10 months ago #103008 by AndrewHsasku
Looping feedback and position changes nothing.
Thats part of my hal:
Code:
# THREADS # ################################################ addf driver.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf x-pid.do-pid-calcs servo-thread addf y-pid.do-pid-calcs servo-thread addf z-pid.do-pid-calcs servo-thread addf a-pid.do-pid-calcs servo-thread addf driver.write servo-thread # PID # ################################################ setp z-pid.Pgain 1.0 setp z-pid.Igain 0.0 setp z-pid.Dgain 0.0 setp z-pid.FF0 0.0 setp z-pid.FF1 1.0 setp z-pid.FF2 0.0 setp z-pid.deadband 0.01 setp z-pid.maxoutput 200.0 net z-enable axis.2.amp-enable-out => z-pid.enable driver.axis_z.enable net z-pos-cmd axis.2.motor-pos-cmd => z-pid.command net z-pos-fb driver.axis_z.position => z-pid.feedback axis.2.motor-pos-fb net z-vel-cmd z-pid.output => driver.axis_z.velocity net z-fault driver.axis_z.fault => axis.2.amp-fault-in

My functions write and read do not execute

Please Log in to join the conversation.

More
8 years 10 months ago #103012 by PCW

net z-pos-cmd axis.2.motor-pos-cmd => z-pid.command
net z-pos-fb driver.axis_z.position => z-pid.feedback axis.2.motor-pos-fb



You did not loop back command to position, that would be done something like this:

net zpos axis.2.motor-pos-fb axis.2.motor-pos-cmd

Please Log in to join the conversation.

More
8 years 10 months ago #103014 by AndrewHsasku
Yeah, pasted one is my original code before changes. I have tried suggested changes rather like below and it didn't helped
Code:
net z-pos-cmd axis.2.motor-pos-cmd => z-pid.command net z-vel-cmd z-pid.output => z-pid.feedback axis.2.motor-pos-fb

Anyway just feed backing this way will just omit my driver.
Inside driver code, in read function, just for current tests, there is cloning data from driver.axis_z.velocity to driver.axis_z.position. However as far, read function do not execute.

Please Log in to join the conversation.

More
8 years 10 months ago #103016 by PCW
if you want to avoid the fault and still be able to run without looping back command to feedback, you could always set ferror
and min_ferror to 1e30 or some such

Please Log in to join the conversation.

More
8 years 10 months ago #103028 by AndrewHsasku
ferror and min_ferror doesn't help.
Commenting my code and using just:
Code:
net x-pos-cmd axis.0.motor-pos-cmd => axis.0.motor-pos-fb
works, but it skips my driver. Adding PID crashes again:
Code:
net x-pos-cmd axis.0.motor-pos-cmd => x-pid.command x-pid.feedback net x-vel-cmd x-pid.output => axis.0.motor-pos-fb

Do I miss sth in PID conf?
I also can't execute anything from driver. Read and write functions don't execute. rtapi_print_msg doesn't print anything. Values changed on rtapi_app_main are not changed in Hal Meter

Please Log in to join the conversation.

Time to create page: 0.244 seconds
Powered by Kunena Forum