Removing Jog panel

If you created a new screenset and want to share it with others then please post it here. You can talk about screens here.

Re: Removing Jog panel

Postby TadasM » Sun Nov 13, 2016 3:29 pm

Gerry,

many thanx for the macros. Working great, except one thing - while any "step dist" mode is selected, clicking on it once more - button state goes to "off". IS there any way to avoid that ? :)

p.s. what about other jog panel functions ? For eg jog feed % values, I cant get this working on main screen too (in ordinary way).


Robertspark,

Thank you for your suggestions and tutorial. Much appreciated. This will be helpful editing files in the future as for today, I need to get going with simple things. At the moment, I cant even figure out how to do a simple macro to toggle output 8 :) Just recently I have started to play with Arduino's...
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Removing Jog panel

Postby ger21 » Sun Nov 13, 2016 4:00 pm

New macros attached.

I just checked, and it looks like Field #913 (Jog %) does not display the numbers when placed outside the jog tab? Is this what you're seeing? The +- buttons work, but the DRO is blank, or doesn't update.

I'm going to report this as a bug and see if they'll change it.
I have some ideas for workarounds, but don't have time right now.
Attachments
20001-20004.zip
(1002 Bytes) Downloaded 849 times
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Removing Jog panel

Postby TadasM » Sun Nov 13, 2016 4:20 pm

Gerry,

works fantastic now! :) Many many thanx Gerry.

Yes the jog% is blank :( If I understand correctly - I could use Your provided macros, modify them to have a functions for other buttons from jog panel ? (I have tested Axis selection, step selection - those handling same as step dist. buttons...)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Removing Jog panel

Postby ger21 » Sun Nov 13, 2016 4:24 pm

Yes, the basic principle of the macros can be used for all buttons.
But I did some quick testing and found that some of the other buttons did work correctly.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Removing Jog panel

Postby TadasM » Sun Nov 13, 2016 5:05 pm

ger21 wrote:Yes, the basic principle of the macros can be used for all buttons.
But I did some quick testing and found that some of the other buttons did work correctly.


With Your help Gerry, I have successfully made buttons for "Continuous" and "Step" functions :) One more thing though, the button does not get current state once app is booted. Just after toggling it shows and maintains current state. Is there way to solve this ?

I found that only "+" and "-" from jog panel are working :) Step dist does not show selected info too, if created on main screen :/


Gerry, would you be so kind and make a macro for my light switch ? :) As I cant figure it out yet... I have it installed on pin8 port2.
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Removing Jog panel

Postby ger21 » Sun Nov 13, 2016 9:59 pm

Gerry, would you be so kind and make a macro for my light switch ? :) As I cant figure it out yet... I have it installed on pin8 port2.


It should be either:

exec.Setoutpin(2, 8);

or

exec.Clroutpin(2, 8);

One should turn it on, and the other should turn it off.


I found that only "+" and "-" from jog panel are working :) Step dist does not show selected info too, if created on main screen :/


It looks like those will not work on the mainscreen at all.
A workaround may be to create a "user" textfield to display the values. Since the button work, you may be able to use the macroloop to read the values from the jog panel and update your user textfield.

Sorry, but I don't really have the time right now to write any macros. I don't really even know the language very well, as the only macros I've written were basically the same as what I sent you.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Removing Jog panel

Postby TadasM » Mon Nov 14, 2016 5:55 pm

ger21 wrote:
Gerry, would you be so kind and make a macro for my light switch ? :) As I cant figure it out yet... I have it installed on pin8 port2.


It should be either:

exec.Setoutpin(2, 8);

or

exec.Clroutpin(2, 8);

One should turn it on, and the other should turn it off.


I found that only "+" and "-" from jog panel are working :) Step dist does not show selected info too, if created on main screen :/


It looks like those will not work on the mainscreen at all.
A workaround may be to create a "user" textfield to display the values. Since the button work, you may be able to use the macroloop to read the values from the jog panel and update your user textfield.

Sorry, but I don't really have the time right now to write any macros. I don't really even know the language very well, as the only macros I've written were basically the same as what I sent you.




It looks like the jog panel shall stay :) .It is quite strange that replaced original icon image with my own one - the "down" state is not working... Have you tested this one Gerry (or someone else) ?


The code you have suggested does not work if put straight into macro as single line, I tried to implement as follows (macro number is correct. I have removed previous buttons from main screen as we are "forced" to use the jog panel):

Code: Select all
bool buttonstate = AS3.Getbuttonstate(20001);

if (!buttonstate)
{
   AS3.Switchbutton(true,20001);
   exec.Setoutpin(2, 8);
        AS3.Switchbutton(false,20001);
        exec.Clroutpin(2, 8);
}


But no luck :) I wish to have toggle button so I could turn ON and turn OFF lights on my CNC. Anyone could help on that with macro please :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Removing Jog panel

Postby ger21 » Mon Nov 14, 2016 7:26 pm

Try this

Code: Select all
bool buttonstate = AS3.Getbuttonstate(20001);

if (buttonstate)
    {
   AS3.Switchbutton(true,20001);   
   exec.Setoutpin(2, 8);
    }
else

    {
        AS3.Switchbutton(false,20001);
       exec.Clroutpin(2, 8);
    }
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Removing Jog panel

Postby Robertspark » Mon Nov 14, 2016 7:31 pm

Think you need an exclamation mark before the buttonstate within the if statement

If (!buttonstate){ // ie if NOT true, then make it true,
...
}
else // if true, then make if false.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Removing Jog panel

Postby ger21 » Mon Nov 14, 2016 7:45 pm

Yes, I got the button state backwards.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

PreviousNext

Return to Custom Screensets

Who is online

Users browsing this forum: Google [Bot] and 2 guests