More than one User Interface? Why?
The default configuration of EMC runs a single user interface (GUI), as called out by the DISPLAY = <something> variable in the [DISPLAY] section of the ini file.
However, you can run more than one GUI, or several different ones at the same time. The additional user interfaces can be in additional windows on the main EMC computer, or even on completely different computers connected over a network. This page describes some of the possibilties, but is not complete.
Why would you want to do such a thing?
- Perhaps you have a large machine, and would like to have two operator stations, one at the front of the machine and one next to the toolchanger for when you are loading tools.
- Perhaps the machine is out in that hot sweaty garage and you'd like to start a part, then go sit in the airconditioning until its done while still having control. (Note: make sure no people or pets can get near the running machine)
It has always been possible to run multiple GUIs, but it hasn't always been trivial to set it up. It still isn't, but some progress has been made in that area, and discussions have started about other improvements.
How to do it
When using "run in place"
The following step-by-step instructions assume that you already did your CVS checkout, configure, and build. Lines starting with "$" are commands to be typed exactly as written, other lines are just for your information and should not be entered into the PC.
- Switch to the top level directory of your CVS checkout (the command below is appropriate for my system, your directory probably has a different name):
- $ cd ~/emcdev/emc2head
- Set some EMC environment variables (not strictly neccessary here, but it saves some typing):
- $ . scripts/emc-environment
- Now start EMC normally - you can just type "emc" and use the config picker, or start it with a specific config by specifying that ini file:
- $ emc configs/<your-config-directory>/<your-ini-file>
- Now for the second GUI... leave the original shell and EMC running, and open another shell.
- Switch to your CVS checkout directory again:
- $ cd ~/emcdev/emc2head
- Then set the environment variables for the new shell (this time it is required):
- $ . scripts/emc-environment
- Switch to your config directory:
- $ cd configs/<your-config-directory>
- Run the second GUI:
- $ tkemc.tcl -ini <your-ini-file>
- (or axis, or mini.tcl, or....)
If the second GUI is to be on a different PC, there are a couple of approaches:
- X11 over SSH: simply to do steps 7 and onward using a ssh login from the remote PC. Either specfiy "-X" (capital X) to ssh, or put the line "ForwardX11 yes" in your ~/.ssh/config (see "man ssh" and "man ssh_config for more information). In that case, the second GUI runs on the main PC, and only the screen, keyboard, and mouse are forwarded to the remote PC. If the second PC is a Windows machine, then an X server such as [Xming] must be used.
- VNC over SSH: ... What VNC does better than X11: you can be right in the middle of doing something, and if you switch off the display machine, go to any other random machine, log back in -- and see all the windows exactly how you left them. ... someone who knows is going to have to fill this in ... ([Ubuntu: VNC over SSH])
- Actually run the the second GUI on the remote PC, and send NML commands over the network. You must edit the appropriate fields (IP addresses) in the file specified by [EMC] NML_FILE, typically emc.nml in the example configurations. The files configs/common/client.nml and configs/common/server.nml are provided to help with this.
When using an installed EMC2
I think its not too different, although you won't use emc-environment, and you will have to cd to a few different directories. More later.