[Date Prev][Date Next][Date Index]

mcaApp





Folks,

There have been a number of bug fixes and enhancements to mcaApp.

drvSTR7201.c for the Struck 7201 and SIS 380x had some serious problems:
- Things were not initialized to zero, and this could cause problems.  
- There is a serious flaw in the SIS380x firmware.  It does not reset the
prescaler counter to 0 when new prescale value is written.  This means, for
example, that if one were using internal channel advance with 0.1 second
dwell time (prescaler=1e6) and then switched to external channel advance, it
will take a random number between 0 and 1e6 external channel advance pulses
before it counts the first channel.  This could take weeks! I have added a
workaround in the driver until the firmware is fixed.
Here are the comments from the file header:
 * .05  3/30/99   mlr  Fixed logic with preset counts

 * .06  09/12/99  mlr  Fixed #include to use '' instead of <> so

 *                     'gnumake depends' works

 * .07  12/05/99  mlr  Added call to drvSTR7201Erase to STR7201Config, needs

 *                     this initialization.

 *                     Fixed bug in the elapsed time logic.  Start time was

 *                     being set in AcqOn, even if an erase had not been
done.  
 *                     Minor changes to avoid compiler warnings.

 * .08  12/12/99  mlr  Added in Tim Mooney's hardware check in functions
called 
 *                     from devSup.

 * .09  02/04/00  mlr  Added support for 'simple' scaler mode in addition to

 *                     multichannel scaler mode.  Added 'mode' and 'signal'

 *                     parameters to drvST7201SetPresets.

 * .10  08/12/00  mlr  Zeroed strCard structure via calloc rather than
malloc    
 *                     when creating it.  Things like presetEndChan were not

 *                     initialized to zero, and this could cause problems.

 *                     Added workaround for problem with prescaler not

 *                     clearing its internal counter when the prescale value
is 
 *                     changed.

 *                     Added code to save/restore floating point registers

 *                     in interrupt service routine.  This was a serious
bug.   
 *                     Fixed some debugging formatting, minor changes to
avoid  
 *                     compiler warnings.

Tim Mooney found and fixed a problem in the ICB routines which was causing
crashes if an unknown ICB module, such as the TCA or DSP was present.

I have made changes to the AIM software to allow it to run on the PowerPC.
AIMConfig now takes another parameter which is the device name of the
Ethernet device.  Previously 'ei0' was hardcoded in.  For the PowerPC use
'dc0'.  If this parameter is omitted it defaults to 'ei0' so old startup
files on mv167 and mv162 will still work.  Here are some recent comments
from devMCA_AIM.c
* .08  05/05/00  mlr       Change AIMConfig to take another parameter, the
*                          name of the Ethernet device.  Previously 'ei0'
*                          was hardcoded in.
* .09  08/02/00  mlr       Previously the nmc_acqu_setelapsed command
*                          (in nmc_user_subs_2.c) always did the following:
*                          - Queried acquisition status
*                          - Turned acquisition off (even if it was off)
*                          - Set the elapsed times
*                          - Turned acquisition back on if it had been on
*                          nmc_acque_setelapsed cannot set the elapsed times
*                          if the AIM is acquiring.  However, this method
has
*                          a lot of extra overhead if the AIM is not
acquiring
*                          Moved the logic into this device support.  Only
*                          turn off acquisition if it is determined to be on
*                          by the ACQG field in the record.  This improves
*                          performance.  It also improves accuracy if the
AIM
*                          is acquiring, because the erase and setelapsed
will
*                          now both be done with acquisition off.
*/              

The new version of mcaApp can be obtained at
ftp://cars.uchicago.edu/pub/epics/mcaApp.tar


Mark Rivers