LitexCNC: firmware and driver for 5A-75B and 5A-75E

More
2 years 8 months ago #292990 by uba100
Then everything should be up to date for me now.
I have compiled and flashed the JSON once with 2 PWM generators + 6 step generators and then again without PWM generators.
Neither variant brought any improvement with regard to the fifth axis.
Here again the output when calling Linuxcnc and attempting to home the axes.


cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal

identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A

litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - encoder ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 0000008C
litexcnc: - Write buffer: 72 bytes
litexcnc: - Read buffer: 96 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.128303 seconds
joint 4 following error
emc/task/taskintf.cc 976: Error on joint 4, command number 136
Cannot unhome while homing, joint 4Cannot unhome while homing, joint 4
task: main loop took 0.141973 seconds
Shutting down and cleaning up LinuxCNC...
task: 6506 cycles, min=0.000033, max=0.141973, avg=0.010151, 2 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime

Ps: I did not reinstall the toolchain, as this was not explicitly requested

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

More
2 years 8 months ago #292998 by Mecanix
Presumably you've seen that Peter is aware and investigating the issue. Just in case you've missed it, here's the link so you can follow-up on the progress:

github.com/Peter-van-Tol/LiteX-CNC/issues/79

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

More
2 years 8 months ago #293000 by uba100
Yes, I know . He had written that it might work if I remove all PWM generators and it would help if I could post the result of that test here.
The following user(s) said Thank You: TOLP2, Mecanix

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

More
2 years 8 months ago - 2 years 8 months ago #293034 by TOLP2
The help is appreciated!

The toolchain does not influence its behavior. Going to check the behavior module by module. 

EDIT:
The culprit has been found. As soon as the encoder module is removed, the joint following error will occur. Solution for now is to remove the encoder module from the JSON. Next step is to investigate why this module is misbehaving. The number of registers reported is correct, so while writing is does not progress the required number of registers. 
Last edit: 2 years 8 months ago by TOLP2.

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

More
2 years 8 months ago #293082 by uba100
I have now removed all encoders from the JSON and reinserted the PWM generators and can confirm that all 5 axes are now working.
I can perform error-free homing and move the axes manually in both directions.

Here is the output from my test:

cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal

identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A

litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - pwm ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 000000B8
litexcnc: - Write buffer: 116 bytes
litexcnc: - Read buffer: 88 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.158369 seconds
task: main loop took 0.234904 seconds
task: main loop took 0.142043 seconds
Shutting down and cleaning up LinuxCNC...
task: 4833 cycles, min=0.000033, max=0.234904, avg=0.010225, 3 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime


Ps: I don't know if this is important. I almost always have to start Linuxcnc twice because the watchdog triggers immediately the first time. This little bug has been there since the beginning of my tests.
The following user(s) said Thank You: TOLP2

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

More
2 years 8 months ago #293086 by TOLP2
The watchdog is a known issue. It annoyed me yesterday during preparation of a demo. It has been resolved yesterday night and will be published in the next version. The next version will be released as soon as the problem with the encoder is solved.
The following user(s) said Thank You: Pro_El

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

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