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

More
3 years 9 months ago #260903 by juergenmoser
Hello Together again - I have found now a solution in my Joint Following Error on the Z Axis
At Fabios Github repo ( github.com/faeboli/Lcnc/blob/master/supp...cncMill/LcncMill.hal )
 I have copied his configuration to test my steppers.
I found an Error in the LcncMill.hal File:# Joint 2 setup   setp Lcnc.00.stepgen.00.scale [JOINT_2]SCALE setp Lcnc.00.stepgen.02.acc_lim [JOINT_2]STEPGEN_MAXACCEL # setp Lcnc.00.stepgen.00.enable true
so i have changed the stepgen.02.acc_lim to stepgen.00.acc_lim and now i have no more Joint Following Errors. Maybe if some tried also this configuration it helps a little bit =) (Maybe also Fabio can change this error in the GitHub Repo)

Another Question: Are the Outputs from the stepgen Step/Dir +3V3? so can I  connect it to a stepper driver (STEP/DIR)and only need a ground
Pin? or is this Inverted?



 
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 #260904 by TOLP2
The 5A-75E has 5 Volt outputs (therefore they have those buffers). Depending on your driver you can van connect these directly. I know Leadshine, Polulu, Lichuan can. Please refer to their documentation.

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

More
3 years 9 months ago #260906 by juergenmoser
Okay thank you for the quick reply - I have a 5a75b.
I was only a little bit confused because there are no step and dir pins connected by the joints in the hal file. 
I know only a little bit about PID - So for my Understanding the PID gives the command to the FPGA and the FPGA produces the Step/Dir signals which goes to the Buffers- right?

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

More
3 years 9 months ago #260917 by TOLP2
Not to make it more complex: your understanding is roughly correct.

If you don't like the PID and tuning of it, you might also want to try  Litex-CNC  and it's pos2vel component. 
The following user(s) said Thank You: juergenmoser

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

More
3 years 9 months ago - 3 years 9 months ago #260920 by juergenmoser
Thanks for your information - Yeah I have no idea how to tune the PID for STEP/Dir or what exactly to do with it. Maybe i`ts better to try Litex-CNC - does anybody or maybe you have a instruction or maybe a hal and ini File for LitexCNC with a Stepgen?

Edit: I have read the readme of LitexCNC - so i have to build a new Firmware. (And can I take the same Firmware (LCNC from Fabio) from the FPGA or do I have to make a new Bitfile for Litex-CNC as well?)
Last edit: 3 years 9 months ago by juergenmoser.

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

More
3 years 9 months ago #260929 by TOLP2
The functionality of both is the same. However, the information transferred is not. You have to rebuilt the firmware.

For Litex-CNC the configuration is done using JSON-files. Some examples of these files are given on the documentation page. You can download them, verify the settings and built them. If you want, I can make a specific config for you as well this evening. Need to know the number of gpio in / out, stepgen, pwm and encoders.

On the documentation there are also examples of the HAL files available per module. 

I tried to make Litex-CNC as user friendly as possible. It is installable from PyPi.org:
Code:
pip install --extra-index-url https://test.pypi.org/simple/ litexcnc[cli] 

To install the driver, litex and toolchain
Code:
litexcnc install_driver litexcnc install_litex litexcnc install_toolchain

When you have your configuration, you can build it using the command:
Code:
litexcnc build_firmware "<path-to-your-configuration>" --build 

After that you can upload the generated bit-file to your board and start connecting your HAL.

Per module there is an example on how to design your HAL file. An example for stepgen is given here . I only noticed just now that the documentation for encoders is missing. Will add that soon. 
The following user(s) said Thank You: juergenmoser

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

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