Adding Minmax to Axis

More
15 Jan 2013 19:03 #28720 by gandalf69
This is more of an Axis question but since I'm using PNCConf to configure......

Each time I attempt to run Axis I get a joint 2 following error and instead of fixing the issue I thought it would be nice to measure it.
BTW, I'm a bit surprised that a following error occurs at all considering there is no hardware being driven and thus there is zero inertia.
Anyway I added the following to custom.hal:

loadrt minmax count=3

addf minmax.0 servo-thread
addf minmax.1 servo-thread
addf minmax.2 servo-thread

net axis.0.ferror minmax.0.in
net axis.1.ferror minmax.1.in
net axis.2.ferror minmax.2.in

Run Axis - Machine/Show Hal Config/Pins/minmax show the pins but even under WATCH their value remains unchanged after running Axis (which then stops with the following error.

I'm not sure what Minmax is supposed to measure (time, volts, etc).
I can't find much about it on LinuxCNC,
Any ideas on how to make Minmax work?

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

More
15 Jan 2013 19:54 #28721 by ArcEye
Replied by ArcEye on topic Adding Minmax to Axis
Hi

I have not used it myself, but running man minmax brings up the scant info, which shows it is for measuring floating point values

Your problem may be that you do not have a signal in your net commands, you are trying to link 2 pins, but net links a signal to one or more pins, so it will see the first argument as a signal name.

Try net Xferror axis.0.ferror minmax.0.in or similar

regards

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

More
15 Jan 2013 22:32 #28724 by gandalf69
Replied by gandalf69 on topic Adding Minmax to Axis
thanks arcEye, what is X? I'm new to this.

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

More
15 Jan 2013 23:07 #28726 by ArcEye
Replied by ArcEye on topic Adding Minmax to Axis
That is simply my assumption that axis.0 is going to be the X axis! :lol:

You can call the signal anything you want as long as that name is not already in use as a signal or pin

regards

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

More
15 Jan 2013 23:45 #28728 by PCW
Replied by PCW on topic Adding Minmax to Axis
"BTW, I'm a bit surprised that a following error occurs at all considering there is no hardware being driven and thus there is zero inertia."

With a servo system you will get a joint following error anytime the feedback (encoder usually) and commanded position differ by more than the current ferror limit.

This means that if no hardware is connected you will get an immediate joint following error
as soon as you try to move (commanded position changes but the encoder count does not follow)

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

More
16 Jan 2013 00:02 #28729 by gandalf69
Replied by gandalf69 on topic Adding Minmax to Axis
thanks ArcEye I'll play with it tomorrow.

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

More
16 Jan 2013 00:06 #28730 by gandalf69
Replied by gandalf69 on topic Adding Minmax to Axis

"BTW, I'm a bit surprised that a following error occurs at all considering there is no hardware being driven and thus there is zero inertia."

With a servo system you will get a joint following error anytime the feedback (encoder usually) and commanded position differ by more than the current ferror limit.

This means that if no hardware is connected you will get an immediate joint following error
as soon as you try to move (commanded position changes but the encoder count does not follow)


OK, catch XX.
So what is the solution?
Delete the encoders?

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

More
16 Jan 2013 00:58 - 16 Jan 2013 01:05 #28731 by PCW
Replied by PCW on topic Adding Minmax to Axis
Not sure what you are trying to do here. If you just wish to avoid following errors when tuning and messing about, I would set min-ferror and ferror to around 1 inch (or 25 mm) so the servo behavior is observable but a runaway is stopped before it gets too far.

simple basic servo setup:

1. With drives disabled, verify proper encoder counting, direction and scale for all axis

2. Next check (and possibly correct) feedback direction.
There are many ways to do this and perhaps pncconf can help

3. Once feedback direction is correct, and with working drive enable circuitry,
you proceed to tuning
Last edit: 16 Jan 2013 01:05 by PCW.

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

More
16 Jan 2013 18:19 #28750 by gandalf69
Replied by gandalf69 on topic Adding Minmax to Axis
PCW, thanks, I'm just messing around with Axis and PNCConf with no hardware attached. I completely overlooked that encoder input would be expected. I will use your suggestion when I get to the hardware.
For now I would just like to get Minmax working in Axis. I need to read up on signal
and pin connections.

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

More
16 Jan 2013 22:44 #28754 by gandalf69
Replied by gandalf69 on topic Adding Minmax to Axis

That is simply my assumption that axis.0 is going to be the X axis! :lol:

You can call the signal anything you want as long as that name is not already in use as a signal or pin

regards


OK, thanks, I got it.
Also thanks to =aike= on CNCZone (message117480)

This works in the custom.hal file.

loadrt minmax count=3

addf minmax.0 servo-thread
addf minmax.1 servo-thread
addf minmax.2 servo-thread

net Xferror axis.0.f-error minmax.0.in
net Yferror axis.1.f-error minmax.1.in
net Zferror axis.2.f-error minmax.2.in



In order to get the Axis cutter path example to work, in the .ini file both MIN_FERROR and FERROR need to be set at a bit more than the G code max numbers.

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

Moderators: cmorley
Time to create page: 0.428 seconds
Powered by Kunena Forum