fbpx

CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Please or Register to create posts and topics.

Question/suggestion on the GUI editor

Page 1 of 2Next

I created a completely new screen. On my machine with Win10 OS I have hidden the taskbar to use the full size of my monitor. But now I can't see the time anymore. Would it be possible to insert the time into the screen with the Gui Editor? The second question would be can i also clear the Python console in the screen? For example how it is possible in the Script Editor.

Hello,

>> Would it be possible to insert the time into the screen with the Gui Editor?

 

It is possible:
1) Add to GUI LineEdit
2) Write a macro that reads the time and saves it to LineEdit with the command gui.edPosX.setText( str v )
edPosX is the LineEdit ID for the X-axis DRO (this is an example).
3) To cycle the macro every second, use a Python action (use the "Timer" trigger)

If you feel lost after reading this hint, let me know, I will make a small guide.

>> The second question would be can and also clear the Python console in the screen?

Yes.
Right-click on the python console, and you will see the cleanup option.

Wojtek

carbonkid has reacted to this post.
carbonkid

I have a macro for the time but I don't know how to display it in Line Edit. But this way I can at least display them in the Python console with a button.

>Yes.
Right-click on the python console, and you will see the cleanup option.

Thanks ist works. 😉

 

But one more question? Can I change colors in the style file without problems? I tried that, but there are always errors. simCNC version is 3.4.22 beta.
Fixed, now it works with the changed colors. There was probably a problem saving the file with Notepad++

I have to ask again, it gives me no peace. I created the following macro.

from datetime import datetime
# datetime object containing current date and time
now = datetime.now()

# dd/mm/YY H:M:S
dt_string = now.strftime("%H:%M:%S")
gui.edTime.setText( dt_string)

Then created a PyAction, selected it as Event "Timer" and then selected my macro. Create a LineEdit with the ID "edTime" in the GUI Editor. Unfortunately the time is not displayed. What am I doing wrong?

gui.edTime.setText( dt_string)

put the ID from the EditLine insde

I follow these instructions from th support und it works fine

 

ok the problem is solved. For everyone who wants to copy it: The name of the LineEdit must match the one in the macro and the pyaction must be ticked.

@Wojtek

I have another question. I would like to add a progress bar to my screen to display the spindle speed and feed. Practically what is displayed in the original screen in the edSro or edFro. How do I have to configure the progress bar? I've tried but it doesn't show the right one.

Hi

You probably forgot to set the max value of "ProgressBar"

Here's the modified screen.
Please, test it.

https://en.cs-lab.eu/wp-content/uploads/2023/03/screen.zip

 

Hi Wojtek, I tested it. It works on feed. I entered the maximum feed as the value, which is also in the settings for motor tuning (helper information). For Input Value I selected current velocity. The current speed is now displayed as a percentage and the block accordingly. With the spindle, the current spindle speed does not work with the input value. I selected the Spindle speed there, and then it worked.

The color of the ProgressBar is light blue. Can I change the color anywhere? I changed the colors of the group ctrlButtons in dark mode for my screen in the style.css but found nothing for the progress bar.

Another question about the Tool Button with LED. I have inserted this and start a script to warm up the spindle. How can I set the LED to flash while the script is running? What do I have to select at Input: LED Interval? There's not a lot of choices there.

Tested again today. When I create a LineEdit with Input: text current spindle speed, nothing is displayed either.
It's the same with your default screen, nothing is displayed there in LineEdit TrueRpm either.
I have no idea what that is. Don't know if you can reproduce that.

Page 1 of 2Next

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?