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

More
16 Jun 2022 20:46 - 17 Jun 2022 11:31 #245287 by svb
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.

 



File Attachment:

File Name: TOLP2_lite...uild.tgz
File Size:614 KB
 

File Attachment:

File Name: TOLP2_litex.tgz
File Size:1,245 KB
 

File Attachment:

File Name: TOLP2_lcnc...6-16.tgz
File Size:3 KB
 
 
Attachments:
Last edit: 17 Jun 2022 11:31 by svb.

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

More
17 Jun 2022 11:57 #245314 by TOLP2
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

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

More
17 Jun 2022 14:35 #245327 by svb
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 ...."
The following user(s) said Thank You: TOLP2

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

More
17 Jun 2022 18:50 - 17 Jun 2022 18:51 #245342 by svb
Video with errors. Firmware the same for both configs

Last edit: 17 Jun 2022 18:51 by svb.

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

More
18 Jun 2022 00:11 #245363 by tommylight
Sure looks like the stepgen feedback is disconnected in the hal file.

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

More
18 Jun 2022 05:23 - 18 Jun 2022 05:33 #245380 by svb
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
Last edit: 18 Jun 2022 05:33 by svb.

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

More
19 Jun 2022 20:45 - 19 Jun 2022 20:57 #245447 by TOLP2
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:
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:
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.
Last edit: 19 Jun 2022 20:57 by TOLP2.

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

More
20 Jun 2022 21:20 #245497 by TOLP2
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.
Tested the firmware / driver with J1 as an input. Works like a charm with the pins reporting TRUE when connected to 3.3 V (sorry, didn't dare to test with 5V yet) and FALSE when disconnected or connected to GND.

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

More
21 Jun 2022 03:12 - 21 Jun 2022 03:34 #245508 by svb
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

File Attachment:

File Name: TOLP2_mesa.tgz
File Size:5 KB

File Attachment:

File Name: TOLP2_mesa.txt
File Size:4 KB

File Attachment:

File Name: TOLP2.tgz
File Size:4 KB

File Attachment:

File Name: TOLP2.txt
File Size:3 KB


Video link for this test

 
Attachments:
Last edit: 21 Jun 2022 03:34 by svb.

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

More
22 Jun 2022 19:44 #245612 by svb
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.

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

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