You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use a name with spaces PnCconf will replace the spaces with underscore
55
-
(as a loose rule Linux doesn't like spaces in names)
56
-
Pick an axis configuration - this selects what type of machine you are building and what axes are available.
57
-
The Machine units selector allows data entry of metric or imperial units in the following pages.
54
+
If you use a name with spaces PnCconf will replace the spaces with underscores
55
+
(as a loose rule Linux doesn't like spaces in names).
56
+
Picking an axis configuration selects what type of machine you are building and what axes are available.
57
+
The "Machine units" selector allows data entry of metric or imperial units in later steps in the configuration process.
58
58
59
59
TIP: Defaults are not converted when using metric so make sure they are sane values!
60
60
61
61
Computer Response Time::
62
62
63
63
The servo period sets the heart beat of the system.
64
-
Latency refers to the amount of time the computer can be longer then that period.
65
-
Just like a railroad, LinuxCNC requires everything on a very tight and consistent time line or bad things happen.
66
-
LinuxCNC requires and uses a 'real time' operating system, which just means it has a low latency ( lateness ) response time
67
-
when LinuxCNC requires its calculations and when doing LinuxCNCs calculations it cannot be interrupted by lower priority requests (such as user input to screen buttons or drawing etc).
68
-
69
-
Testing the latency is very important and a key thing to check early.
70
-
Luckily by using the Mesa card to do the work that requires the fastest response time (encoder counting and PWM generation) we can endure a lot more latency then if we used the parallel port for these things.
71
-
The standard test in LinuxCNC is checking the BASE period latency (even though we are not using a base period).
72
-
If you press the 'test base period jitter' button, this launches the latency test window ( you can also load this directly from the applications/cnc panel ).
73
-
The test mentions to run it for a few minutes but the longer the better.
74
-
Consider 15 minutes a bare minimum and overnight even better.
75
-
At this time use the computer to load things, use the net, use USB etc we want to know the worst case latency and to find out if any particular activity hurts our latency.
76
-
We need to look at base period jitter.
77
-
Anything under 20000 is excellent - you could even do fast software stepping with the machine 20000 - 50000 is still good for software stepping and fine for us.
78
-
50000 - 100000 is really not that great but could still be used with hardware cards doing the fast response stuff.
79
-
So anything under 100000 is usable to us.
80
-
If the latency is disappointing or you get a bad hiccup periodically you may still be able to improve it.
81
-
82
-
TIP: There is a user compiled list of equipment and the latency obtained on the LinuxCNC wiki: https://wiki.linuxcnc.org/cgi-bin/wiki.pl?Latency-Test
83
-
Please consider adding your info to the list.
84
-
Also on that page are links to info about fixing some latency problems.
64
+
Latency refers to the amount of time the computer can be longer than that period.
65
+
Just like a railroad, LinuxCNC requires everything on a very tight and consistent timeline or bad things happen.
66
+
LinuxCNC requires and uses a 'real-time' operating system, which just means it has a low-latency (lateness) response time.
67
+
When LinuxCNC requires and is performing calculations, it cannot be interrupted by lower priority requests (such as user input to screen buttons or drawing etc).
68
+
69
+
Testing the latency is crucial and a key thing to check before proceeding further. Please follow the directions on the <<sub:install:sec:latency-test,Latency Test>> page before proceeding further.
85
70
86
71
Now we are happy with the latency and must pick a servo period.
87
72
In most cases a servo period of 1000000 ns is fine (that gives a 1 kHz servo calculation rate - 1000 calculations a second).
88
-
If you are building a closed loop servo system that controls torque (current) rather then velocity (voltage) a faster rate would be better - something like 200000 (5 kHz calculation rate).
73
+
If you are building a closed loop servo system that controls torque (current) rather than velocity (voltage) a faster rate would be better - something like 200000 (5 kHz calculation rate).
89
74
The problem with lowering the servo rate is that it leaves less time available for the computer to do other things besides LinuxCNC's calculations.
90
75
Typically the display (GUI) becomes less responsive.
91
76
You must decide on a balance. Keep in mind that if you tune your closed loop servo system then change the servo period you probably will need to tune them again.
Copy file name to clipboardExpand all lines: docs/src/install/latency-test.adoc
+27-19Lines changed: 27 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,9 @@ Motherboards, video cards, USB ports, and a number of other things can hurt the
23
23
The best way to find out what you are dealing with is to run the latency test.
24
24
25
25
Generating step pulses in software has one very big advantage - it's free.
26
-
Just about every PC has a parallel port that is
26
+
Just about every PC that has a parallel port is
27
27
capable of outputting step pulses that are generated by the software.
28
+
28
29
However, software step pulses also have some disadvantages:
29
30
30
31
- limited maximum step rate
@@ -45,7 +46,13 @@ Do not run LinuxCNC or StepConf while the latency test is running.
45
46
[[sec:latency-test]]
46
47
=== Latency Test(((Latency Test)))
47
48
48
-
To run the test, open a terminal window
49
+
The latency test can be run a few different ways.
50
+
51
+
If you are using PnCconf to configure your machine, you can launch the Latency Test by clicking the "Test Base Period Jitter button' during the 2nd step of the process.
52
+
53
+
If you are using StepConf to configure your machine, you can launch the Latency Test by clicking the "Test Base Period Jitter button' during the 2nd step of the process.
54
+
55
+
If you want to run the test from the command line, open a terminal window
49
56
(in Ubuntu, from Applications → Accessories → Terminal)
50
57
and run the following command:
51
58
@@ -91,26 +98,27 @@ You should run the test for at least several minutes; sometimes
91
98
the worst case latency doesn't happen very often, or only happens
92
99
when you do some particular action. For instance, one Intel
93
100
motherboard worked pretty well most of the time, but every 64
94
-
seconds it had a very bad 300 µs latency. Fortunately that was
95
-
fixable, see https://wiki.linuxcnc.org/cgi-bin/wiki.pl?FixingSMIIssues .
96
-
97
-
So, what do the results mean? If your Max Jitter number is less
98
-
than about 15-20 microseconds (15000-20000 nanoseconds), the
99
-
computer should give very nice results with software stepping.
100
-
If the max latency is more like 30-50 microseconds, you can still
101
-
get good results, but your maximum step rate might be a little
102
-
disappointing, especially if you use microstepping or have very
103
-
fine pitch leadscrews. If the numbers are 100 µs or more,
104
-
i.e. >= 100,000 nanoseconds (ns), then the PC is not a good candidate for software
105
-
stepping. Numbers over 1 millisecond (1,000,000 ns) mean
106
-
the PC is not a good candidate for LinuxCNC, regardless of whether you
107
-
use software stepping or not.
101
+
seconds it had a very bad 300 µs latency. Fortunately that was fixable, see <<_latency_tuning>>.
102
+
103
+
So, what do the results mean?
104
+
105
+
If your Max Jitter number is less
106
+
than about 20,000 nanoseconds, the
107
+
computer should give very nice results with software stepping or a dedicated hardware card such as a Mesa 'Anything I/O' card.
108
+
109
+
If the Max Jitter number is between 20,000 and 50,000 nanoseconds, you can still
110
+
get good results with software stepping, but your maximum step rate might be a little
111
+
disappointing, especially if you use microstepping or have very fine pitch leadscrews. You can, however, achieve excellent results using a hardware card.
112
+
113
+
If the Max Jitter number is between 50,000 and 500,000 nanoseconds, you cannot use software stepping. You can, however, achieve acceptable results using a hardware card.
114
+
115
+
If the Max Jitter number is above 500,000 nanoseconds, you cannot use software stepping or a hardware card with LinuxCNC and achieve acceptable results.
108
116
109
117
[NOTE]
110
118
If you get high numbers, there may be ways to improve them.
111
-
Another PC had very bad latency (several milliseconds) when
119
+
Another PC had very bad latency (several million nanoseconds) when
112
120
using the onboard video. But a $5 used video card solved the problem.
113
-
LinuxCNC does not require bleedingedge hardware.
121
+
LinuxCNC does not require bleeding-edge hardware.
114
122
115
123
For more information on stepper tuning see the
116
124
<<cha:stepper-tuning,Stepper Tuning>> Chapter.
@@ -173,7 +181,7 @@ Options:
173
181
When determining the latency, LinuxCNC and HAL should not be running, stop with `halrun -U`.
174
182
Large number of bins and/or small binsizes will slow updates.
175
183
For single thread, specify `--nobase` (and options for servo thread).
176
-
Measured latencies outside of the +/- bin range are reported with special end bars.
184
+
Measured latencies outside the +/- bin range are reported with special end bars.
177
185
Use `--show` to show count for the off-chart [pos|neg] bin.
0 commit comments