Button name

Moderators: TomKerekes, dynomotion

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Button name

Post by Tarasevih » Fri Jul 16, 2021 8:47 am

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!

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Button name

Post by TomKerekes » Sat Jul 17, 2021 12:35 am

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
Attachments
ChangeText.scr.txt
(240 Bytes) Downloaded 49 times
WithChangeText.scr.txt
(54.49 KiB) Downloaded 43 times
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Button name

Post by Tarasevih » Sat Jul 17, 2021 4:58 am

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!

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Button name

Post by TomKerekes » Sat Jul 17, 2021 8:15 pm

Hi Taras,

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

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Button name

Post by Tarasevih » Sun Jul 18, 2021 4:52 am

Hi Tom. Maybe you're right. See screenshot. Is there access to this component from a C program?

Regards, Taras!
Attachments
Имя кнопки.jpg

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Button name

Post by TomKerekes » Sun Jul 18, 2021 4:17 pm

Hi Taras,

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

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Button name

Post by Tarasevih » Mon Jul 19, 2021 5:39 am

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!
Attachments
RTCPON.jpg
RTCPOff.jpg

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Button name

Post by TomKerekes » Mon Jul 19, 2021 2:58 pm

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?
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Button name

Post by Tarasevih » Tue Jul 20, 2021 3:07 pm

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
Attachments
Инстремент.jpg

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Button name

Post by Tarasevih » Wed Jul 21, 2021 5:34 am

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.

Post Reply