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, 07:23:29 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
Turn off soft limits in macro.....
Pages:
1
Go Down
« previous
next »
Author
Topic: Turn off soft limits in macro..... (Read 470 times)
0 Members and 2 Guests are viewing this topic.
jevs
Active Member
Offline
Posts: 31
Turn off soft limits in macro.....
«
on:
April 03, 2011, 08:06:03 PM »
I have been fighting VB for hours.
How can I tell it to turn off the softlimits if they are on?
I am working on a tool change macro that has to move the Z axis out of it's soft limits.
DoOEMButton(119) will toggle it, but that does me no good if the macro executes while the softlimits happen to be off. If that happens then it just turns the soft limits back on and gives you a reset during the macro because you are out of soft limit area.
I need it to check if soft limits are on and then toggle them to off, but if they are already off do nothing
I have tried this:
SoftLimit = GetOEMLED(23)
If SoftLimit = 1 Then DoOEMButton(119)
It doesn't work
I have tried this:
If GetOEMLED(23) = 1 Then DoOEMButton(119)
That doesn't work either.
P.S. why in the heck does the window to type in a message always bounce up so you can't see what your typing on this stupid thing!
Logged
jevs
Active Member
Offline
Posts: 31
Re: Turn off soft limits in macro.....
«
Reply #1 on:
April 03, 2011, 08:08:46 PM »
Oh if someone has a simple command to just turn soft limits off, that would be great also, but I cant find anything but toggle, which is lame.
Logged
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Turn off soft limits in macro.....
«
Reply #2 on:
April 03, 2011, 08:23:57 PM »
Try:
If GetOEMled (23) Then
DoOEMButton (119)
End If
Works here,
Russ
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Turn off soft limits in macro.....
«
Reply #3 on:
April 03, 2011, 09:00:01 PM »
Quote from: jevs on April 03, 2011, 08:06:03 PM
............... has to move the Z axis out of it's soft limits.
Why do you not have the Soft Limits set up to include the entire range of the available Z travel ?
On mine, anything out of the Soft Limits will hit a Limit or crash into a hard stop.
Just curious,
Russ
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
jevs
Active Member
Offline
Posts: 31
Re: Turn off soft limits in macro.....
«
Reply #4 on:
April 03, 2011, 09:17:26 PM »
If GetOEMled (23) Then
DoOEMButton (119)
End If
This seems to work, but how come no variable? It just assumes IF "on" Then? I guess if wanting to tell if it is off then you would do something like this-IF NOT GetOEMLED(23) Ten.......?
As for getting out of the softlimits......I don't want to be able to jog out of the "machinable" area when I am manually jogging the machine. So my softlimit is set at the home switch of Z which happens to be in the middle somewhere. Above this home switch tool change occurs. See the video here for better understanding. This was just a manual jog to show a tool change. I have the macro working now, I just have to get it counting the tools next and keeping track of which one it is on.
http://www.youtube.com/watch?v=W-0q5uM8jbU
Logged
jevs
Active Member
Offline
Posts: 31
Re: Turn off soft limits in macro.....
«
Reply #5 on:
April 03, 2011, 09:19:13 PM »
Oh and there is a limit switch at the top of the tool change area and at the bottom of the z that are the hard limits in series tied to the Z limit input. So, it is still safe......
Logged
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Turn off soft limits in macro.....
«
Reply #6 on:
April 03, 2011, 09:33:56 PM »
Don't know much about VB, just what I've seen in examples from others.
What you mention would probably work.
Good luck with the rest of it, plenty of examples around the forum for the tool change.
Russ
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
AndrewM
Support Tech
Administrator
Offline
Posts: 185
Re: Turn off soft limits in macro.....
«
Reply #7 on:
April 06, 2011, 12:49:15 PM »
I'm still learning VB but I pulled this out of the script I use to do my homing, dont know if it will help but...
If CBool(GetOEMLED(MachSoftLimitsONLED)) Then
DoOEMButton(MachSoftlimitsToggle) 'Turns Soft Limits OFF(or Off)
End If
Logged
www.machsupport.com
www.newfangledsolutions.com
jevs
Active Member
Offline
Posts: 31
Re: Turn off soft limits in macro.....
«
Reply #8 on:
April 06, 2011, 01:28:14 PM »
Thanks, I got my tool changer macro done, the previous posters method worked fine. You can see the code here if you want:
http://www.machsupport.com/forum/index.php/topic,18069.0.html
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...