> I have just started today the testing of Mark's XPS_trajectoryScan from motor-R6-9 on our Newport XPS-Q8.
> Is your "ProfileMove API" a better fit for the XPS trajectory scan?
Yes, the ProfileMove is intended to replace the old trajectoryScan code. trajectoryScan is based on a SNL program that talks directory to the XPS controller, without going through the same driver that the motor record is talking to. This is a bad architecture, because the motor record driver has no idea that other software is talking to the controller at the same time, and so it is not possible to prevent conflicts.
The ProfileMove API uses very similar PVs to the trajectoryScan, but it moves the software into the same driver that is being used with the motor record. It also defines an API, and not just a set of records, which the trajectoryScan SNL code does.
We switched from trajectoryScan to ProfileMove on our APS beamlines back in 2011 and have been very happy with it. It required only minor changes to the SPEC macros from those we were using with trajectoryScan.
> If so, could we have the code for testing?
The code is on Github. The base classes are in motorApp/MotorSrc, and the derived classes for the APS are in motorApp/NewportSrc.
motor/iocBoot/iocWithAsyn/st.cmd.xps4 and motors.template.xps4 contain an example of how to load the ProfileMove database and configure the XPS.
Here is a link to a SPEC macro that does scanning using the ProfileMove API on the XPS. Note that for historical reasons it is still called trajectoryscan, but it is using the new API and database.
I have some IDL test programs here:
This is the documentation at the top of profile_move.pro
function profile_move, profile, positions, groupName=groupName, useAxes=useAxes, $
maxAxes=maxAxes, time=time, acceleration=acceleration, npulses=npulses, $
pulseRange=pulseRange, build=build, execute=execute, readback=readback, $
; This IDL function loads and execute a profile move
; using the EPICS asyn motor driver and its profile move functions.
; EPICS profile moves
; CALLING SEQUENCE:
; Result = PROFILE_MOVE(Profile, Positions)
; PROFILE: The EPICS record name for thisprofile, for example '13BMC:Prof1:'.
; POSITIONS: [NPOINTS, NMOTORS]. The positions of the motors at each point in the profile move
; KEYWORD PARAMETERS:
; GROUPNAME: If this keyword is specified it controls the group name of the XPS profile
; USEAXES: An with list of axes to move
; TIME: If this keyword is a scaler, then it specifies the fixed time per point
; in the profile. If it is an array then it specifies the time per point.
; Default=1 second per point.
; ACCELERATION: The acceleration time for the profile. Default=1 second.
; NPULSES: The number of output pulses during the profile. Default=NPOINTS, the number
; of points in the input Positions array.
; PULSERANGE: The range of points over which to output pulses. Default=[1,NPOINTS]
; BUILD: Set this keyword to build and verify the profile. This is the default.
; EXECUTE: Set this keyword to execute the profile. This is the default.
; READBACK: Set this keyword to read back the profile into ACTUAL and ERROR.
; The default is to not read back.
; NOTE: Any or all of these keywords can be set. If none is set then the
; function does not do anything.
; Result: This function returns a status indicating whether the
; selected operations were successful or not. 0=success,
; anything else is a failure.
; ACTUAL: An array of [Nactual, NMOTORS] containing the actual positions of
; each axis.
; ERRORS: An array of [Nactual, NMOTORS] containing the following errors of
; each axis.
; NOTE: The ACTUAL and ERROR outputs are only returned if the READBACK keyword it set.
; SIDE EFFECTS:
; This procedure can move the motors. Be careful!
; positions = [[1,2,3],[.1, .2, .3], [0,3,4]]
; status = PROFILE_MOVE('13IDC:Prof1:', positions, /readback, actual, errors)
; plot, actual[*,0]
; oplot, errors[*,0]
; MODIFICATION HISTORY:
; Written by: Mark Rivers, April 5, 2011
There are 4 test programs, profile_move_test[1-4].pro that I used to test the software.
It would be trivial to translate these IDL functions into Python if that is the language you would like to work in.
From: So, Sung-Leung [mailto:email@example.com]
Sent: Monday, September 25, 2017 12:43 PM
Cc: Mark Rivers; Mark.Clift@synchrotron.org.au
Subject: Re: Coordinated motion with EPICS motor record
Hi Mark (both Rivers and Clift),
I have just started today the testing of Mark's XPS_trajectoryScan from motor-R6-9 on our Newport XPS-Q8.
Is your "ProfileMove API" a better fit for the XPS trajectory scan? If so, could we have the code for testing?
- Re: Coordinated motion with EPICS motor record So, Sung-Leung
- Navigate by Date:
Re: Archiver: Problems with disconnected PVs Andrew Johnson
AD: save array of floats into HDF5 as attribute Hinko Kocevar
- Navigate by Thread:
Re: Coordinated motion with EPICS motor record So, Sung-Leung
RE: Coordinated motion with EPICS motor record So, Sung-Leung