[Mx-mailing-list] MX 1.5.2 is available

Bill Lavender lavender at agni.phys.iit.edu
Fri Apr 2 12:37:30 CDT 2010

Versions 1.5.2 of MX, MP, MpWx, and MxTcl are now available at the MX
web site from the download page


More information about the MX data acquisition and control system can
be found at


There was never an official announcement for 1.5.1, so the changelogs
for both 1.5.1 and 1.5.2 are included below.

**************** Changelog for MX version 1.5.2 ****************

Version 1.5.2 (03/30/10):
	New Device Driver:

	    u500_variable - This driver provides a way to read and
		write U500 V-variables.

	The 'u500_rs232' driver has now been successfully tested for
	writing command strings to the U500 controller.  It appears
	that reading strings sent by running U500 programs may well not
	be possible.

	The 'iseries' interface driver can now communicate correctly
	with i-Series controllers in Point-to-point mode rather than
	just those in Multipoint mode.

	Added support for the Mpatrol and Dmalloc memory debugging 

	Found and fixed a variety of memory leaks.

	The set_mode functions of the 'epics_scaler' and 'epics_timer'
	drivers now turn off Joerger autocount, since autocount can
	delay the start and end of MX scans by several seconds.

	Added PowerPMAC 'gpascii' support to the 'pmac' driver.  Bear
	in mind that this code has not yet been tested with a real

	Added a new 'set plot end' command for 'motor', which tells MX
	to only display the plot at the end of a scan.  For XAFS scans,
	the effect is to only update the plot at the end of each scan

	Modified scan plotting support to use the new mx_coprocess_open()
	and mx_coprocess_close() functions rather than popen() and pclose().
	The coprocess functions provide a way of reliably being able to
	kill all of the processes spawned by the call to mx_coprocess_open()
	which is not possible with popen().   The coprocess support has
	been tested on both Unix and Windows platforms.

	MX area detectors can now be used as scan input devices.  For
	step scans, an image will be stored for each step in the scan.

	MX area detectors now support deferring the adding of a bias
	offset until after the flood field correction.  This was done
	to improve the linearity of the dark current and flood field
	corrections.  For this case, the correction calculations are
	done in double precision floating point so that temporary
	intermediate results can be negative before the values are
	converted to 16-bit unsigned integers at the end.

	Added new area detector fields:

	    datafile_allow_overwrite - If set, this flag allows the
		area detector software to overwrite existing data
		files.  If the flag is not set, an error will be 
		returned instead.


	Dark and flood images are no longer saved as part of the normal
	area detector datafile numbering sequence.

	When using SMV format, the area detector bias offset is now
	written to the ZEROOFFSET field in the SMV header.

	MCS quick scan backlash is now only performed if the following

	   fabs( quick_scan_backlash_correction / quick_scan_motor_scale )

	is greater than 1.0e-6.  Otherwise, the quick scan backlash step
	is skipped, which can shorten the setup time for a quick scan
	by 3 seconds or more.

	Added a new 0x8 'epics_mcs_flags' bit (ignore clears) to the
	'epics_mcs' record.  If this flag is set, then any commands
	to clear the MCS will be ignored.  Instead the MCS will be
	cleared before the start of the next measurement.

	Added a just-in-time debugging option (-J) for 'motor' and
	'mxserver' which invokes a debugger just after a crash.

	Added -m option to 'mxserver'.  This tells the MX server to
	periodically display a brief description of its resource usage
	at a time interval in seconds specified by the argument to the
	-m option.

	Added thread-safe versions of Posix time functions such as
	localtime_r() for non-Posix build targets.

	Added EPICS support for the 'cygwin' build target.

	Support has been dropped for building MX support for EPICS 3.13.
	Please use EPICS 3.14 or above.

	Added MXF_SPAWN_NO_PRELOAD flag for mx_spawn() to keep
	spawned debuggers from being affected by things like 
	LD_PRELOAD=/usr/lib/libefence.so.  In addition, the unused
	suspend code for mx_spawn() has been deleted.

	Fixed an ancient bug in 'motor' where script files were not being
	closed after the script was executed.  The symptom was that after
	approximately 1020 scripts had been run, attempts to run new
	scripts would abort with a 'Too many open files' error.

	Fixed bugs in the handling of MXFT_RECORD, MXFT_RECORDTYPE, and
	MXFT_INTERFACE fields by mx_copy_array_to_buffer().

	Fixed the handling of multidimensional string arrays in network
	RAW mode.

	Moved some file descriptor handling functions to mx_io.c.

	Changed a number of long and unsigned long variables to int32_t
	and uint32_t for 64-bit compatibility with data structures that
	must be 32-bit.

