Hello Guest it is October 26, 2021, 04:44:22 PM

Author Topic: User DRO (Counter)  (Read 11488 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: User DRO (Counter)
« Reply #10 on: March 05, 2013, 07:02:56 AM »
you don't need any while isMovings, sleeps or variables for what you're doing. If all you want to do is increment a DRO with each call to the macro ALL you need is the single line

SetUserDRO(1010, GetUserDRO(1010)+1)

Type it into the vb editor and try it - THEN make sure you save it correctly and in the right place. If you do that it will run from the MDI AND from GCode.

Ian
« Last Edit: March 05, 2013, 07:07:18 AM by stirling »
Re: User DRO (Counter)
« Reply #11 on: March 05, 2013, 07:15:56 AM »
Thanks stirling,
think that's my problem. not saved in correct location.
in the mach3 directory in C:\Mach3\macros\MyMill\M1001.m1s
from what i read, this is correct.
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: User DRO (Counter)
« Reply #12 on: March 05, 2013, 07:30:43 AM »
The point is that if your macro works in the CB editor then changing the code is irrelevant to your problem. I only provided my code because it's the simplest code to do what you want.

The correct location depends on YOUR profile name. If you're using the standard screenset then your profile is displayed at bottom right on the main (program run) screen. The default is usually Mach3Mill. Then you save your macro as c:\Mach3\macros\YOUR PROFILE NAME\M1001.m1s

Ian
Re: User DRO (Counter)
« Reply #13 on: March 05, 2013, 07:36:09 AM »
but that is where it is saved. my profile is MyMill.
C:\Mach3\macros\MyMill\M1001.m1s
« Last Edit: March 05, 2013, 07:38:50 AM by Kenneth »
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: User DRO (Counter)
« Reply #14 on: March 05, 2013, 07:48:43 AM »
works just fine here. please post your macro.
Re: User DRO (Counter)
« Reply #15 on: March 05, 2013, 07:52:37 AM »
found the problem. i WAS running the wrong profile. after sterling said that about the profile bar
in mach3 default. i added the label in my set and opened mach3. showed TheMill not MyMill.
counter works.....THANKS all
« Last Edit: March 05, 2013, 08:05:02 AM by Kenneth »
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: User DRO (Counter)
« Reply #16 on: March 05, 2013, 08:09:35 AM »
 ::)
Re: User DRO (Counter)
« Reply #17 on: August 24, 2013, 01:46:38 AM »
thank you very much  ;D