Need some ideas on how to set up a home built OD/can grinder

  • markd
  • Topic Author
  • New Member
  • New Member
More
7 years 11 months ago #120643 by markd
I found what I thought would be a very close hal file but it gives me a error when starting linuxcnc.

error is OD-grinder.hal:143 pin 'stepgen.3.velocity-cmd' does not exist

Please can someone look at the hal file to see what I missed.

Please Log in to join the conversation.

More
7 years 11 months ago #120656 by andypugh
Code:
loadrt stepgen ctrl_type=pppv step_type=0,0,0,0
...
Code:
# Scaling --------Aaxis setp scale.1.in 0 setp scale.1.gain 42.1 setp scale.1.offset 0 addf scale.1 servo-thread # WorkHead ------ Aaxis setp stepgen.3.position-scale [AXIS_3]SCALE setp stepgen.3.steplen 1 setp stepgen.3.stepspace 1 setp stepgen.3.dirhold 35000 setp stepgen.3.dirsetup 35000 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL #net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd #net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb #net spindle-cmd => stepgen.3.velocity-cmd #net astep <= stepgen.3.step #net adir <= stepgen.3.dir #net zenable => stepgen.3.enable net spindle-enable <= motion.spindle-on => stepgen.3.enable net spindle-cmd-rpm => scale.1.in net scale.1.out => stepgen.3.velocity-cmd net spindle-out <= stepgen.3.step

I think that ctrl_type needs to be p,p,p,v (ie, a comma between each letter)

You also shouldn't need the separate scale component if the stepgen position-scale is set correctly. (That is coming in from the INI file.)

Please Log in to join the conversation.

  • markd
  • Topic Author
  • New Member
  • New Member
More
7 years 11 months ago #120696 by markd
Thanks Andy,

I made the change you suggested which did solve the error. I know have another problem which is that there is no response from the speed command in mdi or from the front panel. the rpm indicator shows the commanded speed from both the panel and mdi.

I tried to find the post that I originally copied the hal file but could not.

Please Log in to join the conversation.

More
7 years 11 months ago #120699 by andypugh
You have the astep and adir connections commented-out in the spindle section.

Please Log in to join the conversation.

  • markd
  • Topic Author
  • New Member
  • New Member
More
7 years 11 months ago #120708 by markd
I changed the line below
net spindle-out <= stepgen.3.step

to
net spindle-out <= stepgen.3.step => parport.0.pin-08-out

and had to comment out the net astep => parport.0.pin-08-out
doing it this way works but seems wrong.

thanks again for your help

Please Log in to join the conversation.

More
7 years 11 months ago #120721 by andypugh

markd wrote: and had to comment out the net astep => parport.0.pin-08-out
doing it this way works but seems wrong.


No, that is absolutely fine, in fact it is how I prefer to do it.
Code:
net s a b c d e
or
Code:
net s a ... net s b ... net s e d ... net s d c
(possibly spread through multiple HAL files) are all perfectly valid.

Please Log in to join the conversation.

  • markd
  • Topic Author
  • New Member
  • New Member
More
7 years 11 months ago #120726 by markd
I am starting to think about the dresser
X and Z axis will reference to the work Head (spindle) G54

U and W axis will reference to the well head possibly G56

The goal is to have the amount dressed from the wheel added as an offset to the X automatically

What do you think?

Attachment not found

Please Log in to join the conversation.

More
7 years 11 months ago #120839 by andypugh
That should be possible. Maybe using kinematics, maybe using kinematics. Possibly just by adding X and U before passing them to the stepgen.

Does the exact wheel diameter matter to the system? If you go back to my mockup using a CD to model a grinding wheel in that case the wheel diameter is a critical part of the calculations as it determines how the contact point rolls round the eccentric.

Please Log in to join the conversation.

  • markd
  • Topic Author
  • New Member
  • New Member
More
7 years 11 months ago #120854 by markd
The wheel diameter is very important to the cam profile but a few thousandths on a 7 inch diameter wheel wont be a problem.
When the OD grinding mode is active the wheel diameter in not critical.

Please Log in to join the conversation.

More
7 years 11 months ago #120996 by andypugh

andypugh wrote: That should be possible. Maybe using kinematics, maybe using kinematics.


Should have said "That should be possible. Maybe using kinematics, maybe using external offsets"
Though a better way occurred to me later, which is using tool offsets. I can't decide between using X offset (like a lathe) or radius offset.
I suspect that using tool-radius compensation might be a good solution if the rotation angle can be programmed as Y in the G-code.

In either case, I think that tool table and wear offsetting is likely to be the answer here, with the wheel-dressing routine calculating a new tool offset and programming it with G10 commands.

Please Log in to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum