Page 1 of 1

ХHC HB04 and immediate execution user macro

PostPosted: Tue Oct 24, 2017 9:51 am
by Andre_bel
I use XHC HB04W pendant with my mashine
(UC300+UCCNC+Neuron /by Shad/+ Oxyfuel)

I noticed that, When Cicle Start is active and G-code is run, realization of the user macroes when pressing buttons Macro1...6 is blocked.

But the possibility of immediate execution user macro when clicking the Macro button 1-6 of the XHC HB04W is necessary, for example, for interruption of a cycle of preheat metal at oxyfuel cutting.

Report whether it is possible to program it a standard method, using Macroloop, for example?


Thank you!

Re: ХHC HB04 and immediate execution user macro

PostPosted: Sun Oct 29, 2017 10:59 pm
by dezsoe
Here are some points you have to know about the user macros and the calling of them.

- You cannot run any macros while g-code is executing. It is normal, because in a macro you may do near anything, including executing g-codes. Imagine what happens if some movement is running and you start some other movements by running a macro.
- The pendant plugin calls macros via the Callbutton function, so in fact you can configure the plugin to call buttons.
- The button codes 20000 to 21999 are for user macro calls. That is how you can "connect" a button to you own macro (M20000.txt to M21999.txt).
- Buttons are also ignored while g-code is executing. There are only some exceptions like Stop, FeedHold, OffLine, FRO and SRO +/-, view settings, etc.

All the above information together: you can configure the macro buttons to run any button codes, but while g-code is running only those special control buttons will execute.

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 8:12 am
by shad
Hello!
Thank you for this information!
But if you look at the other side - for example we have a button #2752 which service inside my plugin. Plugin use this button for their internal needs (send any information to the controller for example or start/terminate any process, of course does not apply to the execution of the program).
How can this be done?

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 8:52 am
by dezsoe
As I know, there is no way to do it, because UCCNC internally ignores any buttonpress while running. (Except the special keys.) Even if you program your plugin to catch keypress_event, that also will not be fired. It is because of the control logic.

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 9:09 am
by shad
I am about my buttons. This buttons are linked internally in to the my plugin and keypress_event work perfect.
Just I am guess that XHC HB04 plugin blocking ALL calls for Callbuttons during code execution?

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 10:58 am
by shad
Balazs!
In other words, is it possible to allow assign Callbutton function for the XHC HB04 buttons?

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 12:31 pm
by dezsoe
Andrew,
Sorry for the misunderstanding, now I see your problem. Only internal functions are called by Callbutton, macros are called by M+macronumber and this is not good for you.

Re: ХHC HB04 and immediate execution user macro

PostPosted: Mon Oct 30, 2017 2:08 pm
by shad
I think I need to write my own plugin for this pendant :)