Hello Guest it is March 28, 2024, 10:28:56 AM

Author Topic: SaveWizard, Saving DROs, DRO/LED number allocation, global functions  (Read 4526 times)

0 Members and 1 Guest are viewing this topic.

Lots of questions in one post...

1) What does SaveWizard do?  Does it just save the values of ALL the DROs and LEDs on the wizard's screen?  Or is it just User DROs/LEDs?  Is there a LoadWizard, or are the parameters loaded automatically?

2) Is there any way to save DROs/LEDs on my custom screen set?  I noticed DROs like Slog Jog Rate and Edge Finder Diameter are saved automatically.  Can I do this for my DROs and LEDs on my own screens?

3) The documenation says that I should use numbers above 1000 for my own DROs and LEDs.  Is there a safe way of allocating them?  Or do I just cross my fingers no other wizard or macro is using the numbers I've picked?

4) Is there any way to do global functions?  Or functions shared between button macros?  Defining global constants would be nice too.  If I can't define globals, can I include common code into a macro?

Thanks,
Frank
Re: SaveWizard, Saving DROs, DRO/LED number allocation, global functions
« Reply #1 on: October 02, 2008, 08:14:01 PM »
Quote
2) Is there any way to save DROs/LEDs on my custom screen set? I noticed DROs like Slog Jog Rate and Edge Finder Diameter are saved automatically. Can I do this for my DROs and LEDs on my own screens?

Actually, I can answer this one myself.  It appears, DROs and LEDs are saved when Mach3 exits.  I just never noticed.
Re: SaveWizard, Saving DROs, DRO/LED number allocation, global functions
« Reply #2 on: October 02, 2008, 08:44:43 PM »
Save Wizard saves all the DRO and LED values in the user space, whether they have been defined on a screen or not. They are saved into a file with the same name as your wizard but with .def for type. Every time your wizard is started up it will read the .def file to take all initial values.

The system DROs are not saved in the wizard set.

Its not a problem for duplication of numbers between wizards, since we can only run one wizard at a time. But duplication between macros and macropumps can be an issue We have had a couple strange bugs reported by guys that have a macropump running and then startup the Newfangled Wizards.  It would have been nice if someone had set a standard back in the early days, like wizards start at 1000 and go up and macropumps start at 1255 and go down, but it has not happened, and its always a risk.

Global functions and buttons are not possible. I just had dinner with Brian tonight and bugged him again to do this, but its a big change in the way VB is integrated into Mach and its not likely to happen. He agrees it would have been a better way, but its to late to go back. One of the main features of Flash in my view is a more integrated programming environment.
Re: SaveWizard, Saving DROs, DRO/LED number allocation, global functions
« Reply #3 on: November 14, 2008, 04:11:47 PM »
Line from last message from Ron Ginger is below.

> One of the main features of Flash in my view is a more integrated programming environment.

so Flash sounds very good ! , the lack of Globals gets to be a big problem the more code I write ! Could someone please elaborate or point to any reading on "FLASH" ?  and I don't mean the Action SuperHero !
Re: SaveWizard, Saving DROs, DRO/LED number allocation, global functions
« Reply #4 on: November 14, 2008, 05:18:14 PM »
Look under the screens topic, there is a whole topic on Flash. There is work being done on a doc for flash, but it is not ready yet.