Hello Guest it is April 19, 2024, 01:48:07 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jestah

Pages: « 1 2 3 4 5 »
11

Hi guys,

I have found a strange issue I can't seem to make headway on by my self. When it is time for a tool change I call an M5 to stop the spindle but have found that this call is turning off my dust extractor output (M8 – not really coolant I know but seemed like a good idea at the time of setting up the cnc )

I have tried the following:

dust extractor to be activated by M8/M9 on output number 1 - when the program hits a M5 call the dust extractor output turns off after the dwell
dust extractor to be activated by M888/M999 (basic output on and off scripts)  and output number 1 - when the program hits a M5 call the dust extractor output turns off after the dwell
dust extractor to be activated by M888/M999 (basic output on and off scripts)  and output number 20 – This works as expected and stays on after an M5 call.

The last option is my back up solution but I am interested seeing if I can get M8 and M9 to work.

I have looked at the M5 macro and it is just a stopspin call, has mach3 got some built in coolant off with tool spin down feature?

I have also attached my XML file as I still cannot get mach3 to ignore my M codes while simulating. I have the box in general config ticked but still my dust hood and extractors outputs fire during simulation ( I have made custom vb buttons to turn my control offline to stop this issue but feel this is a poor long term solution)




Best Regards
Krishna Khatri-Chetri | CNC Sales Support
W & R Jack Ltd |  19 Allens Road East Tamaki |Office: 09 271 7700 | DDI: 09 271 7731 |  Mobile: 021 825566 | www.jacks.co.nz | Find Us
 Please protect the environment - don't print this e-mail unless you really need to


12
Hi Ian,

Thanks for your advice, I am new to mach3 and just teaching myself by reading other peoples code. I often see the :

While IsMoving
   Sleep(25)
Wend

loop after a g code movement and just assumed it was always needed to keep mach3 on task till it was done. I have not seen any info that has said before that you dont need this loop, would you mind posting some info about where you can omit it as I am sure one day I am going to blindly press feed hold and crash a script with how I am currently coding....

Would posting the whole tool change macro help?

13
Thanks for the reply tp ( may I ask your name?). Sadly I do need to run the sim as the last thing I need is a misplaced work offset in play before running the file and driving over some metal stops that are just within the possible cutting area if the program is not correctly located.

Could you please explain what you mean by proper use of while IsMoving . Is it not used correctly in the script I posted? I am very new to vb – less than a few months really so always keen to learn the best way to do things.

ok... after a day of trying everything I have tracked down the issue....
When first making the code I had it all loaded into a button script. At some point I decided to make it its own macro file and then call that via Code "M691" from the button script and only worked out this was the issue after loading each of my backups one by one until got to the point of trying an older screen set backup that still had the code in the script.

Not sure why this seems to stall the loading of the file but it seems to work ok now.  Is there any issue with moving scripts to custom macros and then calling that macro via the Code ”M*********” method?

I have seen it said a few times but it’s bad to call macros from macros, why is this? How many is ok? If this is not the way to do things can someone give me the method that is accepted as best practise?

14
Hi guys,

I have been chipping away at getting my cnc running and things have been going really well. The scripts I built seem to mostly working well and my VB is getting better by the day!

Maybe I was feeling a bit too chuffed with my self that today when I went to pause the cnc mid tool change rather than coming to a controlled stop and waiting for cycle start it stepped onto the next line in the vb script as it was currently in the following while loop:

Call MovePos(OldTool)'Move infront of old tool slot

Code "G53 G00 X" & XPos-ToolIn & "Y" & YPos
While IsMoving()                                                      '  this is where i pressed feed hold
   Sleep(25)
Wend

Code "G53 G00 Z" & ZPos 'Lower to tool insert height  '  This is where it then stepped to. VERY bad as it was mid table but my estop hand was on form so no damage today....
While IsMoving()
   Sleep(25)
Wend

I was lucky that saw this happening and managed to get to my estop before the tool tool into the bed of the cnc.

My first plan was to put lf statements in to make sure it was at the target gcode before stepping over to the next line by checking against a DRO but this will add HUGE amount of coding as each movement will need to check it actually has reached its target.

My next plan was to use a brain to see if a script/macro was running then somehow lock out the feed hold but could not find an output to issue an estop if the feed hold button was pressed while in a script.

Any other idea to help make sure that feed hold acts as expected rather than causing scripts to step onto the next line?

15
I found this post that I think is the same issue as I’m having:

http://www.machsupport.com/forum/index.php/topic,19254.msg133307.html#msg133307


"When one uses LoadFile() it not only loads the file but goes through quickly (ignoring M0/M1 stops and all time constraints) to check for errors, to generate a toolpath and probably do some other things. The latter part seems to take much longer than the actual loading.  Putting in a sufficiently long Sleep command allows one to see all of this happening. If the Sleep time is not sufficient and RunFile() kicks in before the loading + other processes are complete, then the RunFile() command is ignored.

This is fine when developing the program because it throws up any errors, however once everything is working OK it results in an irritating delay while the system does its checks.   A "Cancel" button comes on the "Please Wait - Generating Path" display but there does not seem to be a way of programing this to cut out the delay."

I am seeing the same symptoms but am unable to get the sleep value to be so that it works. I have left it to load for well over 10 mins and still nothing.

i have also tried moving it to an Mcode rather than a button script, no luck either.


16
Thanks for the fast reply,

I did use :

While IsMoving
Sleep (100)
Wend

But this would allow the code to skip the loading and step into the simulation without loading the tool path and with that same window displayed. This is frustrating as it seems to be fine once you exit out of the script and then regen and simulate.

All of my testing and the posts I have found suggest there is an issue with this vb call. The only work around I have found is to choose the right sleep value. There was a post suggesting that it was the way mach3 processes the file and it gets trapped into some sort of strange loop and wont kick out.

I have stripped the script right back to just the loading the file and it works a treat….  I can also run it from the script editor and it will work as expected but from the Mcode call on the MDI line or from a screen button calling the mcode it stalls.

I am reinstalling my full licenced version of mach3 now and going to do a clean install, rebuild of my mxl and make sure I install the parallel port drivers (did not have them as I am running an ESS) to see if this solves my issues.

I have also double checked Ignore Macros is checked but still having outputs fire on simulation. What can I do to start trouble shooting this issue?

The While IsMoving call - I was under the impression this was just for movement, can someone point me to the info to find what other things it will wait for.









17
stalling photo and my macro

18
I have been trying to make a button to automatically load a spoil board surfacing program, run a simulation and then run the file.

I have the button made, all the vb done and it seemed to work ok for the first few runs so I know that overall it should work. I then change the skim program a little and then suddenly  it seems to be stalling around the load file.
LoadFile(Skimfile) Sleep (100) While IsLoading()    Sleep (25) Wend

I have tried lots of different sleep values , wait loops, big sleeps with no wait… nothing seems to work.  It seems that people are using a sleep value by trial and error as a work around but  I cannot seem to find a value that works for me.
If I hit the cancel button on the “please wait generating path” window I get left with the program loaded in the gcode window but no tool path loaded in the tool path window.  At this point I can regen, simulate and then run the code so really stumped as to what is wrong!

The other big issue is that I am still having outputs fire (just for a moment) when I run a simulation (maybe also with the run from here button but I will need to check when I get to the workshop tomorrow). I have check the “Ignore M Calls While Loading” which did not help so have had to add script to the button to first check the state of the offline led, turn the cnc offline,  run the sim then turn it back online. This works ok for now but I would prefer to solve the problem than put a bandage on it and hope it gets better.

19
General Mach Discussion / Re: Homing and Squaring a Gantry
« on: January 30, 2013, 06:46:37 AM »
I have this working well to square the gantry but would like to ask if there is a way to stop the little "dance" that it seems to do.

Both move to home
one switch is hit
then the other side homes.

Is it possible to have

both move home
one hits a switch while the other keeps moving ?

I also found it hard to get my switches mounted perfectly so I decided to get it within 0.5mm of where it needed to be and then make the last adjustment with the following bit of vb.


DoOemButton(357)    'deslave axis

Code "G1 F100 A0.270"       '*Place offset here* max 0.5mm adjustment!!!!  Move A axis (slave) the distance to adjust squareness
While IsMoving
Sleep(25)
Wend

DoOemButton(358)    'slave axis

20
Scott,

I love your pluging and screen! It has made setting up my first ATC very easy. Could not have done it with out this screen as I could not find much info about mapping oem triggers and other items not already on the standard 1024 screen.

I would like to try making my own screen set so I have spent a few days poking about yours but I think I will give up and admit its well over my head. Could you give me a few clues as to how you went about mapping the io without a brain or macro? Also why do you use this method than a brain or a macro?

Many thanks!


Pages: « 1 2 3 4 5 »