Errors caused by Latency or something else?

14 Oct 2018 14:54 #118774 by simonmn

If this is placed incorrect, please tell me.

I got a Mesa 7i76e step/dir card, which I have setup on a old gaming pc, tried both debian stretch-uspace preemt from a iso, and a guide showing how to install Mint 18.1 with similar kernel setup. (the extend of my linux knowledge)
In hindsight both of these attempts had similar outcome...

My issue is these two errors:

The first one is probably because of my insane latency...

Sounding like the noob I am: I have tried EVERYTHING!!!.....i can find googleing "Linuxcnc Latency problems".
Disabling power saving features and the like in BIOS, changed kernels and OS distro's, didn't seem to help much.

If latency is my issue, to me it seems the only solution is to get some new hardware. Is this really my only option?

"hm2/hm2_7i76e.0: error finished read! iter=6" I haven't had much luck on this error. Is it also latency? Or is it my Ethernet connection?

Before these errors, I get this popup:

I have no idea if these errors are connected to the previous.

If you couldn't tell, I'm pretty lost. It would be great if I could keep the hardware I have now, but if its causing more issues than fixing, i'll be happy to get something else. Sadly it seems like a gamble to me whether you get low or high latency with new hardware.

I hope you guys can help me with these issues, or guide me to some hardware that works

If you need additional information, i'll gladly tell you.
14 Oct 2018 16:52 #118781 by andypugh
That latency on the servo thread is actually OK.

You base thread isn't great. But you don't need a base thread. In fact you should probably turn it off.
14 Oct 2018 17:32 - 14 Oct 2018 17:33 #118785 by PCW
I've copy pasted this from another thread. it applies here also

if you have latency issues run linuxcnc and then run:

halcmd show param *.tmax

in a terminal window

This will show the individual and total ( servo-thread.tmax ) times used by LinuxCNCs real time functions. These times are in CPU clocks, to get an idea of the total clocks time per servo thread period, look at motion.servo.last-period

Also what host PC hardware are you running? If you have a Intel or Qualcom MAC you must make some driver setting adjustments with the ethtool utility

The "error finishing read" error suggests also be that the latency issue is possibly just because you have totally lost contact with the 7I76E, so I would check the Ethernet connection and 7I76E power supplies when running to make sure there is not an issue there.
Last edit: 14 Oct 2018 17:33 by PCW.
14 Oct 2018 19:25 #118790 by simonmn
Wow thanks for the quick response!

I thought is was the base thread I was supposed to use... Saw on different post that 15000 to 30000 was the acceptable values, and got a little worried since I had 10x that amount! But is it really the Servo thread instead? well lucky me :cheer:
How do I turn off the base thread? And if I may ask, what does it do/effect it has?

Heres the result:

The hardware I use:
CPU: AMD FX8350 8 core 4GHz
Motherboard: Asus M5A97 R2.0
GPU: AMD Radeon R9 270X 4GB
Ram: 8GB
Harddrive: 1TB mechanical 7600rpm i believe
14 Oct 2018 19:42 #118792 by PCW
That looks fine (~133 usec max (534761/4000000000) assuming the CPU is running at 4 GHz)

Are all power management options disabled in the BIOS? (Cool&quiet etc)

You only need a servo thread

You can run the latency test with just a servo thread with

latency-test 1ms

or the latency histogram with

latency-histogram --nobase
14 Oct 2018 20:38 #118797 by tommylight
That "trace back error" you get when you use the stepconfig or pnccongfig and select the advanced option of making AXIS UI full screen at start up.
The latency problems might be due to a failing hard drive, so use a USB stick and start linuxcnc from it to check the latency from a live session.
15 Oct 2018 07:05 #118822 by simonmn
Unselecting the fullscreen option fixed the popup. Thanks!

Running latency test with base thread off, shows 27739 ns in max jitter after stressing the computer.
Heres some pictures from bios and the histogram:

I don't know if there is a difference in "Disabled by CPU" or "Always disabled", but I just use the latter.

Sorry for the poor reflection, should have taken a screenshot instead. The "Theme" was messing with the font color.

min(us): -26.6
sdev(us): 0.6
And the elapsed time was: 766 sec

I reflashed the debian stretch uspace iso on a usb and booted to into it. The latency was significantly lower, and fairly stable(between 5000 and 10000 resetting after a couple of minutes) although when stressing the computer would spike into 350000+ values.
Does this confirm your suspicion on the harddrive? I guess the spikes are probably because its a simple usb2, and not being that great at handling load.
It would be cool if I could keep those values by just upgrading the harddrive, to something like a 60gb ssd?
Thank you guys for the great responses!
15 Oct 2018 07:17 #118823 by tommylight
Those numbers look good, adding an ssd would get rid of much of the latency excursions. Avoid the non brand name ones.
15 Oct 2018 13:39 #118831 by simonmn
Went out and got a 120gb Kingston ssd, it did have a positive effect on latency, and speed of the computer itself. But I still get the same two errors...
It now sits around sub 10000 in servo thread, although I was able to get it up to 21000 once.
So I tried entering 21000 in pncconf wizard, or the .ini file, still results in the errors. iter=6 in all the different attemps I have tried.
Is there something simple I have overlooked? I know its kind of an unfair question to ask, but I feel like I am fixing around the real issue.

Some other post talk about Ip adresses, so I'll just throw some information out there if something sticks out:
7i76e jumper moved up to use ip address
Computer ip set to with netmask to (Although it switches itself to just 24 after saving)
I can ping the 7i76e, with the leds reacting, but " mesaflash --device7i76e " results in no board found.

When launching my linuxcnc config, the steppers gives a "thud" sound, as if the drivers are sending power, so some communication must exist.

Here is a new screenshot of the histrogram on the new install:
15 Oct 2018 13:50 #118832 by andypugh
The histogram seems to show latency of 430 uS, which is pretty terrible.
Moderators: cmorley
Time to create page: 0.224 seconds
Powered by Kunena Forum