You can make some changes to the size and coloration of the standard EMC guis in order to make them fit your screen and your setup. Yes you can grab the sizer on the bottom of the gui screen and shift it around, but the results may be unpredictable. A better approach is to edit the appearance file that is shipped with each gui. The variable lines in these files allow for changes in the size and coloration of portions of the gui.
Copies of these files reside in the emc directory and are named , XEmc, YEmc. and TkEmc. The TkEmc file is used directly but the real X and Y appearance files are read from an x-windows directory. Before you begin to edit an appearance file, make a backup copy. I prefer to name my backup something other than ??.bak because some of the text editors will automatically use a file named .bak to keep the last changes you made. If you make several edits and try them out .bak will only keep one back from the current file.
In the case of tkemc, you can change the size of lettering so that it can be made to fit into a 640x480 screen rather than the 800 it is shipped for. If you are thinking about making changes in the appearance of a gui, you might want to make a backup copy of the gui's appearance file before you change it.
The first image shows the appearance of the TclTk gui running
with default values. Table 1 shows the contents of the default
TkEmc file. As shipped, tkemc uses mostly white lettering on a
blue background. Notice that the abort button in the upper right
corner shows the highlighted color and the position displays use
very large lettering.
! Set the colors for the main screen ! Default font is "variable", aka 12-point Helvetica
bold. ! Set the font size specifically for the position digits.
Do this after ! set background/foreground for labels that are clickable |
For the 640x480 screen you have to uncomment the line that refers to font size. To do that, remove the (!) in front of the line as shown in the second line below.
replace
! *top*font: -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*with
*top*font: -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*
Then exchange the commenting on the lines that refer to the font size for the position display. The first two lines below are the default setup. The next two lines are setup for the smaller display.
replace
! *top*position*font: -*-courier-bold-r-normal-*-24-*-*-*-*-*-*-*
*top*position*font: -*-courier-bold-r-normal-*-56-*-*-*-*-*-*-*with
*top*position*font: -*-courier-bold-r-normal-*-24-*-*-*-*-*-*-*
!*top*position*font: -*-courier-bold-r-normal-*-56-*-*-*-*-*-*-*
When you have made these changes save the file and when you start tkemc you should get the smaller gui.
If you are running under Linux and have more than one screen size available you can change size by holding down <control> and <alt> and pressing + on the number pad. Then all you have to do is drag tkemc to center it in the display or bump the edges of the displayed area with the mouse arrow. This will show you how the gui will appear on a lower resolution screen.
Several other features of the tkemc display can be changed by making changes in the TkEmc file. This second figure shows a screen view of tkemc with several of the features changed. Each of the changes is underlined in the revised TkEmc file shown as table 2.
The fonts and colors available may be different for your computer. A little experimenting with this file and you will find a combination of colors and sizes that should please you.
If you mess it up so bad that you can't figure out what you did, just go back to the backup file that you started with, copy it and start again.
To make greater changes to the tkemc gui will require that
you edit the emc/plat/*****/bin/tkemc file. This requires some
knowledge of the TclTk programming language and is described elsewhere.
! Set the colors for the main screen ! Default font is "variable", aka 12-point Helvetica
bold. ! Set the font size specifically for the position digits.
Do this after ! set background/foreground for labels that are clickable |
This screenshot shows the standard xemc gui. As shipped, this gui is more than adequate for machine control using an 800x600 display. If you want to use it on a 640 screen you will have to edit it's resource file.
The real file that does the work is xemc" located in the /usr/local/nist/emc/plat/linux_2_0_36/bin/ directory. The real resource file that it uses when it starts up is named "XEmc" and it resides in /usr/X11/lib/X11/app-defaults. Don't be confused by the file of the same name in the emc directory. Editing it will not change the appearance of xemc unless you packup emc after making the changes and then reinstall the whole thing.
The XEmc file in /usr/X11/lib/X11/app-defaults is the file
that you will want to edit to change colors and text size. For
example, by editing the lines as indicated by the underlined numbers
in table 3 below, you can make xemc run on a lower resolution
screen. These lines are scattered throughout the real file which
is to long to include here.
*font: -adobe-helvetica-bold-r-normal--10-*-*-*-*-*-*-1 *menu*font: -adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-1 *fileEditorText*font: -adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-1 *toolTableText*font: -adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-1 *varFileText*font: -adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-1 *helpXemcText*font: -adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-1 *posLabel0.font: -adobe-courier-bold-r-normal--32-*-*-*-*-*-*-1 |
This is the result of the changes as suggested in table 3. This gui will fit a low resolution screen quite nicely. Remember to backup the file before you make changes so that when you get unexpected results you can go back to the original. (or use the emc/Xemc as original and copy it over your edited one in /usr/X11/lib/X11/app-defaults.
It is much more difficult to change colors for the xemc than
it is for the tkemc. If you want to change colors you will need
to change them in many places throughout the file. Some experimenting
will give you a feel for the layout. Background references change
the color of a whole widget while foreground references change
the color of text.
As shipped, yemc is very tall and requires editing in order to show successfully on 640 or 800 resolution screens. Since it is intended for more than three axis it will adjust its length when it is started to the number of axis defined in the .ini file.
Yemc uses the same kind of resource file that xemc uses. That file, YEmc is also found in the in /usr/X11/lib/X11/app-defaults directory.
The version shown at right shows the effects of changes to font size listed in table 3. These changes will fit a four axis display into an 800 resolution screen quite nicely.
As shown, yemc is displaying a rotary fourth axis, using joint computation, while running the program cds.ngc. Since the early 2000 year EMC interpreter and motion programs will only work three axis at once, yemc only allows manual motion and screen display of the fourth axis.
This is a preliminary copy of part of a chapter to be included in the Software Setup section of the EMC cookbook. This page is maintained by Ray Henry. Comments, criticism, flames, additions, subtractions, and editing are welcomed.