Hello Guest it is April 24, 2024, 04:02:35 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - UT_Tech

Pages: 1
1
General Mach Discussion / M98 subroutine won't execute
« on: March 26, 2012, 01:13:35 AM »
Ok, this is embarassing.  I've read that some of you are using the M98 syntax for a subroutine call.  So the function must be working in Mach3.  The trouble is that I can't get it to work.  I really need this to work and here is a very simple test file that I wrote:

;( CNC File       :- Injector Hole Test ver A3 )
;( Produced       :- March 25, 2012 )
;( Post Processor :- M_Mach 3_inc 02_02_12 )
;( Part Number ID :- Injector complete pocket )
;( Tools Used )
;( T01  9.53mm End Mill)
;( T02  6.35mm End Mill)
;( T03  5.56 Twist Drill / Center Drill)
;
%
N5  O0001
N10 G00 G21 G17 G90 G40 G49
N20 G52  X30.0  y0.0  ;start with first offset
N30 M98  P0002 L1  ;call the machining routine
N40 G52 X60  Y0.0  ;use a different offset to run it again
N30 M98  P0002 L1  ;call the machining routine
N50 G28
N60 M30
;
;Injector pocket routine is here
N70 O0002  ;injector pocket routine
N80 M05
N90 X0.      Y0.
N100 M06 T03
N110 M03
N120 G43 H3
N130 S2000
N140 G04 P2.0
N150 G00 x20  Y-20  Z50
N155 M99
N160 G98 G83 X20  Y-20  Z-7.0 Q1.0   R3.0  F100.0
N170 G80
N180 G00 Z80.
;
N190 M05
N200 M06 T01  ;tool change to 9.53mm  end mill
N210 M03
N220 G43 H1
N230 S2500
N240 G04 P2.0
N250 X20    Y-20    F1000
N260 Z3
;
;Mill out the full depth of the 24mm body first.  Use 2mm go-round cuts
;make the 24mm body pocket in 2 steps, first to 15mm depth
N270 G01 Z-7.0  F30  ;plunge to 15mm depth
N280 G01 X22  F15  ;OD cut #1, of 5
N290 G03 X22  I-2.0  J0  ;go-round
N300 G01 X24       ;OD cut #1, of 5
N310 G03 X24  I-4.0  J0  ;go-round
N320 G01 X26    ;OD cut #2, of 5
N330 G03 X26  I-6.0  J0  ;go-round
N340 G01 X27.2    ;OD cut #3, of 5
N350 G03 X27.2  I-7.2  J0  ;go-round
N360 G03 X27.2  I-7.2  J0  F40 ;go-round for cleanup
N370 G01 X26  F500  ;back away from the wall
N380 G01 Z-3.8  ;Move up to the upper O-ring step
N390 G01 X28.2 F15
N400 G03 X28.2  I-8.2  J0  ;go-round
N410 G03 X28.2  I-8.2  J0  F50 ;go-round for cleanup
N420 G01 X20  F500  ;back to center
N430 G00 Z50.
N440 M99  ;end of routine
%

Lines N5 through N60 execute without doing anything.  Nothing at all.  The toolpath window of Mach3 shows nothing.  Why???  What's wrong here.  The code itself works fine.  Here is the same code with very minor differences that I've run on metal:

