Missing rapids, sometimes

More
01 Aug 2020 20:39 #176810 by bartniswonger
Hi there - I have been using linuxcnc for a number of years and am extremely grateful for all the people who have committed so much time to its development and to answering questions in these forums. Thank you all.

This is the first time I have come across an issue I could not figure out by searching.

Some background. I have a 3 axis cnc router which uses a Gecko G540 stepper driver. I recently upgraded the computer and added a Mesa 7i92 instead of a direct parallel port connection. In doing so I switched to Linux Mint 19.3, using real time kernel v4.19 and the linuxcnc-uspace package - v2.8.0, updated yesterday.

The issue I am having is that small rapid movements in the X axis do not get executed - the DRO changes, but the machine does not move. Below is a small program to illustrate. The comments tell you which lines do not result in physical movement. The oddity is that the same line, further down in the code and after a G1, work fine. So I think I can rule out mechanical issues, or electrical, which seems to leave my configuration. But I cannot see what might cause this behavior.
%
G17 G20 G40 G90 G64 P0.001
F80
G0 X1 Y1
Z1.
G1 Z1.1 (this line is needed to cause the issue)

G0 X1.2 Y20 (this rapid has no X movement in reality)
G0 X1 Y1 (nor does this)

G0 X1.2 Y10 (these both do)
G0 X1 Y1

G1 X1.1
G0 X1.2 Y20 (now both these lines work as expected)
G0 X1 Y1

G53 G0 Z0.0
M5
G28
M30
%

It seems that the angle of the rapid matters. Moving X .2" over 10" works, but it does not work over 20". .25" over 20" works.

I am attaching my hal and ini files. My migration from a parallel port setup was a bit rough, and the new hal/ini files seem a bit different from the 2.7 (or 2.6?) version I was running before.

I appreciate any insight anyone has. I have been banging my head against this for a few days now, and no doubt I am missing something obvious. I have been bitten by it several times in seemingly basic code generated by my cam software and it is really bugging me! Everything cuts fine, but there are weird alignment issues as the X axis slowly gets out of whack.

Thanks so much!

Bart

File Attachment:

File Name: maxym.hal
File Size:13 KB

File Attachment:

File Name: maxym.ini
File Size:5 KB
Attachments:

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

More
01 Aug 2020 21:43 #176815 by tommylight
We would need more info about the machine, moving parts, etc.
In the mean time, delete this line
BASE_PERIOD = 33333
in the ini file and also edit these values
DIRSETUP = 2000
DIRHOLD = 2000
STEPLEN = 2500
STEPSPACE = 2500
to
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 5000
STEPSPACE = 5000
for all axis.

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

More
01 Aug 2020 21:44 - 01 Aug 2020 21:45 #176816 by PCW
Replied by PCW on topic Missing rapids, sometimes
Sounds like a hardware issue to me. I would try first setting all steplen values to 5000
to see if it makes difference (because I have seen similar issues with G540s and 3.3V signals)

Ha, Tom beat me to it...
Last edit: 01 Aug 2020 21:45 by PCW.

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

More
02 Aug 2020 00:59 #176831 by bartniswonger
Well that fixed it.

Thank you!

The base_period was a leftover - I am not actually creating the base thread as my hardware could not support it - sadly. And I don't need it.

I had played with the signal durations some - it really did not work without them being tweaked. I should have known to keep pushing in that area. In the past it has always worked or clearly not worked. This working except for really specific circumstances is new. I learned something, thank you!

What is the "best practice" with these settings? Do I bring them down until things stop working and then increase by some margin? Or is 20000 enough to get me the motion I need? The X axis is a 48" long 1/2" 10-tpi acme screw so it is limited in how fast it can spin before it whips. I always get confused on the math getting from steplen et al to a velocity.

The Y axis is a 60" 25mm x 1 ball screw so it can spin much faster before mechanical issues crop up. I have it jogging reliably at 240 ipm, while the X is maxed out at 150.

A question about the voltage levels. I tried to use the open_drain stuff to set the voltage to 5v rather than 3.3v. Would that help here? I am not sure what happened that I could not get it to work but probably my lack of deep understanding of hal files is to blame.

Thanks again. I am very relieved it was a configuration issue!

Bart

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

More
02 Aug 2020 02:41 #176848 by PCW
Replied by PCW on topic Missing rapids, sometimes

What is the "best practice" with these settings? Do I bring them down until things stop working and then increase by some margin? Or is 20000 enough to get me the motion I need? The X axis is a 48" long 1/2" 10-tpi acme screw so it is limited in how fast it can spin before it whips. I always get confused on the math getting from steplen et al to a velocity.


If 5000 ns timings for steplen/stepspace do not limit your maximum speed, there is no advantage to reducing them
Likewise, the 20000 ns settings for dirsetup and dirhold will not cause any issues.

5000/5000 steplen/stepspace settings will limit the step frequency to 100 KHz = 50 RPS = 3000 RPM with a
G540's 2000 steps per turn. This is way beyond a useful RPM

A question about the voltage levels. I tried to use the open_drain stuff to set the voltage to 5v rather than 3.3v. Would that help here? I am not sure what happened that I could not get it to work but probably my lack of deep understanding of hal files is to blame.


No, it will be 5V open circuit but will not have enough drive so will work worse than normal mode

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

Time to create page: 0.095 seconds
Powered by Kunena Forum