svb please post you hal file. I can try testing Fabio firmware
@svb:
I finally was able to put together a working machine around my board and the firmware.
I'm not sure about the source of your disconnection problem, but I have a pair of ideas.
Surely in future the error messaging need to be updated, because now is too crude to be
meaningful.
In the meantime I'm comparing your ini and hal files with mine, I have noticed a pair of things.
First I would strongly suggest to not use directly joint.n.vel-cmd as input for stepgen velocity command.
I have had problem with this because joint.n.vel-cmd can have some discontinuities, for example in my case there is backlash compensation.
The correct approach should be to use joint.n.motor-pos-cmd as input.
Since this is a position signal, the solution is to use a pid that takes the joint motor position as input and gives back the requested motor velocity as output.
So you will have joint.n.motor-pos-cmd -> pid.n.command pid.n.output->Lcnc.00.stepgen.nn.vel-cmd
A basic pid setup shoud be simple just to have the system going:
first order feed-forward: FF1=1 all others zero
Pgain high, but significantly lower than the value at wich the motor start self oscillating
I term some value that zeroes the residual error fast enough.
This removed the strange random joint following error that I was experiencing.
Second Is the enabling-disabling of the system, I've made it somewhat different than you,
honestly don't know if this has any influence on your system behavior, but:
in my system I'm using iocontrol.0.user-enable-out connected to Lcnc.00.enable
then iocontrol.0.user-request-enable to Lcnc.00.enable-request to request the enabling of the system.
Lcnc.00.enabled is the feedback that I'm using for powering the hardware and
(negated) used also for resetting the stepgens in case of problems.
In my case I have an input from external drivers alarm that will stop the machine and reset the stepgens also, it is ANDed with Lcnc.00.enabled.
You can use as reference the files I've uploaded here:
github.com/faeboli/Lcnc/tree/master/support_files/LcncMill