Hello Guest it is January 19, 2022, 05:52:30 AM

Author Topic: Reset - I was wrong  (Read 7232 times)

0 Members and 1 Guest are viewing this topic.

Re: Reset - I was wrong
« Reply #10 on: April 30, 2008, 09:38:53 PM »
I have tried both the current 'lockdown' version (I'm on a different computer from the one running Mach3 so I'm not sure of the version), and the newest beta release. The problem is the same on both. It doesn't seem to be so much a problem in how it saves it as how it runs it. I've done two different macros that run perfectly if i run them from the vbeditor screen, and they both crash if I run them from a button, even though the code is EXACTlY the same  on both screens. That defiinatly indicates that the problem is in Mach3 and not in the code. This could be a severe problem for me. I tend to customize my machines for what I'm doing with them, and this would indicate that I can't do it because it can't handle simple scripts. I switched to Mach3 because I was told how good it was, but this is a MAJOR deficiency.
Re: Reset - I was wrong
« Reply #11 on: April 30, 2008, 09:54:05 PM »
Have you tried this....

After you do your VB edit thing and save- try Reloading the screen set to refresh.  I have noticed that sometimes a screen set reload helps.


Offline Chaoticone

  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: Reset - I was wrong
« Reply #12 on: April 30, 2008, 10:16:45 PM »
Also might want to try view, save current view after putting your code in the button.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Reset - I was wrong
« Reply #13 on: April 30, 2008, 10:25:53 PM »
I have tried everything, including rebooting (which happens about every 2 min anyway). I have probably had to reboot my computer by pulling the plug at least 200 times in the past two days. If it gets caught in a 'While IsMoving(), Wend' loop (which happens frequently) I could only kill it by pulling the plug. The VB 'Stop' button doesn't work, you can't even do a 'Control/Alt/Delete' to kill the program, once it is stuck it is stuck. From what I can tell, Mach3 simply doesn't handle VB scrips worth a damn.

I used WinCNC for over 3 years on this machine, and it does have it's problems (no tech support, expensive, and no forums for problems), but when I wrote a macro, IT WORKED. I switched to CandCNC controllers and Mach3 because I was convinced by users on the CNCZone forum. They all said the same, 'Change to Mach3 and CandCNC', the support is great. I agree, the support is great, but that doesn't help if the software doesn't work. So far, I have spent over $500.00 on this conversion between hardware and software, and I'm getting less enthused by the day. I have spent countless hours over 3 days trying to do two simple macros, only to find that the software chokes on, what I know, is good code. I'll give this about 2 more days and I'll decide which program/controller to dump on ebay.
Re: Reset - I was wrong
« Reply #14 on: April 30, 2008, 11:33:26 PM »

I think everyone has had their problems/frustrations at times and we feel your pain but when reading back through your posts (also on the other thread your started regarding the reset issue), I think everyone has tried quite sincerely to help you with your issues HOWEVER, You are asking Mach to do very specific customized tasks that really is not in the 'normal' scope of what most people do.  Of course this involves custom programming (VB and the like) but you have not shared your VB script or posted your screenset file for others to examine.  This makes it a little tough for others to see what it is that you are doing (or more specifically where the problems may lie). 

How about you post what it is that you are currently doing and maybe someone with some VB experience can help.

There are more than 2 ways to 'skin a cat'.  There are usually workarounds or 'alternative methods' to acheive the same results.  Perhaps a fresh perspective might help.  Again, as I've said already without showing us what you have done, it's hard for us to suggest any of these alternatives. 

Finally, like I said we feel your pain but might I offer as a kind and gentle word of advice...I think you will find that doggin' Mach on this forum probably won't get others 'inspired' to help out.

Offline Chip

  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Reset - I was wrong
« Reply #15 on: May 01, 2008, 12:04:42 AM »
Hi, Ken

The vb code I posted works fine hear loaded in the Ref All Button, No errors.


Re: Reset - I was wrong
« Reply #16 on: May 01, 2008, 12:52:25 AM »
Try adding a sleep to the While IsMoving()..

While IsMoving()

Fixing problems one post at a time ;)


Offline jimpinder

  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Reset - I was wrong
« Reply #17 on: May 01, 2008, 03:42:30 AM »
Ken - I have been following this and appreciate your problems.

I run several macros on my machine - all interlinked to DRO's etc. I can put info in a DRO and the script reads and writes to them without a problem.

I do not bother with Screen4 - but write the program from the VB script editor on Mach (either Mill or Lathe).

When I have written these, I save them in the Macro file in the Mach folder, under the Code M(***)(three figure number) as per the instructions in the VB script editor. I can then either include them in a GCode program, or type M*** into the machine to execute immediately.

Can I suggest that you do this with your VB script and try that method. If the script is saved in the Macro file like this it should execute correctly.

If you then want to call the Macro on a button, there is only one line of script in the button window - calling the Macro number.

I am re-fitting my limits and homing switches with laser detectors this week, so, if you can post your script for us to have a look at, I don't mind putting it on my machine and seeing what happens. It sounds a useful piece of script anyway, and I could see with a User DRO or two thrown in, it could be used in all sorts of situations when setting up.
Not me driving the engine - I'm better looking.
Re: Reset - I was wrong
« Reply #18 on: May 01, 2008, 06:56:23 AM »
Sorry about the 'rant'. I was just getting frustrated trying to get this to work.

One of the things I have had problems with is that the documentation seems to be spread out all over the place, and I don't guess I've found everything. Jimpinders suggestion will probably solve the problem, I've just never found the syntax to do that. At one time I did save the program as a 'M' file in the macros directory, but haven't seen a syntax example to call it from a button. I'm sure most of this is just a matter of me learning the languages involved and learning how to link them.

Thanks to everyone for their help and suggestions. I'll keep playing with it, I thing I'm getting close and I'll post the code when I get it working.