![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I want my oil pump to come on when my spindle does (but for now wish to retain independant control so i can run the oilpump without the spindle should I chose) I thought I could to this quite easily by adding 'enableoutout whatever' to the M3 and M4 macros however this stops them working at all, presumably because they are making a function call rather than running code directly. So my question is , how can my make my lube pump output enable when the spindle is enabled in either direction and disable when the spindle is disabled without hardwiring it to the same physical output pin?
__________________ Dom http://www.ukrobotics.com/projects |
|
#2
| ||||
| ||||
| Use the macropump. Just check when the spindle outputs are active, and turn on your pump. I just checked, and I can get coolant to come on by modifying the M3macro to DoSpinCW() Code"M7" Maybe if you create a new macro to turn on your oil and call that macro. Use, say, M777 and change M3 to: DoSpinCW() Code"M777" It should work. What does your code look like?
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| ||||
| ||||
| Did you hit "Enter" after that line? DoSpinCW() ActivateSignal(Output3) worked for me?? If you don't type "Enter" after the last line, Mach won't read it.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| ||||
| ||||
| You are using M3 to turn on the spindle, and not just clicking on a "spindle on" button? Because it'll only work when an actual M3 is called.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
| Sponsored Links |
|
#6
| |||
| |||
| Yes I was. I actually got an error message saying something about an invalid command or something. So it was running my code just not liking it. I had each instruction on a separate line but whether I explicitly pressed enter I cant remember. I'll have anohter play tomorrow and see what I find.
__________________ Dom http://www.ukrobotics.com/projects |
|
#7
| ||||
| ||||
| Do this, it will make your life easier........ you can do it in Brians, or Macropump, example for each listed. Brian: Open up "Brain Editor" put this in your brain: OemLED(11)->NoOp->OUTPUT(2) Save as, pumpbrain, goto brain control, reload all brians, find yournew one, enable it, and your up. MacroPump: if GetOEMLED(11) then 'this LED is on anytime the spindle is running Cw/ccw. ActivateSignal(OUTPUT2) else DeActivateSignal(OUTPUT2) end if ///////// in both of the above examples you dont have to modify your M3 or M4 or M5 at all. scott
__________________ Commercial Mach3: Screens, Wizards, Plugins, Brains,PLCs, Macros, ATC's, machine design/build, retrofit, EMC2, Prototyping. http://sites.google.com/site/volunteerfablab/ |
|
#8
| |||
| |||
| Thanks for all the different suggestions. I think ger21 hit the nail on the head with the pressing enter comment. I tried editing m3/m4/m5 again and made sure I pressed enter after each line and all of a sudden it worked. Amazing how so often its the simplest things which cause the biggest fustrations.
__________________ Dom http://www.ukrobotics.com/projects |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VB Scripting 101 | UKRobotics | Screen Layouts, Post Processors & Misc | 12 | 05-18-2009 06:04 AM |
| Need Help with Basics of Macros | johnpiero | G-Code Programing | 6 | 06-24-2008 06:36 PM |
| Scripting reference... | kiwichris | NCPlot G-Code editor / backplotter | 5 | 11-15-2007 03:36 PM |
| modify drill macros | Karl_T | CamSoft Products | 2 | 11-18-2005 10:10 AM |
| Scripting | Klox | BobCad-Cam | 29 | 10-02-2003 10:11 PM |