Joint 0 following error. Error on axis 0, command number X
- AndrewHsasku
- Offline
- Junior Member
-
Less
More
- Posts: 23
- Thank you received: 0
12 Dec 2017 14:17 #102997
by AndrewHsasku
I am trying to develop my configuration.
At the moment I am having problem with errorprinted in linuxCNC andprinted 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. 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?
At the moment I am having problem with error
Joint 0 following error
Error on axis 0, command number X
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
Unexpected realtime delay on task 1
What would be a reason of this error: something missed or just latency?
Please Log in or Create an account to join the conversation.
12 Dec 2017 14:34 #102999
by BigJohnT
Replied by BigJohnT on topic Joint 0 following error. Error on axis 0, command number X
You can't run LinuxCNC from a Virtual Box as it's not real time.
JT
JT
Please Log in or Create an account to join the conversation.
12 Dec 2017 15:37 #103004
by PCW
Replied by PCW on topic Joint 0 following error. Error on axis 0, command number X
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
commanded position to the feedback position and avoid following error faults
Please Log in or Create an account to join the conversation.
- AndrewHsasku
- Offline
- Junior Member
-
Less
More
- Posts: 23
- Thank you received: 0
12 Dec 2017 16:26 #103008
by AndrewHsasku
Replied by AndrewHsasku on topic Joint 0 following error. Error on axis 0, command number X
Looping feedback and position changes nothing.
Thats part of my hal:
My functions write and read do not execute
Thats part of my hal:
# 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 or Create an account to join the conversation.
12 Dec 2017 16:50 #103012
by PCW
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
Replied by PCW on topic Joint 0 following error. Error on axis 0, command number X
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 or Create an account to join the conversation.
- AndrewHsasku
- Offline
- Junior Member
-
Less
More
- Posts: 23
- Thank you received: 0
12 Dec 2017 16:59 #103014
by AndrewHsasku
Replied by AndrewHsasku on topic Joint 0 following error. Error on axis 0, command number X
Yeah, pasted one is my original code before changes. I have tried suggested changes rather like below and it didn't helped
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.
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 or Create an account to join the conversation.
12 Dec 2017 17:15 #103016
by PCW
Replied by PCW on topic Joint 0 following error. Error on axis 0, command number X
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
and min_ferror to 1e30 or some such
Please Log in or Create an account to join the conversation.
- AndrewHsasku
- Offline
- Junior Member
-
Less
More
- Posts: 23
- Thank you received: 0
12 Dec 2017 19:07 - 12 Dec 2017 19:09 #103028
by AndrewHsasku
Replied by AndrewHsasku on topic Joint 0 following error. Error on axis 0, command number X
ferror and min_ferror doesn't help.
Commenting my code and using just:works, but it skips my driver. Adding PID crashes again:
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
Commenting my code and using just:
net x-pos-cmd axis.0.motor-pos-cmd => axis.0.motor-pos-fb
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
Last edit: 12 Dec 2017 19:09 by AndrewHsasku.
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds