- Posts: 69
- Thank you received: 0
VMC related HAL questions.
So I thought it was time to start a new in the correct (hopefully) section of the forum.
I'm slowly getting closer to knowing how hal is done. Not good enough to write anything myself yet though
Quick info:
Machine: Modig MD5000 -85
Spindle: SK40 5krpm max, Lenze 4902 DC spindle drive (+/-10V control)
Control: Mesa 5i25+7i77
My most prominent problem at the moment is spindle speed compensation. Or lack of.. As seen in the picture below.
Andypugh pointed me to this wiki page:
wiki.linuxcnc.org/cgi-bin/wiki.pl?SpindleOrient
Witch sadly doesn't help me (and my limited hal knowledge) much :huh:
I've attached my .ini and -hal files if they are of any interest.
So can somebody help me? :dry:
Please Log in to join the conversation.
But "spindle closed loop control" might be a little to advanced to start with :whistle:
The "Spindle Orientation" schematic makes a lot more sense now at least
Can the spindles two pid's be tuned via Linuxcnc? (cant remember what the tool is called) Or do I have to change the settings in the hal file?
Please Log in to join the conversation.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
Please Log in to join the conversation.
thewho wrote: Can I modify and use this on my machine?
wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
The Vismach model that I am playing with now has a closed-loop velocity spindle with orient (using M19)
so the HAL code to implement t this HAL diagram now exists as an example.
Unforunately it only exists on my machine at home.
If I get chance I will nip home at lunchtime and post it here. (as I am away all weekend)
Please Log in to join the conversation.
It will start up, home and run G-code.
It will also rotate the simulated spindle and respond to M19 commands.
Note that the orient component only updates outputs when motion.spindle-orient goes true from false, so to change orient angle you have to start the spindle and move it fractionally.
So,
M19 R45
M3 S10
M19 R180
Will work. (I might look at modifying "orient")
[strike]Tool changing is a work-in-progress. At the moment M6 is remapped to call an O-word subroutine, but the subroutine still does very little. [/strike]
The G-code routine now does a complete tool change cycle for the simulated machine, but anyone using this code should make absolutely sure that it does all the necessary things in the right sequence for their hardware. Errors could be costly, but I am not in a position to test this code on your actual machine.
Extract the VMC.zip file into the configs folder and you should get a new config to choose in the LinuxCNC config picker.
You will need to give the "vmcgui" file execute permissions for the config to work.
(right-click, properties, permissions, from the file manager)
(Update 18 July) The carousel component now supports position-pulse + index mode
Please Log in to join the conversation.
Is it a time/prio thing?
Same with Pncconf, it's a great tool but I feel it could do so much more.
Thanks again Andy for helping newbies like me
Please Log in to join the conversation.
thewho wrote: But why isn't things like closed loop spindle control built in?
It isn't generally necessary, for one thing. Exact spindle speed isn't that important. Before VFDs machines would only run at 6 or 8 fixed speeds, and nobody worried about it too much.
Even now, you don't particularly care about exact speed, just too fast and too slow.
Please Log in to join the conversation.
thewho wrote: Is it a time/prio thing?
Same with Pncconf, it's a great tool but I feel it could do so much more.
If only you knew how complex Pncconf is and how many thousands of hours the author spent writing it.
Spindle feedback is in the manual.
JT
Please Log in to join the conversation.
BigJohnT wrote: Spindle feedback is in the manual.
Some of it is in that zip file too
Please Log in to join the conversation.
This is a video of the tool change in action:
And here is the G-code that does the change.
Please Log in to join the conversation.
