- Posts: 4
- Thank you received: 0
Beginners help with latency error / loosing steps
Im new to LinuxCNC, an while I've been digging into it for a few weeks and getting quite far on my own, now im stuck - And would love some professional eyes on my case.
I bought a pre-bulit 3 axis from a hobbyist a while ago. Machine is wonderfully configured, very sound construction. Software... well, i don't know.
Now after some minor adjustments and finally (!) getting my tool probe working properly, i have had two occurrences of loosing steps on Y axis, which is moving the heavy gantry. Simultaneously, i always get a latency warning on startup ("RTAPI: ERROR: Unexpected real time delay on task 1"). Wich also manifests itself in a short freeze of the PC when loading larger gcodes (10 mb and up). At least i guess those issues might be connected - Im a little out of my depth here.
Im running of an old Dell Optiplex 960, sporting a E8000 Processor. I did all the BIOs settings as recommended. So what else could i do? Stepper tuning? (Is that even related to latency issues?) Any ideas?
Looking forward to your help!
All the very best,
Raph.
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22010
- Thank you received: 3
If parallel, edit the ini file found in the machine configuration folder and set the Base_period higher, test several times till you get no more warnings.
Beware that that will limit the velocity and might cause joint errors, so the joint/axis velocities will have to be lowered for each axis.
Please Log in to join the conversation.
As a bloody beginner Im hesitant to change any values without knowing what they actually do. Im still reading the manual and sereral posts, and lets just say: it's not a concept that comes naturally to me.
I did a few latency tests, usually around 16000, highest ever recorded was 18000.
The BASE_PERIOD is set to 16666, MAX_VELOCITY set to 140. Does that look about right?
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22010
- Thank you received: 3
-test for at least 1 hour of air cutting, copy files, watch youtube, etc
-if no latency warning, set to 45000
-rinse and repeat.
If you do get warnings at 50000, try 55000 and up, in 5K increments.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
What is the current base thread speed? (Will need to be some amount less than your worst case latency.)
What is the current step scale, max velocity, max acceleration, and step timing? (All of the scale and speed info is in the ini file.)
Please Log in to join the conversation.
But would a change of base period in that range affect any other settings that id have to adjust? Just to be sure...
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Raph wrote: Im on Parallel port.
As a bloody beginner Im hesitant to change any values without knowing what they actually do. Im still reading the manual and sereral posts, and lets just say: it's not a concept that comes naturally to me.
I did a few latency tests, usually around 16000, highest ever recorded was 18000.
The BASE_PERIOD is set to 16666, MAX_VELOCITY set to 140. Does that look about right?
If you are getting latency peaks around 18000, then the fastest you should probably consider running the base-thread should probably be about 25000. Even then you might still get some real time warnings.
Please Log in to join the conversation.
So min. base period is my latency (18us) + min. required hold time (2us im my case), and a little extra wiggle room. Which is how you arrived at the base period of about 25000, right?
If i further examine the Stepper Tuning manual, it starts to get weird. Either i don't get this (likely) or my predecessor just messed things up. My drives datasheet is a little vague with only defining min. of all timing requirements at 2 us.
So Stepconf looks like this atm:
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 7630
setp stepgen.0.dirsetup 7630
But the results of the Step timing Calculator suggests something completely different.
I know my drive needs at least one period before a direction change, so dirhold should be 18us latency + 2us min from the dive = at least 20000 ns?! No? And then there is stepspace (which i don't fully understand yet), but having it at 0 seems suspicions.
Id love your comment and advice on this. I hope it makes sense to you, and sonn will to me. Heads up!
Cheers,
Raph.
EDIT: One more thing that i cant seem to find out on my own: which parameter sets the signal output at either rising or falling edge? My drives like the rising variant, and i'd like to make sure LinuxCNC does exactly that. But where to check?
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22010
- Thank you received: 3
If i remember correctly:Raph wrote: setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 7630
setp stepgen.0.dirsetup 7630
Those are not timing settings, those are intervals of base period used for software stepping/parallel port, usually in hal there is an entry that resets the parallel port pins at a set interval,
The timings are usually in the ini file, or if they are not present, the above mentioned reset time will set the timings.
Eg.
loadrt hal_parport cfg="0x378 out"
setp parport.0.reset-time 5000
Please Log in to join the conversation.
But make sure that you can see evidence of a reset function being loaded in the HAL.
dihold and dirsetup are rarely, if ever, critical and there is very little penalty for them being too long as the motors are always moving at zero steps per second when a reversal happens.
Please Log in to join the conversation.
