EPICS WIN32 Extensions Build 39k ================================ This is a temporary build with a workaround for an Exceed memory exception problem. MEDM and SGA are built Debug to avoid this problem. The Build was made with Visual Studio 7.1 and Exceed 7. It has been tested and works with Exceed 7 through Exceed 10. Setup may tell you Exceed versions above Exceed 7 are a later version and as such may require the extra setup files. However, you should not need them for Exceed 8 or Exceed 9. You do need them for Exceed 10. For Exceed 10 you will need to install the Exceed Support files, set DISPLAY, XKEYSYMDB and XLOCALEDIR, then start Exceed before running the programs. The Exceed Support files should be installed by default for this version. If it does not say this, then use Custom during the installation and check the boxes for at least Program Files, Required DLLs, and Exceed Support Files. You may also check Extra Program Files if you want the extra files described below. You will have to set the DISPLAY, XKEYSYMDB and XLOCALEDIR environment variables. The examples given below should work if you did not change the installation directory. Exceed will have to be started before running the applications. It will not start automatically. If you have problems running the programs, check the Exceed Local Console. If it goes away before you can open it, it may be necessary to set it to not close on last client exit. How to do this is described below. When time and resources permit, there will be a new version of the EPICS WIN32 Extensions with up-to-date applications built with EPICS Base 3.14 and the latest version of Exceed (Exceed 10 or later). This package includes versions of the EPICS extensions that are built to run on WIN32 platforms, that is, Windows 98/2000/XP. This build was built with Exceed XDK 7.0 with the latest available patches. It should run on earlier and later versions of Exceed if you follow the instructions below. This version should also run on other PC X servers besides Exceed. Note that the build Exceed version changed from 6.2 to 7.0 with Build 32 and the behavior of Exceed 7 is different from that of 6.2. If you are upgrading from a build prior to Build 32, you should review the instructions as the installation has changed. If your version of Exceed is different from the build version, especially if it is prior to Exceed 6.1, you may need to set the environment variable DISPLAY, possibly XKEYSYMDB, and possibly XLOCALEDIR. If you set DISPLAY, you must start Exceed before starting the programs. There is a more complete discussion of this issue below. Be sure to read about Exceed support files and environment variables if you have problems. This build can be installed to be stand alone. It should then run with other PC X servers than Exceed, or even with no PC X server at all (if you display to another machine). To use it stand alone, you will need to install the Exceed support files, set DISPLAY, XKEYSYMDB and XLOCALEDIR, then start your X server before running the programs. The resources are not available to test the programs with other servers, but comments would be welcome. It appears to work with Reflection 6.10 and XFree86 4.0.3. See below for more information. If you were previously putting configureWindowPositionToClient=1 in your WIN.INI file to help with Exceed window placement for MEDM, it should no longer be necessary nor advisable. If you are interested in being put on the mailing list for future releases of the EPICS WIN32 Extensions, send email to evans@aps.anl.gov. Bugs and comments may be sent to the author of the extension or to evans@aps.anl.gov. To be useful, bugs should include explicit steps that the person responsible can use to reproduce the problem. Setup installs the necessary files in the directory of your choice, by default in: c:\Program Files\EPICS WIN32 Extensions Please note that the EPICS WIN32 Installation procedure changed significantly after Build 20 and again after Build 31. Especially note the environment variables that may be needed if you are upgrading from an early version and read about the Exceed support files. If you are upgrading from one of the earlier versions, uninstall, then clean up any remaining files in the EPICS WIN32 Extensions installation directory (by default, c:\Program Files\EPICS WIN32 Extensions) and delete the directory before proceeding, since the directory structure will be changed. If you are asked to reboot during uninstall, clean up the directory and then rerun this installation program after rebooting. If you have a previous build of EPICS WIN32 Extensions installed, it is always better to uninstall it before installing the new build. This will insure a cleaner installation. You can uninstall the EPICS WIN32 Extensions via Add/Remove Programs in the Control Panel. If you previously installed the extra programs or Exceed support files, and no longer want them, you definitely should do an uninstall before the install. Otherwise, needless registry keys will be left. Be sure to close any running programs including Exceed, the Exceed Local Console, and caRepeater before installing or uninstalling. In particular, be sure to close CaRepeater. CaRepeater will not appear on the Task Bar but can be closed in the Dialog Box obtained from Ctrl-Alt-Delete or the Task manager in 2000/XP. For Windows 2000 or XP you need to have administrator privileges to install the EPICS WIN32 Extensions. If you change your Exceed version or the location of the Exceed directory or did not have Exceed installed originally, then you should do an uninstall and a reinstall. PATH ==== It should not be necessary to have your Exceed directory in your PATH to run the X programs, as was required in early editions of the EPICS WIN32 Extensions. The location of the EPICS WIN32 Extensions and the Exceed path, if applicable, is stored in the registry for each program in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\AppPaths. This allows you to run programs from Run on the Start Menu or by using the START command (e.g. "start medm") in a DOS window or command shell. Moreover, it insures you will get DLLs from the installed directory and from the Exceed directory. A possible side effect is that the paths in the registry are silently appended to the front of your path variable when you run the programs. This means you cannot get different versions of the DLLs by putting other directories in your PATH. (You should normally not want to do this anyway.) If Exceed was not installed when you installed the EPICS WIN32 Extensions, you must reinstall them so the Exceed path will be in the registry keys. CaRepeater ========== Most channel access programs require CaRepeater to be running and will try to start it if it is not running. These applications should be able to find CaRepeater without your doing anything special. You can also start CaRepeater yourself, perhaps by putting it in your StartUp program group. Exceed Support Files ==================== If you are using Exceed, it is best to use the same version of Exceed as that used to build the EPICS WIN32 Extensions; however, that may not be practical. Hummingbird allows the files that are necessary to run the programs to be included with them, so that the programs will run with different versions of Exceed and even with other PC X servers. The tradeoff is that if these files are included in the directory with the programs, then you need to set the environment variable DISPLAY and possibly some others. When DISPLAY is set, the X programs will no longer start Exceed automatically when you click on a program icon or otherwise attempt to start the program. You must start Exceed manually before running the programs. Even if your Exceed version is different from the Build version, you may not have to install the Exceed support files (and consequently have to set DISPLAY). It appears, in fact, that it is not necessary if you have Exceed 6.1 or later. If you want to run the programs without Exceed, you will definitely have to install the support files and define DISPLAY, XKEYSYMDB, and XLOCALEDIR. If you have problems running the programs and your version of Exceed is different from the build version, you should try installing the support files. By default setup will install the Exceed support files and put them in the same directory as the programs unless it determines that your version of Exceed is 6.1 or later. If the files are installed you need to set DISPLAY and start Exceed manually and possibly define XKEYSYMDB and XLOCALEDIR. You can change the default behavior of setup by doing a custom install. You do a custom install by picking Custom, rather than Full or Typical during the installation procedure. You should be able to redo the installation without uninstalling if you are adding the support files. If you are removing them, do an uninstall first. It is possible the programs will work correctly without the support files and DISPLAY and the other environment variables being necessary. Alternatively, you may wish to have the support files installed even if you have the same Exceed version in order to insure a stand-alone installation or one that will work with different versions of Exceed. Note that setup, by default, intends to not install the Exceed support files if you have Exceed 6.1 or later. Owing to inconsistency in Exceed version numbering, it is possible that setup will not do this right. Near the beginning of the installation where setup lists your Exceed version, you should get a message saying whether the support files are to be installed by default or not. You can then decide to do a custom install if necessary. If you want to experiment with avoiding the use of DISPLAY with the files installed, it appears to be sufficient to just delete or rename Hcllocal.dll in the EPICS WIN32 Extensions directory. The behavior of Exceed in regard to DISPLAY and to what files need to included has changed several times and is not documented. It may vary depending on the combination of your Exceed version and the build version. Setup has been designed to do what is thought to be the most reasonable thing for the most people. Feel free to experiment and comment. Environment Variables ===================== You may need to define environment variables to run the EPICS WIN32 Extensions. What you need to set depends on what Exceed version you have as discussed above. The three environment variables of most importance are DISPLAY, XKEYSYMDB, and XLOCALEDIR. The commands to set environmental variables at a command prompt are given. You need to use the method of setting them permanently that is appropriate for your version of Windows. You have to set DISPLAY if the Exceed support files are in the EPICS WIN32 Extensions directory. In other circumstances, if you have not set DISPLAY and if the programs do not appear when you try to run them, you should try setting DISPLAY, especially if your Exceed version differs from the one with which the EPICS WIN32 Extensions were built. The downside of setting DISPLAY is that local X clients no longer start Exceed automatically, and Exceed must be started manually before they are run. (See above.) The situation is the same as if you were trying to display a client from a remote computer. The server must be started first. The command to set DISPLAY is: set DISPLAY=localhost:0 (You can also set DISPLAY to point to another computer if you wish.) Setting XKEYSYMDB causes Exceed to find the Keysym database in the EPICS WIN32 Extensions directory. The Exceed support files do not need to be installed. If you have Exceed 5, this will always be necessary. It may also be necessary if you have another earlier version, unless you have the Exceed XDK. It will also probably be necessary if you are not using Exceed. If you are getting messages about unfound keysyms, such as osfActivate, set this variable. If the EPICS WIN32 Extensions are in the default location, the command is: set XKEYSYMDB=c:\Program Files\EPICS WIN32 Extensions\XKeySymDB Setting XLOCALEDIR causes Exceed to find the locale directory in the EPICS WIN32 Extensions directory. It requires that the Exceed support files are installed. If you are having problems of unexplained nature, especially with drag and drop, try setting this variable. It will only be useful if the Exceed support files are installed. If you are not using Exceed, it will probably be necessary. The command is: set XLOCALEDIR=c:\Program Files\EPICS WIN32 Extensions\locale Set this to locate resource files if you have any: set XAPPLRESDIR=c:\Program Files\EPICS WIN32 Extensions or where ever you keep resource files. See the Exceed documentation for more information. Set this if you have an Xdefaults file: set XENVIRONMENT=c:\Program Files\EPICS WIN32 Extensions\Xdefaults or wherever you keep the Xdefaults file. See the Exceed documentation for more information. Set these to log what goes to the Exceed Local Console. See the Exceed documentation for more information. Use the log for debugging. The log file will continue to grow if you always have these set: set LOGGING=YES set LOGFILE=c:\Program Files\EPICS WIN32 Extensions\exceed.log You may need to define variables such as EPICS_CA_ADDR_LIST to allow channel access to find your process variables. A description of these variables is in the Channel Access manual. These can be set in your AUTOEXEC.BAT (Windows 95/98) or System Properties/Environment for 2000/XP using lines like the following: set EPICS_CA_ADDR_LIST=164.54.188.65 set EPICS_CA_AUTO_ADDR_LIST=NO It may be convenient to set EPICS_DISPLAY_PATH. This is the path list that MEDM uses to find ADL files. The paths of directories that contain ADL files are specified with a semi-colon as a delimiter. (This is different than on UNIX, where the delimiter is a colon.) See the MEDM Reference Manual for more information. An example of how to set this variable is: set EPICS_DISPLAY_PATH=c:\My Documents\adl;n:\adlsys If you want to access ADL files that are in a system directory on UNIX, you can make a link in your UNIX home directory to the system directory: ln -s /usr/local/iocapps/adlsys ~/adlsys then mount that drive on your PC (as n: for example) and put the directory in the EPICS_DISPLAY_PATH as above. If you run out of environment space, you need to put something like the following line in your CONFIG.SYS: shell=command.com /e:1024 /p The following an example of a typical setup needed to make the EPICS WIN32 Extensions run. You can copy these lines to your AUTOEXEC.BAT or set them in the way appropriate for your version of Windows and modify them as needed. You will probably only need the first three variables if you are not using Exceed or your Exceed version is prior to 6.2. You must have the Exceed support files installed for XLOCALEDIR to be useful, since the locale directory is only installed in that case. set DISPLAY=localhost:0 set XKEYSYMDB=c:\Program Files\EPICS WIN32 Extensions\XKeysymDB set XLOCALEDIR=c:\Program Files\EPICS WIN32 Extensions\locale set EPICS_CA_ADDR_LIST=164.54.188.65 set EPICS_DISPLAY_PATH=c:\My Documents\adl;n:\adlsys Winsock 2 ========= The versions of channel access included here require Winsock 2 to be installed on your system. If you have Windows 2000 or XP, it is probably already installed. If you have Windows 98, it may not be installed or a bad version may have been installed. If you have the file: C:\WINDOWS\SYSTEM\ws2_32.dll on your Windows 95 system, you probably have Winsock 2 installed. You can look at the Properties of this file and determine the version. It should be 4.10.1656 or later. There is a bug in widely distributed, earlier versions of ws2_32.dll. Channel access will not work well with these earlier versions. You can get a good version of Winsock 2 at: http://www.microsoft.com/windows95/info/ws2.htm If you get an error message about not finding WS2_32.DLL, you do not have Winsock 2 installed or it is not installed properly. Exceed ====== The X Windows programs require an X Server to run. The only X Server supported is Exceed by Hummingbird, http://www.hcl.com. The WIN32 versions have been built with X and Motif libraries supplied with the Exceed XDK. You can use the regular version of Exceed to run the programs. You do not need the XDK version. It should be possible to another PC X server than Exceed. Your mileage may vary. You will need the Exceed support files and will need to set environmental variables as discussed above. Exceed 5 is no longer supported. A significant amount of effort has gone into making the programs work with Exceed 5, and you should try them if you have it. However, if you have problems you cannot resolve, you will need to upgrade to a later version. The resources are no longer available to fix problems with Exceed 5. Fonts ===== MEDM uses a set of font aliases that will not be installed with Exceed by default. See the MEDM reference Manual for several ways to make these fonts available. If you have Netscape or Internet Explorer installed, you should be able to view the MEDM Reference Manual via the Help button in MEDM. Otherwise, the Reference Manual is with the other EPICS documentation. The location is given below. There is a sample file, fontTable.adl, in the SupportFiles directory of EPICS WIN32 Extensions. This will show you what you are getting for the MEDM fonts. Programs ======== The EPICS Extension provided in this release are: adt.exe (Array Display Tool) alh.exe (Alarm Handler) caRepeater.exe (See above) ca_test.exe (Command-line test program) histTool.exe (HistTool) StripTool.exe (StripTool) medm.exe (MEDM) probe.exe (Probe) namecapture.exe (Namecapture) sga.exe (GIF Animator) The documentation for these programs is the same as for the UNIX versions and may be found at: http://www.aps.anl.gov/asd/controls/epics/EpicsDocumentation/WWWPages/ EpicsDoc.html There is a subdirectory of EPICS WIN32 Extensions named SupportFiles, not to be confused with the Exceed support files. (The Exceed support files are in the main directory along with the programs if they are installed.) It contains some sample ADL files for MEDM, some GIF files for SGA, configuration files for ADT, and a sample configuration file for ALH. The icons for MEDM, SGA, and ALH in the EPICS WIN32 Extensions group initially start these programs in this directory. You may change that; however, it is suggested that you do not put your own files in that directory as they may interfere with or be lost in subsequent installations. To use printing in MEDM, the print command in Print Setup may be set to use Ghostview or Exceed's lpr command: lpr host-name printer-name user-name e.g. lpr helios mcr2 jones The printer must be a Postscript printer for lpr to work. The Plot item in the File menu in ADT requires Sddsplot, which is available for WIN32 but is not included in this distribution. Unless Sddsplot is installed, this menu item will not do anything useful. Extra Programs ============== These are programs that may be of interest and are included for testing purposes. You need to do a Full or Custom install to get them. Chaos.exe: Chaos5.exe: This is an X program that does Mandelbrodt plots. It uses Exceed but not EPICS. Chaos5.exe is built with Exceed 5. Chaos.exe is built the same as the other extensions. The UNIX version is built with almost identical code. It makes a nice timing test for X Windows programs converted to WIN32. For the standard Mandelbrodt plot done with the screen maximized, informal testing (on UNIX or Windows 95 unless noted) has indicated: Machine X Server Time (sec) ------- -------- ---------- 486DX2 66 MHz Exceed 5 27.27 Toshiba Satellite Pro Exceed 5 5:31 Pentium 200 MHz Exceed 5 1:14 Pentium 300 MHz Exceed 5 0:46 Pentium 200 MHz Exceed 6 3:55 (Built with Exceed 5) Pentium 200 MHz Exceed 6 3:55 (Built with Exceed 6) Compaq 800 MHz Exceed 7 0:16 (Built with Exceed 7) Sparc 20 UNIX 2:42 Sparc Ultra 1 UNIX 1:46 Sparc Ultra 2 UNIX 1:35 Sparc Ultra 30 UNIX 1:09 Sparc Ultra 10 UNIX 0:41 WinProbe.exe: This is a native Windows version of Probe that does not use Exceed but that does use EPICS Channel Access. It was originally written by Fred Vong and is not being developed at this time, but it should work. SM.exe: This is a native Windows program that does not use Exceed nor EPICS. It demonstrates the physics of Synchrotron Motion in an accelerator. It also illustrates the Standard Equation of nonlinear dynamics. Further information can be obtained from its Help button. Troubleshooting =============== You get dialog boxes saying the program cannot find DLLs that have names starting with "HC" or "HCL": This should no longer be a problem. If it happens, try uninstalling, then reinstalling the EPICS WIN32 Extensions. You can probably fix it by putting the Exceed directory in your path; however, the Exceed directory should not have to be put in your path. Be sure Exceed was installed when you installed the EPICS WIN32 Extensions and has not been moved. See the discussions above. You put your Exceed directory in the PATH, but you still get dialog boxes saying it cannot find the Exceed DLLs: You may have run out of environment space. Try typing PATH or SET in a DOS window to see if it is really set right. If you are on Windows 95/98, try running AUTOEXEC.BAT in a DOS window, and see if it says it is out of environment space. If so, put a line in your CONFIG.SYS as indicated above to get more environment space. The X programs sort of work, but the keys, especially BS, do not behave properly and errors about keys such as osfActivate appear in the Exceed Local Console: Set XKEYSYMDB as described above. Drag and Drop does not work, especially with Exceed 5: Set XLOCALEDIR as described above. Drag and Drop may leave garbage on your screen. This is a problem in all versions of Exceed. There is currently no fix for it. You only get a single-sized, default font in MEDM: You probably need to put the MEDM aliases in your font path or use a font server. See the discussion above or the MEDM Reference Manual. You do not get the larger MEDM fonts. You need to be sure the 100 dpi fonts are installed in Exceed or that you are using a font server that has them. You have a problem but you do not know if it is with Exceed, EPICS, or Windows: Do a full installation and try running the extra programs. They require various combinations of Exceed, EPICS, and Windows. There are problems with setup when doing an installation, reinstallation, or with uninstall: Be sure all programs are closed, especially Exceed and the Exceed Local Console, and that CaRepeater is killed with Ctrl-Alt-Delete or the Task Manager in 2000 or XP. Try rerunning the installation. If you have problems with the Motif programs, check the Exceed Local Console. It may be necessary to set it to not close on last client exit under Option. If it does not stay up long enough to do this, run localcon.exe by itself, by double-clicking on it in Explorer, for example. It will be in the EPICS WIN32 Extensions installation directory if the Exceed files are installed, and in the Exceed installation directory otherwise. You may have problems specifying paths to files when the paths contain spaces, such as with the EPICS WIN32 Extensions. It is best to consult a Windows manual or do some trial and error for this. Surrounding the whole filename in quotes usually works. You get scrollbars that are the wrong color, or ADT gives X Error messages. You need to get the latest patches for Exceed from Hummingbird. The uninstallation is not completely successful. If CaRepeater, Exceed, or the Exceed local Console was running, you will need to restart Windows to finish the uninstall. You may need to manually delete the EPICS WIN32 Extensions installation directory, by default at C:\Program Files\EPICS WIN32 Extensions. Some of the programs create files when they are run, and you may have saved files. Uninstall does not delete this directory if new files have been created in it.