ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
09 Jul 2023 10:43 - 09 Jul 2023 11:34 #275070
by deroj
Replied by deroj on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
I treid to install 11-add-external... with
poetry install
I could install the driver with
poetry run litexcnc install_driver
before I had to install click and yapps with
poetry run pip3 install click
poetry run pip3 install yapps
But I cannot build the firmware
poetry run litexcnc build_firmware "...json" --build throws
Error: Litex is not installed. Please run 'litexcnc install_litex' first.
But poetry run "litexcnc install_litex --user" throws:
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
So I tried litexcnc install_litex -d "/home/oj/.cache/pypoetry/virtualenvs/litexcnc-nG38Bnph-py3.7"
Then it installed LiteX in the poetry env
But then poetry run litexcnc build_firmware "...json" only opens some kind of "input":
>
only way to exit is to close the terminal window
EDIT:
Think I got it...
I opened poetry shell
then copied the JSON to the poetry env directory.
After this I run litexcnc build_firmware "/full-path-to-poetry-env-directory/file.json" --build
Second EDIT:
I installed the driver again in this shell with litexcnc install_driver
Did a test with halrun and it worked.
It loads the driver and I can see all the pins.
loadrt litexcnc
loadrt litexcnc_eth connection_string="192.168.178.150" #the documentation says "eth:192.168.178.150" but this didn't work
then I connected a simple rotary encoder and I can see the counts in LinuxCNC
poetry install
I could install the driver with
poetry run litexcnc install_driver
before I had to install click and yapps with
poetry run pip3 install click
poetry run pip3 install yapps
But I cannot build the firmware
poetry run litexcnc build_firmware "...json" --build throws
Error: Litex is not installed. Please run 'litexcnc install_litex' first.
But poetry run "litexcnc install_litex --user" throws:
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
So I tried litexcnc install_litex -d "/home/oj/.cache/pypoetry/virtualenvs/litexcnc-nG38Bnph-py3.7"
Then it installed LiteX in the poetry env
But then poetry run litexcnc build_firmware "...json" only opens some kind of "input":
>
only way to exit is to close the terminal window
EDIT:
Think I got it...
I opened poetry shell
then copied the JSON to the poetry env directory.
After this I run litexcnc build_firmware "/full-path-to-poetry-env-directory/file.json" --build
Second EDIT:
I installed the driver again in this shell with litexcnc install_driver
Did a test with halrun and it worked.
It loads the driver and I can see all the pins.
loadrt litexcnc
loadrt litexcnc_eth connection_string="192.168.178.150" #the documentation says "eth:192.168.178.150" but this didn't work
then I connected a simple rotary encoder and I can see the counts in LinuxCNC
Attachments:
Last edit: 09 Jul 2023 11:34 by deroj.
The following user(s) said Thank You: RiJa
Please Log in or Create an account to join the conversation.
10 Jul 2023 10:42 - 10 Jul 2023 11:47 #275129
by RiJa
Replied by RiJa on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hello, I've done everything you have done successfully but I'm having trouble figuring out which IP address to connect it to. When i connect to my board and check my connection there is nothing but the device for my internet that i use and enp0s25 which shows as disconnected. When you write loadrt litexcnc_eth connection_string="192.168.178.150" is 192.168.178.150 the ip address thats in the config file or the one you use to connect with the ethernet cable.
Also im having trouble using hal because it doesn't recognize litexcnc[/code]
Also im having trouble using hal because it doesn't recognize litexcnc
[code]halcmd: loadrt litexcnc
hal_lib: dlopen: /usr/lib/linuxcnc/modules/hal_lib.so: cannot open shared object file: No such file or directory
Note: Using POSIX realtime
litexcnc: dlopen: /usr/lib/linuxcnc/modules/litexcnc.so: cannot open shared object file: No such file or directory
<stdin>:1: waitpid failed /usr/bin/rtapi_app litexcnc
<stdin>:1: /usr/bin/rtapi_app exited without becoming ready
<stdin>:1: insmod for litexcnc failed, returned -1
Last edit: 10 Jul 2023 11:47 by RiJa.
Please Log in or Create an account to join the conversation.
10 Jul 2023 15:56 #275141
by deroj
Replied by deroj on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hello.
Yes, the IP address is the one you set in the JSON config.
My ethernet adapter in the PC is another one.
I set it to a static IP which fit to the 5A-75B address.
192.168.178.222 in my case.
Please, check Peter's examples...
litex-cnc.readthedocs.io/en/11-add-exter...75b_v8.0_i24o32.json
can you build the firmware with this?
can you flash the colorlite board?
your error from halcmd looks like it cannot find the litexcnc drivers.
did you successfully run
litexcnc install_driver ?
Yes, the IP address is the one you set in the JSON config.
My ethernet adapter in the PC is another one.
I set it to a static IP which fit to the 5A-75B address.
192.168.178.222 in my case.
Please, check Peter's examples...
litex-cnc.readthedocs.io/en/11-add-exter...75b_v8.0_i24o32.json
can you build the firmware with this?
can you flash the colorlite board?
your error from halcmd looks like it cannot find the litexcnc drivers.
did you successfully run
litexcnc install_driver ?
Please Log in or Create an account to join the conversation.
10 Jul 2023 17:21 #275144
by tuxcnc
Replied by tuxcnc on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Well...
It seems the AB encoder works as expected, but the ABZ encoder works as AB, that meant it not works.
I need an index pulse, because I want a lathe drive.
It seems the AB encoder works as expected, but the ABZ encoder works as AB, that meant it not works.
I need an index pulse, because I want a lathe drive.
Please Log in or Create an account to join the conversation.
10 Jul 2023 17:33 #275145
by RiJa
Replied by RiJa on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
I'm trying to build this repo with poetry, I've succesfully built the firmware and flashed the board.
Please Log in or Create an account to join the conversation.
10 Jul 2023 20:43 #275157
by deroj
Replied by deroj on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
@RiJa:
you build the firmware with the config.json.
you flashed the board
But did you install the drivers for LinuxCNC with
litexcnc install_driver ?
you build the firmware with the config.json.
you flashed the board
But did you install the drivers for LinuxCNC with
litexcnc install_driver ?
The following user(s) said Thank You: RiJa
Please Log in or Create an account to join the conversation.
11 Jul 2023 06:54 - 11 Jul 2023 12:06 #275191
by RiJa
Replied by RiJa on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
I'm having trouble doing that, I get this error
halcmd: loadrt litexcnc
Note: Using POSIX realtime
litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
Cannot load default module 'gpio': /usr/share/rtlib/litexcnc_gpio.so: cannot open shared object file: No such file or directory
litexcnc: rtapi_app_main: Operation not permitted (-1)
<stdin>:2: waitpid failed /usr/bin/rtapi_app litexcnc
<stdin>:2: /usr/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for litexcnc failed, returned -1
Last edit: 11 Jul 2023 12:06 by RiJa.
Please Log in or Create an account to join the conversation.
11 Jul 2023 14:09 #275212
by deroj
Replied by deroj on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hi.
I changed the encoder to have index input.
All I did was edit the config.json -> encoder section
Then flashed the board with firmware, opened LinuxCNC and the encoder works as expected.
I made a small video.
First set encoder.index-enable true.
Then when it detects the index pulse, the counter will be set to zero and index-enable back to false.
www.dropbox.com/s/zg66ako64gm8v3w/VID_20230711_160304.mp4?dl=0
I changed the encoder to have index input.
All I did was edit the config.json -> encoder section
Then flashed the board with firmware, opened LinuxCNC and the encoder works as expected.
I made a small video.
First set encoder.index-enable true.
Then when it detects the index pulse, the counter will be set to zero and index-enable back to false.
www.dropbox.com/s/zg66ako64gm8v3w/VID_20230711_160304.mp4?dl=0
Please Log in or Create an account to join the conversation.
11 Jul 2023 14:10 #275213
by deroj
Replied by deroj on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
@RiJa
can you show the terminal output when you run
litexcnc install_driver?
can you show the terminal output when you run
litexcnc install_driver?
Please Log in or Create an account to join the conversation.
11 Jul 2023 15:34 #275216
by tuxcnc
The encoder.index-enable should be set by user only and never reset by software.
This pin is for reset the encoder counter at EVERY index pulse, not only once on the first.
So this is a bug.
I can't get the index pulse in Linuxcnc - the halscope does not show this, but I didn't detailed test and I don't know is this a bug or I do some wrong...
Replied by tuxcnc on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
You are right, this works as you wrote, but should not.First set encoder.index-enable true.
Then when it detects the index pulse, the counter will be set to zero and index-enable back to false.
The encoder.index-enable should be set by user only and never reset by software.
This pin is for reset the encoder counter at EVERY index pulse, not only once on the first.
So this is a bug.
I can't get the index pulse in Linuxcnc - the halscope does not show this, but I didn't detailed test and I don't know is this a bug or I do some wrong...
Please Log in or Create an account to join the conversation.
Time to create page: 0.172 seconds