![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| CamSoft Products Discuss Camsoft PC based CNC controller products here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hello Camsoft Users; I have an unusual problem that I did not run into before today. I am able to turn on/off the mist coolant and the flood coolant from on screen buttons. Forthermore, you can turn on the mist coolant from the handheld pendent unit and by using M07 and M08 commands. To simplify code, I created a Macro to turn them off and handle the lights and on screen messages that needed to be addressed. Now the problem. If the [M9] macro runs during the drill cycle, the machine will halt and tell you that the axis have not reached their commanded positions. I did change the code so that it is everywhere I could think of and I do not get the error, but I am wondering if/why a drill Macro (or any other Macro) will be interrupted if another request is made to run a macro. the code is as follows: [[G81]] ' G81 \200=f 'CAPTURE FEEDRATE IF\775>0THENIF\525=1THEN GOTO :W DRILL ' Still in W-axis drill mode. ISTHERE R;\28;\29 IF\28>0THEN\30=\29 ISTHERE W;\500;\501 IF\500>0THEN\777=\501:GOTO :W DRILL ISTHERE Z;\400;\401 IF\400>0THEN\776=\401 \20=r COMMAND VS \3 DECELSTOP:RAPID x;y;;w COMMAND VS \3 DECELSTOP :RAPID ;;\20;w:SLEEP .1 DECELSTOP:GO x;y;\776;w:SLEEP .1 COMMAND VS \3 DECELSTOP IF\998=0THENz=\30:RAPID x;y;\30;w:SLEEP .1:EXIT IF\998=1THENz=\132:RAPID x;y;\132;w:SLEEP .1:EXIT :W DRILL \525=1 ' W-axis drill mode flag IF\500>0THEN\777=\501 \134=\133 COMMAND VS \3 DECELSTOP:RAPID x;y;;w COMMAND VS \3 DECELSTOP:RAPID ;;;r :SLEEP .1 DECELSTOP:GO x;y;;\777 :SLEEP .1 COMMAND VS \3 DECELSTOP IF\998=0THENRAPID x;y;;\30:w=\30:EXIT IF\998=1THENRAPID x;y;;\133:w=\133:EXIT [[M9]] 'coolant off BUTTON18 ;;;COOLANTOFF.BMP BUTTON14 ;;;MISTCOOLANTOFF.BMP:\340=1'mist coolant interlock #24=1:#103=0:#102=0:MESSAGE ALL COOLANT OFF \91=0 Thank you |
|
#2
| |||
| |||
| You're missing something Jim all we original saw was the word Hello.
__________________ (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) Last edited by camsoft; 04-01-2008 at 12:13 PM. |
|
#3
| ||||
| ||||
|
Well da. Trying to find the program error in event driven programming can drive you nuts. You got to have a way to quickly isolate what has happened right at the error and just before. The Logfile can be very useful but its just too much data to narrow your search quickly. I have found it very useful to have MESSAGE everywhere in the code to identify what's running when. Only turn it on when needed by using an on screen button. here' how I did it: '*********Mcodes for button8 'Set flag for extra messaging to screen \140=1 BUTTON8 IN; Full Messaging -----M31 'Clear extra messaging to screen \140=0 BUTTON8 OUT;No Messages -----M32 '*****PUT A BUTTON ON THE SCREEN [BUTTON8] VISIBLE=TRUE TOP= 1795 LEFT= 8935 HEIGHT=500 WIDTH=2000 FKEY= 0 CAPTION=Error Messaging MFUNC1ST=31 MFUNC2ND=32 BITMAP= '***typical example, put these EVERYWHERE IF \140=1 THEN MESSAGE . Estop.fil just ran '***note I found it helpful to begin all these messages with a . and three spaces to keep separate on the screen. Good luck in your quest. I just had a problem where I was losing "home" on my lathe. Turns out I had re-used a variable number in my air lube injection routine that only turns the motor off 4 timer.fil scans after a collet open/close command. I NEVER would have found this without the above trick. Karl |
|
#4
| |||
| |||
| Hi Karl T. What is puzzeling is I coppied the same exact code for the [M9] macro and placed it in the M7 code (turn on mist coolant) so that if it were the second push of any button ( on screen, hard button or M code) it would turn off. That works all day. The G81 macro will continue to work and you will not get an in position error. When I was using the [M9] macro, I went to diagnostics and pressed why am I not moving? Reply, axis have not reached final position. out of tolerance on axis 3. It is almost like it was washing the dishes, was asked to take out the garbage and then forgot what it was doing. When you use the M code, it looks like you are asking someone else to take the garbage out. Any thoughts would be appreciated. |
|
#5
| ||||
| ||||
| I'll put this under the title of "wierd ****". **** happens. If I were you, start over,find a different way to do it. For example, just put everything you need in an M code. get rid of macro. You've got a button calling an M code calling a macro. Worth a shot. No promise though. In general, I've had issues with on screen buttons. I find an operator button far more reliable. If you think about it you've bypassing a lot of stuff by using inputio. My machine just has a "coolant off" button. Works like a charm. There only the output#=0 and a couple of light commands. I've got a ton of inputs and inputio commands. Everything event driven. They fire all the time during motion without issue. Karl |
| Sponsored Links |
|
#6
| |||
| |||
| Amen Karl. That is what I ended up doing. There are no issues with the G81 macro. You can turn the coolant pump and the mist coolant on and off without any issues. I was just wondering why it would happen. It is a 3.33 GHz computer with 2 Gig of ram running Windows XP pro. No other programs are loaded so I feel confident that it is not for lack of computing power. |
![]() |
| 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 |
| Drill operation problem | nomodoh | CamBam | 1 | 07-27-2007 09:56 AM |
| protel pcb Drill file problem with mach2 ? | NASR1 | Mach Mill | 0 | 06-28-2007 02:22 PM |
| VF0E Macro Problem | stang5197 | Haas Mills | 1 | 06-14-2007 05:34 PM |
| Noob Drill Grid Pattern Macro Question | KOzOK | Fadal | 8 | 01-08-2007 09:11 AM |
| Problem with drill depth | Alan S | Post Processors for MC | 2 | 11-03-2005 02:23 AM |