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!
Question/suggestion on the GUI editor
Quote from CS-Lab Support on 21 March 2023, 08:12>> With the spindle, the current spindle speed does not work with the input value. I selected the Spindle speed there, and then it worked.
You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
> 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
You have several options to change the color of the chunk progress bar (I also included a dark theme):
- In the css file for all QProgressBar widgets:
QProgressBar::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}QProgressBar::chunk[darkTheme="true"]{
background: yellow;
}This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-a.mp4
b. In the css file for individual ProgressBar_1 and ProgressBar_2 widgets
[id="ProgressBar_1"]::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}
[id="ProgressBar_1"]::chunk[darkTheme="true"] {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #ffffff,
stop: 1 #0000ff );
}
[id="ProgressBar_2"]::chunk {
background: yellow;
}
[id="ProgressBar_2"]::chunk[darkTheme="true"] {
background: blue;
}
This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-b.mp4
c) In the GUI editor, in the "css" form for individual ProgressBar_1 and ProgressBar_2 widgets
ProgressBar_1
#id::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}
#id::chunk[darkTheme="true"] {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #ffffff,
stop: 1 #0000ff );
ProgressBar_2
#id::chunk {
background: yellow;
}
#id::chunk[darkTheme="true"] {
background: blue;
This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-c.mp4
>> How to make the LED flash while executing the script?
Two functions have been prepared for LEDs:
a.
gui.btnPause.setLedState( True ) – turns on the LED
gui.btnPause.setLedState( False ) – turns off the LED
b.
gui.btnPause.setLedInterval( 1000 ) – causes the LED to flash with an interval of 1 second
gui.btnPause.setLedInterval( 0 ) – makes the LED light up continuously
btnPause is the id of the pause button diode (this is just an example)
>> What do I need to select in Input: LED Interval? There's not much choice there.
Yes, I know.
Soon we will expand the list with other parameters.
>> With the spindle, the current spindle speed does not work with the input value. I selected the Spindle speed there, and then it worked.
You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
> 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
You have several options to change the color of the chunk progress bar (I also included a dark theme):
- In the css file for all QProgressBar widgets:
QProgressBar::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}
QProgressBar::chunk[darkTheme="true"]{
background: yellow;
}
This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-a.mp4
b. In the css file for individual ProgressBar_1 and ProgressBar_2 widgets
[id="ProgressBar_1"]::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}
[id="ProgressBar_1"]::chunk[darkTheme="true"] {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #ffffff,
stop: 1 #0000ff );
}
[id="ProgressBar_2"]::chunk {
background: yellow;
}
[id="ProgressBar_2"]::chunk[darkTheme="true"] {
background: blue;
}
This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-b.mp4
c) In the GUI editor, in the "css" form for individual ProgressBar_1 and ProgressBar_2 widgets
ProgressBar_1
#id::chunk {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #00ff00,
stop: 1 #ff000f );
}
#id::chunk[darkTheme="true"] {
background: QLinearGradient( x1: 0, y1: 0,
x2: 1, y2: 0,
stop: 0 #ffffff,
stop: 1 #0000ff );
ProgressBar_2
#id::chunk {
background: yellow;
}
#id::chunk[darkTheme="true"] {
background: blue;
This is a link to a video showing effects: https://www.cs-lab.eu/wp-content/uploads/2023/03/example-c.mp4
>> How to make the LED flash while executing the script?
Two functions have been prepared for LEDs:
a.
gui.btnPause.setLedState( True ) – turns on the LED
gui.btnPause.setLedState( False ) – turns off the LED
b.
gui.btnPause.setLedInterval( 1000 ) – causes the LED to flash with an interval of 1 second
gui.btnPause.setLedInterval( 0 ) – makes the LED light up continuously
btnPause is the id of the pause button diode (this is just an example)
>> What do I need to select in Input: LED Interval? There's not much choice there.
Yes, I know.
Soon we will expand the list with other parameters.
Quote from CS-Lab Support on 21 March 2023, 11:42>> 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.You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
>> 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.
You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
Quote from carbonkid on 21 March 2023, 21:50Thanks for that, I'll try that as soon as possible, but first the tool length measurement has to work.
Quote from CS-Lab Support on 21 March 2023, 11:42>> 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.You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
Yes, of course, that makes sense. No, I don't have an ENC module. Property also “just” the IP-M.
Thanks for that, I'll try that as soon as possible, but first the tool length measurement has to work.
Quote from CS-Lab Support on 21 March 2023, 11:42>> 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.You must have an encoder module (CSMIO-ENC) to use the current spindle speed.
If you do not have the CSMIO-ENC module, select as below:
Yes, of course, that makes sense. No, I don't have an ENC module. Property also “just” the IP-M.
Quote from carbonkid on 9 January 2024, 20:52Quote from CS-Lab Support on 17 March 2023, 12:52Hi
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
I came across this progress bar again in my current screen vertical project. What is the value actually for? Unfortunately, this is not described in the screen editor guide.
Quote from CS-Lab Support on 17 March 2023, 12:52Hi
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
I came across this progress bar again in my current screen vertical project. What is the value actually for? Unfortunately, this is not described in the screen editor guide.
Quote from CS-Lab Support on 10 January 2024, 15:13Can you specify which value you are asking about?
Can you specify which value you are asking about?
Quote from CS-Lab Support on 12 January 2024, 10:12"Value" is the initial value of the ProgresBar.
PropgresBar is set to this value once after starting the simCNC software."Maximum" is the maximum value for the ProgresBar when not using it, ranging from 0% to 100%
"Value" is the initial value of the ProgresBar.
PropgresBar is set to this value once after starting the simCNC software.
"Maximum" is the maximum value for the ProgresBar when not using it, ranging from 0% to 100%