Access custom buttons via trigger inputs - possible ???

If you have a question about the software please ask it here.

Access custom buttons via trigger inputs - possible ???

Postby beefy » Mon Mar 11, 2019 7:17 am

I have a Neuron THC which has it's own plugin and custom buttons on the screen.

I know that we can use "Trigger Inputs" to use external pushbuttons / switches to call internal functions of the software.

I'm going to set up a very basic remote pendant using trigger inputs, but of course a custom button does not call an internal UCCNC function. I'd like to be able to control the Neuron Z up/down buttons remotely.

Would I be correct in saying there is no way to access a custom button via UCCNC inputs at this point in time ??? And I'd have to maybe I'd have to write a plugin that communicates serially with a remote pendant.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Access custom buttons via trigger inputs - possible ???

Postby Robertspark » Mon Mar 11, 2019 7:32 am

Set each of the buttons you want on the pendant to call two macros

Within the macros call the z up and z down button

I'll do it for you later, that pesky little thing called work in the way of doing interesting stuff
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Access custom buttons via trigger inputs - possible ???

Postby cncdrive » Mon Mar 11, 2019 8:05 am

If those buttons are on the UCCNC screen then they all have a buttoncode parameter, you can check them with the screen editor.
You can attach those custom macro button codes in the input trigger and then the input pin triggering will call the custom button.
If the button calls a plugin function is not a problem, the plugin will see the same event as if you have pressed the button manually with mouse clicking when you triggering the input which calls the button.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Access custom buttons via trigger inputs - possible ???

Postby Robertspark » Mon Mar 11, 2019 9:43 am

Here is the screenset manual I did for the neuron screenset a while ago (note I've not checked or updated it in a while)

https://drive.google.com/file/d/0B9eqGq ... sp=sharing

2711 and 2712 are the button codes you are looking for.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Access custom buttons via trigger inputs - possible ???

Postby beefy » Mon Mar 11, 2019 10:48 am

Thanks very much Balazs and Rob.

So...........this is very good news. The UCCNC user manual is a little bit misleading because it appears to be saying you can ONLY call UCCNC internal functions.

So just to clarify, the "whole truth" is somewhat missing. An input trigger can have ANY code number applied, even a custom button number which is outside the internal UCCNC function codes listed (100-781 currently) in the input trigger popup box.

I've attached a picture of an example Input Trigger setup for the Neuron Z up & down buttons. So I can do that ???

INPUT TRIGGERS FOR NEURON.jpg

============

Likewise, is this statement from the macro capabilities documentation, also not telling the whole truth ??

Function: void Callbutton(int buttonnumber)
Description: This function calls an internal function of the UCCNC software. The buttonnumber represents an internal function number of the UCCNC software. The buttonnumber list is described in a separate documentation file.
Example: exec.Callbutton(100);


i.e. you can call ANY on-screen button with Callbutton(), even button codes outside the stock standard button codes 100-781 ???

The bit that had me thinking it was not possible was because of the wording in the documentation "internal functions". I therefore thought that if the button code was not one of the UCCNC internal functions I could not use I/O triggers or the Callbutton() function.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Access custom buttons via trigger inputs - possible ???

Postby Robertspark » Mon Mar 11, 2019 10:58 am

I keep forgetting that you can call macros and screenset buttons from input triggers {which is probably a really good reason to keep your macro numbers high and away from the screenset number objects).

I just never use the I/O Triggers or Hotkeys..... don't know why... just never crosses my mind to use them.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Access custom buttons via trigger inputs - possible ???

Postby beefy » Mon Mar 11, 2019 11:57 am

Robertspark wrote:you can call macros and screenset buttons from input triggers


You sure about that Rob (calling macros) ???

I wasn't aware you could also use input triggers to call macros. I certainly hope you can :) Ah, let me guess. You have to use button numbers 20,000 to 20,999 and create corresponding numbered macros. Then, when the I/O trigger calls the button code, the corresponding macro is executed ???

Balazs, could you confirm that.

Rob, I was the same with input triggers until I really NEEDED a remote pendant to deal with tip ups on a long cut. I thought if I could at least have remote Cycle Stop and Cycle Start that would save me lots of time by being close to wherever the table is cutting. I could pause the cut, lift out a tip-up and continue.
Of course programming a micro and doing serial coms would be the ultimate. I could have every button code I want at the pendant, and wouldn't need 6 four pair cables to go to all the I/O.
Last edited by beefy on Mon Mar 11, 2019 12:15 pm, edited 1 time in total.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Access custom buttons via trigger inputs - possible ???

Postby cncdrive » Mon Mar 11, 2019 12:13 pm

Yes, you can do that like how you described.
Yes, you can call macros too, the 20000 to 21999 are button codes which call the same number macros directly and you can attach an input trigger to those too.
Yes, the manual is a bit missleading, you can add any button codes in the input triggers and it will call that button, not only the built in UCCNC functions,
however if you adding custom codes etc. those will also become internal UCCNC functions, because it will be compiled into a UCCNC function, so it is kind of semantics... :)
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Access custom buttons via trigger inputs - possible ???

Postby beefy » Mon Mar 11, 2019 12:18 pm

Thanks again guys.

This is fantastic.

I'm really glad CncDrive decided to have this forum all that time ago. There's a lot of priceless info here, and many users would only have a fraction of the knowledge of UCCNC without it.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Access custom buttons via trigger inputs - possible ???

Postby Robertspark » Mon Mar 11, 2019 12:31 pm

beefy wrote:I'm really glad CncDrive decided to have this forum all that time ago. There's a lot of priceless info here, and many users would only have a fraction of the knowledge of UCCNC without it.


+1
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: Bing [Bot] and 6 guests