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

More
11 Jul 2023 15:57 - 11 Jul 2023 16:54 #275218 by PCW
That is how index is handled by LinuxCNC

Typically LinuxCNC's motion component sets index-enable true
for homing to index or spindle synchronized moves. Then, when the hardware
(or software) encoder component detects the index, it clears its hal position pin
and sets index-enable false to tell motion that index has be detected.
Last edit: 11 Jul 2023 16:54 by PCW.
The following user(s) said Thank You: tommylight

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

More
11 Jul 2023 16:35 #275222 by tuxcnc

That is how index is handled by LinuxCNC

Typically LinuxCNC's motion component sets index-enable true
for homing to index or spindle synchronized moves. Then when the hardware
(or software) encoder component detect the index, it clears its hal position pin
and sets index-enable false to tell motion that index has be detected.
 

You are right, I was wrong.
linuxcnc.org/docs/html/man/man9/encoder.9.html

Well, I must finish my lathe model for real test...

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

More
12 Jul 2023 07:05 #275256 by RiJa
@deroj

Because I installed it with poetry i can only run the command poetry run litexcnc install_driver inside the folder with sudo
cnc@debian:~/Desktop/LiteX-CNC-11-add-external-extensions-to-litexcnc$ sudo -E env PATH=$PATH poetry run litexcnc install_driver
INFO: Retrieving default driver files to compile...
Copying file 'watchdog.c'
Copying file 'litexcnc.c'
Copying file 'wallclock.c'
Copying file 'litexcnc_eth.c'
Copying file 'etherbone.c'
Copying file 'litexcnc_gpio.c'
Copying file 'litexcnc_stepgen.c'
Copying file 'litexcnc_encoder.c'
Copying file 'litexcnc_pwm.c'
Copying file 'pos2vel.c'
Copying file 'watchdog.h'
Copying file 'wallclock.h'
Copying file 'litexcnc.h'
Copying file 'etherbone.h'
Copying file 'litexcnc_eth.h'
Copying file 'litexcnc_encoder.h'
Copying file 'litexcnc_pwm.h'
Copying file 'litexcnc_gpio.h'
Copying file 'litexcnc_stepgen.h'
Copying file 'pos2vel.h'
INFO: Compiling LitexCNC driver...
Compiling realtime litexcnc.c
litexcnc.c: In function ‘litexcnc_register’:
litexcnc.c:519:1: warning: label ‘fail0’ defined but not used [-Wunused-label]
  519 | fail0:
      | ^~~~~
Linking litexcnc.so
cp litexcnc.so /usr/lib/linuxcnc/modules/
Compiling realtime pos2vel.c
Linking pos2vel.so
cp pos2vel.so /usr/lib/linuxcnc/modules/
Compiling realtime litexcnc_eth.c
Linking litexcnc_eth.so
cp litexcnc_eth.so /usr/lib/linuxcnc/modules/
Compiling realtime litexcnc_gpio.c
Linking litexcnc_gpio.so
cp litexcnc_gpio.so /usr/lib/linuxcnc/modules/
Compiling realtime litexcnc_stepgen.c
Linking litexcnc_stepgen.so
cp litexcnc_stepgen.so /usr/lib/linuxcnc/modules/
Compiling realtime litexcnc_encoder.c
Linking litexcnc_encoder.so
cp litexcnc_encoder.so /usr/lib/linuxcnc/modules/
Compiling realtime litexcnc_pwm.c
Linking litexcnc_pwm.so
cp litexcnc_pwm.so /usr/lib/linuxcnc/modules/
INFO: LitexCNC driver installed

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

More
12 Jul 2023 07:36 - 12 Jul 2023 07:38 #275257 by deroj
and the files are really in the /usr/lib/linuxcnc/modules/ folder?

how did you install LinuxCNC?

I am using the official debian with LCNC 2.8.4
www.linuxcnc.org/iso/linuxcnc-2.8.4-buster.iso

another thing you can try, what helped me.

open terminal
> poetry shell
> litexcnc install_driver

 
Last edit: 12 Jul 2023 07:38 by deroj.

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

