- Posts: 44
- Thank you received: 0
ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
4 years 4 months ago #245287
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hi all. I'm sorry, but I'm very dumb and I don't understand what's going on. One, two or all three axes change their readings as they want. And if, at the start, the indications of the axes and suddenly turn out to be static, the error "joint (012) following error" pops up at the first movement This happens on the board 5a-75b, and on 5a-75e it is strictly identical.
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Please Log in to join the conversation.
4 years 4 months ago #245314
by TOLP2
Replied by TOLP2 on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Thanks for trying this out and the data. I will look into this (not able to check the data right now)
With static you mean: they don't change anymore? Also, did you include your ini file and Hal file? There might be some acceleration related issue here
With static you mean: they don't change anymore? Also, did you include your ini file and Hal file? There might be some acceleration related issue here
Please Log in to join the conversation.
4 years 4 months ago #245327
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
TOLP2_litex is a litex build dir
TOLP2_litex_json_build is a BIG json from litex build dir.
TOLP2_lcnc is a LinuxCNC config archive.
I try to make video today or tomorrow.
In general, the values change stochastically for all axes. Sometimes, after starting, the values do not change, and the homing supposedly proceeds normally. but when I try to perform some kind of movement (for example, in MDI G1X100F150) I get the error "joint ...."
TOLP2_litex_json_build is a BIG json from litex build dir.
TOLP2_lcnc is a LinuxCNC config archive.
I try to make video today or tomorrow.
In general, the values change stochastically for all axes. Sometimes, after starting, the values do not change, and the homing supposedly proceeds normally. but when I try to perform some kind of movement (for example, in MDI G1X100F150) I get the error "joint ...."
Please Log in to join the conversation.
4 years 4 months ago #245342
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Video with errors. Firmware the same for both configs
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
4 years 4 months ago #245363
by tommylight
Replied by tommylight on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Sure looks like the stepgen feedback is disconnected in the hal file.
Please Log in to join the conversation.
4 years 4 months ago #245380
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hi
hal file in this archive
forum.linuxcnc.org/media/kunena/attachme..._lcnc_2022-06-16.tgz
Please see this. I'm not expert in hal
# Step Gen 00 (X) signals/setup
setp [TOLP2](CARD0).stepgen.00.position-scale [JOINT_0]SCALE
setp [TOLP2](CARD0).stepgen.00.steplen [JOINT_0]STEPLEN
setp [TOLP2](CARD0).stepgen.00.stepspace [JOINT_0]STEPSPACE
setp [TOLP2](CARD0).stepgen.00.dir-hold-time [JOINT_0]DIRHOLD
setp [TOLP2](CARD0).stepgen.00.dir-setup-time [JOINT_0]DIRSETUP
setp [TOLP2](CARD0).stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [TOLP2](CARD0).stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
#net xpos-cmd <= joint.0.motor-pos-cmd => [TOLP2](CARD0).stepgen.00.position-cmd
net xvel-cmd <= joint.0.vel-cmd => [TOLP2](CARD0).stepgen.00.velocity-cmd
net xpos-fb <= [TOLP2](CARD0).stepgen.00.speed-feedback => joint.0.motor-pos-fb
#$#net xpos-fb <= [TOLP2](CARD0).stepgen.00.position-feedback => joint.0.motor-pos-fb
net xenable <= joint.0.amp-enable-out => [TOLP2](CARD0).stepgen.00.enable
I experimented with different combinations, and only in such a combination did something somehow try to earn
hal file in this archive
forum.linuxcnc.org/media/kunena/attachme..._lcnc_2022-06-16.tgz
Please see this. I'm not expert in hal
# Step Gen 00 (X) signals/setup
setp [TOLP2](CARD0).stepgen.00.position-scale [JOINT_0]SCALE
setp [TOLP2](CARD0).stepgen.00.steplen [JOINT_0]STEPLEN
setp [TOLP2](CARD0).stepgen.00.stepspace [JOINT_0]STEPSPACE
setp [TOLP2](CARD0).stepgen.00.dir-hold-time [JOINT_0]DIRHOLD
setp [TOLP2](CARD0).stepgen.00.dir-setup-time [JOINT_0]DIRSETUP
setp [TOLP2](CARD0).stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [TOLP2](CARD0).stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
#net xpos-cmd <= joint.0.motor-pos-cmd => [TOLP2](CARD0).stepgen.00.position-cmd
net xvel-cmd <= joint.0.vel-cmd => [TOLP2](CARD0).stepgen.00.velocity-cmd
net xpos-fb <= [TOLP2](CARD0).stepgen.00.speed-feedback => joint.0.motor-pos-fb
#$#net xpos-fb <= [TOLP2](CARD0).stepgen.00.position-feedback => joint.0.motor-pos-fb
net xenable <= joint.0.amp-enable-out => [TOLP2](CARD0).stepgen.00.enable
I experimented with different combinations, and only in such a combination did something somehow try to earn
Please Log in to join the conversation.
4 years 4 months ago #245447
by TOLP2
Replied by TOLP2 on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
I checked the HAL-file, but as far as I can see the position feedback is correctly connected to the stepgen, so something else has to go wrong.
I see that you already put the following code in your HAL-file:
Can you re-enable the code and copy the created output to the forum? To see the output, you have to start LinuxCNC from the command line, just by typing linuxcnc. Any output created from the debug will be printed to the output.It will help me to further pinpoint the cause of this behavior.
Furthermore I see that in the HAL-file, the order of adding functions to the thread can be optimized. Please, use the following order:
Above order means that the current state is read from the FPGA. The motion-controller can then determine the required state of the stepgens. Finally this desired state is written to the stepgen. The loop is nice and tight.
I see that you already put the following code in your HAL-file:
Code:
setp [TOLP2](CARD0).stepgen.02.debug TRUE
Can you re-enable the code and copy the created output to the forum? To see the output, you have to start LinuxCNC from the command line, just by typing linuxcnc. Any output created from the debug will be printed to the output.It will help me to further pinpoint the cause of this behavior.
Furthermore I see that in the HAL-file, the order of adding functions to the thread can be optimized. Please, use the following order:
Code:
addf [TOLP2](CARD0).read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf [TOLP2](CARD0).write servo-thread
Above order means that the current state is read from the FPGA. The motion-controller can then determine the required state of the stepgens. Finally this desired state is written to the stepgen. The loop is nice and tight.
Please Log in to join the conversation.
4 years 4 months ago #245497
by TOLP2
Replied by TOLP2 on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Today I did my first SMD soldering and replaced one of the 74HCT245 with a 74LVC245 on my 5A-75E. The 74LVC245 is a 3.3 V buffer with 5V tolerant inputs, so it is suitable for input buffer. Required modifications:
- cut traces supplying 5V to VCC (pin 20) and DIR (pin 1);
- Connect VCC (pin 20) to a 3.3 V supply. I used a relative long jumper wire all the way to the JTAG point, where I know for sure it is available;
- Connect DIR (pin1) to GND, this will make the buffer direction to be INPUT.I changed U28, which makes J1 an input.
Please Log in to join the conversation.
4 years 4 months ago #245508
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Hi.
Changed configs and attach the logs.
TOLP2 based on a StepConf and has 3 axis config
TOLP2_mesa based on a PNConf and has 2 axis config
Video link for this test
Changed configs and attach the logs.
TOLP2 based on a StepConf and has 3 axis config
TOLP2_mesa based on a PNConf and has 2 axis config
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Video link for this test
Please Log in to join the conversation.
4 years 4 months ago #245612
by svb
Replied by svb on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Dear Peter.
Can you share your .bit file and corresponding .json file?
I will try your file for checking my board. May be my board not work correctly.
Can you share your .bit file and corresponding .json file?
I will try your file for checking my board. May be my board not work correctly.
Please Log in to join the conversation.
Time to create page: 0.258 seconds
