How to create custom tabs in PlanetCNC TNG software
User can create new state tabs.
State tabs are displayed on main user interface and can include any parameter used by software whether its tool offset value, number of g-code line or absolute position of machine. By default, software will display only state tabs “GCode” and “IO”.
User can create up to 30 state tabs.
To create new state tab, access your PlanetCNC install folder and locate Profiles folder. Open your profile folder and create new .txt file and name it State1.txt.
Even when state file is empty, it will be displayed as new state tab, under state panel. Default name of the tab will be its file name, in this case State1:
If state panel uses multiple state tabs, it would make sense to use more descriptive tab names. You can do this by simply adding desired <_name text > next to file name.
So, if we would like to change our State1 tab name into e.g. Tool Offset, change name of the State1 file into: State1_Tool Offset.txt:
State tabs can be display any given parameter value or text. To display desired text, you can use label command:
label "Milk" label "Bread" label "Butter"
You can also change color of labels using colorname command:
label "Milk" colorname=#f8ff00 label "Bread" colorname=#21d841 label "Butter" colorname=#2c6bed
Since we will use tabs to display something more meaningful than shopping list, here is an example of Selected tool and Current tool parameter value display under label Tool:
label "Tool" param _selected_tool 0 "Selected Tool" param _current_tool 0 "Current Tool"
Lets change colors and size of label and parameters:
label "Tool" colorname=#ffa500 size=35 param _selected_tool 0 "Selected Tool" colorname=#2c6bed color=#21d841 param _current_tool 0 "Current Tool" colorname=#2c6bed color=#21d841
Example of Work Position parameter values displayed under label Work Position, note that position values will be displayed at three decimals :
label "Work Position" colorname=#ffa500 size=35 param _x 3 "Work X" size=32 colorname=#2c6bed color=#21d841 param _y 3 "Work Y" size=32 colorname=#2c6bed color=#21d841 param _z 3 "Work Z" size=32 colorname=#2c6bed color=#21d841
Parameter values can be displayed in decimal, boolean od HEX format. Here is an example of all three types of parameter value format display:
label "Value format" colorname=#ffa500 size=35 param _x 3 "Work X" size=32 colorname=#2c6bed color=#21d841 param _hw_motors_en B "Motors Enable" colorname=#2c6bed color=#21d841 param _hw_limit X "Limit Hex" colorname=#2c6bed color=#21d841
With new state tabs you can also use values of default GCode and IO panels. You can also display controller input/output state values.
label "Panel and IO values" colorname=#ffa500 size=35 panel gcodes colorname=#2c6bed color=#21d841 panel mcodes colorname=#2c6bed color=#21d841 panel othercodes colorname=#2c6bed color=#21d841 io input colorname=#2c6bed size=32 name="Input LED's" color=#21d841 io custom colorname=#2c6bed size=32 name="LED's" led="ES,LM,MT,ER,On,In,Ln,Jn,Cn" color=#21d841
As state tab values you can also use expressions. Here is an example of using DateTime function do display current time:
label "Date and Time" colorname=#ffa500 size=35 expr "DateTime()" DT "Current Time" colorname=#00a5ff color=#4bb725