Version 1.5.1 (10/29/09):
	MX now supports Windows 7 and Visual Studio 2008.
	New Device Drivers:

	    handel, handel_network, handel_mca, handel_input, handel_sum,
	    and handel_timer:
	        New preliminary MCA drivers for the DXP-XMAP from Xray
		Instrumentation Associates that exclusively use Handel
		-specific APIs.  The previous generation of 'xia_...'
		drivers still used Xerxes style parameter names, even
		when making calls to Handel.  Although the drivers seem
		to work (except for handel_timer), they have not been
		used for real experiments yet.

	    prologix - This new GPIB driver has been tested with Prologix
	        GPIB-USB controller from www.prologix.biz.  The driver
		should work with the GPIB-ETHERNET controller as well
		but this has not been tested.

	    spellman_df3, spellman_df3_ain, spellman_df3_aout,
	    spellman_df3_din, spellman_df3_dout:
	        A group of drivers for the Spellman DF3/FF3 series of
		high voltage power supplies for X-ray generators.

	    systron_donner_m107 - Driver for the Systron-Donner M107
	        DC voltage source.

	    epics_ccd - MX area detector driver for the EPICS CCD record.
	    mca_weighted_sum - This is an analog input driver that
	        reports weighted sums of MCA regions of interest.

	    function_generator_scaler - MX scaler driver for a software
	        emulated scaler that acts like a function generator.

	Updates to the 'ilm' and 'cryojet' drivers from Henry Bellamy
	of CAMD at Louisiana State University.

	The 'marccd_shutter' record can now talk to a 'marccd_server_socket'

	The MX 'epics_mca' driver now supports the DXP-XMAP based
	Vortex detectors available in the Advanced Photon Source
	detector pool.

	MX scans now put all of the MCA output spectra for the scan
	into a subdirectory which has a name derived from the scan
	output file name.

	If a scan uses 'SFF' format headers, then any MCA files written
	by that scan also have 'SFF' headers.  Similarly, 'XAFS' headers
	are added to MCA files written by scans using 'XAFS' format

	Added support for a multichannel scaler (MCS) 'clear_deadband'.
	If an MCS clear is commanded and the time since the last clear 
	is less than the clear deadband _and_ no new start has been
	commanded, then the clear is skipped.  This was done for
	performance reasons.

	When running a 'motor' script, 'motor' now first looks for the
	script name with the string '.mtr' appended.  If not found,
	it then looks again for the script _without_ the string '.mtr'
	appended.  In addition, 'motor' now supports a new environment
	variable MX_MOTOR_PATH.  If MX_MOTOR_PATH is defined, 'motor'
	now searches this path to look up motor scripts specified for
	the '@' command.

	The 'setup scan' command in 'motor' has been changed so that
	aborting a new scan setup preserves any existing scan with
	the same name.

	Brought up to date the text for the top level 'help' command
	of the 'motor' program.

	In 'motor', a command like 'help set', 'help ad', etc.  now
	redirects the individual help messages for each of the commands.

	'setup scan' and 'modify scan' in 'motor' now inform the user
	during the scan setup if they have selected an input device name
	that does not exist, rather than waiting until the scan is

	The 'mca rawread' and 'mca rawcount' commands in 'motor' now
	allow you to abort the display of output by typing 'q'.

	Added a 'show scas' command to 'motor' and rearranged the precedence
	so that a 'show sca' command now returns a list of scans.

	Added a 'rename scan' command to 'motor'.

	The 'ls330_motor' driver for Lakeshore 330 temperature controllers
	now handles soft aborts by directly sending a raw LS300 command
	instead of using mx_motor_move_absolute().  The previous procedure
	of using mx_motor_move_absolute() could mistakenly 'abort' the
	abort if the current temperature was outside the soft limits of
	the motor record.

	Modified 'motor' so that amplifier gains that are >= 10000 are
	shown in exponential notation.

	Improved the behavior of pause/retry logic in MX scans.

	Input scans now work correctly if 'scan_early_move' is set.

	The 'vcc_monitor' program for monitoring changes to MX network
	fields now supports some interactive commands:
	    a - Add new callback
	    d - Delete existing callback
	    l - List existing callbacks
	    q - Quit

	Added a new MX_NETWORK_OPTION_WORDSIZE option to allow MX network
	clients to find out the wordsize of the server.  If the wordsize
	of the client and the server are different, it is necessary for
	them to communicate using XDR format even if the data formats
	are the same.

	Added a new mx_breakpoint() function.  If a debugger is not
	currently running, then this will start the debugger.  If a 
	debugger _is_ running, then this will generate a breakpoint trap
	back into the debugger.  Not currently implemented for all

	Added a new mx_analog_input_clear() function.  This is intended
	for use with analog input devices that can latch a value.

	Added new 'mxserver' debugging infrastructure:
	    Implemented mxserver "enable remote breakpoint" option '-r'.

	    Added a new 'mx_database.breakpoint' network field.  This is
	    only active if remote breakpoints have been enabled by the
	    '-r' option listed above.

	    Added a new 'mx_database.debugger_started' network field.
	    Writing 0 to this resets the internal mx_debugger_started flag,
	    so that calling mx_breakpoint() again will spawn a new debugger

	EPICS changes:
	    MX code that communicates with EPICS has been changed to be
	    64-bit safe by using 'int32_t' for all MX_CA_LONG variables.

	    Replaced mx_epics_poll_for_events() with mx_epics_pend_event().

	    Added new mx_epics_pend_io() function.

	    Added new wait_for_connection parameter to mx_epics_pv_connect().

	    Replaced the existing mx_epics_get_num_elements() function with

	    Added mx_epics_pv_get_field_type() and mx_epics_get_element_size().

	    Replaced the old EPICS_IS_VERSION_... macros with a new
	    MX_EPICS_VERSION macro to be used in conditional compilation
	    macros for dealing with multiple versions of EPICS Base.

	Area detector changes:
	    Lots of internal changes for the Aviex PCCD-16080 driver.

	    Added a new 'use_dezinger' record field to provide a way of
	    remotely turning on or off correction image dezingering.

	    MX area detector drivers can now select at run time whether or
	    not they implement dark current and flood field correction
	    measurements using a multiframe sequence or a series of one-shot
	    measurements.  Currently, the Aviex PCCD-170170 and PCCD-4824
	    detector default to using multiframe sequences, while all others
	    (including the PCCD-16080) default to using a series of one-shot

	The 'pmac_motor' driver now sets the direction of home searches
	using the Ixx23 variable.

	The Mclennan 'pm304' driver no longer looks at the state of the
	'Not error' bit returned for the 'os' command.

	Updated the U500 drivers to send aborts followed by a fault
	acknowledge when starting up.  The U500 motor driver now reports
	the motor as busy for up to 0.5 seconds after a move, even if the
	U500 hardware says that it is not busy.  This is done because the
	U500 hardware may report the motor as in position for a short time
	after a move is commanded.

	For the 'mca_value' driver, the existing 'corrected_roi_integral'
	and 'corrected_soft_roi_integral' MX fields have been renamed
	to 'live_time_corrected_roi_integral' and 
	'live_time_corrected_soft_roi_integral'.  The original names
	also exist as aliases.  Also added the new 
	'rate_corrected_roi_integral' and 'rate_corrected_soft_roi_integral'

	Added new mx_get_console_size() function that is intended to
	be used to match the number of lines displayed in paged text
	output to the actual size of the text console.

	Added 'mxupdate' support for MXFT_HEX fields.

