Need help with a macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: Need help with a macro

Postby ger21 » Sun Nov 19, 2017 8:11 pm

I'll go back out and check after football. :)
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 933
Joined: Sat Sep 03, 2016 2:17 am

Re: Need help with a macro

Postby Dan911 » Sun Nov 19, 2017 8:20 pm

ger21 wrote:I'll go back out and check after football. :)



Thanks, normally that's what I'd be doing on a Sunday but Jets are off and Giants been way to disappointing.

Dan
Dan911
 
Posts: 286
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Need help with a macro

Postby 1JUMPER10 » Sun Nov 19, 2017 8:38 pm

It works! :o
My port and pin numbers were already 1,1. I changed my button number to 5500, re installed macro 5400, and enabled the plug in and restarted. I tested it several times and it works like it should. Only thing I don't understand is why change the button number to something other than the macro number? I thought the button called the macro according to it's button number?

Doesn't matter, really just curious. Thanks again CNCDrive, Gerry and Dan for the help.
1JUMPER10
 
Posts: 48
Joined: Tue Oct 04, 2016 1:54 am

Re: Need help with a macro

Postby ger21 » Sun Nov 19, 2017 10:27 pm

What you do is specify the port and pin number for the output in the macroloop, and define a User LED, in this case 500. It looks like the plugin/macroloop use LED500 to store the current state of the output.
The button isn't calling the macro. I believe that the plugin is monitoring the button, and using the LED number to know what the button number is. 5000 + 500.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 933
Joined: Sat Sep 03, 2016 2:17 am

Re: Need help with a macro

Postby dezsoe » Sun Nov 19, 2017 11:26 pm

Yes, Gerry is right. The macro runs in a loop, it can be any number. The button number must be the LED number + 5000, because the plugin handles button number 5001..5000+MaxLED, as I wrote in the beginning of this thread. I'm happy to read it works, but now I don't know what was the problem.
dezsoe
 
Posts: 393
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Need help with a macro

Postby ger21 » Sun Nov 19, 2017 11:43 pm

I think he had the wrong button number....
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 933
Joined: Sat Sep 03, 2016 2:17 am

Re: Need help with a macro

Postby 1JUMPER10 » Mon Nov 20, 2017 12:38 am

My button number was 5400. Because I thought it had to be the macro number.

I never worked with the screen editor, or added buttons and only once before used a plugin. It's all simple to you guys but mostly brand new to me. I have definitely learned a few things.
1JUMPER10
 
Posts: 48
Joined: Tue Oct 04, 2016 1:54 am

Re: Need help with a macro

Postby Dan911 » Mon Nov 20, 2017 1:49 am

dezsoe wrote:It is a bit annoying when you write a macro, know that it must work, but it does not. I read the UB1 manual and nothing points to why it doesn't switch K1. I really don't understand it... :(


Hi dezsoe, I shared in your frustration here.

I already started to write a more configurable plugin then the one I uploaded before you posted your solution, when it was posted neither was working it seened silly to upload. I just uploaded since it became clear that both solutions work well. I think it may be appealing to the less experienced like myself.
Dan911
 
Posts: 286
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Need help with a macro

Postby ger21 » Mon Nov 20, 2017 1:52 am

Sorry Dan, I forgot to follow up.
I did go out and test your plugin, and yes, it did activate the relay on the UB1.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 933
Joined: Sat Sep 03, 2016 2:17 am

Re: Need help with a macro

Postby Dan911 » Mon Nov 20, 2017 1:55 am

Thank you Gerry
Dan911
 
Posts: 286
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

PreviousNext

Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest