LinuxCNC + Orange Pi (allwincnc)

More
29 Jul 2021 01:46 - 29 Jul 2021 01:47 #216178 by Bari
The cpu cores should NOT being doing be doing any speed changes. They should be configured after reset to come up to a stable frequency and just stay there. Any core speed changes will cause too much latency even for a servo thread. No base thread is used with AllwinCNC on the big ARM cores. The integrated ARISC does all the step generation at its own locked core frequency.
Last edit: 29 Jul 2021 01:47 by Bari.

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

More
29 Jul 2021 02:48 #216180 by Dolence
Tomorrow I will try to have the CPU at a fixed rate somehow. I feel it is close to work, just need to figure out what can be done to solve this latency issue. This is why I asked here if someone else is using it in a real case scenario. Someone else could have stumbled on the same issue and have a fix or direction.

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

More
29 Jul 2021 03:03 - 29 Jul 2021 03:04 #216181 by Bari
wiki.linuxcnc.org/cgi-bin/wiki.pl?Following_Error

forum.linuxcnc.org/38-general-linuxcnc-q...or-on-stepper-system

When running the latency test you should be doing other things on the system like opening and closing a file, copying files etc etc
Last edit: 29 Jul 2021 03:04 by Bari.

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

More
29 Jul 2021 03:19 #216183 by Dolence
Thank you very much! I will read this carefully and run some new tests tomorrow. Just for reference, which values should I be expecting in this H3 board? What are common values?

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

More
29 Jul 2021 06:12 - 29 Jul 2021 12:17 #216188 by tjtr33
Hi
re following errors
I suggest trying the supplied 3Atest config

I suggest editing /boot/armbianEnv.txt by adding
"extraargs=isolcpus=1,2,3 idle=poll"

I suggest that latency doesnt mean a damn thing
because i use arisc stepgen which is used in 3Atest
( the arisc side of the opi brain is not affected by latency afaik )

My tests run all night and i do not get Unexpeced realtime delay erros
(UXRTdelay).
I do not get following errors.

