Hello Guest it is August 15, 2020, 04:34:55 AM

Author Topic: New program for pipe coping  (Read 13992 times)

0 Members and 1 Guest are viewing this topic.

Re: New program for pipe coping
« Reply #10 on: January 08, 2011, 03:21:26 PM »
TP, You make me smile. I like it!

Tony
Re: New program for pipe coping
« Reply #11 on: January 08, 2011, 04:10:40 PM »
TP
with your roller drive idea you could use my X/Y linear output. If you don't maintain good traction you get a botched job. I can't seem to find the "Mach tool box " you mentioned.

DaOne, "I could right a wizard to spit out common angles ". How do ya write the wizard? That's what I need to find out.

Tony

Offline DaOne

*
  •  236 236
    • View Profile
Re: New program for pipe coping
« Reply #12 on: January 08, 2011, 04:23:07 PM »
Tony,

I wizard is done the same way as a screenset. I use Mach Screen. It can be found here...

http://www.kd-dietz.com/klausphp/images/eng/machscreen/beschreibung/machscreen_doc.htm


It will require VB codding ability and a bit of knowledge of how mach works with VB.


This is the Mach Toolbox section....


http://www.machsupport.com/forum/index.php/board,75.0.html

Offline DaOne

*
  •  236 236
    • View Profile
Re: New program for pipe coping
« Reply #13 on: January 08, 2011, 04:27:01 PM »
I never saw TPs post...

http://www.machsupport.com/forum/index.php/topic,16411.0.html

If this works correctly I can build a front end to build it into a wizard form. Is this working correctly?

Offline BR549

*
  •  6,932 6,932
    • View Profile
Re: New program for pipe coping
« Reply #14 on: January 08, 2011, 05:53:11 PM »
The things you have to do is

Enable A axis rotations in tool path
Rotate as Y axis
Set the Feedrate to radius in settings to match the radius of the tube

The rest seems to work correctly here.   Use it if you can, throw rocks at it if you can't(;-)

(;-) TP

Offline DaOne

*
  •  236 236
    • View Profile
Re: New program for pipe coping
« Reply #15 on: January 08, 2011, 07:16:55 PM »
Maybe someone can take a look at this code...

Code: [Select]
Sub Main()

'(CNC A axis Plasma TUBE Coping routine)
'(Math derivative by Dan Hopper Copyright 2006)

'WIZARD BY WES TREIHAFT

CutTubeD = GetOEMDRO (1006)
UncutTubeD = GetOEMDRO (1016)
TubeThickness = GetOEMDRO (1012)
JointANGLE = GetOEMDRO (1017)
ASTEPDEG = GetOEMDRO (1018)

RO = CutTubeD / 2     
RU = UncutTubeD / 2     
RI = RO - TubeThickness
AF = JointANGLE           
ID = CutTubeD - TubeThickness * 2                   
ASTEPDEG = 2             


SetTicker 20, ""





OpenTeachFile "PIPENOTCHER.tap"
 
Code "%"
Code "G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94"
Code "G0 A0.000 x0.000 Z1.000 F500"
Code "Z0.0"
Code "M98 P01 L180"
Code "G0  A0.0 X0.0 Z1.0"
Code "M30"
Code "o01"
Code "G1  A" & ASTEPDEG & " X" & (Sqr (RU * 2 - ((RI * Sin (ID)) *2)) /  Sin(AF) -  Tan (90-AF) * RI * Cos(ID))
ID =(ID+2)
ASTEPDEG =(ASTEPDEG +2)
Code "M99"
Code "%"

CloseTeachFile

Call LoadTeachFile()
End Sub

Main


Here is what I am converting...

Code: [Select]
(CNC A axis Plasma TUBE Coping routine)
(Math derivative by Dan Hopper Copyright 2006)
#100= 1.250       (CutTube Diameter)
#101= 1.250       (Uncut Tube Diameter)
#103= .095         ( Tube Thickness )
#104= 45             (Joint ANGLE)
#200 = [#100 / 2]         (RO)
#201 = [#101 / 2]         (RU)
#202 = [#200 - #103]  (RI)
#203 = #104                (AF)
#204 = 0                       (ID)
#300= 2                        (A step in deg)
G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94
G0 A0.000 x0.000 Z1.000 F500
Z0.000
M98 P01 L180
G0  A0.000 X0.000 Z1.000
M30
o01
G1  A#300 X  [sqrt [#201 **2 - [ [#202 * sin [#204]] **2]] /  sin[#203] -  tan [90-#203] * #202 * cos[#204]]
#204=[#204+2]
#300=[#300+2]
m99
%

I don't understand the "**"

 I am getting :cannot divide by zero when it comes to the line with the math.

Offline BR549

*
  •  6,932 6,932
    • View Profile
Re: New program for pipe coping
« Reply #16 on: January 08, 2011, 07:22:32 PM »
Squared      ^2     the Gcode version is **2

Offline DaOne

*
  •  236 236
    • View Profile
Re: New program for pipe coping
« Reply #17 on: January 08, 2011, 07:27:15 PM »
makes sense :)

Offline BR549

*
  •  6,932 6,932
    • View Profile
Re: New program for pipe coping
« Reply #18 on: January 08, 2011, 07:32:20 PM »
IF you have not filled the variables FIRST you will get a divide by zero (;-) Once the varialbe are loaded then it will run. The same thing happens in Gcode(;-)

(;-) TP

Offline DaOne

*
  •  236 236
    • View Profile
Re: New program for pipe coping
« Reply #19 on: January 08, 2011, 07:34:50 PM »
Variables are filled... something must be wrong still getting divide by 0