**************** Changelog for MP version 1.5.2 ****************

Version 1.5.2 (03/30/10):

	New methods added:

		Added status bit definitions for use by the get_status()
		and get_extended_status() methods.

		get_file_format_type_from_name() - This returns the 
		    file format type for an image rather than the
		    in-memory format.

		Added status bit definitions for use by the get_status()
		and get_extended_status() methods.

		connected() - This reports whether or not a given
		    MX network field is connected to the remote server.

	    Mp.c_wait_for_debugger() - This method waits for a C debugger
		such as GDB to attach to the process.

	Modified methods:

	    	Renamed get_format_type_from_name() to

	'mpshell' now uses the 'readline' module (if present) on Posix

Version 1.5.1 (10/04/09):

	New methods added:

		get_all_records() - This method returns a Python list of
		    Mp.Record objects that corresponds to all of the
		    records in the MX C database.

		multiple_motors_move_absolute_with_flags() - This method 
		    starts motion for several motors using the supplied
		    'motion_flags' value.  The previously existing method
		    multiple_motors_move_absolute() is now implemented
		    using this new method with 'motion_flags' set to 0.

	    Mp.c_breakpoint() - This method invokes the mx_breakpoint()
	    	    function of MX.

	    Mp.change_filename_prefix() - This method can translate between
	    	    two filename prefixes if the file can be accessed in
		    more than one way.
	Modified methods:

		get_multiple_record_names() - The get_multiple_records()
		    method now returns a list of record objects rather than
		    a list of record names.  You can get the old behavior
		    using the new Mp.RecordList.get_multiple_record_names()
		    method.  In addition, the reverse_order argument has
		    been removed since you can reverse the order of the list
		    using the Python list.reverse() method.

**************** Changelog for MpWx version 1.5.2 ****************

Version 1.5.2 (03/30/10):
	MpWx widgets now test for the existence of the MX network field
	at startup time.

	Received one-element lists are now converted into scalars.

Version 1.5.1 (10/05/09):
	Added 'base' keyword to the MpWx.Value widget.  Specifying 8, 10,
	or 16 for the base causes the widget to display its value in the
	requested base.

	Added 'reverse_order' keyword for the MpWx.RadioBox widget.

	The value changed callback code for MpWx has been changed so that
	if multiple widgets point at the same network field, then all of
	the widgets share the same callback.

	Modified the value changed callback function signature to include
	the network field object (Mp.Net) as the first argument of the
	callback function.

**************** Changelog for MxTcl version 1.5.2 ****************

Version 1.5.2 (03/30/10):
	Changed mx_process_exists() to mx_process_id_exists() to mirror
	the same change in libMx.

Version 1.5.1 (10/04/09):
	Added the Mx::user_requested_interrupt_or_pause() function.

More information about the Mx-mailing-list mailing list