My scale and acc are based on my
system ( scale = 2666.66666 becuz i am metric,1/16step, 1.5 pitch screw,
direct coupled motors, 200step/rev motors, and acc = 600.

Your system will not use thes values unless you have the same
transmission.

I have used this to test 2 different styles of nema17 with tmc2130 drives in standalone mode, at 1/16th step. I got 29.4666mm/sec with 1/16 microstepping reliably ( thats an amazing pulse per second rate )

My 'reliably' is a test program moving +/-80mm 100 times and returning to same shaft angle ( tie wrap on shaft aligns to magic maker mark on body )

One set of 'hi torque nema 17' motors gave me 1350mm/min , another set gave me 1768mm/min.
All test done with a set of 3 motors each,
all with same tnc2130,
but current on small motors was 0.8vref and 0.98vref on larger motors.

Tests results are repeatable BUT not loaded.

I am hitting the motor limits, not opi/allwincnc limits.

I am now trying lichian 3phase stepservos but have difficultly is using Port G for the step and dir.. thats another story.

SO, yes others do use the OPI, I use OPi+2e with 2G.

I do NOT tease the bears,
my cnc control is not for web browsing or watching 4K Netflix.
I think that is reasonable.

my 2c.

ps: my  /etc/default/cpufrequtils  shows
mnin and max cpu freq both at 1008000
governor = performane

you can set those with armian-config

pps: i use a 1inch square alum heat sink above cpu and some other chips
with a 12V fan right in top
you HAVE to coole these pi's (opi rpi bpi)

hth


tomp
Last edit: 29 Jul 2021 12:17 by tjtr33. Reason: add cpu freq tested at, cooling note. typo

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

More
29 Jul 2021 06:52 #216191 by tjtr33
values of what? latency?

latency is irrelevant if using arisc pwm-stepgen
well, just as irrelevant as when using mesa or pico external stepgens.

if you worry about following errors,
look into your max vel, and acceleration settings,
maybe make your thread speed same as supplied 3Atest config.

hth
tomp
The following user(s) said Thank You: Dolence

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

More
29 Jul 2021 09:42 - 29 Jul 2021 09:45 #216205 by Bari
Latency is relevant if one is getting real time delay errors and they don't have the cpu clocks locked at one speed.

The following errors are likely explained in the links I provided earlier.

wiki.linuxcnc.org/cgi-bin/wiki.pl?Following_Error

forum.linuxcnc.org/38-general-linuxcnc-q...or-on-stepper-system

The u-boot firmware should be built to force the cpu into a good working state for most users. Experienced devs may build what they wish. The real time kernel should also be configured for lowest possible latency while supporting all the required features for a LCNC system. Both currently are not.  Users should not be expected to edit /boot/armbianEnv.txt by adding
"extraargs==isolcpus=1,2,3 idle=poll"
Last edit: 29 Jul 2021 09:45 by Bari.
The following user(s) said Thank You: Dolence

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

More
29 Jul 2021 20:49 - 29 Jul 2021 21:01 #216267 by Dolence
Thank you very much for all the help. It is really very appreciated!

Ok, so today I run a few more tests...

Fixing the CPU min and max frequency to the same value and adding isolating CPUs editing /boot/armbianEnv.txt like this solved my latency issues.
extraargs=isolcpus=1,2,3 idle=poll

I still getting the joint following errors. Even with out of the box configuration files (just adding the option to ignore homing) I still getting this error. So far I've tried to use higher values for FERROR and MIN_FERROR and adding STEPGEN_MAXVEL and STEPGEN_MAXACCEL values 20% higher than MAX_VELOCITY and MAX_ACCELERATION, but none of these helped.

[TRAJ]
COORDINATES =  XYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 15.0
MAX_LINEAR_VELOCITY = 150.00
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXVEL = 187.50
STEPGEN_MAXACCEL = 937.50
SCALE = 256.0
FERROR = 10.0
MIN_FERROR = 1.0
HOME_OFFSET = 0.0

[AXIS_Y]
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXVEL = 187.50
STEPGEN_MAXACCEL = 937.50
SCALE = 256.0
FERROR = 10.0
MIN_FERROR = 1.0
HOME_OFFSET = 0.0

[AXIS_Z]
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 200.0
STEPGEN_MAXVEL = 120.0
STEPGEN_MAXACCEL = 240.0
SCALE = 160.0
FERROR = 10.0
MIN_FERROR = 1.0
HOME_OFFSET = 0.0


It doesn't matter much at this moment since I'm getting the same error with provided example configuration, but my real hardware is as follow:

1.8 degree 200 steps per revolution Easy Servos on X, Y and Z
X and Y screw pitch are 25mm per revolution
X and Y microsteps = 32
Z screw pitch is 20mm
Z microsteps = 16
Attachments:
Last edit: 29 Jul 2021 21:01 by Dolence.

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

More
30 Jul 2021 06:08 #216311 by envyvan
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
SCALE = 256.0
I think this value is quite fast for a hobby cnc.
If I don't get it wrong, SCALE should be how many pulse for 1mm or inch, then you set up the VELOCITY to 150mm per second.

I not sure the H3 CPU would able to handle it.
And I also notice AXIS GUI seems like to show up quite much warning and error which tklinuxcnc GUI does not.

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

More
30 Jul 2021 06:14 - 30 Jul 2021 06:24 #216313 by tjtr33
Hi Dolenece,
i reply inline....

Thank you very much for all the help. It is really very appreciated!

Ok, so today I run a few more tests...

Fixing the CPU min and max frequency to the same value and adding isolating CPUs editing /boot/armbianEnv.txt like this solved my latency issues.


extraargs=isolcpus=1,2,3 idle=poll

>>> so no more Unexpected RealTime Delays?


I still getting the joint following errors.

>>> did you fix ( nail down ) the cpu speed?
>>>You can use Armbian-config to set the min and max to the same value
>>>and choose the governor as performance


Even with out of the box configuration files (just adding the option to ignore homing) I still getting this error. So far I've tried to use higher values for FERROR and MIN_FERROR and adding STEPGEN_MAXVEL and STEPGEN_MAXACCEL values 20% higher than MAX_VELOCITY and MAX_ACCELERATION, but none of these helped.
>>> the arisc_pwm_stepgen is not the same animal as linuxcnc stepgen
>>> the arisc criiter doesnt have the same params, so dont add flippers onto a cat.
>>> dont add stepgen_max_accel etc to arisc stepgen
>>>
>>> some ferrors could be due to a varying cpu speed, see above
>>> did you follow the urls send by Bari concerning following errors?

[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 15.0
MAX_LINEAR_VELOCITY = 150.00
>>> ok so thats 4500 mm/minute
NO_FORCE_HOMING = 1
[EMCIO] EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
>>> i have not tried 750 acc but it does not sound crazy high, as i used 600
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXVEL = 187.50
>>> hey! there is no stepgen_maxvel in an arisc pwm_stepgen
>>> if you are using standard linuxcnc stepgen on an opi
>>> the you will have very low steprates, low acc, and no experience from me
>>> ditto for stepgen_maxaccel >>> please use linuxcnc stepgen OR arisc pwm_stepgen NO MIXING STEPGEN_MAXACCEL = 937.50
>>> scale is correct for 25mm pitch 1.8degree stepper 1/32 uSteps
SCALE = 256.0
FERROR = 10.0
MIN_FERROR = 1.0
HOME_OFFSET = 0.0

>>> dont worry about Y or Z untill X can be tormented without ferrors
[AXIS_Y]
...snip...


It doesn't matter much at this moment since I'm getting the same error with provided example configuration, but my real hardware is as follow:

1.8 degree 200 steps per revolution Easy Servos on X, Y and Z
X and Y screw pitch are 25mm per revolution
X and Y microsteps = 32
Z screw pitch is 20mm
Z microsteps = 16

>>>summary
>>> read the ferror docs
>>> please fix (nail down) the cpu freq
>>> please adapt a supplied config.ini, dont add items that did not exist in original

>>> try 1 thing at a time, and post your results
hth
tomp

ps: somebody explain to me how to include the orig text in this goofy editor ( forum editor )
i swear there used to be a button
Last edit: 30 Jul 2021 06:24 by tjtr33. Reason: stupid editor, stupid editer

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

Time to create page: 0.204 seconds
Powered by Kunena Forum