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 27, 2012, 05:16:31 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
Need help with Macro A-axis.
Pages:
1
Go Down
« previous
next »
Author
Topic: Need help with Macro A-axis. (Read 419 times)
0 Members and 2 Guests are viewing this topic.
Oldraven
Active Member
Offline
Posts: 24
Need help with Macro A-axis.
«
on:
March 04, 2011, 08:38:27 AM »
I am wrestling with the VB language to make a macro for turning a stepper on the A-axis.
Complete newbie to Visual Basic.
There is an optical sensor on the tool changer axis, one pulse per revolution.
I want first to home the tools to this optical pulse.
This is what I have;
'M6start.own
'Input is an optical sensor for homing the ATC.
'Get OEMLED ATC-Home. Check if ATC opto is lit.
'One pulse as a home reference generated by Emco5cnc ATC.
While GetOEMLED(821) = False
Call Rotate_1
Wend
Private Sub Rotate_1()
Code "G91"
Code "G00 A259"
GetOEMLED(821)
Code "G00 A-10"
Code "G90"
End Sub
any ideas please.
Jos
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Need help with Macro A-axis.
«
Reply #1 on:
March 07, 2011, 08:06:58 AM »
ah, ok.......
I am ASSUMING..... that you want to "Home" the A ONCE per user session? It would be best to use Machs Native homing routines.
in which case you don't need any macro, just pipe your home switch to mach3.
on the other hand, if your doing this for each time you call the "A" axis before going to find the tool, you can again use a Hybrid version of the Homing routine.
Note you will need to bring in the homing input inside of Ports and Pins and set it's port and pin number to be your A axis home.
'M6Start.m1s
DoOEMButton(1025) 'This will Re-Ref (or Ref), you A axis only.
Code "G1 A-10 F6" 'If you need to move some distance, after your homing to "line up" your first slot, then put in then change this amount to what you need.
While IsMoving() 'Old school wait till it finishes moving.
Wend
DoOEMButton(1011) 'If you want to "Zero" your A axis at the main tool slot, so that from this point on, you can have your the rest of your ATC code move to
'tool slots based on Tool Slot 1, being your A=0 degrees.
'The rest of your ATC code for moving to new positions here.
'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/
Oldraven
Active Member
Offline
Posts: 24
Re: Need help with Macro A-axis.
«
Reply #2 on:
March 07, 2011, 10:40:10 AM »
Thanks Scott,
I will give it a try.
What I wanted to do is first of all Home the A-axis (ATC optical pulse)
then on call from the G-code , M6 T0404 for instance, select the tool called for.
I run into different problems;
A-axis is Angular > set
Rot 360 rollover > set
A Home input 13 low active.
After homing I want to turn the A-axis 60 degrees ( 6 tool positions)
The ATC turns alright but sometimes CW and sometimes CCW.
Sometimes 60 degrees but mostly turns a few times around.
Even the VB script editor plays up, stepping through a macro if OK, running it gives some errors even to the point that the system hangs up.
It is hard to get control,
thanks,
Jos
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Need help with Macro A-axis.
«
Reply #3 on:
March 09, 2011, 08:40:40 AM »
Here look at this Rotary ATC example code I posted a while back, it can help you get started...
http://www.machsupport.com/forum/index.php/topic,4191.0.html
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...