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

More
3 years 3 months ago - 3 years 3 months ago #275191 by RiJa
I'm having trouble doing that, I get this error
Code:
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: 3 years 3 months ago by RiJa.

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

More
3 years 3 months ago #275212 by deroj
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

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

More
3 years 3 months ago #275213 by deroj
@RiJa
can you show the terminal output when you run
litexcnc install_driver?

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

More
3 years 3 months ago #275216 by tuxcnc

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.
 
You are right, this works as you wrote, but should not.
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.

More
3 years 3 months ago - 3 years 3 months ago #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: 3 years 3 months ago by PCW.
The following user(s) said Thank You: tommylight

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

More
3 years 3 months ago #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.

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