Page 1 of 1

Help Writing a Macro

PostPosted: Tue May 22, 2018 9:49 pm
by Balbers
I need help with a VERY simple custom macro but am unfamiliar with the language used for UCCNC in comparison to Mach3. For some reason no matter what I tried, mach 3 wouldn't work for me so I am trying this program to see about switching. It would run the macro just fine through the VB editor but when it actually came to running it during a program it wouldn't work, it would only activate or deactivate the spindle output.

The macro would replace the m3 and m5 macro and do the following:
M3:
activate spindle (
Sleep for xx seconds
activate second output


M5:
Deactivate second output
Sleep for xx seconds
Turn off spindle

Can anyone help me with the code for these?

Re: Help Writing a Macro

PostPosted: Tue May 22, 2018 10:07 pm
by Balbers
I actually ended up running through the M6 macro and I think I figured it out.

Re: Help Writing a Macro

PostPosted: Tue May 22, 2018 10:23 pm
by cncdrive
The prebuild macros which install with the UCCNC can be a good starting point to learn writting macros.
Also study the UCCNC/Documenation folder, there are some documents about macro coding.
And on the forum search for the user Robertspark, he made a nice summarised documentation.
And if you will still need help my collegue Dezsoe will help you on the forum.

Re: Help Writing a Macro

PostPosted: Wed May 23, 2018 2:54 pm
by Robertspark
Manual link below in signature VVVV

Re: Help Writing a Macro

PostPosted: Fri Jul 13, 2018 5:27 am
by asuratman
Manual link below in signature VVVV


All instructions used in UCCNC are all in the UCCNC MACROS - 1-2105, nothing else. So if we want to learn the macro, these all instructions in the UCCNC MACROS - 1-2105 needed.

Re: Help Writing a Macro

PostPosted: Fri Jul 13, 2018 5:49 am
by Robertspark
You use c# methods / statements / functions too

I was told these are missing from the manual, not got around to adding them yet, too busy at present
I found that some methods are missing. Here is a list of methods to add :

1. void Codesync(string code)
2. void Additemtolistbeginning(bool isAS3, string val, int labelnumber)
3. int Setselectedindexinlist(bool isAS3, int labelnumber, int index)
4. void Addled(bool isAS3, double x, double y, double w, double h, bool blinktype, int picturenumber, int LEDnumber, int layernumber)
5. void Addled(bool isAS3, double x, double y, double w, double h, int picturenumber, int LEDnumber, int layernumber)
6. void Sendallbuttonsup(bool isAS3)
7. int Getfieldint(bool isAS3, int labelnumber)
8. double Getfielddouble(bool isAS3, int labelnumber)
9. long Getcodetotalruntimemsec()
10. void Pluginshowup(string Pluginfilename)