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.