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, 04:56:53 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
M03 macro and changing pulleys
Pages:
1
2
3
4
5
»
Go Down
« previous
next »
Author
Topic: M03 macro and changing pulleys (Read 2007 times)
0 Members and 1 Guest are viewing this topic.
Aeroshade
Active Member
Offline
Posts: 138
M03 macro and changing pulleys
«
on:
March 01, 2011, 12:30:46 PM »
I'm having a problem getting my M3 macro to change pulleys for me. My machine has a high gear and low gear that is changed by outputs.
I have tried the "SetOemDRO(56,1)" to change the pulley and "SetPulley(1)", neither seem to work. When I issue an M3 and I check the "Settings" tab and I see that "Spindle Pulley" does not change. I also get the error "Too Fast for Pulley..Using Max.".
I have my pulleys set up like this:
Pulley 1 = 0min. 910 max.
Pulley 2 = 911min. 5000max.
This is what I have, maybe someone can tell me where I'm going wrong.
Spin = GetRPM()
If Spin < 911 Then
SetOemDRO(56,1)
Call LowGear
End If
If Spin > 910 Then
SetOemDRO(56,2)
Call HighGear
End If
Sub LowGear
ActivateSignal(OUTPUT8)'Low Gear (OUTPUT)
Sleep (50)
Do Until IsActive(OEMTRIG2)'Low Gear Switch (INPUT)
Loop
If IsActive(OEMTRIG2) Then
Call SpinSpindle
End If
End Sub
Sub HighGear
ActivateSignal(OUTPUT7)'High Gear (OUTPUT)
Sleep (50)
Do Until IsActive(OEMTRIG1)'High Gear Switch (INPUT)
Loop
If IsActive(OEMTRIG1) Then
Call SpinSpindle
End If
End Sub
Sub SpinSpindle
DoSpinCW()
End Sub
Exit Sub
Any help would be great
Thanks,
Aero
Logged
Hood
Active Member
Online
Posts: 17,366
Carnoustie, Scotland
Re: M03 macro and changing pulleys
«
Reply #1 on:
March 01, 2011, 01:44:06 PM »
Try with
If GetRPM<911
Hood
Logged
Aeroshade
Active Member
Offline
Posts: 138
Re: M03 macro and changing pulleys
«
Reply #2 on:
March 01, 2011, 02:01:37 PM »
Quote from: Hood on March 01, 2011, 01:44:06 PM
Try with
If GetRPM<911
Hood
Still not getting the pulley to change. Is there a setting some where that needs to be set for auto pulley select?
Thanks,
Aero
Logged
Hood
Active Member
Online
Posts: 17,366
Carnoustie, Scotland
Re: M03 macro and changing pulleys
«
Reply #3 on:
March 01, 2011, 02:15:30 PM »
Not that I know of and seems to work here when I try to set the pulley, didnt have the rest of your VB though.
Try putting the pulley change in the spindlespeed.m1s
If you want to attach your xml I will try with that and see if I can find where its going wrong
Hood
Logged
Hood
Active Member
Online
Posts: 17,366
Carnoustie, Scotland
Re: M03 macro and changing pulleys
«
Reply #4 on:
March 01, 2011, 02:26:26 PM »
Just tried here with your code in the M3 and its fine so must be something in your xml.
Hood
Logged
Aeroshade
Active Member
Offline
Posts: 138
Re: M03 macro and changing pulleys
«
Reply #5 on:
March 01, 2011, 02:28:58 PM »
OK, so I used M999 to test something. I put this in M999:
SetOemDRO(56,1)
I saved it then ran it in MDI. It changed my "Spindle Pulley" under the "Settings" tab to 1. So I changed M999 to this:
SetOemDRO(56,2)
I saved it then ran it in MDI and it changed the "Spindle Pulley" under the "Settings" tab to 2. I can't see why it works fine with the M999 but not in my M3.
In my spindlespeed.m1s I only have this:
rpm = GetRPM() SetSpinSpeed( rpm )
I attached my .xml file.
Thanks for the help
Aero
A2100.xml
(102.62 KB - downloaded 35 times.)
Logged
Hood
Active Member
Online
Posts: 17,366
Carnoustie, Scotland
Re: M03 macro and changing pulleys
«
Reply #6 on:
March 01, 2011, 02:35:27 PM »
Ok working fine here with your xml.
One thing is I think the spindlespeed macros should be on two lines, ie
rpm = GetRPM()
SetSpinSpeed( rpm )
but not sure how that would make a difference, definitely worth trying though.
Hood
Logged
Aeroshade
Active Member
Offline
Posts: 138
Re: M03 macro and changing pulleys
«
Reply #7 on:
March 01, 2011, 04:09:19 PM »
Quote from: Hood on March 01, 2011, 02:35:27 PM
Ok working fine here with your xml.
One thing is I think the spindlespeed macros should be on two lines, ie
rpm = GetRPM()
SetSpinSpeed( rpm )
but not sure how that would make a difference, definitely worth trying though.
Hood
I tired that, no change. This is really strange. Is there anyway to link to a different Mcode from a VB script?
Thanks,
Aero
Logged
Hood
Active Member
Online
Posts: 17,366
Carnoustie, Scotland
Re: M03 macro and changing pulleys
«
Reply #8 on:
March 01, 2011, 04:16:14 PM »
I am crap at VB so not the best to advise on that but I think you have to be careful calling another macro from a macro.
Have you definitely got the macro named correctly, ie m3.m1s and placed in the correct folder?
I suppose if your output switches you must but not sure if you said whether it does or not?
Hood
Logged
Aeroshade
Active Member
Offline
Posts: 138
Re: M03 macro and changing pulleys
«
Reply #9 on:
March 01, 2011, 04:31:40 PM »
Yes, if I manually change the pulley I can see that the relays for the gear change are working. It's just this darn SetOemDRO thing thats holding me back
Aero
Logged
Pages:
1
2
3
4
5
»
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...