From e515d23f203f4ba21e0d86bfdf1f95fcf6cdc7f2 Mon Sep 17 00:00:00 2001 From: kmpeters Date: Wed, 19 Jun 2013 19:41:30 +0000 Subject: [PATCH] Added records to HXP_coords.db to sync motor target positions and read CS's after a CS is changed. --- iocBoot/iocWithAsyn/motor.substitutions.hxp | 4 +-- motorApp/Db/HXP_coords.db | 38 +++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/iocBoot/iocWithAsyn/motor.substitutions.hxp b/iocBoot/iocWithAsyn/motor.substitutions.hxp index c6e074ae..f5f3c941 100644 --- a/iocBoot/iocWithAsyn/motor.substitutions.hxp +++ b/iocBoot/iocWithAsyn/motor.substitutions.hxp @@ -22,6 +22,6 @@ file "$(MOTOR)/motorApp/Db/HXP_extra.db" file "$(MOTOR)/motorApp/Db/HXP_coords.db" { pattern - {P, R, PORT, CHAN} - {xxx:, hxp:c0:, HXP1, 0} + {P, R, PORT, CHAN, M1, M2, M3, M4, M5, M6} + {xxx:, hxp:c0:, HXP1, 0, m1, m2, m3, m4, m5, m6} } diff --git a/motorApp/Db/HXP_coords.db b/motorApp/Db/HXP_coords.db index 529ee0b3..7f2de2f0 100644 --- a/motorApp/Db/HXP_coords.db +++ b/motorApp/Db/HXP_coords.db @@ -24,6 +24,44 @@ record(bo,"$(P)$(R)SET_CS") { field(VAL, "0") } +# Monitor set-CS PV and initiate sync on release of button +record(calcout,"$(P)$(R)syncCalc") { + field(DESC,"HXP sync calc") + field(DTYP,"Soft Channel") + field(SCAN,"Passive") + field(INPA,"$(P)$(R)SET_CS.VAL CP NMS") + field(B, "1.0") + field(CALC,"A") + field(OCAL,"B") + field(ODLY,"0.5") + field(OOPT,"Transition To Zero") + field(DOPT,"Use OCAL") + field(OUT, "$(P)$(R)syncSeq.PROC PP NMS") +} + +# Sync target positions and update CS readbacks after setting a CS +record(sseq, "$(P)$(R)syncSeq") { + field(DESC,"HXP sync seq") + field(SCAN,"Passive") + field(STR1,"1") + field(LNK1,"$(P)$(R)$(M1).SYNC PP NMS") + field(STR2,"1") + field(LNK2,"$(P)$(R)$(M2).SYNC PP NMS") + field(STR3,"1") + field(LNK3,"$(P)$(R)$(M3).SYNC PP NMS") + field(STR4,"1") + field(LNK4,"$(P)$(R)$(M4).SYNC PP NMS") + field(STR5,"1") + field(LNK5,"$(P)$(R)$(M5).SYNC PP NMS") + field(STR6,"1") + field(LNK6,"$(P)$(R)$(M6).SYNC PP NMS") + field(STR7,"1") + field(LNK7,"$(P)$(R)READ_CS.VAL PP NMS") + field(DLY8,"0.25") + field(STR8,"0") + field(LNK8,"$(P)$(R)READ_CS.VAL PP NMS") +} + # CS input fields record(ao,"$(P)$(R)CS_SET_X") { field(DESC,"CS X target")