;( CNC File       :- Injector Hole Test ver A3 )
;( Produced       :- March 25, 2012 )
;( Post Processor :- M_Mach 3_inc 02_02_12 )
;( Part Number ID :- Injector complete pocket )
;( Tools Used )
;( T01  9.53mm End Mill)
;( T02  6.35mm End Mill)
;( T03  5.56 Twist Drill / Center Drill)
;
%
N10 G00 G21 G17 G90 G40 G49
N20 M05
N20 G52 X90 Y0  ;use this offset to find an open spot in the practice material
N30 X0.      Y0.
N40 M06 T03  ;Change to 5.56mm drill bit
N50 M03
N60 G43 H3
N70 S2000
N80 G04 P2.0
N90 G00 x20  Y-20  Z50
N110 G98 G83 X20  Y-20  Z-7.0 Q1.0   R3.0  F100.0  ;Peck drill with rapid in-feed
N120 G80
N130 G00 Z80.
;
N140 M05
N150 M06 T01  ;tool change to 9.53mm  end mill
N160 M03
N170 G43 H1  ;use the offset for this tool
N180 S2000
N190 G04 P2.0
N200 X20    Y-20    F1000
N210 Z3
;
;Mill out the full depth of the 24mm body first.  Use 2mm go-round cuts
N220 G01 Z-7.0  F30  ;plunge to 7mm depth
N230 G01 X22  F20  ;OD cut #1, of 5
N240 G03 X22  I-2.0  J0  ;go-round
N250 G01 X24       ;OD cut #1, of 5
N260 G03 X24  I-4.0  J0  ;go-round
N270 G01 X26    ;OD cut #2, of 5
N280 G03 X26  I-6.0  J0  ;go-round
N290 G01 X27.2    ;OD cut #3, of 5
N300 G03 X27.2  I-7.2  J0  ;go-round
N310 G03 X27.2  I-7.2  J0  F100 ;go-round for cleanup
N320 G01 X26  F500  ;back away from the wall
N330 G01 Z-3.8  ;Move up to the upper O-ring step
N340 G01 X28.3 F40
N350 G03 X28.3  I-8.3  J0  ;go-round
N360 G03 X28.3  I-8.3  J0  F100 ;go-round for cleanup
N370 G01 X20  F500  ;back to center
N380 G00 Z50.
;
N390 G28
N392 G52 X0 Y0
N400 M30
%

The code without the subroutine call works fine.  The subroutine call does not.  I've spent days on this.  What's going on???  BTW, it would be VERY VERY helpful to have a working example of the M98/M99 syntax in the manual. 

Thank you,
Steve

2
General Mach Discussion / LPT1 Parallel Port Problem Solved
« on: February 03, 2011, 03:37:24 PM »
I hope someone finds this information useful.  I spent the better part of a day with much foul language working on this problem:

We've been using a Sieg KX1 for making prototypes and the PC we use to drive it failed.  The repair required a new motherboard, which naturally has no parallel port.  A PCI card will work but there are 2 tasks involved.  You have to use a card with 5V outputs and Mach3 has to be informed what is the IO address of the new port.

The 5V requirement is simple.  Buy a card with 5V outputs.  You can also buy or build a buffer board, but a 5V card will cost less then $20.  How do you know if a card supports 5V?  You won't know until after you buy it.  I bought 3, one had a 5V output.  For example a StarTech PCI1P has 3.3V outputs but a PCI-2S1P has 5V outputs.  Here's a link to the product that works:

http://us.startech.com/product/PCI2S1P-2-Port-16C550-Serial-and-1-Port-EPPECP-Parallel-Slot-Saver-PCI-Card

PCI Parallel Port cards install differently than a legacy motherboard port.  You may recall setting the port parameters (Address, irq, type) of your motherboard.  The PCI cards don't work that way.  The StarTech cards, like many PCI cards, will install two parallel ports, one legacy port as LPT1 and one EPP/ECP port as LPT3.  When you install the card and load the drivers you will notice (in Device Manager, Start->Control Panel->System->Hardware Tab->Device Manager) that these two ports use different system resources but they are the same physical port.  In other words, Mach 3 will like one but not the other and you have to figure out which.  If you enable then disable the port you should hear the mill respond.  For my system the hardware responded to LPT3, which Windows Device Manager reported using address 0xE800..  In Mach3, click on Config, Ports and Pins, then look at the attahced screen shot.  Fill in the address you found in Device manager.  Note that Port#1 in Mach3 does NOT mean LPT1, it's simply the first logical port that Mach3 uses.  When you type in the address don't worry that Mach 3 adds a 0x in front of the number.  Address E800 and 0xE800 are the same thing, the "0x" just means that the address is in HEX format.  Go back into this config screen again to make sure the address was saved.

That's it.  It worked for me.  I hope it works for you.


Pages: 1