- Posts: 26
- Thank you received: 10
ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
- juergenmoser
- Offline
- Junior Member
-
Less
More
3 years 9 months ago #260961
by juergenmoser
Replied by juergenmoser on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
So I think thats my problem - i have Python 3.7 installed.I Will update pip. How can I Upload to python 3.8? also when i try the command without pip3 and only pip the say I have only Python 2.7 Installed..
Please Log in or Create an account to join the conversation.
- TOLP2
- Offline
- Elite Member
-
Less
More
- Posts: 225
- Thank you received: 178
3 years 9 months ago #260963
by TOLP2
Replied by TOLP2 on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Checking at this moment whether it installs on Python 3.7. If it works, I'll directly release a new version.
The following user(s) said Thank You: juergenmoser
Please Log in or Create an account to join the conversation.
- juergenmoser
- Offline
- Junior Member
-
Less
More
- Posts: 26
- Thank you received: 10
3 years 9 months ago #260965
by juergenmoser
Hmm i dont know whats the problem...
Replied by juergenmoser on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Code:
cnc@debian:~$ pip3 install https://test-files.pythonhosted.org/packages/05/6c/6493aa81992f8fc84eeb2934bdc568b30791c529b40915bd272baa976455/litexcnc-0.9.0a3.tar.gz
Collecting https://test-files.pythonhosted.org/packages/05/6c/6493aa81992f8fc84eeb2934bdc568b30791c529b40915bd272baa976455/litexcnc-0.9.0a3.tar.gz
Using cached https://test-files.pythonhosted.org/packages/05/6c/6493aa81992f8fc84eeb2934bdc568b30791c529b40915bd272baa976455/litexcnc-0.9.0a3.tar.gz
Installing build dependencies ... done
litexcnc requires Python '>=3.8,<4.0' but the running Python is 3.7.3
cnc@debian:~$ python --version
Python 2.7.16
cnc@debian:~$ python3 --version
Python 3.8.16
cnc@debian:~$
Please Log in or Create an account to join the conversation.
- TOLP2
- Offline
- Elite Member
-
Less
More
- Posts: 225
- Thank you received: 178
3 years 9 months ago #260968
by TOLP2
Replied by TOLP2 on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Seems like you have multiple python installations on your system. I just released alpha-4, which does support Python 3.7, so you should be able installing it with the first command.
If the python 3.7 installation is on path (which is assume to be, as pip3 is on path), the scripts like install_driver should work and you won;t have to bother with the Python version hell.
If the python 3.7 installation is on path (which is assume to be, as pip3 is on path), the scripts like install_driver should work and you won;t have to bother with the Python version hell.
The following user(s) said Thank You: juergenmoser
Please Log in or Create an account to join the conversation.
- muvideo
- Offline
- Senior Member
-
Less
More
- Posts: 62
- Thank you received: 30
3 years 9 months ago #260987
by muvideo
Replied by muvideo on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hi, sorry for the inaccuracies of my template, I should check It and sincronize It with my real working configuration.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 InverteInverte
Please Log in or Create an account to join the conversation.
- muvideo
- Offline
- Senior Member
-
Less
More
- Posts: 62
- Thank you received: 30
3 years 9 months ago - 3 years 9 months ago #260991
by muvideo
Hi,
the PID part can be confusing and intimidating for the newcomers to this configurations.
I should write more about this part in the documentation.
The simplified background is that in Lcnc the stepgen is a variable frequency pulse generator, this is a choice for having simple fpga code and fast and smooth pulse generation dynamics.
Since the frequency (i.e pulses per second) is the joint velocity scaled by a constant quantity (constant that depend on steps per revolution, gear ratio, lead screw etc) then Lcnc for the stepgen will accept as input the requested joint velocity.
Lcnc is not handling directly position requested, will provide only position feedback (by counting how many steps have been generated).
Usually you need to move the joint to a certain position, and linuxcnc will provide this as commanded position, so the PID here will "translate" the position requested from linuxcnc to velocity command sent to Lcnc, so it sits between Linuxcnc and Lcnc.
But Pid need also to know the actual position of the axis at every instant in order to provide correct calculations.
So to summarize pid need two inputs: position you want to reach and actual joint position, and provides one output: requested joint velocity.
Here the feedback part could generate some confusion, since in your configuration there will have no real world feedback from the axis: you dont have encoders. But the fpga step generator will take some time to move the axis, due to for example acceleration limit imposed in hal, or hardware limits in step rate, and since the acceleration is limited, and so the velocity, the actual position will change in a finite time, and the PID will read this in positon feedback from Lcnc for it's intenal calculations,
In my hal file all this configuration is where you read:
Replied by muvideo on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
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?
Hi,
the PID part can be confusing and intimidating for the newcomers to this configurations.
I should write more about this part in the documentation.
The simplified background is that in Lcnc the stepgen is a variable frequency pulse generator, this is a choice for having simple fpga code and fast and smooth pulse generation dynamics.
Since the frequency (i.e pulses per second) is the joint velocity scaled by a constant quantity (constant that depend on steps per revolution, gear ratio, lead screw etc) then Lcnc for the stepgen will accept as input the requested joint velocity.
Lcnc is not handling directly position requested, will provide only position feedback (by counting how many steps have been generated).
Usually you need to move the joint to a certain position, and linuxcnc will provide this as commanded position, so the PID here will "translate" the position requested from linuxcnc to velocity command sent to Lcnc, so it sits between Linuxcnc and Lcnc.
But Pid need also to know the actual position of the axis at every instant in order to provide correct calculations.
So to summarize pid need two inputs: position you want to reach and actual joint position, and provides one output: requested joint velocity.
Here the feedback part could generate some confusion, since in your configuration there will have no real world feedback from the axis: you dont have encoders. But the fpga step generator will take some time to move the axis, due to for example acceleration limit imposed in hal, or hardware limits in step rate, and since the acceleration is limited, and so the velocity, the actual position will change in a finite time, and the PID will read this in positon feedback from Lcnc for it's intenal calculations,
In my hal file all this configuration is where you read:
- joint.1.motor-pos-cmd => pid.1.command # here the requested position from linuxcnc is connected to PID input command
- Lcnc.00.stepgen.01.pos-fb => pid.1.feedback # here the actual position feedback of the axis from Lcnc is connected to the PID feedback
- pid.1.output => Lcnc.00.stepgen.01.vel-cmd # here you connect the pid output to Lcnc velocity command
About PID configuration, for the stepgen it is very simple, since the feedback dynamics are very predictable (some reasons here, basically the feedback here is not from the real axis position*, but from stepgen in fpga, so no disturbances from the real world) you can use the parameters you see in the hal file:
setp pid.1.FF1 1.0
setp pid.1.Pgain 200
setp pid.1.Igain 20
setp pid.1.Dgain 0
setp pid.1.deadband 0.01
If I understand correctly TOLP implementation, the position pid part in his software is already embedded in the driver so his implementation hides most of this and your life is simplified.
I prefer to not rewrite a PID logic inside my driver, since we already have a very good PID in ours hal components.
*Note:
If you will ever add encoders to your machine, and modify the board to read inputs, this configuration could easily be modified to accept feedback from encoders instead than from Lcnc, so you will have a full closed loop axis. In this case a proper PID calibration is needed since the PID will be dealing with real world and unpredictable disturbances.
Last edit: 3 years 9 months ago by muvideo.
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: 0.363 seconds
(Maybe also Fabio can change this error in the GitHub Repo)