Page 1 of 2

Button name

Posted: Fri Jul 16, 2021 8:47 am
by Tarasevih
Hi! Is it possible to change the inscription on the button executing the script from the script?
This is needed to get the status indicator.

Regards, Taras!

Re: Button name

Posted: Sat Jul 17, 2021 12:35 am
by TomKerekes
I don't fully understand.

But here is a screen with Button (IDC_But10) labeled Change which changes the text of IDC_But11 by executing a SubScript (Change Text).

Note when the text of a button is changed the screen may not update with the new text until the button is redrawn. We should probably add a command to re-draw it. The SubScript sets the focus to the button to cause it to be redrawn.

Note you must remove the .txt extensions.

HTH

Re: Button name

Posted: Sat Jul 17, 2021 4:58 am
by Tarasevih
Thanks Tom for the quick response. Can I do it from C program ?
I want to turn on and off RTCP one button and so that the name of this button changes RTCP_on and RTCP_off.
So I will know what mode the machine is in now.

Regards, Taras!

Re: Button name

Posted: Sat Jul 17, 2021 8:15 pm
by TomKerekes
Hi Taras,

Did you mean change the Text of a label (not the name of button)?

Re: Button name

Posted: Sun Jul 18, 2021 4:52 am
by Tarasevih
Hi Tom. Maybe you're right. See screenshot. Is there access to this component from a C program?

Regards, Taras!

Re: Button name

Posted: Sun Jul 18, 2021 4:17 pm
by TomKerekes
Hi Taras,

Those are buttons. Why not use a Label using the KMotionCNC Screen Editor?

Re: Button name

Posted: Mon Jul 19, 2021 5:39 am
by Tarasevih
Hi Tom.You did not understand me. I need to change the text on a button to hot. During work KMotionCNC.
I want to turn on and off the RTCP with one button and also so that the name of the button changes as in the pictures below.

Regards, Taras!

Re: Button name

Posted: Mon Jul 19, 2021 2:58 pm
by TomKerekes
Hi Taras,

Ok so you do want it to be a button.

I was making changes to make that possible/easier but ran into a problem. To turn on RTCP ie:

G43.3 Hn

Which tool needs to be specified. How would you handle that? I suppose we could remember the last Tool loaded via M6 Tn Tool change. Do you have any suggestion?

Re: Button name

Posted: Tue Jul 20, 2021 3:07 pm
by Tarasevih
Hi Tom. When changing the tool, it can be indicated as in the screenshot. When RTCP is turned on, take the tool number from the active one.
Sorry for my English.

Regards, Taras

Re: Button name

Posted: Wed Jul 21, 2021 5:34 am
by Tarasevih
I also noticed this problem. If RTCP is turned off and I turn it on G43.4H1, the position of the Z axis becomes - the length of the tool. If this happens during the execution of the G code, then the zero of the workpiece will move lower by the length of the cutter and machining will continue above the workpiece. Is this normal behavior Tom? I think that when the RTCP is turned on, the length of the tool should be recorded in offset without affecting the height of the Z axis.KMotionCNC Version 4.35F .

Regards, Taras.