wxmtxy

A GUI tool for EPICS


author: Pete R. Jemian (jemian@anl.gov)
version: 0.5
wxmtxy logo

Overview

wxmtxy provides EPICS support to users, allowing them to define a table of known positions for an X,Y positioner (motor) pair and provides a one-button click to drive the X,Y pair to a specific table setting. Also can record current position into a setting.

Several sets of X,Y positioners can be configured. (Each set is separate.) In fact, the positioners do not have to be motors, but can be any type of EPICS PV that will accept a numeric value.

wxmtxy is based on wxPython and relies on CaChannel to communicate with EPICS.

In the Graphical User Interface (GUI), tooltips are provided for most items. Moving and pausing the mouse over a widget (GUI component such as a button or a label) will cause a terse description of that widget to be displayed. Moving the mouse away will cause that tooltip to disappear.

For more help, explanations are provided in the HTML pages you are viewing now.

Example

One way to learn how to use this tool is to work through an example. This example shows how to start wxmtxy, configure it for two EPICS motors, set some positions, and save the configuration into a file.

Purpose and objectives

How to use wxmtxy.py

Create a new XYpair

You can add specifications to control additional sets of X and Y positioners. Add space for a new pair of X and Y positioners by selecting the Page menu, Create New X,Y pair item. Note that Ctrl+p is a keyboard shortcut for the same menu selection.

Configure the EPICS Process Variables

You configure EPICS by specifying the EPICS PV names. An editor is available by selecting the Page menu, EPICS Configuration item. Note that Ctrl+Shift+e is a keyboard shortcut for the same menu selection.
If the chosen positioner is an EPICS motor record, then you need only specify the EPICS PV name for the VAL field (of that axis). After typing the PV name, keeping the selection in the same entry box, press the Enter and the software will check the local EPICS network for that name. The box will turn green if the PV is found and stay pink of not found. The checkbox will be set automatically as to whether the PV is from a motor record.
If you make a mistake in typing, or press the enter key in the wrong place, you can Revert any changes back to the default values or Clear X or Clear Y to clear all PV names and checkboxes from either of the two axes.

Figure 3

Create a new Tab

You can add a new tab to the end of the list of tabs of the displayed XYpair to document a set of positions for the X and Y positioners. Make a new tab by selecting the Page menu, Create new tab item. Note that Ctrl+t is a keyboard shortcut for the same menu selection.

Create a new Row

You can add a new row to the end of the displayed tab (of the displayed XYpair) to document a new position for the X and Y positioners. Make a new row by selecting the Page menu, Create new row item. Note that Ctrl+r is a keyboard shortcut for the same menu selection.

Save the settings to a Settings File

To save the current settings to a file, select the File menu, Save As ... item.

Figure 13

A save file window will appear. Navigate to a directory to save your settings, enter a name with the extension .XML and finish your task.

Figure 14

Definitions

EPICS PV fields

field description
DESC EPICS PV to use when asking the positioner for its description string
DMOV EPICS PV to use when asking the positioner if it is done moving. DMOV=1: not moving, DMOV=0: moving
EGU EPICS PV to use when asking the positioner for its engineering units string
RBV EPICS PV to use when asking the positioner where it is now
STOP EPICS PV to use when telling the positioner to stop moving immediately
VAL EPICS PV to use when telling the positioner to move to a new value

General terms

term description
EPICS PV EPICS Process variable name. See http://www.aps.anl.gov/epics. Perhaps a document such as http://www.aps.anl.gov/epics/base/R3-14/10-docs/CAref.html for more details.
EPICS motor record EPICS abstract specification of a positioner such as a stepping motor. See http://www.aps.anl.gov/bcda/synApps/motor/index.html or http://www.aps.anl.gov/bcda/synApps/motor/R6-4/motorRecord.html for more details.
XYpair set of Tabs in wxmtxy belonging to an XYpair
Tab set of Rows in a Tab of an XYpair in wxmtxy
Row specific combination in wxmtxy of (label, X_position, Y_position)
Settings File XML file with specifications for EPICS Process Variables and saved positions for the wxmtxy.py application
Text positions file The "Text positions file" is a plain text file and can be prepared with any text editor. The file describes a set of positions to be loaded into a Tab of the wxmyxy application.

Files

The "Text positions file" is a plain text file and can be prepared with any text editor. The file describes a set of positions to be loaded into a Tab of the wxmtxy application. It contains an arbitrary number of rows. Each row contains three values, separated by tabs. The values are "label X_position Y_position" where the positions are in "mm". An example is provided (examples/standard-paddle.txt) that describes the positions on the standard 4-column paddle.

Users will likely produce a"Text positions file" by preparing a spreadsheet with sample description (label) and X,Y positions on the sample paddle. The origin (0,0) is the notch on the upper-right edge of the paddle.

example file: Text positions

file description
examples/standard-paddle.txt positions on the standard 4-column paddle

example file: XML Settings

file description
examples/USAXS_XY.xml settings file from USAXS sample and detector stages
examples/test-settings.xml settings file used by developer to test various features

Python source file documentation

PyDocs from wxmtxy source code

file description
wxmtxy.py starts the wxmtxy application
wxmtxy_root.py Main frame of wxmtxy application
wxmtxy_pair.py configuration for X,Y pair of EPICS positioners
wxmtxy_tab.py set of rows with positioner settings
wxmtxy_row.py Define/manage GUI elements for one row of the table
wxmtxy_pvsetup.py configure EPICS for X,Y pair
wxmtxy_xml.py read/write routines for wxmtxy XML settings
wxmtxy_axis.py Maintain EPICS PVs and connections for one axis
wxmtxy_version.py version information for wxmtxy
setup.py Python distutils packaging file for wxmtxy

Helper files that could work with other Python projects

file description
wxmtxy_htmlview.py HtmlView to view HTML-formatted help files
pvConnect.py simplified connections to an EPICS PV using CaChannel
menuLauncher.py standalone GUI to launch various utilities

Other files

file description
LICENSE APS EPICS extensions software license
README Comments to developers reading the source code files
XSLT stylesheet XSLT stylesheet to display settings files nicely in a WWW browser

Requirements

Python

wxPython

ca

CaChannel


The wxmtxy application and related files are copyyright (c) 2009.
#*************************************************************************
# Copyright (c) 2009-2010 The University of Chicago, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2009-2010 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# This file is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution. 
#*************************************************************************