List of milling machine features I am seeking

Ignoramus2412 wrote:


You need to remember that there is a standard G-code, really S code to set the speed of the spindle, and you implementation should properly handle it. If the code says S1500, followed by M03, that should be all that is required to start the spindle turning at 1,500 RPM. All the code/script to start the spindle and adjust the vari-drive to the correct speed needs to be hidden, so that there is nothing more than a delay on the M03 while the spindle is brought to the correct speed, before G-code execution continues.
The same can also apply to the high/low gear change, where the background script can handle the high/low gear change transparently as needed, i.e. set a threshold for the commanded RPM at which point the high/low gear change occurs. There is no reason to have to add gear changes to your G-code, when you already need special background routines to handle the speed setting of the vari-drive.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

PeteC, all I read about speed changes, makes it seem that it is difficult to change speed by means of varidrive, within the regular HAL logic.
However, I realized that it is a very easy way to do by means of miscellaneous codes M100-199. Those codes are implemented in EMC by means of scripts with ame names, living in a certain directory. Those scripts. in turn, can get access to workings of EMC by means of command "halcmd".
So, I wrote a speed change perl script. It is UNTESTED, because I am away from home. But here it is.
It may be summarized as follows:
- if spindle is not running, start it and wait 1 second. - calculate acceptable boundaries for actual speed. - If speed is below acceptable boundary, turn on SPEED INCREASE solenoid. - If speed is above acceptable boundary, turn on SPEED DECREASE solenoid.
- Assuming speed needed changing, wait up to 20 seconds until speed is "in range". - If after 20 seconds speed is in range, good, otherwise bad.
- if spindle was not running prior to this code, stop spindle and wait until VFD stops is.
The advantage of this approach is that it is done in a totally self evident script that can be debugged. The disadvantage is that S300 reads better than M141 P300. But I can live with it and leave S command control VFD speed, which I do not really need to do with varidrive that much, but just to look cleaner.
#!/usr/bin/perl
print STDERR "$0: " . join( ',', @ARGV ) . ".\n";
sub Kaput { my ($msg) = @_; die $msg; }
sub get_hal { my ($signal) = @_; my $out = `halcmd getp $signal`; chomp $out; return $out; }
sub set_hal { my ($pin, $value) = @_; system( "halcmd setp $pin $value" ) && Kaput( "Could not halcmd $pin $value" ); }
my $P = $ARGV[0]; my $Q = $ARGV[1];
my $min_speed = 60; my $max_speed = 4200;
my $min_delta = 5; my $pct_delta = 0.05; my $time_limit = 20; # seconds
my $commanded_speed = $P;
unless ( $min_speed <= $commanded_speed && $commanded_speed <= $max_speed ) { die "Commanded speed $commanded_speed NOT between limits of $min_speed and $max_speed"; }
my $lower_limit = max( $min_speed, $commanded_speed * (1-$pct_delta) - $min_delta ); my $upper_limit = min( $max_speed, $commanded_speed * (1+$pct_delta) + $min_delta ); my $was_running = get_hal( 'motion.spindle-on' );
unless ( $was_running ) { set_hal( "motion.spindle-forward", "TRUE" ); sleep 1; }
my $start_time = time; my $ok = undef;
my $speed = get_hal( 'motion.spindle-forward' );
my $increasing; if ( $speed < $lower_limit ) { set_hal( 'halui.spindle.increase', 1 ); $increasing = 1; } elsif ( $speed > $upper_limit ) { set_hal( 'halui.spindle.decrease', 1 ); $increasing = undef; } else { $ok = 1; }
while( !$ok && time < $start_time+$time_limit ) { if ( $lower_limit <= $speed && $speed <= $upper_limit ) { $ok = 1; last; } sleep 0.01; }
if ( $increasing ) { set_hal( 'halui.spindle.increase', 0 ); } else { set_hal( 'halui.spindle.decrease', 0 ); }
unless ( $ok ) { # Stop spindle. We screwed up set_hal( 'halui.spindle.is-on', 0 ); Kaput "Could not reach desired speed in $time_limit sec." unless $ok; }
unless ( $was_running ) { # Spindle was not originally running, stop it set_hal( 'halui.spindle.is-on', 0 ); }
exit 0;
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ignoramus2412 wrote:

I suspect your code will need some tweaking to account for lag time in vari-drive response so it doesn't overshoot the target speed, i.e. only turn on the up/down solenoid for 1 second, then turn it off and wait a second for the drive to stabilize before checking the speed and determining if it needs more adjustment.
There must be a way to hang this code off of the normal M03/M04 commands so that the machine will operate more or less normally relative to other CNC mills other than a bit slow spindle start when changing speeds. I can't imagine that EMC2 has a limitation that would prevent this.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Pete, I am not speaking from any kind of knowledge. I think that I found way to change spindle speed that I understand. There may be a cuter aproach that I do not yet know. But I found something that I personally find workable.
i
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ignoramus29207 wrote:

Jon seems to think someone else has already done this, I'd try to find more information on that.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

People did closed loop speed control with a VFD. I saw that. I have not seen implementations of speed control with a varidrive. And I did ask on the emc-users list.
This vari-drive control from G code is relatively rare, so I am not surprised. Most modern VMCs simply have oversized spindle motors and VFDs, whereas most older CNC and retrofit mills do not have pneumatic varidrive control.
What I will do is, the S instruction will control VFD (S1000 == 60 Hz), and practically I will not use it much. And my M141 instruction will adjust the varidrive whenever I see fit. Normally there is rarely a need to adjust speed, besides use of tapping after drilling.
i
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Automatic lube (ways & ball screws)?
Automatic tool changer?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The mill has that already.

This is too hard, I would not do it.
i
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The interface is easy. Heck, you could build an "extension ring" for your rotary table to act as the tool holder.
But you do have to have a power drawbar that can be controlled by EMC. I don't recall your saying if you had one.
LLoyd
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On 2010-08-09, Lloyd E. Sponenburgh <lloydspinsidemindspring.com> wrote:

I do not have a power drawbar. Based on some abysmal past experiences, trying to implement something like this will lead to a disaster.
i
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ignoramus29207 wrote:

ATC is nice, but far from critical for a home shop. You already have a quick change spindle, so as long as you can keep standard tools pre-set in their holders and numbered for quick change with the tool length offsets and whatnot properly entered into the control, manual tool changes should be fast and easy.
One addition that might be worthwhile would be to install a tool length sensor probe at a far corner of the table to allow fast automated tool length measurement.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I agree with all of the above.
i
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I'm a bit late to your thread... been fighting the new 'puter and helping "the kid" all weekend.
As to list of new things to add. Consider a servo on the knee and link it to tool height when doing a manual tool change. Your 2 1/2 axis machine suffers from too small a Z range and this solves the issue.
Karl
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

    Aside from that -- Iggy's spindle has a quick-change locking ring for the NTMB/NMTB-30 (whichever) holders. This requires a hook wrench to lock and release it. So to have a power drawbar (ideally with the finger cluster to grip a pull ball on a CAT-30 holder or a BT-30 on a power drawbar).
    I agree that adding a tool changer to your machine is not a practical project for the present. If you stumble across an alternate head for the machine, with the different spindle and the mounting points for the turret -- then you might reconsider this project.
    Enjoy,         DoN.
--
Remove oil spill source from e-mail
Email: < snipped-for-privacy@d-and-d.com> | Voice (all times): (703) 938-4564
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.