EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Newport XPS-Q8 and Motor Record - RV120HAHL stage
From: "Pearson, Matthew R." <[email protected]>
To: Mark Rivers <[email protected]>
Cc: Tonia Batten <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 1 Nov 2013 18:54:41 -0400
Hi Tonia,

I've had problems in the past setting VBAS to non zero values. I seem to remember it caused the acceleration to be set too high for the XPS, although it may not be causing this issue.

Also, I see you're using Asyn 4-13. It's probably worth upgrading from that version since there were locking problems in that version (fixed in Asyn 4-14).

Cheers,
Matt



On Nov 1, 2013, at 5:53 PM, Mark Rivers <[email protected]> wrote:

> Hi Tonia,
>  
> It looks to me like the conversion from steps to XPS engineering units may be incorrect.  The steps per unit you are passing in XPSConfigAxis looks OK, since it is 10000, which is the reciprocal of MRES (0.0001).   The driver converts “steps per units” to “stepSize”  = 1./”steps per unit”, and it multiplies all velocity and position values from the motor record by this value.
>  
> You can determine what value of stepSize the driver is acutall using by typing the following command:
>  
> asynReport 10 XPS1
>  
> You can also get more complete debugging output by changing this line:
>  
> asynSetTraceMask("XPS1",0,0x9)
>  
> to this:
> asynSetTraceMask("XPS1",0,0xFF)
>  
> That should enable this output in motorAxisMove:
>  
>    PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f\n",
>           pAxis->card, pAxis->axis, position, min_velocity, max_velocity, acceleration);
>  
> That will show you the target position (in “steps”) and velocity (in “steps” per second) the motor record is requesting.
>  
>  
> motorAxisMove then sets the velocity and acceleration as follows:
>  
>     status = PositionerSGammaParametersSet(pAxis->pollSocket,
>                                            pAxis->positionerName,
>                                            max_velocity*pAxis->stepSize,
>                                            acceleration*pAxis->stepSize,
>                                            pAxis->minJerkTime,
>                                            pAxis->maxJerkTime);
>  
> It then moves the motor as follows:
>  
>     deviceUnits = position * pAxis->stepSize;
> ..
>         status = GroupMoveAbsolute(pAxis->moveSocket,
>                                    pAxis->positionerName,
>                                    1,
>                                    &deviceUnits);
>  
> Cheers,
> Mark
>  
>  
>  
> From: [email protected] [mailto:[email protected]] On Behalf Of Tonia Batten
> Sent: Friday, November 01, 2013 4:13 PM
> To: [email protected]
> Subject: Newport XPS-Q8 and Motor Record - RV120HAHL stage
>  
> Good Afternoon,
>  
> I am using EPICS R3.14.12, MOTOR 6-5 and ASYN 4-13 with a Newport XPS-Q8 controller with an XPS-DRV03 card to try and move a RV120HAHL stage.  Because the RV120HAHL stage is not supported by the Newport Controller I have configured the RV120CCHL and adjusted the following parameters and then auto tuned the configuration for the stage.
>  
> EncoderResolution = 0.0001 ;--- units
> MaximumVelocity = 8 ;--- units / s
> MaximumAcceleration = 32 ;--- units / s²
> HomeSearchMaximumVelocity = 4 ;--- units / s
> HomeSearchMaximumAcceleration = 16 ;--- units / s²
> MinimumTargetPosition=1;--- units
> MaximumTargetPosition=59;--- units
> HomePreset=6;--- units
>  
> Here is the information from the .ini file for the stage I have configured.
>  
> ;RV@RV160CCHL@XPS-DRV03
> ;--- Unit = deg
> ;--- Configuration_Comment =
> ;--- Smart stage name
> SmartStageName=
> ;--- Motor driver model parameters
> DriverName=XPS-DRV03
> DriverMaximumRMSCurrent=1.98;--- A
> DriverRMSIntegrationTime=3;--- s
> ;--- Driver command interface parameters
> MotorDriverInterface=AnalogVoltage
> ScalingCurrent=5;--- A
> CurrentLimit=3.96;--- A
> ScalingVoltage=48;--- V
> VoltageLimit=45.56;--- V
> ;--- Position encoder interface parameters
> EncoderType=AquadB
> EncoderResolution=0.0001;--- units
> LinearEncoderCorrection=0;--- ppm
> Backlash=0;--- units
> CurrentVelocityCutOffFrequency=100;--- Hz
> CurrentAccelerationCutOffFrequency=100;--- Hz
> PositionerMappingFileName=
> PositionerMappingLineNumber=
> PositionerMappingMaxPositionError=;--- units
> EncoderIndexOffset=0;--- units
> ;--- Limit sensor input plug parameters
> ServitudesType=StandardEORDriverPlug
> MinimumTargetPosition=1;--- units
> MaximumTargetPosition=59;--- units
> HomePreset=6;--- units
> MaximumVelocity=8;--- units / s
> MaximumAcceleration=32;--- units / s2
> EmergencyDecelerationMultiplier=4
> MinimumJerkTime=0.005;--- s
> MaximumJerkTime=0.05;--- s
> TrackingCutOffFrequency=25;--- Hz
> ;--- Home search process parameters
> HomeSearchSequenceType=MechanicalZeroAndIndexHomeSearch
> HomeSearchMaximumVelocity=4;--- units / s
> HomeSearchMaximumAcceleration=16;--- units / s2
> HomeSearchTimeOut=86;--- s
> HomingSensorOffset=0;--- units
> ;--- Position servo loop type parameters
> CorrectorType=PIDDualFFVoltage
> ClosedLoopStatus=Closed
> FatalFollowingError=1;--- units
> KP=36
> KI=650
> KD=0.279
> KS=0.8
> GKP=0
> GKD=0
> GKI=0
> KForm=0;--- units
> IntegrationTime=1E+99;--- s
> DerivativeFilterCutOffFrequency=4000;--- Hz
> DeadBandThreshold=0;--- units
> KFeedForwardVelocity=1.815
> KFeedForwardAcceleration=0.0010378
> KFeedForwardVelocityOpenLoop=1.815
> Friction=0;--- V
> NotchFrequency1=0;--- Hz
> NotchBandwidth1=0;--- Hz
> NotchGain1=0
> NotchFrequency2=0;--- Hz
> NotchBandwidth2=0;--- Hz
> NotchGain2=0
> ;--- Motion done condition mode parameters
> MotionDoneMode=Theoretical
>  
> After rebooting the controller I am able to successfully use the Newport web interface to initialize, home and move the stage.  However when I try and move the stage with the Motor record I am seeing strange behaviour. 
>  
> Here is my st.cmd file.
>  
> #!./bin/linux-armv5teb/ideasMonoMtr
>  
> ## You may have to change ideasMonoMtr to something else
> ## everywhere it appears in this file
>  
> #< envPaths
>  
> ## Register all support components
> dbLoadDatabase("./dbd/ideasMonoMtr.dbd",0,0)
> ideasMonoMtr_registerRecordDeviceDriver(pdbbase)
>  
> ## Load record instances
> dbLoadRecords("./db/IDEAS_MonoMtr.db")
> dbLoadRecords("./db/IDEAS_MonoPseudoMtr.db")
> dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=SMTR1608-9-B20-05:")
>  
> # cards (total controllers)
> XPSSetup(1)
>  
> # card, IP, PORT, number of axes, active poll period (ms), idle poll period (ms)
> XPSConfig(0, "192.168.0.254", 5001, 1, 10, 5000)
>  
> # asyn port, driverType, box number, number of  axes)
> drvAsynMotorConfigure("XPS1", "motorXPS", 0, 1)
> XPSInterpose("XPS1")
>  
> # Turns off the ability of the motor record to change an actuator's position without moving it.
> XPSEnableSetPosition(0)
>  
> # card,  axis, postioner name, steps per unit
> XPSConfigAxis(0,0,"S.Pos",10000)
>  
> asynSetTraceMask("XPS1",0,0x9)
> #asynSetTraceMask("XPS1",0,255)
> asynSetTraceIOMask("XPS1",0,0x2)
> #asynSetTraceIOMask("XPS1",0,2)
>  
> iocInit()
>  
> Here is how my motor record and the XPS_extra records are defined.  In addition I have some additional PV’s defined to calculate the ultimate position of the motor.
>  
> record(motor,"SMTR1608-9-B20-05:brag")
> {
>                 field(DESC,"Mono Brag")
>                 field(DTYP,"asynMotor")
>                 field(DIR,"Pos")
>                 field(VELO,"1")
>                 field(VBAS,".1")
>                 field(ACCL,".2")
>                 field(BDST,"0")
>                 field(BVEL,"1")
>                 field(BACC,".2")
>                 field(OUT,"@asyn(XPS1,0)")
>                 field(MRES,"0.0001")
>                 field(PREC,"5")
>                 field(EGU,"degrees")
>                 field(DHLM,"59")
>                 field(DLLM,"1")
>                 field(INIT,"")
>                 field(RTRY,"0")
>                 field(TWV,"1")
> }
>  
> # Database for Newport XPS
>  
> grecord(ao,"SMTR1608-9-B20-05:brag:MIN_JERK_TIME") {
>     field(DESC,"Min jerk time")
>     field(PREC,"3")
>     field(VAL,".01")
>     field(DTYP, "asynFloat64")
>     field(OUT,"@asyn(XPS1,0)MIN_JERK_TIME")
> }
> grecord(ao,"SMTR1608-9-B20-05:brag:MAX_JERK_TIME") {
>     field(DESC,"Max jerk time")
>     field(PREC,"3")
>     field(VAL,".03")
>     field(DTYP, "asynFloat64")
>     field(OUT,"@asyn(XPS1,0)MAX_JERK_TIME")
> }
> grecord(ai,"SMTR1608-9-B20-05:brag:READBACK") {
>     field(DESC,"Readback")
>     field(PREC,"4")
>     field(PINI, "1")
>     field(DTYP, "asynFloat64")
>     field(SCAN, "I/O Intr")
>     field(INP,"@asyn(XPS1,0)MOTOR_POSITION")
> }
> grecord(ai,"SMTR1608-9-B20-05:brag:XPS_STATUS") {
>     field(DESC,"XPS Group Status")
>     field(DTYP, "asynInt32")
>     field(PINI, "1")
>     field(PREC,"0")
>     field(SCAN, "I/O Intr")
>     field(INP,"@asyn(XPS1,0)XPS_STATUS")
> }
>  
> I did an asyn trace and after starting up the motor records appears to be passing in the wrong values for the limits.
>  
> 2013/11/01 14:03:31.880 motorAxisSetDouble[0,0]: error performing PositionerUserTravelLimitsSet for high limit=0.000000, status=-17
> 2013/11/01 14:03:31.888 drvMotorAsyn::writeFloat64, reason=4, value=0.000000
> 2013/11/01 14:03:31.895 devMotorAsyn::asynCallback: SMTR1608-9-B20-05:brag pasyn{Float64,Int32}->write returned
> 2013/11/01 14:03:31.904 motorAxisSetDouble[0,0]: error performing PositionerUserTravelLimitsSet for low limit=0.000000, status=-17
>  
> Upon initialization I am pushing in a movement from the home position of 6.000 to 8.54439294393059, however the motor is passing in a value below the low limit for an absolute move and is therefore not moving.
>  
> 2013/11/01 14:03:36.041 SendAndReceive unexpected response =-17,GroupMoveAbsolute (S.Pos,1.398175069718e-312),EndOfAPI
>  
> epics> dbpr SMTR1608-9-B20-05:brag 10
> ACCL: 0.2           ACKS: NO_ALARM      ACKT: YES           ADEL: 0
> ALST: 0             ASG:                ASP: (nil)          ATHM: 0
> BACC: 0.2           BDST: 0             BKPT: 00            BVEL: 1
> CARD: -1            CBAK: 0xa0db8       CDIR: 1             CNEN: Disable
> DCOF: 0             DESC: Mono Brag     DHLM: 59
> DIFF: 2.54329294393059                  DINP:CONSTANT       DIR: Pos
> DISA: 0             DISP: 0             DISS: NO_ALARM      DISV: 1
> DLLM: 1             DLY: 0              DMOV: 1             DOL:CONSTANT
> DPVT: 0xa0dd0       DRBV: 6.0011        DSET: 0x40109680    DTYP: asynMotor
> DVAL: 8.54439294393059                  EGU: degrees        ERES: 1.0e-04
> EVNT: 0             FLNK:CONSTANT 0     FOF: 0              FOFF: Variable
> FRAC: 1             HHSV: NO_ALARM      HIGH: 0             HIHI: 0
> HLM: 59             HLS: 0              HLSV: NO_ALARM      HOMF: 0
> HOMR: 0             HOPR: 0             HSV: NO_ALARM       HVEL: 0.1
> ICOF: 0             INIT:               JAR: 5              JOGF: 0
> JOGR: 0             JVEL: 1             LCNT: 0
> LDVL: 8.54439294393059                  LLM: 1              LLS: 0
> LLSV: NO_ALARM      LOCK: NO            LOLO: 0             LOPR: 0
> LOW: 0              LRLV: 0             LRVL: 85444         LSET: 0xa18f8
> LSPG: Go            LSV: NO_ALARM       LVAL: 8.54439294393059
> LVIO: 0             MDEL: 0             MIP: 0              MISS: 0
> MLIS: 00 0d 84 38 00 0d 82 f8 00 00 00 04                   MLOK: 00 09 e1 10
> MLST: 0             MMAP: 0             MOVN: 0             MRES: 1.0e-04
> MSTA: 2050          NAME: SMTR1608-9-B20-05:brag            NMAP: 0
> NSEV: NO_ALARM      NSTA: NO_ALARM      NTM: YES            NTMF: 2
> OFF: 0              OMSL: supervisory   OUT:INST_IO @asyn(XPS1,0)
> PACT: 0             PCOF: 0             PHAS: 0             PINI: NO
> POST:               PP: 0               PPN: (nil)          PPNR: (nil)
> PREC: 5             PREM:               PRIO: LOW           PROC: 0
> PUTF: 0             RBV: 6.0011         RCNT: 0             RDBD: 1.0e-04
> RDBL:CONSTANT       RDES: 0x651d0       RDIF: 25433         REP: 60011
> RHLS: 0             RINP:CONSTANT       RLLS: 0             RLNK:CONSTANT
> RLV: 0              RMOD: Default       RMP: 60011          RPRO: 0
> RRBV: 60011         RRES: 0             RSET: 0x40109488    RTRY: 0
> RVAL: 85444         RVEL: 0             S: 50               SBAK: 50
> SBAS: 5             SCAN: Passive       SDIS:CONSTANT       SET: Use
> SEVR: NO_ALARM      SMAX: 0             SPMG: Go            SPVT: (nil)
> SREV: 200           SSET: 0             STAT: NO_ALARM      STOO:CONSTANT
> STOP: 0             STUP: OFF           SUSE: 0             SYNC: 0
> TDIR: 0             TIME: 2013-11-01 14:04:06.363958000     TPRO: 0
> TSE: 0              TSEL:CONSTANT       TWF: 0              TWR: 0
> TWV: 1              UDF: 0              UEIP: No            UREV: 0.02
> URIP: No            VAL: 8.54439294393059                   VBAS: 0.1
> VELO: 1             VERS: 6.5           VMAX: 0             VOF: 0
>  
> What is even stranger is that the velocity and acceleration are then set to values much smaller than then should be (e-312)
>  
> <image001.jpg>
>  
> I am sure I must have something configured incorrectly.  At this point it appears that the problem is associated with something configured incorrectly with the motor record.  I would greatly appreciate any feedback or insight anyone can provide.
>  
> Thanks,
>  
> Tonia Batten, P.Eng
> Control System Analyst
> Canadian Light Source
> 44 Innovation Blvd.
> Saskatoon, SK S7N 2V3
> Tel:  306-657-3865
> Email: [email protected]
>  
>  
>  
>  



Replies:
RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Tonia Batten
References:
Newport XPS-Q8 and Motor Record - RV120HAHL stage Tonia Batten
RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Mark Rivers

Navigate by Date:
Prev: RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Mark Rivers
Next: RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Tonia Batten
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Mark Rivers
Next: RE: Newport XPS-Q8 and Motor Record - RV120HAHL stage Tonia Batten
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·