Mesa 7i76e and toolchanger.comp

More
18 Apr 2017 22:02 #91609 by mikeross
I'm trying to get a 6 position tool changer (Emco Compact 5) to work fully.
I've got the changer rotating but there are many things still not quite right with the whole configuration.
A few background details:
The toolchanger is now rotated by a stepper motor, and it is the rotate past a pawl and reverse to lock type.
The main problem is the velocity of the toolchanger is really slow - minutes to perform a change.
  • I had this toolchanger.comp working previously with machinekit on a BeagleboneBlack - (4 axes). To work on that setup I had to remove the PID function on the stepgen, otherwise the PID controlled the velocity and I couldn't easily figure out how to set the velocity. So I'm back up against this issue with the Mesa 7i76e - PnCconf generates the axis with PID even though the steppers are open loop. So, can I remove the PID from the Mesa stepgen?
    Or perhaps better - is there a way to control the velocity as a fixed output - either configured in the HAL, ini or the toolchanger.comp?
  • I ended up configuring 4 axes (XYZA - mill) when I really only want 2 axes of lathe motion (XZ), but otherwise I couldn't seem to get the connection to the stepgen to happen. I can probably reshuffle the toolchanger to the Y axis and loose A axis but this doesn't seem like the right or complete solution.
    Can I use a stepgen without having it defined as an axis? If so - how? Where do I make the connections to it - in the HAL file only?
Attached are the toolchanger.comp, and my .hal and .ini that are "working", however very slowly.

The forums help is always appreciated.
PS - I killed the Beaglebone - so this is why I'm playing with a Mesa card and linuxcnc :)
Mike
Attachments:

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

More
18 Apr 2017 23:43 #91615 by PCW
Replied by PCW on topic Mesa 7i76e and toolchanger.comp
You definitely don't want to use an axis for your tool changer motion

The PID component is not the cause of any speed issues so I would leave it alone

Its probably more likely that your velocity limit is related to using the A axis (and the Axis setup and scaling)
for the toolchanger so I would leave the PID in and would net the toolchanger comps position command to the PID
position command so its directly controlled, something like:

#*******************
# TOOL CHANGER
#*******************

setp pid.ToolChanger.Pgain [ToolChanger]P
setp pid.ToolChanger.gain [ToolChanger]I
setp pid.ToolChanger.Dgain [ToolChanger]D
setp pid.ToolChanger.bias [ToolChanger]BIAS
setp pid.ToolChanger.FF0 [ToolChanger]FF0
setp pid.ToolChanger.FF1 [ToolChanger]FF1
setp pid.ToolChanger.FF2 [ToolChanger]FF2
setp pid.ToolChanger.deadband [ToolChanger]DEADBAND
setp pid.ToolChanger.maxoutput [ToolChanger]MAX_OUTPUT
setp pid.ToolChanger.error-previous-target true
setp pid.a.maxerror .0005

net ToolChanger-index-enable <=> pid.a.index-enable
#need ToolChanger-enable to come from a reasonable LinuxCNC pin here)
net ToolChanger-enable => pid.ToolChanger.enable
net ToolChanger-enable => hm2_7i76e.0.stepgen.02.enable
net ToolChanger-pos-cmd <= toolchanger.position-cmd
net ToolChanger-pos-cmd => pid.ToolChanger.command
net ToolChanger-pos-fb => pid.ToolChanger.feedback
net ToolChanger-output => pid.ToolChanger.output


# ---closedloop stepper signals---


net ToolChanger-output <= hm2_7i76e.0.stepgen.02.velocity-cmd
net ToolChanger-pos-fb <= hm2_7i76e.0.stepgen.02.position-fb


# Step Gen signals/setup

setp hm2_7i76e.0.stepgen.02.dirsetup [ToolChanger]DIRSETUP
setp hm2_7i76e.0.stepgen.02.dirhold [ToolChanger]DIRHOLD
setp hm2_7i76e.0.stepgen.02.steplen [ToolChanger]STEPLEN
setp hm2_7i76e.0.stepgen.02.stepspace [ToolChanger]STEPSPACE
setp hm2_7i76e.0.stepgen.02.position-scale [ToolChanger]STEP_SCALE
setp hm2_7i76e.0.stepgen.02.step_type 0
setp hm2_7i76e.0.stepgen.02.control-type 1
setp hm2_7i76e.0.stepgen.02.maxaccel [ToolChanger]STEPGEN_MAXACCEL
setp hm2_7i76e.0.stepgen.02.maxvel [ToolChanger]STEPGEN_MAXVEL

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

More
20 Apr 2017 01:26 #91686 by mikeross
Thank you for the tips, I've quickly tried implementing it but had a few too many typos on my part and ran out of time to debug...

Hopefully on the weekend I'll get back to this and follow up here with results.

Regards,
Mike

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

More
24 Apr 2017 00:09 - 24 Apr 2017 00:09 #91911 by mikeross
I've made the changes and I have the toolchanger moving, although rather slowly. This is what happened on the BBB and I got around it by not using the PID.

with P=1000, I=0, D=0 i get 0.5 for velocity when doing a tool change. Playing with P and increasing it seems to directly impact the velocity but I understand that P should be limited to 1000?
I.E. P=2000 the velocity rises to 1, P=2500 and velocity goes to 1.25

Is there another way of making the velocity go higher?
I've already increased the stepgen max velocity to way above that (250) and stepgen max acceleration is high too (4000) with no apparent effect (if they are too low they do limit).

Ideas?
Attachments:
Last edit: 24 Apr 2017 00:09 by mikeross. Reason: remove duplicate attachments

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

More
24 Apr 2017 00:12 - 24 Apr 2017 00:51 #91912 by PCW
Replied by PCW on topic Mesa 7i76e and toolchanger.comp
P has basically nothing to do with velocity (only velocity corrections)

It sounds like you do not have FF1=1

Also, if this is a metric machine, set the PID maxerror to ~0.01
Last edit: 24 Apr 2017 00:51 by PCW.

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

More
24 Apr 2017 00:17 #91913 by mikeross
Yes - FF1 = 1 and still stuck at 0.5 for velocity
Attachments:

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

More
24 Apr 2017 01:11 #91919 by PCW
Replied by PCW on topic Mesa 7i76e and toolchanger.comp
Can you post you hal and ini files? something very basic is broken here

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

More
24 Apr 2017 01:22 #91920 by mikeross
Attached,

Thanks,
Mike
Attachments:

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

More
24 Apr 2017 02:22 #91921 by PCW
Replied by PCW on topic Mesa 7i76e and toolchanger.comp
OK what i think is happening is this:
The toolchanger does not provide a motion profile, it just steps the position so the
FF1 term is not doing the expected thing

You might try setting the PID maxerrror to 0 and see what happens
The following user(s) said Thank You: mikeross

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

More
25 Apr 2017 00:03 #92018 by mikeross
As suggested I changed the PID maxerror in the HAL to 0 (spent some time looking for this in the .ini...)
setp pid.ToolChanger.maxerror .000
That worked - Now its alive! Needs to be tuned though as it overshoots quite a bit.
This might be another reason for me to think about rewriting the toolchanger.comp, but if I get it working enough I may just live with it.

Thanks for your help!
Mike

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

Moderators: PCWjmelson
Time to create page: 0.164 seconds
Powered by Kunena Forum