another noob trying to tune the servo

More
14 Sep 2018 19:36 #117554 by Psykhon
Im in the middle of a major reconstruction of my main cnc, mainly to seriously improve rapids speeds since its main use is to drill pcbs and need fast as can get (or pay) point to point movements
Im switching from some nema23 3NM steppers with a gecko G540 to leadshine EL5 400w servo/drivers (except for the Z, its still a stepper until I can pay for another servo)
Also had a 5i25 and now I added a 7i77, and 7i78 to control the remaining stepper and the new spindle, a westwind m320
So far, the best calibration I could get its the one on the image, please notice there Im testing at crazy high speed, and it seems that it could achive more
I had two questions:
Mainly, what do you think about those results showing in the scope? Can that be improved?
The second its about those warnings and how to solve them .
Thanks a lot!
Attachments:

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

More
15 Sep 2018 17:49 - 15 Sep 2018 17:50 #117581 by PCW
My guess would be that your drive does not have its velocity loop tuned optimally, This should be done
before tuning LinuxCNC's position loop.

The warnings indicate that your host PC has too high latency to run the 1 KHz servo thread
A common cause of this is power management, so I would check that all power management options
are disabled in the PC's BIOS setup.

As a test can you run:

latency-histogram --nobase --sbinsize 1000

While moving windows around, running videos etc for a few minutes, and post a
screenshot here ( latency-histogram has a screenshot button and puts its screenshot
image files in /tmp/latency-histogram/ )
Last edit: 15 Sep 2018 17:50 by PCW.

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

More
18 Sep 2018 22:50 #117734 by Psykhon
Thanks PCW!
here is the requested screenshot.
I tried to disable ACPI in bios, but afterwards LinuxCNC freezes the machine (mouse responds but nothing else), attempting to run the command latency-histogram --nobase --sbinsize 1000, also freezes the computer.
Nonetheless I can run these simple commands:
halrun
loadrt hostmot2
loadrt hm2_pci
loadrt threads
addf hm2_5i25.0.read thread1
addf hm2_5i25.0.write thread1
start
loadusr halmeter pin hm2_5i25.0.encoder.00.position
They work fine and can exit halrun without any problem

Should I reinstall all? I could not find a solution yet, maybe Im googling the wrong terms
Attachments:

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

More
19 Sep 2018 02:52 #117735 by PCW
I would not expect re-installation to change anything. ACPI should be left enabled

You have nearly 2 milliseconds of latency. This poor latency must be resolved either by choosing another PC or finding the cause I still think its likely that you have some power management features enabled in the BIOS or perhaps have a SMI issue (SMI issues show up as periodic latency spikes)

This post details some of the things you can do to reduce latency on a similar vintage CPU:

forum.linuxcnc.org/18-computer/25927-red...lticore-pc-s-success

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

More
19 Sep 2018 05:41 #117736 by tommylight
Try booting from USB and check latency.
Some HDD cause huge spikes in latency for no obvious reasons.

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

More
19 Sep 2018 19:03 #117756 by Psykhon
Tried to load de SMI module but it says chipset not found. lspci -vv says its a Intel Corporation 82801JI (ICH10 Family) so there is SMI in there as far as I could figure it out.
It seems there I need to recompile the smi module to accept ICH10, but it has been a real challenge so far.

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

More
19 Sep 2018 20:36 - 19 Sep 2018 20:39 #117761 by PCW
Are you sure you have disabled all power management in the BIOS?
Disable Cstates >1
also disable legacy USB
2 MS delays really suggest power management issues
It may also be a bad hard drive (do you see error messages in the kernel log?)
Last edit: 19 Sep 2018 20:39 by PCW.

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

More
19 Sep 2018 20:44 #117763 by Psykhon
latency run result:
RTAI Testsuite - USER latency (all data in nanoseconds)
2018/09/19 17:43:21
RTH| lat min| ovl min| lat avg| lat max| ovl max| overruns
RTD| -1456| -1456| -1435| 3192| 3192| 0
RTD| -1456| -1456| -1234| 1968684| 1968684| 19
RTD| -1456| -1456| -1434| -1039| 1968684| 19
RTD| -1456| -1456| -1434| -735| 1968684| 19
RTD| -1456| -1456| -1237| 1963638| 1968684| 38
RTD| -1456| -1456| -1434| 3530| 1968684| 38
RTD| -1456| -1456| -1234| 1958281| 1968684| 57
RTD| -1456| -1456| -1436| -780| 1968684| 57
RTD| -1456| -1456| -1236| 1959735| 1968684| 76
RTD| -1456| -1456| -1437| -1045| 1968684| 76
RTD| -1456| -1456| -1435| -777| 1968684| 76
RTD| -1456| -1456| -1236| 1956089| 1968684| 95
RTD| -1455| -1456| -1433| 2611| 1968684| 95
RTD| -1456| -1456| -1238| 1952266| 1968684| 114
RTD| -1456| -1456| -1436| -735| 1968684| 114
RTD| -1456| -1456| -1236| 1946340| 1968684| 133
RTD| -1456| -1456| -1435| -1076| 1968684| 133
RTD| -1456| -1456| -1434| -751| 1968684| 133
RTD| -1456| -1456| -1236| 1947316| 1968684| 152
RTD| -1456| -1456| -1437| -1056| 1968684| 152
RTD| -1456| -1456| -1238| 1938992| 1968684| 171
2018/09/19 17:43:41
RTH| lat min| ovl min| lat avg| lat max| ovl max| overruns
RTD| -1456| -1456| -1433| -793| 1968684| 171
RTD| -1455| -1456| -1237| 1934986| 1968684| 190
RTD| -1462| -1462| -1438| 2602| 1968684| 190
^CRTD| -1462| -1462| -1438| 2602| 1968684| 190

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

More
19 Sep 2018 21:03 - 19 Sep 2018 21:08 #117764 by Psykhon
Also tried disabling lan, usb, ide busmaster, everything non essential, same latencys
Killing Xserver, same
Init 1, also same results

Is there a better way to pinpoint where the latency may come from?

the Latency FAQ post says that the SMI latency spikes are regularly between 32-64 secconds, but I have them in 1-3 seccond period
Last edit: 19 Sep 2018 21:08 by Psykhon.

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

More
19 Sep 2018 21:09 - 19 Sep 2018 21:13 #117765 by Psykhon
Disabled CStates, legacy and also tried booting from a pen drive, no difference
Hard drive is a 32gb SSD
Last edit: 19 Sep 2018 21:13 by Psykhon.

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

Time to create page: 0.103 seconds
Powered by Kunena Forum