Hello Guest it is April 19, 2024, 04:19:23 AM

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 - Fleck

Pages: 1 2 »
1
Trying to come up with working code to find length of opposite side of triangle. Works on calculator just cant get code correct.

What I have that is not working:

 opposite = adjacent * (((Sin(angleOpposite) * Atn(X / Sqr(-X * X + 1) / (Sin(angleAdjacent)* Atn(X / Sqr(-X * X + 1)))

Any help is appreciated

2
 I am trying to write a boxing loop for Lathe type tool passes with a router to a A axis spindle.  I am used to a different scripter and would have used a While, Do, End While.
 I am reading the material and trying to figure this out with no real programming experience so I am sure its a mess. The Macro is either blowing through the code or infinite looping .

 Any info is appreciated.
 Also wondering, is declaring a As Double the same as declaring a Real number?

Dim Blanklength, Finishdiameter, Stock
Dim Roughfeed, Finishfeed
Dim Cutdepth
Dim Cutnumber
Dim XProgramlo,YProgramlo,ZProgramlo,AProgramlo
Dim XAbsolo, YAbsolo, ZAbsolo, AAbsolo
Dim Finishpass
Dim Retract
Dim IStock
Dim IFinishdiameter

Blanklength = GetUserDRO(1226)*-.1'get blank length input
Stock = GetUserDRO(1227)/2'get stock input
Finishdiameter = GetUserDRO(1229)/2'get blank diameter input
Roughfeed = GetUserDRO(818)'get Roughfeed length input
Finishfeed = GetUserDRO(818/2)'Get Finishfeed length Input
Cutnumber = GetUserDRO(1228)'get full cut depth
XProgramlo = GetDRO(83)'Current G54 X location
YProgramlo = GetDRO(84)'Current G54 Y location
ZProgramlo = GetDRO(85)'Current G54 Z location
AProgramlo = GetDRO(86)'Current G54 A location
XAbsolo = GetDRO(0)'Current G53 X location
YAbsolo = GetDRO(1)'Current G53 Y location
ZAbsolo = GetDRO(2)'Current G53 Z location
AAbsolo = GetDRO(3)'Current G53 A location
Cutdepth = SetUserDRO(1225,(Stock-Finishdiameter)/Cutnumber)
Finishpass = GetUserDRO(1230)'get finish pass depth
Retract = GetUserDRO(1231)'get retract distance
Cutdepth = GetUserDRO(1225)  
IStock = SetUserDRO(1232,(Stock-Finishdiameter))
 
N1:
Code "G90"
Code "M03"
While IsMoving ()
Wend
Code "G0 Y" & YProgramlo '& "X" & XProgramlo'Rapid to Program X and Y zero
Code "G0 Z" & Stock +.01'Rapid to tenth inch above rough stock  
Code "G52 Z" & Finishdiameter'Zero offset
While IsMoving ()
Wend


N2:
Do While IStock >= (0)
'*****
Code "G01Z" & Cutdepth & Roughfeed'Tool Entry
Code "G01Y" & Blanklength'Tool Pass
Code "G0Z" & Retract'Tool Retract
Code "G0 Y0"
IStock = GetUserDRO(1232)
IStock = SetUserDRO(1232,(IStock*1)-Cutdepth)
Loop
'*****

N3:
Code"G53 Z0"
Code "G52 Z0"
Code "M05"
Code "M30"      

3
Trying to learn A axis programming. I have just installed a second parallel  port built a G540 with power supply and activated A axis pins and ports. My motor is  200steps per rev.* 10microsteps per rev.*2 "for 2 to 1 gear ratio, 30 teeth headstock 15 teeth stepper"/360°= Steps per 11.1111 Motor Tuning

All seems to be working in MDI code input have not checked with indicator but 360° and 0° are 12:00 180° is 6:00 etc..., but when I run this code the "G01 A360.0 F150"  is over rotating by many times before continuing to next line.

 I have "use radius for feedrate", "A-rotations enabled" in Config/Toolpath, "A axis is angular", "Ang Short Rot on G0"Config/General Config, "Rotation Radius A.0010" Settings Alt-6

 Here is my troubled code.

G00G17G90G40G49G80
T1M06
G00G43Z0.700H1
S20000M03
G94
G00Y-0.187
G00Z0.500
G01Z0.389F75
A360.0F150
G01Y-1.437A-2666.667F150
G01A-2306.667F150
G00Z0.489
G00Y-0.187
G00A0.0
G01Z0.377F75
G01A360.0F150 Over rotates by multiple full revolutions
  
 Any info is appreciated



4
General Mach Discussion / 2 controllers, 2nd for 4th axis
« on: October 09, 2013, 02:42:43 AM »
I just upgraded my Lathe and have a extra controller. I have rewired the DB 25 connector to match Mach pin configuration to controller. I have moved the new controller "A axis" to Port 1 a known working port.  Moved my servos to new PCI parallel port 2. Router works well but I am not having success with the "A axis" stepper motor.  When I measure DC Voltage on step/Dir pin to pin 14 I get 4 V in one direction and 0 in the other.  Motor makes an initial step every now and then when jogged but stops.
 Thanks in advance for any advice.
                                    Mike

5
General Mach Discussion / G92 for a drifting offset?
« on: October 05, 2013, 04:02:55 AM »
 I am working on a macro in which I can measure my part, input the measurement into a X and Z user defined variable screen box and have the offsets calculated relative G54-59. Right now the "off offset amount" is applied to a G52 X#X Z#Z. This macro works great the first run, but stays at that offset relative to the original offset and my variables no longer work as planned. I would like the new offset to be 0 relative to Machine 0 every time a part drifts/lost step and the off part measurements are entered into the cpu. This way all the guy working with me has to do is measure the part, input measurements(only if off) and load the lathe. Would a G92 be a good approach. Kind of a drifting/resetting offset.
                                                               Any advice is appreciated
                                                                           Mike

6
VB and the development of wizards / Lathe tool offset macro
« on: September 29, 2013, 03:37:43 PM »
Wondering if anyone has setup a lathe X/Z Macro for lathe cutters using machine zero and an isolated piece of known stock wired to a switch. Maybe on an movable arm or a removable magnet with a repeatable position. Thinking it would need to be manually jogged due to no spring load but could speed things up.

7
I have noticed that I am loosing position on my Z axis with my gantry router. I have a stepper equipped lathe (different controller) that I have set the feeds/speeds up on by raising the feedrate as high as possible then slowly raising the start/stop and measuring movement until steps are lost at this point using 70% as a workable setting, then doing the same with max feedrate, direction change etc...

Would this "go-no-go" approach work with servos as they are closed loop? If it would what would the proper order of operations be to max out motor to the point of position loss and then back off in Mach3.
                         Thanks,
                              Mike

8
General Mach Discussion / Post mosification for M00 Block Delete
« on: April 23, 2013, 02:19:05 AM »
Hi, I have added a tool change macro in Mach and am trying to block delete the M00's in the code as I am using the "Stop spindle wait for cycle start" in Mach.
 In my BC post  "Use block delete for stop codes (M00)? Y " is what I am  working with.  This is placing the "/" after the block line numbers causing Mach to reject the code.
 Is there something else I need to add to the (M00) in the post text?  
 Here is a bit of the code, Also not sure why but this part of the code is topping my speed out at 200ipm with a watchdog warning, even though cam is set f25. M00 is last line
                                                                            Thanks for any help.
           BEGIN PREDATOR NC HEADER)
(MACH_FILE=HAAS - 3XVMILL.MCH)
(MTOOL T1 S4 D.25 H2. A90. C0. DIAM_OFFSET 1 = .125)
(MTOOL T5 S4 D.25 H5. A118. C0. DIAM_OFFSET 5 = .125)
(MTOOL T2 S1 D.75 H5. A0. C0. DIAM_OFFSET 2 = .375)
(MTOOL T6 S2 D1. H2.65 A0. C.5 DIAM_OFFSET 6 = .5)
(MTOOL T11 S2 D.5 H4. A0. C.25 DIAM_OFFSET 11 = .25)
(SBOX X-.2495 Y-17.1291 Z-1.7503 L13.5 W18. H1.75)
(END PREDATOR NC HEADER)

%
O100
(PROGRAM NUMBER)
(PROGRAM NAME - BACK INSIDE ROUTE BOTTLE.NC)
(POST -  MACH 3 MILL NO ATC)
(DATE - MON. 04/22/2013)
(TIME - 10:06PM)

N01 G20 G40 G49 G54 G80 G90 G91.1
/N02 G53 Z0.

(JOB 1  HOLE  RANDOM POINT PATTERN)
(FEATURE DRILL HOLE)

/N03 T1 M6
N04 S9167 M03
N05 G00 G90 G54 X7.3511 Y-6.5342
/N06 G43 H1 Z.0997 M08
N07 G81 G98 X7.3511 Y-6.5342 Z-.0803 R.0997 F25.
N08 X5.6493 Y-14.4987
N09 G80
N10 G80
N11 M09
N12 M05
/N13 G53 Z0.
/N14 G53 X0. Y0.
N15/M00

(JOB 1  HOLE  RANDOM POINT PATTERN)
(FEATURE DRILL HOLE)

N16 T5 M6
N17 S1191 M03
N18 G00 G90 G54 X7.3511 Y-6.5342
N19 G43 H5 Z.0997
N20 G81 G98 X7.3511 Y-6.5342 Z-.2503 R.0997 F25.
N21 X5.6493 Y-14.4987
N22 G80
N23 G80
N24 M05
/N25 G53 Z0.
/N26 G53 X0. Y0.
N27/M00
                  

  
  

 

9
General Mach Discussion / M6 Macro working when I romove gcode line #s
« on: April 21, 2013, 08:48:14 PM »
Hi is there some text I can insert into my tool-change macro to account for the line #s my CAM has in its code. My tool change works if I delete them.
 Thanks

10
 I really want to do this. I would assume that I use pin 13, as that is set for "tool Probe" in Mach. This is new to me. I have looked at the breakout board and cannot figure out a trace to a pad or hookup for pin 13. There is a rather nice empty 5 lead connector that when the parallel port is engaged the far pin has continuity to ground for pins 14-21. My plan is a simple wire from pin to a isolated ground plate.  Any information is appreciated.

Pages: 1 2 »