Hello Guest it is March 28, 2024, 07:10:50 AM

Author Topic: MDI input to select pulley ?  (Read 10067 times)

0 Members and 1 Guest are viewing this topic.

MDI input to select pulley ?
« on: December 21, 2009, 08:07:19 PM »
Is there a MDI input to select pulley # ?
Or must it be done by macro or dro entry ?
This is only ref. I found.
http://www.machsupport.com/forum/index.php/topic,5860.0.html
Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: MDI input to select pulley ?
« Reply #1 on: December 21, 2009, 08:26:09 PM »
I would imagine the DRO has an OEM number so make a custom macro for each pulley you wish to use and just call that from MDI or code.

Macro would just be something like
SetOemDRO(***,1)

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: MDI input to select pulley ?
« Reply #2 on: December 21, 2009, 08:31:20 PM »
Just looked it up, OEM DRO 56 is the pulley DRO so a macro for instance called m101.m1s with
SetOemDRO(56,1)
in it would set the spindle pulley to 1 when you called m101
If you had m102.m1s with
SetOemDRO(56,2)

then it would set it to pulley 2 when you did a m102

etc etc

Hoood
Re: MDI input to select pulley ?
« Reply #3 on: December 21, 2009, 08:42:21 PM »
hey thanks Hoood,
 That's pretty well what I gathered from the earlier post.
Was just wondering if there was a direct call, like
M3 P4 S6000 or such...
Russ



Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: MDI input to select pulley ?
« Reply #4 on: December 21, 2009, 08:43:50 PM »
OOPS sorry was too lazy to look at the link ;D
Not as far as I know, then again I have never messed with the pulleys.

Hood
Re: MDI input to select pulley ?
« Reply #5 on: December 21, 2009, 10:15:11 PM »
Just looked it up, OEM DRO 56 is the pulley DRO so a macro for instance called m101.m1s with
SetOemDRO(56,1)
in it would set the spindle pulley to 1 when you called m101
If you had m102.m1s with
SetOemDRO(56,2)

then it would set it to pulley 2 when you did a m102

etc etc

Hoood

Hood,

Here's what I do - mine is M966.  The pullley number is passed as the P parameter.  e.g. - "M966 P3" selects pulley 3.  (Ignore the "cruft" my pre-processor sticks in there....)

''========================================================================================
'  Created From: SetPulley.m3m
'  Includes:
'       ../Common.def
''========================================================================================

''========================================================================================
''    Included Definitions:
''========================================================================================
MachCurrentPulleyOEMDRO =    56   ' DRO used to show current pulley
''========================================================================================

''
'   Button macro to set current pulley
''

'#filename "M966.m1s"
'#include "Common.def"

        NewPulley = Param1()
        SetPulley(NewPulley)
Regards,
Ray L.
Re: MDI input to select pulley ?
« Reply #6 on: December 21, 2009, 10:33:08 PM »
That's really neat Ray.....THANKS.
Consider using a BP J head w/no VFD.
In the event that there IS a pulley change required but using the same tool....as in roughing then finishing, what would be in your program to stop for the pulley change ? Would that be part of the PP ?
Basically, any time the commanded speed is <> current pulley min/max, M1 or something ? ? ?
Thanks
(got a servo and drive for my knee, following you on that too)


Re: MDI input to select pulley ?
« Reply #7 on: December 21, 2009, 11:04:15 PM »
That's really neat Ray.....THANKS.
Consider using a BP J head w/no VFD.
In the event that there IS a pulley change required but using the same tool....as in roughing then finishing, what would be in your program to stop for the pulley change ? Would that be part of the PP ?
Basically, any time the commanded speed is <> current pulley min/max, M1 or something ? ? ?
Thanks
(got a servo and drive for my knee, following you on that too)




Here's a section of one of my programs:

(Filename: Motor Shield Plate.tng)
(Post processor: My Mach2 Post 091221.scpost)
(Date: 12/21/2009)
G20 (Units: Inches)
G40 G90
F10
(Part: Motor Shield Plate)
()
(Process: Drill, Motor Shield Plate Bolt Holes, T505: #4 Center Drill [5/16 x 1/8 x 1/8] [0.31250], 0.25 in Deep)
G00 Z1.5000
M06 T1 (#4 Center Drill [5/16 x 1/8 x 1/8] [0.31250])
M843 P1
G00 Z1.5000
M00 ( Pulley: 4 Motor: L )
M966 P4
M03 S3423 (Spindle CW 3423 RPM)
(Drill: Dia=0.3125, Start=-0.0000, Depth=-0.2500, Peck=0.3125)
G00 X-1.3700 Y1.3700
G00 Z0.0200
G01 Z-0.2500 F6.064 S3423
....

The way I generate this is rather round-about, and involves a customized SheetCAM POST to generate a G-code file, which is then processed by a custom Perl program that post-processes that file, and outputs another one that actually runs on the mill.  The whole process is a bit complex, and was a PITA to create, but once I got it working, it's been trouble-free, and does create much better G-code for my machine.

My SheetCAM post outputs a fairly generic G-code file that knows nothing the characteristics of the machine.  I parse that file with the Perl program, extracting a lot of information about spindle speeds, tool numbers, etc that are used.  It does this based on constraints on things like min/max allowable VFD frequency in each motor speed range (I allow 120Hz in low speed, but only 90HZ in high speed), and minimizing the amount of manual intervention required to run the program on the machine.  Among other things, I look at the sequence of spindle speeds required throughout the program, and determine the optimum sequence of pulleys, motor speed ranges and VFD frequencies to use, to minimize the number of pulley changes, since pulley changes are a PITA, and time-consuming.  VFD frequency is controlled my Mach3, to that comes basically "free".  Pulley and motor speed range changes require stopping the spindle, and manually flipping a switch or changing the belt.  So, when either a pulley change or motor speed change is required, I insert G-code to stop the spindle, turn off coolant, and prompt the user to do whatever needs to be done.  You can see this in the line "M00 ( Pulley: 4 Motor: L )", which tells me to put the belt on the highest speed pulley, and flip the motor to the low speed range.  After the user hits Cycle start, the spindle and coolant are restored to their previous state, and the program continues on.

You can see the use of my M966 macro, right after the M00 line prompting me to change the pulley, to tell Mach which pulley is now active.

The "M843 Px" is my "pseudo-G43" to enable tool-length compensation with the knee.  I also have "M849" to take the place of G49 to turn off tool length comp.  I can't use G43, because Mach3 does not provide the necessary hooks to use the knee in this way.  This will be fixed in v4, and I'll be able to use G43.  For now, this kludge gets the job done, but it is a PITA.

Regards,
Ray L.
Regards,
Ray L.
Re: MDI input to select pulley ?
« Reply #8 on: December 22, 2009, 09:43:31 AM »
Very neat Ray..I like it.
If/ when I EVER get my mill ready, I'll use this or something very similar.
Thanks,
RC

Offline jaja

*
  •  68 68
    • View Profile
Re: MDI input to select pulley ?
« Reply #9 on: August 31, 2010, 05:27:37 PM »
Perhaps a stupid idea, but I made a clone from the pulley select DRO input/ output control in the diagnostic screen.
You know where it says "spindle pulley" at the bottom left on the diagnostic screen.
I copied such a button to the manual screen and I think I can select a pulley with it by selecting it and typing the pulley number in it.
I think it works because it tells me when it is too fast for a pulley, which corresponds with the values I assigned to this pulley.
Is this a way to select a pulley or am I totally wrong

gr jaja