Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
December 02, 2008, 04:11:35 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
Re: ATC VB script example for rotary changer...
Pages:
1
Go Down
« previous
next »
Author
Topic: Re: ATC VB script example for rotary changer... (Read 819 times)
0 Members and 1 Guest are viewing this topic.
BOB88
Active Member
Offline
Posts: 4
Re: ATC VB script example for rotary changer...
«
on:
June 08, 2008, 12:34:51 PM »
Hi Drew,
Your program has helped me a lot to learn about script with mach3. My turret has 8 positions, but no raise solenoid or index pins or BCD switches.
It is cycled one turret position by actuating a single air solenoid for about .55 seconds.
The turret is cycling fine by the following script in the file: M20.m1s located in the macros folder.
ActivateSignal(Output8) 'mapped to Port1 pin5, applies air to index cylinder
Code "G04 P.55"
While IsMoving()
Sleep 100
Wend
DeActivateSignal(Output8) 'turns off air to index solenoid which completes one index cycle.
So, any time I do M20 the turret advances and locks one position. Great so far.
Now, I need to come up with the number of cycles or moves needed to get to the desired next tool.
In the M6Start.m1s, I'd like to calculate the unsigned value of the (CurrentTool minus SelectedTool) which will give me the number of advances necessary to get to the next tool. Then I can call or execute M20 that number of times to get to the selected tool.
How would you do that? When you said M6 is not used in lathe but T0101, T0202,etc. did you mean that M06 does not appear in the G-Code program itself, but just the T-numbers and that MACH3 knows to look at the M6Start when it sees a T-number? (I noticed that you tested for M6)
Thank you for sharing your knowledge with newcomers to MACH.
BOB88
Logged
Ron Ginger
Active Member
Online
Posts: 266
Re: Re: ATC VB script example for rotary changer...
«
Reply #1 on:
June 08, 2008, 05:48:27 PM »
Here is the main part of my tool changer routine. This is a 6 position changer, but you could edit it for more.
tool=getcurrenttool()
'MsgBox ("current tool " & tool)
NewTool= getselectedtool()
'msgbox ("new tool " & NewTool)
if NewTool=tool then
exit sub
end if
if NewTool>tool then
steps=Newtool-tool
else
steps=6 - (tool-NewTool)
End If
If tool Mod 2 Then 'even number
code "G00 Z 2"
Else
code "G53 G00 X 0" 'move X to machine home 0
code "G00 z -2"
End If
'msgbox(" move steps " & steps)
for I=1 to steps
code "G91 G00 A72"
code "g00 A-12"
code "G90"
While IsMoving()
Wend
next I
The Mod 2 part handles the retract for tool change- the even number slots inmy changer are for boring tools, so I need to retract in Z before a change. The Odd number tools are turning tools, so I want to retract X first.
Logged
BOB88
Active Member
Offline
Posts: 4
Re: Re: ATC VB script example for rotary changer...
«
Reply #2 on:
June 12, 2008, 01:24:24 PM »
I need a way to tell Mach3 what the "currenttool" is at startup. In other words a way to ask the question "What is the current position of the turret" and be able to type in the number from 1-8. That will be the current tool at startup since, without BCD switches, there is no way to know where the turret is without asking.
Also, how do these programs deal with tool 00 which Mach allows as a legitimate tool number?
Thank you,
Bob
Logged
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.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****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
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...