Jittery stepper pulses with mesa 7i76E [SOLVED]

More
4 years 3 months ago - 4 years 3 months ago #246860 by paw
Hi, I'm new to Linuxcnc, but have made cnc machines with other software/boards.
I've recently done a cnc conversion on a small manual lathe using open loop stepper motors and a mesa 7i76E board, and the configuration has been really very slick with pnconf.
However, the stepper movements are rather rough/scratchy and slightly noisy. The movements are very smooth with pulses from a signal generator, but looking at the pulse output from the mesa board on a 'scope there appears to be quite a lot of jitter in the output causing the rough movement.

I'm using a dedicated PC, which is an HP Proliant microserver. 
I've got the base thread latency below 50usec, after disabling stuff in the bios, and I am using a 1ms servo thread.
The PC has a Broadcom BCM5723 network card.
uname -a reports:
Linux cnclathe 4.19.0-17-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.194-2 (2021-06-21) x86_64 GNU/Linux

If I reduce the servo thread to 500usec, the movements are much smoother, but I get some realtime delay errors, I suppose not surprisingly. A servo thread of 2ms seemed to make it worse.

The network card seems to use IRQ coalescing of 20usec, according to ethtool, and although it isn't an Intel card I tried setting it to zero. In fact it wouldn't support less than 1, and 1 made no difference.

If I ping the mesa board I get times of:
min 0.16ms, avg 0.201ms, max 0.34ms, mdev 0.026ms. I'm not sure how good/bad those figures are.

As I understand it, dpll is enabled on the mesa board by default, but I tried toggling the setting in halcmd to be sure.

I'm not sure what to try now, so any help would be very appreciated, please 
Many thanks
Phil

Histogram attached
 

 
Last edit: 4 years 3 months ago by paw. Reason: marked solved

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

More
4 years 3 months ago #246870 by PCW
Can you post your hal/ini files? This sounds like a setup error of some kind

Also a halscope plot of the following error might help in diagnosis

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

More
4 years 3 months ago #246874 by tommylight
Try an MDI move or run some short gcode, if it moves smooth, change the keyboard or use this
forum.linuxcnc.org/38-general-linuxcnc-q...elocity-fluctuations
If it is still rough, set the step time and step space to at least 5000 in hal or ini
Also, use this for latency testing:
Code:
latency-histogram --nobase --sbinsize 1000 --show
On your picture there are excursions on both sides and both screens that can not be seen, notice the striped lines.

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

More
4 years 3 months ago #246880 by arvidb

However, the stepper movements are rather rough/scratchy and slightly noisy. The movements are very smooth with pulses from a signal generator, but looking at the pulse output from the mesa board on a 'scope there appears to be quite a lot of jitter in the output causing the rough movement.
Can you post a screenshot of the 'scope trace? If I'm guessing a bit, with a Mesa HW stepgen you should have a pretty smooth pulse train except that its frequency should be updated once every servo period. If your settings are wrong so that the frequency changes a lot every servo period you might perceive that as noise and jitter.

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

More
4 years 3 months ago #246885 by paw
@PCW attached are my hal/ini files. I'm working on how to use halscope - I'll post again when I've got it going
Many thanks

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

More
4 years 3 months ago - 4 years 3 months ago #246886 by PCW
Here is a plot of 7I76E stepgen following error at a 1 KHz servo thread rate.
These are with fairly  aggressive  velocity and acceleration limits = 1500 IPM
and 200 IPS/S = ~ 1/2G. Errors will be lower with lower velocity and acceleration limits,
but even at these extremes the actual stepgen position error is ~15 uinch peak:

 

Top trace is velocity in IPS, 5 IPS/div, middle trace is following error, 10 uinch/div
and bottom trace is DPLL error (basically Host PC jitter relative to DPLL reference)

I would suggest plotting the same variables for comparison
Last edit: 4 years 3 months ago by PCW.

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

Time to create page: 0.344 seconds
Powered by Kunena Forum