# Database for GroupKill, GroupInitialize, GroupReferencingStart, GroupReferencingStop and GroupReferencingActionExecute for XPS with asynMotor # positionerError,positionerHardwareStatus,... # # Vanik Kakoyan # March 21, 2016 # # # Macro paramters: # $(P) - PV name prefix (halldxps1:,...) # $(R) - PV base record name (m1,...) # $(G) - Group name # $(PORT) - asyn port for this controller # $(TIMEOUT) - asyn timeout # $(ADDR) - asyn addr for this axis # # PVs for GroupReferencingActionExecute(Action,Sensor,Parameter) command # record(busy,"$(P)$(R):positRefActionExecute") { field(DESC,"GroupRefActionExecute command") field(DTYP, "asynInt32") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_ACTIONEXECUTE") field(ZNAM, "Done") field(ONAM, "GroupReferencingStop") } record(mbbi,"$(P)$(R):positRefActionExecuteStat") { field(DESC,"GroupRefActionExecute command status") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_ACTIONEXECUTE_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") } # #-- "Action" for GroupReferencingActionExecute command # record(mbbo,"$(P)$(R):positRefAction") { field(DESC, "Action for GroupRefActionExecute command") field(PINI, "YES") field(VAL , "0") field(DTYP, "asynInt32") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_ACTION") field(ZRVL, "0") field(ZRST, "LatchOnLowToHighTransit") field(ONVL, "1") field(ONST, "LatchOnHighToLowTransit") field(TWVL, "2") field(TWST, "LatchOnIndex") field(THVL, "3") field(THST, "LatchOnIndexAfterHighToLo") field(FRVL, "4") field(FRST, "SetPosition") field(FVVL, "5") field(FVST, "SetPositionToHomePreset") field(SXVL, "6") field(SXST, "MoveToPrevLatchedPos") field(SVVL, "7") field(SVST, "MoveRelative") } # #-- "Sensor" for GroupReferencingActionExecute command # record(mbbo,"$(P)$(R):positRefSensor") { field(DESC, "Sensor for GroupRefActionExecute command") field(PINI, "YES") field(VAL , "0") field(DTYP, "asynInt32") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_SENSOR") field(ZRVL, "0") field(ZRST, "MinusEndOfRun") field(ONVL, "1") field(ONST, "MechanicalZero") field(TWVL, "2") field(TWST, "PlusEndOfRun") field(THVL, "3") field(THST, "None") } # #-- "Parameter" for GroupReferencingActionExecute command # record(ao,"$(P)$(R):positRefParameter") { field(DESC, "Parameter for GroupRefActionExecute") field(PINI, "NO") field(DTYP, "asynFloat64") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_PARAMETER") field(VAL, "0") field(PREC, "$(PREC)") } # # axisReferencing Operations Message # record(waveform,"$(P)$(R):positRefMessage") { field(DESC, "positReferencing Operations message") field(DTYP, "asynOctetRead") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GROUP_REFERENCING_MESSAGE") field(FTVL, "CHAR") field(NELM, "256") field(SCAN, "I/O Intr") } #---------------------------------------------------------------------- # # PV '$(P):$(R):positionerError' from PositionerErrorRead(PositionerName) command # record(longin,"$(P)$(R):positError") { field(DESC, "PositionerError") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))POSITIONER_ERROR") field(SCAN, "I/O Intr") } # # PV '$(P):$(R):positionerHardwareStatus' from PositionerHardwareStatusGet(PositionerName) command # record(longin,"$(P)$(R):positHardwareStat") { field(DESC, "PositionerHardwareStatus") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))POSITIONER_HARDWARE_STATUS") field(SCAN, "I/O Intr") } # # positionerHardwareStatus String # record(waveform,"$(P)$(R):positHardwareStatStr") { field(DESC, "positionerHardwareStatus String") field(DTYP, "asynOctetRead") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))POSITIONER_HARDWARE_STATUS_STRING") field(FTVL, "CHAR") field(NELM, "256") field(SCAN, "I/O Intr") } # # positionerError String # record(waveform,"$(P)$(R):positErrorStr") { field(DESC, "positionerError message") field(DTYP, "asynOctetRead") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))POSITIONER_ERROR_STRING") field(FTVL, "CHAR") field(NELM, "256") field(SCAN, "I/O Intr") } # #-- HomeSearchMaximumVelocity parameter from stages.ini file # record(ai,"$(P)$(R):positHomeSearchMaxVel") { field(DESC, "HomeSearchMaxVelocity param") field(PINI, "YES") field(DTYP, "asynFloat64") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))HOME_SEARCH_MAX_VEL") field(PREC, "$(PREC)") field(SCAN, "I/O Intr") } # #-- HomePreset parameter from stages.ini file # record(ai,"$(P)$(R):positHomePreset") { field(DESC, "HomePreset parameter") field(PINI, "YES") field(DTYP, "asynFloat64") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))HOME_PRESET") field(PREC, "$(PREC)") field(SCAN, "I/O Intr") field(FLNK, "$(P)$(R):setOffset" ) } # Change motor records offset field record(calcout, "$(P)$(R):setOffset") { field(INPA, "$(P)$(R):positHomePreset") field(CALC, "-1*A") field(SCAN, "Passive") field(OUT, "$(P)$(R).OFF NMS") field(OOPT, "Every Time") field(DOPT, "Use CALC" ) }