More
12 Jul 2023 09:08 - 12 Jul 2023 09:10 #275263 by RiJa
Thank you, that helped. But after flashing the board and trying to check with hal im getting this error:
[code]halcmd: loadrt litexcnc_eth connection_string="eth:10.0.0.10"
litexcnc: loading litexCNC etherbone driver version 1.0.0
failed to resolve remote socket address (err=-8 / Servname not supported for ai_socktype)
LitexCNC-eth: ERROR: failed to connect to board on 'eth:10.0.0.10'
rtapi_app: caught signal 11 - dumping core
<stdin>:2: waitpid failed /usr/bin/rtapi_app litexcnc_eth

<stdin>:2: /usr/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for litexcnc_eth failed, returned -1
[/code]
Removing the eth: doesn't work either.
Last edit: 12 Jul 2023 09:10 by RiJa.

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

More
12 Jul 2023 09:12 #275264 by deroj
Can you Ping the Board unser this IP?

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

More
12 Jul 2023 10:03 - 12 Jul 2023 10:13 #275270 by RiJa
cnc@debian:~$ ping 10.0.0.10
PING 10.0.0.10 (10.0.0.10) 56(84) bytes of data.
From 10.0.0.15 icmp_seq=1 Destination Host Unreachable
From 10.0.0.15 icmp_seq=2 Destination Host Unreachable
From 10.0.0.15 icmp_seq=3 Destination Host Unreachable
From 10.0.0.15 icmp_seq=4 Destination Host Unreachable
From 10.0.0.15 icmp_seq=5 Destination Host Unreachable
From 10.0.0.15 icmp_seq=6 Destination Host Unreachable
From 10.0.0.15 icmp_seq=7 Destination Host Unreachable
From 10.0.0.15 icmp_seq=8 Destination Host Unreachable
From 10.0.0.15 icmp_seq=9 Destination Host Unreachable
From 10.0.0.15 icmp_seq=10 Destination Host Unreachable

 
Last edit: 12 Jul 2023 10:13 by RiJa.

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

More
12 Jul 2023 10:55 #275273 by deroj
So when you cannot ping it, LinuxCNC wouldn't find it either....

Do you use the left or right LAN port from the board?
Only one will work.

And is 10.0.0.10 the IP address you set in the JSON config?

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

More
12 Jul 2023 10:59 - 12 Jul 2023 11:07 #275275 by RiJa
Now i can ping the 10.0.0.10 because I should've used the other ethernet port but i still get the same error
cnc@debian:~$ ping 10.0.0.10
PING 10.0.0.10 (10.0.0.10) 56(84) bytes of data.
64 bytes from 10.0.0.10: icmp_seq=1 ttl=128 time=0.101 ms
64 bytes from 10.0.0.10: icmp_seq=2 ttl=128 time=0.127 ms
64 bytes from 10.0.0.10: icmp_seq=3 ttl=128 time=0.122 ms

cnc@debian:~$ halrun
halcmd: loadrt litexcnc
Note: Using POSIX realtime
litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
halcmd: loadrt litexcnc_eth connection_string="eth:10.0.0.10"
litexcnc: loading litexCNC etherbone driver version 1.0.0
failed to resolve remote socket address (err=-8 / Servname not supported for ai_socktype)
LitexCNC-eth: ERROR: failed to connect to board on 'eth:10.0.0.10'
rtapi_app: caught signal 11 - dumping core
<stdin>:2: waitpid failed /usr/bin/rtapi_app litexcnc_eth

<stdin>:2: /usr/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for litexcnc_eth failed, returned -1


 
Last edit: 12 Jul 2023 11:07 by RiJa.

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

More
12 Jul 2023 11:07 - 12 Jul 2023 11:14 #275277 by deroj
So, what board do you have?

And don't use the "eth:" part in the connection string
Last edit: 12 Jul 2023 11:14 by deroj.

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

Moderators: PCWjmelson
Time to create page: 0.218 seconds
Powered by Kunena Forum