Final sync with trunk for R6-6.

This commit is contained in:
Ron Sluiter
2011-08-30 21:36:37 +00:00
parent dfb4d7530d
commit 79af962c38
12 changed files with 122 additions and 168 deletions
+6
View File
@@ -256,6 +256,12 @@ Modification Log from R6-5 to R6-6
File modified: OmsSrc/drvMAXv.cc
14) OMS MAXv
- Increase maximum configuration string size from 150 to 300 bytes.
- Increase all receive buffer sizes to same 300 bytes.
- Add error checks for buffer overflow in MAXvConfig() and in readbuf().
- Buffer overflow error checks
Modification Log from R6-4 to R6-5
==================================
+30 -67
View File
@@ -5,12 +5,14 @@
<meta content="Ronald L. Sluiter" name="Author" />
<meta content="Synopsis of modifications, fixes and new features for each motor record release."
name="Description" />
<title>EPICS Motor Record Release R6-5 Notice</title>
<title>EPICS Motor Record Release R6-6 Notice</title>
<meta content="Ronald L. Sluiter" name="author" />
<meta content="Notification of bug fixes, functional changes and new features." name="description" />
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
</head>
<body>
<div style="text-align: center">
<h1>
<b>Motor Record Version 6-6 Release Notice</b></h1>
@@ -21,53 +23,10 @@
</div>
<div style="text-align: left">
<p>
<b>Many driver and device support files</b>
</p>
<p>
Minor fixes to allow building dynamically on win32-x86, i.e. to build DLLs. This
mostly involved changing the location of the #include &lt;epicsExport.h&gt; statement
and adding the epicsShareFunc qualifier.
</p>
<p>
<b>XPS trajectory scanning (Mark Rivers)</b>
</p>
<p>
Fixed a bug with soft limit checking when the motors .DIR field was negative.
</p>
<p>
There was previously a problem with reading back the gathering data (actual and
theoretical positions) when doing trajectory scans. The problem was that the XPS
firmware would sometimes save a corrupted file to the flash drive in the XPS. Newport
is not fixing this, so we changed to reading the gathering data GatheringDataMultipleLinesGet(),
i.e. directly over the socket connection to the XPS, rather than saving to a file
and using FTP to copy the file to the IOC.
</p>
<p>
The above change exposed a bug in the SendAndReceive function in asynOctetSocket.cpp.
That function needs to loop reading from the socket until it sets the end-of-message
string ",EndOfAPI". It was not previously doing this, which was OK when responses
were shorter than the 999 bytes that the XPS sends in one message. But the GatheringDataMultipleLinesGet()
function returns very long responses, up to 64KB, so this needed to be fixed.
</p>
<p>
Updated the XPS_C8_driver.cpp and .h files to the latest versions that come with
the XPS 2.6.2 firmware. This adds new functions over the versions previously being
used. To take advantage of these new functions the XPS firmware needs to be upgraded
to 2.6.2.
</p>
<p>
<b>asynMotorDriver</b>&nbsp;</p>
<p>
Changed the function callParamCallbacks(addr, addr) to callParamCallbacks(addr).
This will require changes to any existing drivers that derive from asynMotorDriver.
</p>
<p>
<b>motorSimDriver</b>&nbsp;</p>
<p>
Fix bug with items not initialized in constructor. Made changes to work with fixes
to asynMotorDriver described above.
<b>Aerotech Ensemble Home Search</b>
</p>
<p>
The Home Search ability will be restored in a future bug fix release.
</p>
</div>
<div style="text-align: center">
@@ -76,17 +35,21 @@
</div>
<div style="text-align: left">
<p>
<b>Parker ACR series controller support</b>&nbsp;</p>
<b>Hytec 8601</b>
</p>
<p>
Asyn motor driver support was added by Hytec for the 8601 stepper motor driver.
</p>
<p>
<b></b>
</p>
<p>
Mark Rivers added a new driver for the Parker ACR (including Aries) series of controllers.
This driver uses the new asyn C++ model, i.e. it derives from asynMotorDriver.cpp.
It has currently only been tested on the single-axis Aries controller, but it should
work on the multi-axis ACR controllers as well. The driver supports parameters beyond
the standard motor record parameters, including the jerk parameter (derivative of
acceleration with respect to time) and 32 opto-isolated inputs and 32 opto-isolated
outputs.
</p>
</div>
<p>
</p>
<div style="text-align: center">
<h1>
<b>Motor Record Version 6-5 Release Notice</b></h1>
@@ -133,15 +96,15 @@
<li>Aerotech Ensemble device driver fixes for incorrect Jog speeds, support for a
negative PosScaleFactor parameter and detecting maximum travel limit switch faults.
</li>
<li>This is the latest release to include the old Ensemble device driver architecture
<li>This is the last release to include the old Ensemble device driver architecture
version. See below. </li>
</ul>
<p>
<b>RES field deleted</b>
</p>
<p>
The RES field was removed from the motor record database definition with this release
(R6-5). The RES field has been depreciated by the MRES field since R4-5.
The RES field was removed from the motor record database definition with this
release (R6-5). The RES field has been depreciated by the MRES field since R4-5.
</p>
</div>
<div style="text-align: center">
@@ -153,26 +116,26 @@
<b>Aerotech Soloist and Ensemble motor controller support</b>
</p>
<p>
Two new drivers from Aerotech were add; an asyn motor version of the Ensemble and
the Soloist under the old driver architecture. Since the Ensemble network connection
requires period communication from the host to prevent the Ensemble from closing
the network socket, the Ensemble support based on the old device driver architecture
will be removed after R5-6. The asyn motor architecture supports continuous, periodic
updates; the old architecture does not.
Two new drivers from Aerotech were add; an asyn motor version of the Ensemble
and the Soloist under the old driver architecture. Since the Ensemble network
connection requires period communication from the host to prevent the Ensemble
from closing the network socket, the Ensemble support based on the old device
driver architecture will be removed after R5-6. The asyn motor architecture
supports continuous, periodic updates; the old architecture does not.
</p>
<p>
<b>ADEL and MDEL fields added</b>
</p>
<p>
Matthew Pearson (Diamond) added support for the ADEL and MDEL motor record fields.
Unlike most records, the ADEL/MDEL fields in the motor record apply to the User
Readback Value (RBV). See the motorRecord.html document for details.
Matthew Pearson (Diamond) added support for the ADEL and MDEL motor record
fields. Unlike most records, the ADEL/MDEL fields in the motor record apply to
the User Readback Value (RBV). See the motorRecord.html document for details.
</p>
<p>
<b>Synchronize field (SYNC)</b>
</p>
<p>
When the SYNC field is set to Yes(1) the record sets the Drive fields (VAL/DVAL/RVAL)
When the SYNC field is set to Yes(1) the record sets the Drive fields (VAL/DVAL/RVAL)
to their readback values (RBV/DRBV/RRBV) and sets SYNC field back to No(0).
</p>
</div>
+8 -8
View File
@@ -13,7 +13,7 @@ dbLoadTemplate "XPSAux.substitutions"
# asyn port, IP address, IP port, number of axes,
# active poll period (ms), idle poll period (ms),
# enable set position, set position settling time (ms)
XPSConfig("XPS1", "164.54.160.55", 5001, 6, 10, 500, 0, 500)
XPSCreateController("XPS1", "164.54.160.55", 5001, 6, 10, 500, 0, 500)
asynSetTraceIOMask("XPS1", 0, 2)
#asynSetTraceMask("XPS1", 0, 255)
@@ -23,16 +23,16 @@ XPSAuxConfig("XPS_AUX1", "164.54.160.55", 5001, 50)
#asynSetTraceMask("XPS_AUX1", 0, 255)
# XPS asyn port, axis, groupName.positionerName, stepSize
XPSConfigAxis("XPS1",0,"GROUP.PHI", 1000)
XPSConfigAxis("XPS1",1,"GROUP.KAPPA", 10000)
XPSConfigAxis("XPS1",2,"GROUP.OMEGA", 10000)
XPSConfigAxis("XPS1",3,"GROUP.PSI", 4000)
XPSConfigAxis("XPS1",4,"GROUP.THETA", 10000)
XPSConfigAxis("XPS1",5,"GROUP.NU", 4000)
XPSCreateAxis("XPS1",0,"GROUP.PHI", "1000")
XPSCreateAxis("XPS1",1,"GROUP.KAPPA", "10000")
XPSCreateAxis("XPS1",2,"GROUP.OMEGA", "10000")
XPSCreateAxis("XPS1",3,"GROUP.PSI", "4000")
XPSCreateAxis("XPS1",4,"GROUP.THETA", "10000")
XPSCreateAxis("XPS1",5,"GROUP.NU", "4000")
# XPS asyn port, max points, FTP username, FTP password
# Note: this must be done after configuring axes
XPSConfigProfile("XPS1", 2000, "Administrator", "Administrator")
XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator")
iocInit
+2 -2
View File
@@ -173,7 +173,7 @@ asynStatus asynMotorAxis::setPosition(double position)
asynStatus asynMotorAxis::setIntegerParam(int function, int value)
{
int mask;
epicsUInt32 status;
epicsUInt32 status=0;
// This assumes the parameters defined above are in the same order as the bits the motor record expects!
if (function >= pC_->motorStatusDirection_ &&
function <= pC_->motorStatusHomed_) {
@@ -324,7 +324,7 @@ asynStatus asynMotorAxis::readbackProfile()
int direction;
int numReadbacks;
int status=0;
static const char *functionName = "readbackProfile";
//static const char *functionName = "readbackProfile";
status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorResolution_, &resolution);
status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorOffset_, &offset);
+2 -2
View File
@@ -137,10 +137,10 @@ typedef enum {
#define LSB_First (TRUE) /* LSB is packed first. */
#elif defined(sparc) || defined(m68k) || defined(powerpc)
#define MSB_First (TRUE) /* MSB is packed first. */
#elif (CPU == PPC604) || (CPU == PPC603) || (CPU==PPC85XX)
#elif (CPU == PPC604) || (CPU == PPC603) || (CPU==PPC85XX) || (CPU == MC68040)
#define MSB_First (TRUE) /* MSB is packed first. */
#else
Error: unknown bit order!
#error: unknown bit order!
#endif
/* -------------------------------------------------- */
@@ -9,6 +9,7 @@ program MM4005_trajectoryScan("P=13IDC:,R=traj1,M1=M1,M2=M2,M3=M3,M4=M4,M5=M5,M6
* August 12, 2000
*/
%% #include <stdlib.h> /* for atof() */
%% #include <string.h>
%% #include <stdio.h>
%% #include <epicsString.h>
+6 -7
View File
@@ -10,9 +10,8 @@ include $(TOP)/configure/CONFIG
INC += XPS_C8_drivers.h
DBD += devNewport.dbd
DBD += devNewportModel3.dbd
LIBRARY_IOC = Newport NewportModel2 NewportModel3
LIBRARY_IOC = Newport
Newport_SRCS += NewportRegister.cc
@@ -38,14 +37,14 @@ Newport_SRCS += XPS_C8_drivers.cpp
Newport_SRCS += drvXPSAsynAux.c
Newport_SRCS += xps_ftp.c
# This is the model 2 asyn driver
NewportModel2_SRCS += drvXPSAsyn.c XPSAsynInterpose.c
Newport_SRCS += drvXPSAsyn.c XPSAsynInterpose.c
# This is the model 3 asyn driver
NewportModel3_SRCS += XPSController.cpp
NewportModel3_SRCS += XPSAxis.cpp
Newport_SRCS += XPSController.cpp
Newport_SRCS += XPSAxis.cpp
ifdef SNCSEQ
NewportModel2_SRCS += XPS_trajectoryScan.st
Newport_SRCS += XPS_trajectoryScan.st
endif
# strtok_r needed on WIN32
Newport_SRCS_WIN32 += strtok_r.c
+63 -53
View File
@@ -7,7 +7,7 @@ Modified By: $Author: sluiter $
Last Modified: $Date: 2009-12-09 10:21:24 -0600 (Wed, 09 Dec 2009) $
HeadURL: $URL: https://subversion.xor.aps.anl.gov/synApps/trunk/support/motor/vstub/motorApp/NewportSrc/XPSMotorDriver.cpp $
*/
/*
Original Author: Mark Rivers
*/
@@ -87,6 +87,7 @@ using std::endl;
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include <epicsTime.h>
#include <epicsThread.h>
@@ -1302,9 +1303,9 @@ asynStatus XPSController::noDisableError()
extern "C" {
asynStatus XPSConfig(const char *portName, const char *IPAddress, int IPPort,
int numAxes, int movingPollPeriod, int idlePollPeriod,
int enableSetPosition, int setPositionSettlingTime)
asynStatus XPSCreateController(const char *portName, const char *IPAddress, int IPPort,
int numAxes, int movingPollPeriod, int idlePollPeriod,
int enableSetPosition, int setPositionSettlingTime)
{
XPSController *pXPSController
= new XPSController(portName, IPAddress, IPPort, numAxes,
@@ -1316,14 +1317,15 @@ asynStatus XPSConfig(const char *portName, const char *IPAddress, int IPPort,
asynStatus XPSConfigAxis(const char *XPSName, /* specify which controller by port name */
asynStatus XPSCreateAxis(const char *XPSName, /* specify which controller by port name */
int axis, /* axis number 0-7 */
const char *positionerName, /* groupName.positionerName e.g. Diffractometer.Phi */
int stepsPerUnit) /* steps per user unit */
const char *stepsPerUnit) /* steps per user unit */
{
XPSController *pC;
XPSAxis *pAxis;
static const char *functionName = "XPSConfigAxis";
double stepSize;
static const char *functionName = "XPSCreateAxis";
pC = (XPSController*) findAsynPortDriver(XPSName);
if (!pC) {
@@ -1331,21 +1333,29 @@ asynStatus XPSConfigAxis(const char *XPSName, /* specify which controlle
driverName, functionName, XPSName);
return asynError;
}
errno = 0;
stepSize = strtod(stepsPerUnit, NULL);
if (errno != 0) {
printf("%s:%s: Error invalid steps per unit=%s\n",
driverName, functionName, stepsPerUnit);
return asynError;
}
pC->lock();
pAxis = new XPSAxis(pC, axis, positionerName, 1./stepsPerUnit);
pAxis = new XPSAxis(pC, axis, positionerName, 1./stepSize);
pAxis = NULL;
pC->unlock();
return asynSuccess;
}
asynStatus XPSConfigProfile(const char *XPSName, /* specify which controller by port name */
asynStatus XPSCreateProfile(const char *XPSName, /* specify which controller by port name */
int maxPoints, /* maximum number of profile points */
const char *ftpUsername, /* FTP account name */
const char *ftpPassword) /* FTP password */
{
XPSController *pC;
static const char *functionName = "XPSConfigProfile";
static const char *functionName = "XPSCreateProfile";
pC = (XPSController*) findAsynPortDriver(XPSName);
if (!pC) {
@@ -1392,65 +1402,65 @@ asynStatus XPSNoDisableError(const char *XPSName)
/* Code for iocsh registration */
/* XPSConfig */
static const iocshArg XPSConfigArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSConfigArg1 = {"IP address", iocshArgString};
static const iocshArg XPSConfigArg2 = {"IP port", iocshArgInt};
static const iocshArg XPSConfigArg3 = {"Number of axes", iocshArgInt};
static const iocshArg XPSConfigArg4 = {"Moving poll rate (ms)", iocshArgInt};
static const iocshArg XPSConfigArg5 = {"Idle poll rate (ms)", iocshArgInt};
static const iocshArg XPSConfigArg6 = {"Enable set position", iocshArgInt};
static const iocshArg XPSConfigArg7 = {"Set position settling time (ms)", iocshArgInt};
static const iocshArg * const XPSConfigArgs[] = {&XPSConfigArg0,
&XPSConfigArg1,
&XPSConfigArg2,
&XPSConfigArg2,
&XPSConfigArg4,
&XPSConfigArg5,
&XPSConfigArg6,
&XPSConfigArg7};
static const iocshFuncDef configXPS = {"XPSConfig", 8, XPSConfigArgs};
/* XPSCreateController */
static const iocshArg XPSCreateControllerArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSCreateControllerArg1 = {"IP address", iocshArgString};
static const iocshArg XPSCreateControllerArg2 = {"IP port", iocshArgInt};
static const iocshArg XPSCreateControllerArg3 = {"Number of axes", iocshArgInt};
static const iocshArg XPSCreateControllerArg4 = {"Moving poll rate (ms)", iocshArgInt};
static const iocshArg XPSCreateControllerArg5 = {"Idle poll rate (ms)", iocshArgInt};
static const iocshArg XPSCreateControllerArg6 = {"Enable set position", iocshArgInt};
static const iocshArg XPSCreateControllerArg7 = {"Set position settling time (ms)", iocshArgInt};
static const iocshArg * const XPSCreateControllerArgs[] = {&XPSCreateControllerArg0,
&XPSCreateControllerArg1,
&XPSCreateControllerArg2,
&XPSCreateControllerArg2,
&XPSCreateControllerArg4,
&XPSCreateControllerArg5,
&XPSCreateControllerArg6,
&XPSCreateControllerArg7};
static const iocshFuncDef configXPS = {"XPSCreateController", 8, XPSCreateControllerArgs};
static void configXPSCallFunc(const iocshArgBuf *args)
{
XPSConfig(args[0].sval, args[1].sval, args[2].ival,
args[3].ival, args[4].ival, args[5].ival,
args[6].ival, args[7].ival);
XPSCreateController(args[0].sval, args[1].sval, args[2].ival,
args[3].ival, args[4].ival, args[5].ival,
args[6].ival, args[7].ival);
}
/* XPSConfigAxis */
static const iocshArg XPSConfigAxisArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSConfigAxisArg1 = {"Axis number", iocshArgInt};
static const iocshArg XPSConfigAxisArg2 = {"Axis name", iocshArgString};
static const iocshArg XPSConfigAxisArg3 = {"Steps per unit", iocshArgInt};
static const iocshArg * const XPSConfigAxisArgs[] = {&XPSConfigAxisArg0,
&XPSConfigAxisArg1,
&XPSConfigAxisArg2,
&XPSConfigAxisArg3};
static const iocshFuncDef configXPSAxis = {"XPSConfigAxis", 4, XPSConfigAxisArgs};
/* XPSCreateAxis */
static const iocshArg XPSCreateAxisArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSCreateAxisArg1 = {"Axis number", iocshArgInt};
static const iocshArg XPSCreateAxisArg2 = {"Axis name", iocshArgString};
static const iocshArg XPSCreateAxisArg3 = {"Steps per unit", iocshArgString};
static const iocshArg * const XPSCreateAxisArgs[] = {&XPSCreateAxisArg0,
&XPSCreateAxisArg1,
&XPSCreateAxisArg2,
&XPSCreateAxisArg3};
static const iocshFuncDef configXPSAxis = {"XPSCreateAxis", 4, XPSCreateAxisArgs};
static void configXPSAxisCallFunc(const iocshArgBuf *args)
{
XPSConfigAxis(args[0].sval, args[1].ival, args[2].sval, args[3].ival);
XPSCreateAxis(args[0].sval, args[1].ival, args[2].sval, args[3].sval);
}
/* XPSConfigProfile */
static const iocshArg XPSConfigProfileArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSConfigProfileArg1 = {"Max points", iocshArgInt};
static const iocshArg XPSConfigProfileArg2 = {"FTP username", iocshArgString};
static const iocshArg XPSConfigProfileArg3 = {"FTP password", iocshArgString};
static const iocshArg * const XPSConfigProfileArgs[] = {&XPSConfigProfileArg0,
&XPSConfigProfileArg1,
&XPSConfigProfileArg2,
&XPSConfigProfileArg3};
static const iocshFuncDef configXPSProfile = {"XPSConfigProfile", 4, XPSConfigProfileArgs};
/* XPSCreateProfile */
static const iocshArg XPSCreateProfileArg0 = {"Controller port name", iocshArgString};
static const iocshArg XPSCreateProfileArg1 = {"Max points", iocshArgInt};
static const iocshArg XPSCreateProfileArg2 = {"FTP username", iocshArgString};
static const iocshArg XPSCreateProfileArg3 = {"FTP password", iocshArgString};
static const iocshArg * const XPSCreateProfileArgs[] = {&XPSCreateProfileArg0,
&XPSCreateProfileArg1,
&XPSCreateProfileArg2,
&XPSCreateProfileArg3};
static const iocshFuncDef configXPSProfile = {"XPSCreateProfile", 4, XPSCreateProfileArgs};
static void configXPSProfileCallFunc(const iocshArgBuf *args)
{
XPSConfigProfile(args[0].sval, args[1].ival, args[2].sval, args[3].sval);
XPSCreateProfile(args[0].sval, args[1].ival, args[2].sval, args[3].sval);
}
+1 -1
View File
@@ -12,7 +12,7 @@ driver(motorMM4000)
registrar(NewportRegister)
registrar(XPSGatheringRegister)
registrar(XPSRegister)
#registrar(XPSRegister3)
registrar(XPSRegister3)
registrar(XPSInterposeRegister)
registrar(drvXPSAsynAuxRegister)
registrar(MM4005_trajectoryScanRegistrar)
-26
View File
@@ -1,26 +0,0 @@
# Newport MM3000, MM4000/5, PM500 and ESP300 Device Driver support.
device(motor,VME_IO,devMM3000,"MM3000")
device(motor,VME_IO,devMM4000,"MM4000")
device(motor,VME_IO,devPM500, "PM500")
device(motor,VME_IO,devESP300,"ESP300")
driver(drvMM3000)
driver(drvMM4000)
driver(drvPM500)
driver(drvESP300)
#driver(motorXPS)
driver(motorMM4000)
registrar(NewportRegister)
registrar(XPSGatheringRegister)
#registrar(XPSRegister)
registrar(XPSRegister3)
#registrar(XPSInterposeRegister)
registrar(drvXPSAsynAuxRegister)
registrar(MM4005_trajectoryScanRegistrar)
#registrar(XPS_trajectoryScanRegistrar)
#variable(devXPSC8Debug)
#variable(drvXPSC8Debug)
#variable(drvESP300debug)
#variable(drvMM3000debug)
#variable(drvMM4000debug)
#variable(drvPM500debug)
+1
View File
@@ -16,6 +16,7 @@ program MAX_trajectoryScan("P=13IDC:,R=traj1,M1=M1,M2=M2,M3=M3,M4=M4,M5=M5,M6=M6
* Tim Mooney -- based on MM4000_trajectoryScan.st by Mark Rivers.
*/
%% #include <stdlib.h>
%% #include <string.h>
%% #include <ctype.h>
%% #include <stdio.h>
+2 -2
View File
@@ -21,7 +21,7 @@ COMMONDBDS += devImsMotor.dbd
COMMONDBDS += devMclennanMotor.dbd
COMMONDBDS += devMicos.dbd
COMMONDBDS += devMicroMo.dbd
COMMONDBDS += devNewportModel3.dbd
COMMONDBDS += devNewport.dbd
ifdef SNCSEQ
COMMONDBDS += LdevNewportTS.dbd
endif
@@ -66,7 +66,7 @@ COMMONLIBS += MicroMo
COMMONLIBS += PI
COMMONLIBS += Acs
COMMONLIBS += Ims
COMMONLIBS += NewportModel3 Newport
COMMONLIBS += Newport
COMMONLIBS += softMotor
COMMONLIBS += motorSimSupport
COMMONLIBS += SmartMotor