Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 28, 2012, 12:50:49 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
VB and the development of wizards
Wizard For Profiling Circle, With Lead-In Arc Function
Pages:
1
Go Down
« previous
next »
Author
Topic: Wizard For Profiling Circle, With Lead-In Arc Function (Read 1160 times)
0 Members and 2 Guests are viewing this topic.
sunmix
Active Member
Offline
Posts: 35
Wizard For Profiling Circle, With Lead-In Arc Function
«
on:
April 04, 2007, 11:44:28 AM »
Hi everyone, i'm facing this problem now,this is my 1st time writing a wizard and I've no idea what i'm lacking of. Don't know where to trace the mistake, as it really makes me confusing. This VB wizard does the profiling of a circle, with a arc lead-in function, for a plasma cutting system. I've done the lead-in, and plan to do the lead-out after i've solved this problem. Can someone help me out?
there are 3 inputs, a lead in arc radius, the circle diameter, and a kerf nozzle width.
Dim LeadInArcRad, XLeadInCenter, YLeadInCenter, StartArcAngle, IncArcAngle, EndArcAngle, CircleDiameter, XStartPoint, YStartPoint, XCircleCenter, YCircleCenter, CircleRad, KerfNoz, KerfTool, KerfExtraCompensation
DoOEM Button (169)
PI = 3.1415926535898
Rem Lead-In Arc Circle 90 Degree Variable Radius
LeadInArcRad = Abs(GetOEMDRO (1050))
XLeadInCenter = -1 * (LeadInArcRad + KerfTool + KerfExtraCompensation)
YLeadInCenter = CircleRad
StartArcAngle = (PI / 180) * 0
IncArcAngle = (PI / 180) * 90
EndArcAngle = StartArcAngle + IncArcAngle
Rem Circle 360 Degree Variable Diameter
CircleDiameter=GetOEMDRO (1051)
XStartPoint = -1 * (KerfTool + KerfExtraCompensation)
YStartPoint = CircleRad
XCircleCentre = LeadInArcRad + KerfTool + KerfExtraCompensation
YCircleCentre = 0
CircleRad = CircleDiameter / 2
Rem Nozzle Kerf Compensation
KerfNoz=GetOEMDRO (1052)
KerfTool= KerfNoz / 2
KerfExtraCompensation= 0.05
If LeadInArcRad = 0 Then
setTicker 20, "How big do you want the lead-in radius arc to be?"
Exit Sub
End If
If CircleDiameter = 0 Then
setTicker 20, "I think you have forgotten to fill in the Circle Diameter!"
Exit Sub
End If
If KerfNoz = 0 Then
setTicker 20, "Hmm, what's the kerf nozzle width?"
Exit Sub
End If
Rem ******************End of If Here And If There******************
StartX = Round ((LeadInArcRad + KerfTool)*(Cos (StartArcAngle)) , 4)
StartY = Round ((LeadInArcRad + KerfTool)*(Sin (StartArcAngle)) , 4)
EndX = Round ((LeadInArcRad + KerfTool)*(Cos (EndArcAngle)) , 4)
EndY = Round ((LeadInArcRad + KerfTool)*(Sin (EndArcAngle)) , 4)
If IncArcAngle > 0 Then
G2_3 = "G3"
Else
G2_3 = "G2"
End If
If GetIJMode() Then
ArcLeadInXCenterPOS= XLeadInCenter - (XLeadInCenter + StartX)
ArcLeadInYCenterPOS = YLeadInCenter - (YLeadInCenter + StartY)
Else
ArcLeadInXCenterPOS= XLeadInCenter
ArcLeadInYCenterPOS = YLeadInCenter
End If
OpenTeachFile "CutArc.tap"
If GetUserLED(1003) Then
Code "G20 (Inch)"
Else
Code "G21 (mm)"
End If
Code " G53 G90 G40 F3000 M04 "
Code " F25 "
Nc = 1
Counter = 1
Do
CODE "M03"
CODE " X" & XLeadInCenter + StartX & " Y" & YLeadInCenter + StartY
CODE g2_3 & " X" & XLeadInCenter + EndX & " Y" & YLeadInCenter + EndY & " I" & ArcLeadInXCenterPOS & " J" & ArcLeadInYCenterPOS
CODE g2_3 & " X" & XStartPoint & " Y" & YStartPoint & " I" & XCircleCenter & " J" & YCircleCenter
Nc=Nc+1
Code "M05"
Code "G00 Z20"
Code "G00 X0.0000 Y0.0000"
Code "M30"
CloseTeachFile
Call LoadTeachFile()
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Wizard For Profiling Circle, With Lead-In Arc Function
«
Reply #1 on:
April 04, 2007, 06:32:11 PM »
There is an errror in your code, see 3rd and 4th line down (copy of your code 1st then the correction below):
CODE "M03"
CODE " X" & XLeadInCenter + StartX & " Y" & YLeadInCenter + StartY
CODE g2_3 & " X" & XLeadInCenter + EndX & " Y" & YLeadInCenter + EndY & " I" & ArcLeadInXCenterPOS & " J" & ArcLeadInYCenterPOS
CODE g2_3 & " X" & XStartPoint & " Y" & YStartPoint & " I" & XCircleCenter & " J" & YCircleCenter
Nc=Nc+1
Corrections:
CODE "g" & g2_3 & " x" & XLeadInCenter + EndX & " Y" & YLeadInCenter + EndY & " I" & ArcLeadInXCenterPOS & " J" & ArcLeadInYCenterPOS
CODE "g" & g2_3 & " X" & XStartPoint & " Y" & YStartPoint & " I" & XCircleCenter & " J" & YCircleCenter
Nc=Nc+1
Possible Issues:
Where you have: g2_3 & " X" & XLeadInCenter + EndX 'It might be better to replace the "XLeadInCenter + EndX" with what they are = to as a singular variable.
Unless your Circle Wizard is a "Secreat project", post it up here with, what is what, and we can try and help you better, if we can see what it is your trying to do..........
Scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...