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 26, 2012, 04:40:18 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
General Mach Discussion
dispenser suckback script - incremental move in macro
Pages:
1
Go Down
« previous
next »
Author
Topic: dispenser suckback script - incremental move in macro (Read 265 times)
0 Members and 2 Guests are viewing this topic.
ASC
Active Member
Offline
Posts: 64
dispenser suckback script - incremental move in macro
«
on:
August 01, 2010, 02:02:09 PM »
Hey guys, doing my best at this VB programming thing but still quite new to it. I'm using my C-axis as a fluid dispenser which is mounted on a linear actuator to move it in and out of the work area. Currently, I have it set up as M802 to extend the actuator (output 2 in Mach) and M902 to retract it. On the retract command, M902, I want to add a few lines to incrementally step the dispenser back a set amount. Here is what my current script looks like:
'M902
'raises dispenser actuator
DeActivateSignal(Output2)
code("G91")
code(G01 C-.005 F50")
code("G90")
This script does work in testing, but I'm worried that the G91 command is going to affect the g-code I am running by switching it momentarily to incremental mode and then back to absolute. Is there a way to make the g91 only affect the c-axis, or a way to momentarily inhibit movement on the other 5 axes? It seems like there should be a really obvious solution here but I can't figure it out for the life of me!
Logged
Mr. Creosote
BR549
Active Member
Offline
Posts: 2,553
Re: dispenser suckback script - incremental move in macro
«
Reply #1 on:
August 01, 2010, 03:07:59 PM »
ASC, the way you are doing it IS the way it is done. Switching back and forth should have NO effect on accurary. You just have to make sure all your moves are correct.
The one thing you may want to consider is to add sleep() and while ismoving() statements to insure the macro thread stays in sync with itself.
'M902
'raises dispenser actuator
DeActivateSignal(Output2)
Sleep(10)
code"G91"
Sleep(20)
code"G01 C-.005 F50"
While Ismoving()
Sleep(100)
Wend
code"G90"
sleep(20)
«
Last Edit: August 01, 2010, 03:10:46 PM by BR549
»
Logged
ASC
Active Member
Offline
Posts: 64
Re: dispenser suckback script - incremental move in macro
«
Reply #2 on:
August 01, 2010, 03:17:18 PM »
thank you again! You've cured both of my big headaches today! If only I could email you a beer....
Logged
Mr. Creosote
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...