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, 09:54:00 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
Just baffled by G54-56 Offsets
Pages:
1
Go Down
« previous
next »
Author
Topic: Just baffled by G54-56 Offsets (Read 275 times)
0 Members and 1 Guest are viewing this topic.
cjmerlin
Active Member
Offline
Posts: 180
Just baffled by G54-56 Offsets
«
on:
May 14, 2011, 10:52:01 AM »
Hi, I've been trying to write a macro to set my Z offsets to the same number whether I am using G54 through G59.
See Macro below. I have noticed that without the wait states Mach will not update the Dro's quickly enough and the Z Dro's are still different even with running the macro.
If I single step through the macro, it seems to work as I intended.
Is there another way to achieve the same thing with one command?
M900.m1s
(1.99 KB - downloaded 29 times.)
Logged
BR549
Active Member
Offline
Posts: 2,557
Re: Just baffled by G54-56 Offsets
«
Reply #1 on:
May 14, 2011, 04:59:44 PM »
OK to start with the use of Code"G4P2" does not really do anything inside of the macro. It is a Gcode pause not VB.
Use while is moving() or sleep
On some systems (computer) you have to add wait states in order for everything to have time to execute OR mach will skip over things as you have seen.
It is just a matter of getting the wait states correct for YOUR system and it will run.
IF you can step through the code and it functions then it is a matter of timing the VBcode to run correctly.
Just a thought, (;-) TP
Logged
ger21
Global Moderator
Offline
Posts: 2,619
Re: Just baffled by G54-56 Offsets
«
Reply #2 on:
May 14, 2011, 10:14:07 PM »
I do it like this:
CurrentOffset = GetOEMDRO(46) ' Get Current Coordinate system 1 = G54, 2 = G55, ....
If CurrentOffset = 1 Then
ZOffset=GetVar(5223)
ElseIf CurrentOffset = 2 Then
ZOffset=GetVar(5243)
ElseIf CurrentOffset = 3 Then
ZOffset=GetVar(5263)
ElseIf CurrentOffset = 4 Then
ZOffset=GetVar(5283)
ElseIf CurrentOffset = 5 Then
ZOffset=GetVar(5303)
ElseIf CurrentOffset = 6 Then
ZOffset=GetVar(5323)
End If
For X = 5223 To 5323 Step 20
SetVar(X, ZOffset)
Next X
Sleep(250)
Logged
Gerry
2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html
cjmerlin
Active Member
Offline
Posts: 180
Re: Just baffled by G54-56 Offsets
«
Reply #3 on:
May 15, 2011, 09:40:20 AM »
Thanks guys for the advice, As you can see in my macro I was getting desparate and willing to try anything.
On reflection it seems writing to the Dro's in turn and waiting for them to update is a slow way of doing things. I increased the sleep times to 450 and still had problems with some of the offsets not getting set correctly.
Thanks for the script Gerry, I'll give that a go. Looks very tidy.
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.
===> 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...