Unexpected realtime delay and genserkins
- Cornflakes
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
18 Apr 2018 10:26 - 18 Apr 2018 10:26 #109238
by Cornflakes
Unexpected realtime delay and genserkins was created by Cornflakes
Hi!
I have prototype of roborics arm with 3 axis based on steppers
7i92 + 7i76x2
Wheezy, LCNC 2.7.12
Max jitter: BP 32000, SP 23000
Homing works propertly
But when i try G0 command, I have "Unexpected realtime delay" error
What can I do?
Thanks
I have prototype of roborics arm with 3 axis based on steppers
7i92 + 7i76x2
Wheezy, LCNC 2.7.12
Max jitter: BP 32000, SP 23000
Homing works propertly
But when i try G0 command, I have "Unexpected realtime delay" error
What can I do?
Thanks
Last edit: 18 Apr 2018 10:26 by Cornflakes.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
18 Apr 2018 13:12 #109250
by Todd Zuercher
Replied by Todd Zuercher on topic Unexpected realtime delay and genserkins
You might be able to ignore the alarm, but it indicates that your PC is not meeting the somewhat modest latency demands of your config.
forum.linuxcnc.org/18-computer/19022-faq-the-latency-problem
forum.linuxcnc.org/18-computer/19022-faq-the-latency-problem
Please Log in or Create an account to join the conversation.
- Cornflakes
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
18 Apr 2018 13:30 #109253
by Cornflakes
Replied by Cornflakes on topic Unexpected realtime delay and genserkins
Is it bad latency with hardware stepgen`s on 7i76?
Max jitter: Base period 32000, Servo period 23000
Pentium Core Duo, chipset H110
Grub config: nomodeset, isolcpus=1
Max jitter: Base period 32000, Servo period 23000
Pentium Core Duo, chipset H110
Grub config: nomodeset, isolcpus=1
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
18 Apr 2018 14:03 #109254
by Todd Zuercher
Replied by Todd Zuercher on topic Unexpected realtime delay and genserkins
Well, start be deleting the base thread from your config.
I have no idea why you have a 50000ns base thread loaded, your config isn't using it for anything.
Once you are rid of that your realtime alarms will likely go away.
In your hal file on line 3 delete
base_period_nsec=[EMCMOT]BASE_PERIOD
If that cures the realtime alarms, you might find that you can increase the servo thread speed back up to the more usuall 1,000,000, without any problems.
I have no idea why you have a 50000ns base thread loaded, your config isn't using it for anything.
Once you are rid of that your realtime alarms will likely go away.
In your hal file on line 3 delete
base_period_nsec=[EMCMOT]BASE_PERIOD
If that cures the realtime alarms, you might find that you can increase the servo thread speed back up to the more usuall 1,000,000, without any problems.
Please Log in or Create an account to join the conversation.
- Cornflakes
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
18 Apr 2018 14:13 #109255
by Cornflakes
Replied by Cornflakes on topic Unexpected realtime delay and genserkins
I already deleted base_period_nsec and traj_period_nsec parameters
It works with servo period only more 3,500,000 when short moving by G0 command
But long moving ends with errors: joint following error, sserial error 13 and unexpected realtime delay
Something makes the delay
It works with servo period only more 3,500,000 when short moving by G0 command
But long moving ends with errors: joint following error, sserial error 13 and unexpected realtime delay
Something makes the delay
Please Log in or Create an account to join the conversation.
18 Apr 2018 14:43 - 18 Apr 2018 14:48 #109256
by PCW
Replied by PCW on topic Unexpected realtime delay and genserkins
I would also remove the isolcpus statement, With Preempt-RT lowering the overall CPU speed (which isocpus does)
will often make Ethernet latency worse. The latency test results will show gross latency problems but
gives little information on the Ethernet latency of the system.
Also if you have Intel Ethernet interface you very likely need to turn off IRQ coalescing
This is done with ethtool:
sudo ethtool -C [Ethernet device name] rx-usecs 0
To determine the Ethernet+LinuxCNC hal latency of the system you need to monitor these parameters:
motion.servo.last-period
servo-thread.tmax
100*(servo-thread.tmax/motion.servo.last-period) is the worst case percent of total servo
thread period used by LinuxCNC and communications. For our Ethernet cards, its best that this be
less than 50%
will often make Ethernet latency worse. The latency test results will show gross latency problems but
gives little information on the Ethernet latency of the system.
Also if you have Intel Ethernet interface you very likely need to turn off IRQ coalescing
This is done with ethtool:
sudo ethtool -C [Ethernet device name] rx-usecs 0
To determine the Ethernet+LinuxCNC hal latency of the system you need to monitor these parameters:
motion.servo.last-period
servo-thread.tmax
100*(servo-thread.tmax/motion.servo.last-period) is the worst case percent of total servo
thread period used by LinuxCNC and communications. For our Ethernet cards, its best that this be
less than 50%
Last edit: 18 Apr 2018 14:48 by PCW.
Please Log in or Create an account to join the conversation.
- Cornflakes
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
18 Apr 2018 18:43 #109260
by Cornflakes
Replied by Cornflakes on topic Unexpected realtime delay and genserkins
I try, but
dj@debian22:~$ sudo ethtool -C eth0 rx-usecs 0
[sudo] password for dj:
Cannot get device coalesce settings: Operation not supported
How correct this option?
Thanks!
dj@debian22:~$ sudo ethtool -C eth0 rx-usecs 0
[sudo] password for dj:
Cannot get device coalesce settings: Operation not supported
How correct this option?
Thanks!
Please Log in or Create an account to join the conversation.
18 Apr 2018 18:53 #109261
by PCW
Replied by PCW on topic Unexpected realtime delay and genserkins
That probably means that eth0 is not a Intel MAC (so the driver does not have that option nor is it needed)
What does dmesg say about your Ethernet chip?
dmesg | grep -i eth
What does dmesg say about your Ethernet chip?
dmesg | grep -i eth
Please Log in or Create an account to join the conversation.
- Cornflakes
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
18 Apr 2018 19:28 #109263
by Cornflakes
Replied by Cornflakes on topic Unexpected realtime delay and genserkins
[ 1.557538] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 1.562748] r8169 0000:01:00.0: eth0: RTL8168b/8111b at 0xf8246000, 4c:cc:6a:b0:6d:90, XID 14100800 IRQ 137
[ 1.562750] r8169 0000:01:00.0: eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
[ 17.171030] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 18.901063] r8169 0000:01:00.0: eth0: link down
[ 18.901091] r8169 0000:01:00.0: eth0: link down
[ 18.901161] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 22.229996] r8169 0000:01:00.0: eth0: link up
[ 22.230048] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 32.365302] eth0: no IPv6 routers present
[ 1.562748] r8169 0000:01:00.0: eth0: RTL8168b/8111b at 0xf8246000, 4c:cc:6a:b0:6d:90, XID 14100800 IRQ 137
[ 1.562750] r8169 0000:01:00.0: eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
[ 17.171030] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 18.901063] r8169 0000:01:00.0: eth0: link down
[ 18.901091] r8169 0000:01:00.0: eth0: link down
[ 18.901161] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 22.229996] r8169 0000:01:00.0: eth0: link up
[ 22.230048] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 32.365302] eth0: no IPv6 routers present
Please Log in or Create an account to join the conversation.
18 Apr 2018 19:49 #109264
by PCW
Replied by PCW on topic Unexpected realtime delay and genserkins
Right, so that's a Realtek MAC so it doesn't have (or need) the IRQ coalesce option set
Also your hal file has the wrong thread order(order of addf's), it should be
7i92 read
everything else
7i92 write
What actual PC hardware are you running?
Also your hal file has the wrong thread order(order of addf's), it should be
7i92 read
everything else
7i92 write
What actual PC hardware are you running?
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds