There have been major changes and improvements to Gladevcp since this page was written, which is now out of date. These changes have been integrated into the EMC2 master branch as of Dec 14, 2010. Please also visit:
- the related GladeVcpSetup page for an introduction and setup
- GladeVCPprogramming to introduce concepts, principles of operation, and programming howto
- HalWidgets for a reference of available HAL widgets
- the configs/gladevcp directory for application examples.
Gladevcp is now in the developer version of EMC 'master'
To use it One must manually add the system links to the glade folders.
see the READ ME in <EMC master folder name>lib/python/gladevcp.
To edit Gladevcp file one must use Glade version 3.6.7 (eg Ubuntu 10.04)
Gladevcp files that have been made with Glade 3.6.7 can be displayed on systems with older versions of Glade (eg Ubuntu 8.04)
But you can't edit and won't see the HAL objects using Glade.
If anyone wishes to donate more or needs help building new HAL widgets lets us know on the EMC Maillist
some test screens showing gladevcp
here is the glade editor:
a modified Touchy with a vcp widget added. You actually don't need to recompile to add widgets:
touchy and two stand alone panels note one is insensitive which can be controlled by HAL pin if wanted:
Pavel Shramov submitted a patch to be able to add gladevcp panels to Axis gui.
Here is how to do it:
You need python-xlib installed
Add a file (shown below-rename it) named '.axisrc' to your home folder. It will be a hidden file. AXIS actually has a couple there already.
Add two variables in DISPLAY section of ini file:
EMBED_TAB_NAME = GladeVCP?
EMBED_TAB_COMMAND = gladevcp -c COMPNAME -w {XID} [path-to-glade-file]
GladeVCP? will be the tab name (change it if you like)
COMPNAME will be the prefix to your gladevcp widgets. (change it if you like)
[path-to-glade-file] is self explanatory.
you can also use gladevcp's -g option to change the geometry in AXIS's tab.
upload:axisrc2.txt
Notes on running gladevcp under Axis:
- make sure your have the development version of emc2 installed in which case you dont need the above axisrc file
- if you get python errors on the console window, check wether there's still a /usr/lib/python2.6/dist-packages/hal.so file lying around besides the newer /usr/lib/python2.6/dist-packages/_hal.so (note underscore); if yes, remove the hal.so file
- if you're using run-in-place, do a 'make clean' to remove any accidentially left over hal.so file.
- currently it isnt possible without a patch to gladevcp to issue hal commands and link pins to other parts of emc. The below patch adds a -h command to gladevcp. Apply this patch, prepare a file with HAL commands and change the ini DISPLAY section as follows:
EMBED_TAB_NAME = GladeVCP?
EMBED_TAB_COMMAND = gladevcp -c COMPNAME -w {XID} -h [path-to-halcommand-file] [path-to-glade-file]
If you're starting with the gladevcp-test.hal file in emc2-dev/lib/python/gladevcp.hal remember to comment out the loadusr statement near the top. This doesnt make sense because the file is read by a already running gladevcp instance.
upload:0001-add-h-halfile-option-to-gladevcp-for-post-init-hal-c.patch
This is a sample that has gladevcp embedded in a tab and pyvcp included on the right side: