From c27f816d9b10830c9fd1b063c1f53643ada12892 Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Sun, 3 Apr 2011 18:55:54 +0000 Subject: [PATCH] New file for profile moves --- motorApp/Db/profileMoveAxis.template | 67 +++++ motorApp/Db/profileMoveAxisXPS.template | 58 +++++ motorApp/Db/profileMoveController.template | 232 ++++++++++++++++++ motorApp/Db/profileMoveControllerXPS.template | 21 ++ 4 files changed, 378 insertions(+) create mode 100644 motorApp/Db/profileMoveAxis.template create mode 100644 motorApp/Db/profileMoveAxisXPS.template create mode 100644 motorApp/Db/profileMoveController.template create mode 100644 motorApp/Db/profileMoveControllerXPS.template diff --git a/motorApp/Db/profileMoveAxis.template b/motorApp/Db/profileMoveAxis.template new file mode 100644 index 00000000..ebfcc01a --- /dev/null +++ b/motorApp/Db/profileMoveAxis.template @@ -0,0 +1,67 @@ +# Database for profile moves with asynMotor +# This is the database for the each axis, profileMoveController is the file +# for the controller. +# +# Mark Rivers +# April 3, 2011 +# +# +# Macro paramters: +# $(P) - PV name prefix +# $(R) - PV base record name +# $(NPOINTS) - Maximum profile points +# $(NREADBACK) - Maximum number of readback positions +# $(PORT) - asyn port for this controller +# $(AXIS) - asyn addr for this axis +# $(TIMEOUT) - asyn timeout for this axis +# $(PREC) - Precision for this axis + +# +# Is this axis involved in the profile move? +# +record(bo,"$(P)$(R)($N)Use axis") { + field(DESC, "Use axis $(AXIS)?") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),$(AXIS),$(TIMEOUT))PROFILE_USE_AXIS") + field(VAL, "0") + field(ZNAM, "No") + field(ONAM, "Yes") +} +# +# Target position array for this axis +# +record(waveform,"$(P)$(R)$(AXIS)Positions") { + field(DESC, "Axis $(AXIS) positions") + field(DTYP, "asynFloat64ArrayOut") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))PROFILE_POSITIONS") + field(NELM, "$(NPOINTS)") + field(FTVL, "DOUBLE") + field(PREC, "$(PREC)") +} + +# +# Readback position array for this axis +# +record(waveform,"$(P)$(R)$(AXIS)Readbacks") { + field(DESC, "Axis $(AXIS) readbacks") + field(DTYP, "asynFloat64ArrayIn") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))PROFILE_READBACKS") + field(NELM, "$(NREADBACK)") + field(FTVL, "DOUBLE") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} + +# +# Following error array for this axis +# +record(waveform,"$(P)$(R)$(AXIS)FollowingErrors") { + field(DESC, "Axis $(AXIS) following errors") + field(DTYP, "asynFloat64ArrayIn") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))PROFILE_FOLLOWING_ERRORS") + field(NELM, "$(NREADBACK)") + field(FTVL, "DOUBLE") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} diff --git a/motorApp/Db/profileMoveAxisXPS.template b/motorApp/Db/profileMoveAxisXPS.template new file mode 100644 index 00000000..0def5509 --- /dev/null +++ b/motorApp/Db/profileMoveAxisXPS.template @@ -0,0 +1,58 @@ +# Database for profile moves with asynMotor +# This database defined records specific to each XPS axis +# +# Mark Rivers +# April 3, 2011 +# +# +# Macro paramters: +# $(P) - PV name prefix +# $(R) - PV base record name +# $(PORT) - asyn port for this controller +# $(AXIS) - asyn addr for this axis +# $(TIMEOUT) - asyn timeout for this axis +# $(PREC) - Precision for this axis + +# +# Readback of minimum position +# +record(ai,"$(P)$(R)MinPosition") { + field(DESC, "Axis $(AXIS) min position") + field(DTYP, "asynFloat64") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))XPS_PROFILE_MIN_POSITION") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} + +# +# Readback of maximum position +# +record(ai,"$(P)$(R)MaxPosition") { + field(DESC, "Axis $(AXIS) max position") + field(DTYP, "asynFloat64") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))XPS_PROFILE_MAX_POSITION") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} + +# +# Readback of maximum velocity +# +record(ai,"$(P)$(R)MaxVelocity") { + field(DESC, "Axis $(AXIS) max velocity") + field(DTYP, "asynFloat64") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))XPS_PROFILE_MAX_VELOCITY") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} + +# +# Readback of maximum acceleration +# +record(ai,"$(P)$(R)MaxAcceleration") { + field(DESC, "Axis $(AXIS) max acceleration") + field(DTYP, "asynFloat64") + field(INP, "@asyn($(PORT),$(AXIS),$(TIMEOUT))XPS_PROFILE_MAX_ACCELERATION") + field(PREC, "$(PREC)") + field(SCAN, "I/O Intr") +} diff --git a/motorApp/Db/profileMoveController.template b/motorApp/Db/profileMoveController.template new file mode 100644 index 00000000..349548df --- /dev/null +++ b/motorApp/Db/profileMoveController.template @@ -0,0 +1,232 @@ +# Database for profile moves with asynMotor +# This is the database for the controller itself, profileMoveAxis is the file +# for each axis. +# +# Mark Rivers +# April 3, 2011 +# +# +# Macro paramters: +# $(P) - PV name prefix +# $(R) - PV base record name +# $(PORT) - asyn port for this controller +# $(NAXES) - Number of axes to be used. +# $(NPOINTS) - Maximum profile points +# $(NPULSES) - Maximum number of output pulses +# $(TIMEOUT) - asyn timeout + +# +# PVs controlling the number of profile elements and the number of output +# pulses +# +record(longout,"$(P)$(R)NumAxes") { + field(DESC, "# of axes being used") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_NUM_AXES") + field(VAL, "$(NAXES)") +} +record(longout,"$(P)$(R)NumPoints") { + field(DESC, "# of points in profile") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_NUM_POINTS") + field(VAL, "$(NPOINTS)") +} +record(longout,"$(P)$(R)NumPulses") { + field(DESC, "Number of output pulses") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_NUM_PULSES") + field(VAL, "$(NPULSES)") +} +record(longin,"$(P)$(R)NumActualPulses") { + field(DESC, "Actual # of output pulses") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_ACTUAL_PULSES") + field(VAL, "$(NPULSES)") + field(SCAN, "I/O Intr") +} +record(longout, "$(P)$(R)StartPulses") { + field(DESC, "Point # to start pulses") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_START_PULSES") + field(VAL, "1") +} +record(longout,"$(P)$(R)EndPulses") { + field(DESC, "Point # to end pulses") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_END_PULSES") + field(VAL, "$(NPOINTS)") +} + +# +# PVs controlling the profile speed and acceleration +# +record(waveform,"$(P)$(R)Time") { + field(DESC, "Time at each point") + field(DTYP, "asynFloat64ArrayOut") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_TIME_ARRAY") + field(NELM, "$(NPOINTS)") + field(FTVL, "DOUBLE") + field(PREC, "3") +} +record(ao,"$(P)$(R)Acceleration") { + field(DESC, "Profile Acceleration") + field(PINI, "YES") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_ACCELERATION") + field(VAL, "0.5") + field(PREC, "3") +} +# +# PVs to build the profile +# +record(busy,"$(P)$(R)Build") { + field(DESC,"Build and check profile") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_BUILD") + field(ZNAM, "Done") + field(ONAM, "Build") +} +record(mbbi,"$(P)$(R)BuildState") { + field(DESC,"Profile build state") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_BUILD_STATE") + field(ZRVL, "0") + field(ZRST, "Done") + field(ZRSV, "NO_ALARM") + field(ONVL, "1") + field(ONST, "Busy") + field(ONSV, "MINOR") + field(SCAN, "I/O Intr") +} +record(mbbi,"$(P)$(R)BuildStatus") { + field(DESC,"Profile build status") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_BUILD_STATUS") + field(ZRVL, "0") + field(ZRST, "Undefined") + field(ZRSV, "INVALID") + field(ONVL, "1") + field(ONST, "Success") + field(ONSV, "NO_ALARM") + field(TWVL, "2") + field(TWST, "Failure") + field(TWSV, "MAJOR") + field(SCAN, "I/O Intr") +} +record(stringin,"$(P)$(R)BuildMessage") { + field(DESC, "Profile build message") + field(DTYP, "asynOctetRead") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_BUILD_MESSAGE") + field(SCAN, "I/O Intr") +} +# +# PVs to execute and abort the profile +# +record(busy,"$(P)$(R)Execute") { + field(DESC,"Execute profile motion") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_EXECUTE") + field(ZNAM, "Done") + field(ONAM, "Execute") +} +record(mbbi,"$(P)$(R)ExecuteState") { + field(DESC,"Profile execute state") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_EXECUTE_STATE") + field(ZRVL, "0") + field(ZRST, "Done") + field(ZRSV, "NO_ALARM") + field(ONVL, "1") + field(ONST, "Move start") + field(ONSV, "MINOR") + field(TWVL, "2") + field(TWST, "Executing") + field(TWSV, "MINOR") + field(THVL, "3") + field(THST, "Flyback") + field(THSV, "MINOR") + field(SCAN, "I/O Intr") +} +record(mbbi,"$(P)$(R)ExecuteStatus") { + field(DESC, "Profile execute status") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_EXECUTE_STATUS") + field(ZRVL, "0") + field(ZRST, "Undefined") + field(ZRSV, "INVALID") + field(ONVL, "1") + field(ONST, "Success") + field(ONSV, "NO_ALARM") + field(TWVL, "2") + field(TWST, "Failure") + field(TWSV, "MAJOR") + field(THVL, "3") + field(THST, "Abort") + field(THSV, "MAJOR") + field(FRVL, "4") + field(FRST, "Timeout") + field(FRSV, "MAJOR") + field(SCAN, "I/O Intr") +} +record(stringin,"$(P)$(R)ExecuteMessage") { + field(DESC, "Profile execute message") + field(DTYP, "asynOctetRead") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_EXECUTE_MESSAGE") + field(SCAN, "I/O Intr") +} +record(bo,"$(P)$(R)Abort") { + field(DESC, "Abort profile motion") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_ABORT") + field(ZNAM, "Done") + field(ONAM, "Abort") +} + +# +# PVs for readback of actual positions and errors +# +record(busy,"$(P)$(R)Readback") { + field(DESC, "Read back actual positions") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_READBACK") + field(ZNAM, "Done") + field(ONAM, "Readback") +} +record(mbbi,"$(P)$(R)ReadbackState") { + field(DESC, "Readback state") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_READBACK_STATE") + field(ZRVL, "0") + field(ZRST, "Done") + field(ZRSV, "NO_ALARM") + field(ONVL, "1") + field(ONST, "Busy") + field(ONSV, "MINOR") + field(SCAN, "I/O Intr") +} +record(mbbi,"$(P)$(R)ReadbackStatus") { + field(DESC, "Readback status") + field(DTYP, "asynInt32") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_READBACK_STATUS") + field(ZRVL, "0") + field(ZRST, "Undefined") + field(ZRSV, "INVALID") + field(ONVL, "1") + field(ONST, "Success") + field(ONSV, "NO_ALARM") + field(TWVL, "2") + field(TWST, "Failure") + field(TWSV, "MAJOR") + field(SCAN, "I/O Intr") +} +record(stringin,"$(P)$(R)ReadbackMessage") { + field(DESC, "Profile readback message") + field(DTYP, "asynOctetRead") + field(INP, "@asyn($(PORT),0,$(TIMEOUT))PROFILE_READBACK_MESSAGE") + field(SCAN, "I/O Intr") +} + diff --git a/motorApp/Db/profileMoveControllerXPS.template b/motorApp/Db/profileMoveControllerXPS.template new file mode 100644 index 00000000..0a3fd846 --- /dev/null +++ b/motorApp/Db/profileMoveControllerXPS.template @@ -0,0 +1,21 @@ +# Database for profile moves with asynMotor +# This database defined records specific to the XPS controller +# +# Mark Rivers +# April 3, 2011 +# +# +# Macro paramters: +# $(P) - PV name prefix +# $(R) - PV base record name +# $(PORT) - asyn port for this controller +# $(TIMEOUT) - asyn timeout + +# Name of the trajectory file that is built and FTP'd to the XPS +record(stringout, "$(P)$(R)TrajectoryFile") { + field(DESC, "XPS trajectory file") + field(PINI, "YES") + field(DTYP, "asynOctetWrite") + field(OUT, "@asyn($(PORT),0,$(TIMEOUT))XPS_TRAJECTORY_FILE") + field(VAL, "TrajectoryScan.trj") +}