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

More
28 Jan 2023 07:32 #263059 by wuyatom
  It may be that my 5A-75E7.1 does not support it, but my 5a-75b_ The firmware file bit generated by v7.0i12o14p6s6e6.json, I use your 5a-75e_ v6.0_ The firmware file generated by i24o26p6s6e6.json cannot ping the motherboard. I don't know why 
Attachments:

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

More
28 Jan 2023 07:36 #263060 by wuyatom
The above gui shows that external estop is enabled, and I have minimized hal

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

More
28 Jan 2023 12:14 - 28 Jan 2023 14:22 #263075 by deroj
Hello.
It was time to get serious :side:
I connected a stepper to the card. It is moving. But at higher speeds I get
"Position Error"
How can I solve that?
I copied the example Stepgen config from the docs.

EDIT:
I changed the hal to use PID components. Now I can go up to 3000 mm/min. I used the Pncconf Wizard to make a start config.
with pos2vel I was limited to max 900 mm/min
Last edit: 28 Jan 2023 14:22 by deroj.
The following user(s) said Thank You: TOLP2

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

More
29 Jan 2023 06:59 #263154 by wuyatom
Your hal can only be used with a watchdog, otherwise the emergency stop in the GUI cannot be pressed, and if you want to use the 5A-75EV7.1 firmware, you need to modify the colorlight.py file. Now my 5A-75EV7.1 board can work normally
 
Attachments:

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

More
29 Jan 2023 21:14 #263187 by TOLP2

Hello.
It was time to get serious :side:
I connected a stepper to the card. It is moving. But at higher speeds I get
"Position Error"
How can I solve that?
I copied the example Stepgen config from the docs.

EDIT:
I changed the hal to use PID components. Now I can go up to 3000 mm/min. I used the Pncconf Wizard to make a start config.
with pos2vel I was limited to max 900 mm/min

Can you share your setup as an example?

Progress on re-write
At this moment I'm re-writing LitexCNC. The goals of this re-write is:
  • The config is stored on the FPGA. The HAL-driver won't need the JSON-file anymore! Connecting to the FPGA is as easy as loadrt litexcnc followed by loadrt litexcnc_eth connection_string="10.0.0.10"
  • To name the pins of the FPGA the 'name' property of each module instance is still used to create a .hal-file containing all aliases for the pins. 
  • The CLI scripts for installing the driver and building the firmware automatically detect new modules and boards. This makes it possible to extend the modules and boards in the future. It is possible to do this with plugins.
  • The structure of the module driver has been seriously simplified.
At this moment 3 out of 4 modules have been re-written, only stepgen is still missing. If you want to try it out, you can try the current branch under development:  11-add-external-extensions-to-litexcnc
The following user(s) said Thank You: Pro_El

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

More
30 Jan 2023 07:00 #263214 by deroj

Can you share your setup as an example?

Yes I can.
I attach the hal and ini from each setup. 

File Attachment:

File Name: pos2vel-setup.tar.gz
File Size:2 KB
 

File Attachment:

File Name: pid-setup.tar.gz
File Size:3 KB
Attachments:
The following user(s) said Thank You: Pro_El, TOLP2

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

More
05 Feb 2023 14:24 - 06 Feb 2023 19:24 #263750 by deroj
So, what do you think is the reason for the speed limit?
With my Mesa 7i96 i can run 10000mm/min with no problems. Maybe higher. I haven`t test it yet.
Or is it just a setting I have to adjust?

EDIT:
Think I found my error. I set up the scale wy too high. It was about 2000 pulses per mm. Should be 800 pulses.
Now I can go up to 8500mm/min.
I won´t need this speed. But its nice to know it could :-)
Last edit: 06 Feb 2023 19:24 by deroj.
The following user(s) said Thank You: TOLP2

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

More
07 Feb 2023 13:36 #263931 by TOLP2

So, what do you think is the reason for the speed limit?
With my Mesa 7i96 i can run 10000mm/min with no problems. Maybe higher. I haven`t test it yet.
Or is it just a setting I have to adjust?

EDIT:
Think I found my error. I set up the scale wy too high. It was about 2000 pulses per mm. Should be 800 pulses.
Now I can go up to 8500mm/min.
I won´t need this speed. But its nice to know it could :-)

Good to hear that you have found the mistake. However, I think the stepgen still doesn't hold up to its expectation:
  • speed: 10,000 mm/min in combination with 2,000 pulses per mm gives a pulse-train with a frequency of 2,000 x 10,000 / 60 = 333 kHz ==> this leads to an error.
  • speed 8,500 mm/min in combination with 800 pulses per mm gives a pulse-train with a frequency of 800 * 8,500 / 60 = 113 kHz, which does work (but actually it should not, see below).
  • Max speed based on .ini-file: STEPLEN = 5000 ns, STEPSPACE = 5000 ns, combined 10 us, maximum speed will be 100 kHz. An error should have been visible and the speed should be lowered to the maximum. I think this did not happen, my apologies.
I just finished moving the stepgen also to the new structure . I will add this to the list of things to improve.

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

More
09 Feb 2023 21:10 #264168 by TOLP2
Everybody can now contribute to Litex-CNC by adding new, customized, modules to the eco-system. I've made a cookiecutter template which prepares all the boilerplate code for you. Just add the driver logic and the firmware and you can use the new module alongside the exisiting modules. 

Quickstart
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter

Generate a LitexCNC module template:
cookiecutter https://github.com/Peter-van-Tol/Litex-CNC-module-template.git

Then:
  • fill in the requested data;
  • open the project in your favorite IDE and start hacking.
By default you can directly use the driver and firmware, as the template will compile without errors. However, as there is no logic inside the module, it won;t do anything. You can try things out by printing something out to the shell.

Usage in HAL
Both the firmware and driver are automatically picked up in the CLI commands, it is unfortunately not yet automatically available in HAL. To register your new module in HAL, you have to explicitly load it, e.g.:
loadrt litexcnc
loadrt litexcnc_toolerator
 

This behavior might be improved upon in the future.

Want to try it out?
Great! But Litex-CNC is under development and so is the template. Feedback is welcome!

As long as Litex-CNC is not yet on pypi.org, one should use the following command when using the template:
poetry remove litexcnc
poetry add git+https://github.com/Peter-van-Tol/LiteX-CNC#11-add-external-extensions-to-litexcnc[cli]

This will modify the setup of the template to use the branch which supports extending Litex-CNC with new modules. Happy hacking!
 

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

More
13 Feb 2023 11:49 #264423 by deroj
What kind of modules have you in your mind?
Like hal components? Or what is the purpose for these modules?

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

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