Hello Guest it is February 25, 2020, 04:33:39 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.

### Messages - Fleck

Pages: 1 2 3 4 »
1
##### VB and the development of wizards / Re: converting sine function, radians to degrees/solving triangle
« on: August 28, 2015, 02:03:56 AM »
correction

opposite = adjacent * (((Sin(angleOpposite) *180 / (4 * Atn(1) / (Sin(angleAdjacent)* 180 / (4 * Atn(1))))

2
##### VB and the development of wizards / converting sine function, radians to degrees/solving triangle
« on: August 28, 2015, 12:37:15 AM »
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

3
##### VB and the development of wizards / Re: Trouble getting out of a conditional loop
« on: June 27, 2014, 04:51:53 PM »
this seems to work well.

N2:
'*****
Degrees = Degreesperloop
Degreesperloop = (360 / Degreesperloop)
Dim Countdown
Dim i,j

For i = 1 To  Degreesperloop

Degreeincrement = Degrees + Degreeincrement 'get degree input
Code "G01 A" & Degreeincrement & "F500"

For j = 1 To Cutnumber
IStock = Cutdepth-IStock
IStock = IStock * -1
Call SetUserDRO(1232,IStock)
IStock = GetUserDRO(1232)
While IsMoving ()
Wend

YEndcorrect = IStock - Partoff
Code "G01 Y" & Leadin &"F" & CutEngageFeed 'Tool Entry
Code "Y0" & "Z" & IStock
Code "G01 Y" & Blanklength & "Z" & YEndcorrect &"F" & Roughfeed'Tool Pass
Code "G0 Y" & LeadIn & "Z" & GetUserDRO(1232) + Retract'Tool Retract

While IsMoving ()
Wend

Next j

IStock = (Stock-Finishdiameter)+Finishpass

While IsMoving ()
Wend

Next i

While IsMoving ()
Wend

4
##### VB and the development of wizards / Trouble getting out of a conditional loop
« on: June 23, 2014, 04:02:59 PM »
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"

5
##### General Mach Discussion / Re: Mach3 Sherline Rotary Magic Number
« on: June 21, 2014, 04:21:53 PM »
I may be wrong but I believe steps per for angular is. Steps*microsteps*Gear Ratio/360

6
##### General Mach Discussion / Re: A axis continually rotates during program but not with mdi commands
« on: June 20, 2014, 02:00:37 PM »
OK everything is doing what it should. This is cumulative build up of units/degrees. So motor needs to rotate from G01A-2306.667F150 to G01A360.0F150. I could enable Rot 360 Rollover and not ever go past 360° but then the code does not work.

I am trying to rough simple blanks for a second op. lathe with multiple passes. Is there a good way to code this with angular settings?

Thanks

7
##### General Mach Discussion / A axis continually rotates during program but not with mdi commands
« on: June 20, 2014, 01:12:38 PM »
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

8
##### General Mach Discussion / Re: New people welcome !! Come in here and introduce your self!
« on: June 20, 2014, 12:23:52 PM »
Hi my name is Mike I am from Alaska
I have been lurking on and off since 2010. This site has been a boon. I am working with a Sherline lathe, K2 gantry router with a 4th axis I just made, I am trying to figure it out and a OmniTurn GT75. I make guitar parts and guitars.

9
##### 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.