Qtvcp is an infrastructure to display a custom CNC screen or control panel in LinuxCNC.
It displays a UI file built with the QTDesigner screen editor or combines this
with python programming to create a VCP Panel.
Qtvcp is completely customizable - you can add different buttons and status LEDs etc.
or add python code for even finer grain customization.

1. Builtin panels

There are several builtin HAL panels available.
in a terminal type qtvcp list <return> to see a list.

1.1. copy_dialog

used for copying qtvcp’s builtin screen code to a folder so one can customize it.

In a terminal:

qtvcp copy_dialog
Copy Dialog
Figure 1. copy Dialog - Copy Qtvcp’s builtin Screen code

1.2. test_panel

  • collect of useful widgets for testing HAL component. Including speech of LED state.

loadusr qtvcp test_panel
Test Panel
Figure 2. test panel - Test Panel VCP

1.3. cam_align

  • a camera display widget for rotational alignment

Qt Camera Alignment
Figure 3. Qtvcp cam align- Camera based alignment panel

1.4. sim_panel

  • a small control panel to simulate MPG jogging controls etc. for simulated configurations

loadusr qtvcp sim_panel
Sim Panel
Figure 4. Qtvcp sim panel - Simulated controls for screen testing.

1.5. vismach_mill_xyz

  • 3d openGL view of a 3 axis milling machine

loadusr qtvcp vismach_mill_xyz
Qtvcp Vismach Mill
Figure 5. Qtvcp vismach- 3 Axis Mill panel

1.6. tool_dialog

  • manual toolchange dialog that gives tool description.

loadusr -Wn tool_dialog qtvcp -o speak_on -o audio_on tool_dialog

Options:

  • -o notify_on -use desktop notify dialogs instead of qtvcp native ones.

  • -o audio_on -play sound on tool change

  • -o speak_on -speak announcement of tool change

Tool Change Dialog
Figure 6. Qtvcp tool dialog - Manual Tool Change Dialog

1.7. Custom Panels

You can of course make your own panel and load it.
If you made a ui file named my_panel.ui and name the following HAL file, my_panel.hal
You would then load this from a terminal with halrun -I -f my_panel.hal

# load realtime components
loadrt threads
loadrt classicladder_rt

# load user space programs
loadusr classicladder
loadusr -Wn my_panel qtvcp my_panel.ui

# add components to thread
addf classicladder.0.refresh thread1


# connect pins
net bit-input1     test_panel.checkbox_1        classicladder.0.in-00
net bit-hide       test_panel.checkbox_4        classicladder.0.hide_gui

net bit-output1    test_panel.led_1             classicladder.0.out-00

net s32-in1        test_panel.doublescale_1-s   classicladder.0.s32in-00

# start thread
start

In this case we load qtvcp using -Wn; which waits for the panel to finish loading before
continuing to run the next HAL command. This is so the HAL pins from the panel are finished
in case the are used in the rest of the file.

2. More Information