ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

More
3 years 9 months ago - 3 years 9 months ago #261029 by deroj
since the script runs apt to install libjson-c-dev, i did it manually.

but i installed it again, your way.
but the error is the same in halrun

running linux mint 21
Linux oj-turner 6.0.0-6-rt-amd64 #1 SMP PREEMPT_RT Debian 6.0.12-1 (2022-12-09) x86_64 x86_64 x86_64 GNU/Linux
LINUXCNC - 2.9.0~pre0+git20221105.ffb6bda926
Last edit: 3 years 9 months ago by deroj.

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

More
3 years 9 months ago #261035 by TOLP2

since the script runs apt to install libjson-c-dev, i did it manually.

but i installed it again, your way.
but the error is the same in halrun

running linux mint 21
Linux oj-turner 6.0.0-6-rt-amd64 #1 SMP PREEMPT_RT Debian 6.0.12-1 (2022-12-09) x86_64 x86_64 x86_64 GNU/Linux
LINUXCNC - 2.9.0~pre0+git20221105.ffb6bda926
Which halcompile do you use? LitexCNC comes with a modified version of halcompile in order to be able to link libjson correctly. I think you are using the original which is part of LinuxCNC. The problem with the orginal version is that it wil compile, but it won't run because of the missing link.

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

More
3 years 9 months ago #261037 by TOLP2

muvideo post=260991 userid=29999

[...]

If I understand correctly TOLP implementation, the position pid part in his software is already embedded in the driver so his implementation hides most of this and your life is simplified.
I prefer to not rewrite a PID logic inside my driver, since we already have a very good PID in ours hal components.

IT is correct that I like to make things as easy as possible. However, your understanding of pos2vel is not completely correct.

The pos2vel component is not a PID implementation. The reason is like you stated, the feedback is predictable. The only part which is not predictable is the amount of counts between two succesive cycles. This is due to the FPGA not running exactly at 40 MHz and also due to the jitter of the thread. These things we can measure and correct for, whilst keeping in mind acceleration limits. The component makes sure that if the acceleration ends (and thus a constant speed is attained), this speed can be reached within one cycle. It is pure physics in the component, very similar to the driving part of LinuxCNC component stepgen, but with added complexity to allow for the stepgen actually taking place on a FPGA.

Also, pos2vel is not baked into the driver. This is because the driver should not contain magic (I agree with you on this one). It is very much possible to use a PID approach to LitexCNC if a user wants this. This also opens the road for full close-loop systems.
The following user(s) said Thank You: muvideo

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

More
3 years 9 months ago - 3 years 9 months ago #261071 by deroj
as i wrote...
"sudo python3 halcompile.py --install litexcnc.c litexcnc_eth.c litexcnc_debug.c stepgen/pos2vel.c"
right in the litex-cnc- driver folder

and after install with sudo, like you said, just "litexcnc install_driver"

original halcompile isnt a python script, or is it? and if, how do i tell litexcnc to use the modified one?
Last edit: 3 years 9 months ago by deroj.

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

More
3 years 9 months ago #261073 by deroj
 

File Attachment:

File Name: install_driver.txt
File Size:36 KB
so i found the original halcompile and renamed it to halcompile1.
then i run the litexcnc install_driver again with no changes.

i attached the terminal output. maybe you can find my mistakes?
thank you

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

More
3 years 9 months ago - 3 years 9 months ago #261083 by TOLP2
I think the error does not come from a linking error, but due to unexpected types in a function. Will have to look into line number 250, where the error occurs.

Edit:
Can you share your system config (OS and version of Linuxcnc) for tracing this error?
Last edit: 3 years 9 months ago by TOLP2.

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

Moderators: PCW, jmelson
Time to create page: 1.076 seconds
Powered by Kunena Forum