Test/Tune Axis in pncconf

More
27 Aug 2011 21:41 #12776 by fgauder
I'm new to Linux, EMC2, and forums so I apologize if this post ends up in the wrong place. I converted a three axis mill from an Anilam M controller to EMC2 using a Mesa 5i20 with 7i33 and 7i37 daughter cards. I used PnCConf to configure them and was making parts a couple days after receiving the cards.

I hope that's an encouragement to anyone thinking about trying this. Those responsible have done a good job of providing information and PCW at Mesa quickly responded to all the hardware questions I had at the beginning.

Now, I'll admit that even though I can make parts, the mill is not yet close to what it was with the Anilam controller. I haven't been able to configure the I/O board so I have handled all of that manually. Also, i haven't been able to tune the drives, so I have a 1" rapid and .5" feed following error set and I use a G4 P1 command after each move to allow the drive time to catch up. So, I'm sure it will only get better from here.

In PnCConf I was able to use the "Open Loop Servo Test" to verify directions and encoder scaling. It worked well for all three axes. However, when I press the "Test/Tune Axis" button for any axis, I get a pop-up warning that says, "Servo Tuning Is Not Finished". What am I missing or doing wrong?

As for I/O, all of the mill's control logic is done on the common side of a 24 VDC power supply. To start with, I would like to have one NO contact that closes with the "Toggle Machine Power" or F2 buttons in Axis. This would enable the drives. Also, I would like one NC in series with the Axis e-stop circuit. It is embarrassing to admit that I haven't been able to even come close to making this happen.

Any help, direction, or guidance will be greatly appreciated.

Thanks,
Frank

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

More
27 Aug 2011 21:53 #12777 by cmorley
I haven't finished coding the tuning test in pncconf. - it's considerably more involved then stepper tuning.
Another way to do it is in AXIS:
under machine heading pick calibration.
this allows you to manually test sero tuning numbers.
remember whatever numbers you punch into this calibration are not coppied to pncconf but is writen to the INI file.
Meaning if you run pncconf again you need to add the numbers into pncconf or pncconf will use the original numbers of PID tunning.

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

More
28 Aug 2011 00:24 #12779 by andypugh
fgauder wrote:

As for I/O, all of the mill's control logic is done on the common side of a 24 VDC power supply. To start with, I would like to have one NO contact that closes with the "Toggle Machine Power" or F2 buttons in Axis.

Do you have any familiarity with HAL yet?
If not, this is a good starting point: linuxcnc.org/docs/html/hal_basic_hal.html
You need to connect a suitable HAL "pin" to another HAL "pin" which corresponds to one of the output drivers on the 7i37.
Assuming that the 7i37 is plugged into the middle header (P3) then 7i37 OUT0 is on pin 33, which is GPIO 040 in HAL. (I figured that out from the 7i3 manual and the pin-allocation information that the Hostmot2 driver put in dmesg.

You need to make this pin an output, which you can do with a line like this in the custom HAL file (changes in the custom HAL file will not be over-writtten by pncconf)
setp hm2_5i20.0.gpio.040.is_output true
You then need to link that GPIO pin to a HAL status pin. The best pin for that is probably halui.machine.is-on. So, in the HAL file you need
net main_breaker halui.machine.is-on => hm2_5i20.0.gpio.040.out
You might not have the halui…. pins if your INI file doesn't contain the magic line HALUI = halui. Though I suspect that pncconf does insert it.
Note that the => has no function, it is purely a convention for human readability. The pin names need to be correct (you can see them all in machine->show hal config inside axis) but the signal name (main_breaker here) can be freely chosen to make sense to you.

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

More
28 Aug 2011 00:51 - 28 Aug 2011 14:26 #12780 by fgauder
Chris,

Thanks for the quick reply. I was able to tune all three axes to a much better responsiveness and cut my following error way down. I did this by just trying different numbers in the Axis calibration window. Is anyone aware on a tutorial for fine tuning the drives?

I have glass scales with .1mm resolution and the drives are currently going to position and then moving back and forth the .0004". Is there a way to lock them from doing this when they are in position? They didn't do it with the Anilam controller.

Thanks,
Frank
Last edit: 28 Aug 2011 14:26 by fgauder. Reason: left out a decimal point

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

More
28 Aug 2011 00:59 #12781 by fgauder
Andy,

Thanks for taking the time to give such detailed information. I'm not familiar with HAL yet. I was trying to make the connections in PnCConf since the pins are all listed on there. I was hoping I could point and click them into submission.

I will try to work through this HAL info this week.

Thanks,
Frank

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

More
28 Aug 2011 01:11 #12782 by BigJohnT
I was told to slowly increase P until it becomes a bit unstable then add I till stable then repeat until you get your following error down using HalScope to watch that as you tune. You might have to try a little D, FF0, FF1, or FF2 to get the last bit of following error out.

John

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

More
28 Aug 2011 03:15 - 28 Aug 2011 03:32 #12785 by cmorley
andypugh wrote:





You need to make this pin an output, which you can do with a line like this in the custom HAL file (changes in the custom HAL file will not be over-writtten by pncconf)

setp hm2_5i20.0.gpio.040.is_output true
You then need to link that GPIO pin to a HAL status pin. The best pin for that is probably halui.machine.is-on. So, in the HAL file you need
net main_breaker halui.machine.is-on => hm2_5i20.0.gpio.040.out
You might not have the halui…. pins if your INI file doesn't contain the magic line HALUI = halui. Though I suspect that pncconf does insert it.
Note that the => has no function, it is purely a convention for human readability. The pin names need to be correct (you can see them all in machine->show hal config inside axis) but the signal name (main_breaker here) can be freely chosen to make sense to you.


You can do most of this from PNCconf with out a custom HAL file.
Not sure what version of EMC you are using.
You can select GPIO as input or output or open drain in PNCconf (pintype combobox)
You can invert the logic in PNCconf (INV checkbox)
The signal you can use for machine-on is amplifier enable.
If you are using EMC 2.5 (you are probably not ) there is a machine on signal (though internally it's the same thing.)
PNCconf always loads HALUI so all those pins are available to connect to in a custom HAL file Iif you want something PNCconf doesn't have.
The help button in pncconf should .....help!
press it while on the mesa page and it should throw some light on setting up the I/O
Last edit: 28 Aug 2011 03:32 by cmorley.

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

More
28 Aug 2011 03:42 #12786 by cmorley
the deadband setting may help in this regard - usually set to half of the minimum encoder count. (.0002)

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

More
28 Aug 2011 09:50 #12788 by andypugh
fgauder wrote:

I'm not familiar with HAL yet. I was trying to make the connections in PnCConf since the pins are all listed on there.


Well, in that case, and following on from Chris' reply, use pncconf.

I tend to use raw hal because much of the time I am using components that pncconf doesn't know about, generally because they aren't even finished yet.

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

More
28 Aug 2011 14:24 #12792 by fgauder
Chris, Andy, and John,

Thanks so much for your help. I have a much better idea of where I'm heading and how to get there now.

In regards to following error, what is a reasonable expectation to get it down to? I was able to bring my rapid following error setting down to .2" from 1" at 100"/min and my feed setting down to .05" from .5", this works up through 50"/min. I also had to decrease my max acceleration setting to 1 from the PnCConf default of 2.

I haven't tried John's method of tuning yet, I'd like to have an idea of what to shoot for.

Thanks again,
Frank

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

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