From 3d93129c9a0faa6e95e7f8a843f92afc1a49a849 Mon Sep 17 00:00:00 2001 From: timmmooney Date: Wed, 3 Dec 2014 18:12:52 +0000 Subject: [PATCH] Implemented Andrew Johnson's cleaner disable solution. Changed scalcouts to calcouts. --- motorApp/Db/asyn_motor.db | 59 +++++++++++++-------------------------- motorApp/Db/motor.db | 57 ++++++++++++------------------------- 2 files changed, 37 insertions(+), 79 deletions(-) diff --git a/motorApp/Db/asyn_motor.db b/motorApp/Db/asyn_motor.db index 07dcd044..f4811217 100644 --- a/motorApp/Db/asyn_motor.db +++ b/motorApp/Db/asyn_motor.db @@ -1,4 +1,4 @@ -#! Generated by VisualDCT v2.5 +#! Generated by VisualDCT v2.6 #! DBDSTART #! DBDEND @@ -13,7 +13,7 @@ record(motor, "$(P)$(M)") { field(BDST, "$(BDST)") field(BVEL, "$(BVEL)") field(BACC, "$(BACC)") - field(OUT,"@asyn($(PORT),$(ADDR))") + field(OUT, "@asyn($(PORT),$(ADDR))") field(MRES, "$(MRES)") field(PREC, "$(PREC)") field(EGU, "$(EGU)") @@ -22,56 +22,40 @@ record(motor, "$(P)$(M)") { field(INIT, "$(INIT)") field(RTRY, "$(RTRY=10)") field(TWV, "1") -} - -record(transform, "$(P)$(M)_ableput") { - field(CLCB, "a") - field(CLCC, "a") - field(OUTA, "$(P)$(M).DISA NPP NMS") - field(OUTB, "$(P)$(M).DISP NPP NMS") - field(OUTC, "$(P)$(M).DISA NPP NMS") + field(SDIS, "$(P)$(M)_able.VAL") } record(bo, "$(P)$(M)_able") { field(DESC, "motor enable") field(PINI, "YES") - field(OUT, "$(P)$(M)_ableput.A PP MS") + field(OUT, "$(P)$(M).DISP") field(ZNAM, "Enable") field(ONAM, "Disable") } -# allow users to change the velocity (or speed) -# by sending a multipler to the -# $(P)$(M)_vCh.A field -# Range check output; SBAS <= S <= SMAX. -record(scalcout, "$(P)$(M)_vCh") { +record(calcout, "$(P)$(M)_vCh") { field(DESC, "change velocity") + field(CALC, "min(max(a*b,c),d)") field(INPB, "$(P)$(M).S") field(INPC, "$(P)$(M).SBAS") field(INPD, "$(P)$(M).SMAX") - field(CALC, "min(max(a*b,c),d)") field(OUT, "$(P)$(M).S") } -# allow users to change the tweak value -# by sending a multipler to the -# $(P)$(M)_twCh.A field -# Range check output; TWV <= HLM - LLM. -record(scalcout, "$(P)$(M)_twCh") { +record(calcout, "$(P)$(M)_twCh") { field(DESC, "change TWV") + field(CALC, "min(max(a*b,c),d-e)") field(INPB, "$(P)$(M).TWV") field(INPC, "$(P)$(M).MRES") field(INPD, "$(P)$(M).HLM") field(INPE, "$(P)$(M).LLM") - field(CALC, "min(max(a*b,c),d-e)") field(OUT, "$(P)$(M).TWV") } #! Further lines contain data used by VisualDCT -#! View(315,484,0.9) -#! Record("$(P)$(M)",840,706,0,0,"$(P)$(M)") -#! Field("$(P)$(M).DISA",0,1,"$(P)$(M).DISA") -#! Field("$(P)$(M).DISP",0,1,"$(P)$(M).DISP") +#! View(405,484,0.9) +#! Record("$(P)$(M)",840,675,0,0,"$(P)$(M)") +#! Field("$(P)$(M).DISP",16777215,1,"$(P)$(M).DISP") #! Field("$(P)$(M).S",16777215,0,"$(P)$(M).S") #! Field("$(P)$(M).SBAS",16777215,0,"$(P)$(M).SBAS") #! Field("$(P)$(M).SMAX",16777215,0,"$(P)$(M).SMAX") @@ -79,18 +63,13 @@ record(scalcout, "$(P)$(M)_twCh") { #! Field("$(P)$(M).MRES",16777215,0,"$(P)$(M).MRES") #! Field("$(P)$(M).HLM",16777215,0,"$(P)$(M).HLM") #! Field("$(P)$(M).LLM",16777215,0,"$(P)$(M).LLM") -#! Record("$(P)$(M)_ableput",1160,816,0,0,"$(P)$(M)_ableput") -#! Field("$(P)$(M)_ableput.A",0,1,"$(P)$(M)_ableput.A") -#! Field("$(P)$(M)_ableput.OUTA",0,0,"$(P)$(M)_ableput.OUTA") -#! Link("$(P)$(M)_ableput.OUTA","$(P)$(M).DISA") -#! Field("$(P)$(M)_ableput.OUTC",0,0,"$(P)$(M)_ableput.OUTC") -#! Link("$(P)$(M)_ableput.OUTC","$(P)$(M).DISA") -#! Field("$(P)$(M)_ableput.OUTB",0,0,"$(P)$(M)_ableput.OUTB") -#! Link("$(P)$(M)_ableput.OUTB","$(P)$(M).DISP") -#! Record("$(P)$(M)_able",1420,816,0,0,"$(P)$(M)_able") -#! Field("$(P)$(M)_able.OUT",0,0,"$(P)$(M)_able.OUT") -#! Link("$(P)$(M)_able.OUT","$(P)$(M)_ableput.A") -#! Record("$(P)$(M)_vCh",440,702,0,0,"$(P)$(M)_vCh") +#! Field("$(P)$(M).SDIS",16777215,1,"$(P)$(M).SDIS") +#! Link("$(P)$(M).SDIS","$(P)$(M)_able.VAL") +#! Record("$(P)$(M)_able",1120,874,0,0,"$(P)$(M)_able") +#! Field("$(P)$(M)_able.OUT",16777215,0,"$(P)$(M)_able.OUT") +#! Link("$(P)$(M)_able.OUT","$(P)$(M).DISP") +#! Field("$(P)$(M)_able.VAL",16777215,0,"$(P)$(M)_able.VAL") +#! Record("$(P)$(M)_vCh",440,699,0,0,"$(P)$(M)_vCh") #! Field("$(P)$(M)_vCh.OUT",16777215,1,"$(P)$(M)_vCh.OUT") #! Link("$(P)$(M)_vCh.OUT","$(P)$(M).S") #! Field("$(P)$(M)_vCh.INPB",16777215,1,"$(P)$(M)_vCh.INPB") @@ -99,7 +78,7 @@ record(scalcout, "$(P)$(M)_twCh") { #! Link("$(P)$(M)_vCh.INPC","$(P)$(M).SBAS") #! Field("$(P)$(M)_vCh.INPD",16777215,1,"$(P)$(M)_vCh.INPD") #! Link("$(P)$(M)_vCh.INPD","$(P)$(M).SMAX") -#! Record("$(P)$(M)_twCh",440,927,0,0,"$(P)$(M)_twCh") +#! Record("$(P)$(M)_twCh",440,925,0,0,"$(P)$(M)_twCh") #! Field("$(P)$(M)_twCh.OUT",16777215,1,"$(P)$(M)_twCh.OUT") #! Link("$(P)$(M)_twCh.OUT","$(P)$(M).TWV") #! Field("$(P)$(M)_twCh.INPB",16777215,1,"$(P)$(M)_twCh.INPB") diff --git a/motorApp/Db/motor.db b/motorApp/Db/motor.db index b7428a39..40df7fe4 100644 --- a/motorApp/Db/motor.db +++ b/motorApp/Db/motor.db @@ -1,4 +1,4 @@ -#! Generated by VisualDCT v2.5 +#! Generated by VisualDCT v2.6 #! DBDSTART #! DBDEND @@ -21,56 +21,40 @@ record(motor, "$(P)$(M)") { field(DLLM, "$(DLLM)") field(INIT, "$(INIT)") field(TWV, "1") -} - -record(transform, "$(P)$(M)_ableput") { - field(CLCB, "a") - field(CLCC, "a") - field(OUTA, "$(P)$(M).DISA NPP NMS") - field(OUTB, "$(P)$(M).DISP NPP NMS") - field(OUTC, "$(P)$(M).DISA NPP NMS") + field(SDIS, "$(P)$(M)_able.VAL") } record(bo, "$(P)$(M)_able") { field(DESC, "motor enable") field(PINI, "YES") - field(OUT, "$(P)$(M)_ableput.A PP MS") + field(OUT, "$(P)$(M).DISP") field(ZNAM, "Enable") field(ONAM, "Disable") } -# allow users to change the velocity (or speed) -# by sending a multipler to the -# $(P)$(M)_vCh.A field -# Range check output; SBAS <= S <= SMAX. -record(scalcout, "$(P)$(M)_vCh") { +record(calcout, "$(P)$(M)_vCh") { field(DESC, "change velocity") + field(CALC, "min(max(a*b,c),d)") field(INPB, "$(P)$(M).S") field(INPC, "$(P)$(M).SBAS") field(INPD, "$(P)$(M).SMAX") - field(CALC, "min(max(a*b,c),d)") field(OUT, "$(P)$(M).S") } -# allow users to change the tweak value -# by sending a multipler to the -# $(P)$(M)_twCh.A field -# Range check output; TWV <= HLM - LLM. -record(scalcout, "$(P)$(M)_twCh") { +record(calcout, "$(P)$(M)_twCh") { field(DESC, "change TWV") + field(CALC, "min(max(a*b,c),d-e)") field(INPB, "$(P)$(M).TWV") field(INPC, "$(P)$(M).MRES") field(INPD, "$(P)$(M).HLM") field(INPE, "$(P)$(M).LLM") - field(CALC, "min(max(a*b,c),d-e)") field(OUT, "$(P)$(M).TWV") } #! Further lines contain data used by VisualDCT -#! View(315,484,0.9) -#! Record("$(P)$(M)",840,706,0,0,"$(P)$(M)") -#! Field("$(P)$(M).DISA",0,1,"$(P)$(M).DISA") -#! Field("$(P)$(M).DISP",0,1,"$(P)$(M).DISP") +#! View(405,680,1.0) +#! Record("$(P)$(M)",840,674,0,0,"$(P)$(M)") +#! Field("$(P)$(M).DISP",16777215,1,"$(P)$(M).DISP") #! Field("$(P)$(M).S",16777215,0,"$(P)$(M).S") #! Field("$(P)$(M).SBAS",16777215,0,"$(P)$(M).SBAS") #! Field("$(P)$(M).SMAX",16777215,0,"$(P)$(M).SMAX") @@ -78,18 +62,13 @@ record(scalcout, "$(P)$(M)_twCh") { #! Field("$(P)$(M).MRES",16777215,0,"$(P)$(M).MRES") #! Field("$(P)$(M).HLM",16777215,0,"$(P)$(M).HLM") #! Field("$(P)$(M).LLM",16777215,0,"$(P)$(M).LLM") -#! Record("$(P)$(M)_ableput",1160,816,0,0,"$(P)$(M)_ableput") -#! Field("$(P)$(M)_ableput.A",0,1,"$(P)$(M)_ableput.A") -#! Field("$(P)$(M)_ableput.OUTA",0,0,"$(P)$(M)_ableput.OUTA") -#! Link("$(P)$(M)_ableput.OUTA","$(P)$(M).DISA") -#! Field("$(P)$(M)_ableput.OUTC",0,0,"$(P)$(M)_ableput.OUTC") -#! Link("$(P)$(M)_ableput.OUTC","$(P)$(M).DISA") -#! Field("$(P)$(M)_ableput.OUTB",0,0,"$(P)$(M)_ableput.OUTB") -#! Link("$(P)$(M)_ableput.OUTB","$(P)$(M).DISP") -#! Record("$(P)$(M)_able",1420,816,0,0,"$(P)$(M)_able") -#! Field("$(P)$(M)_able.OUT",0,0,"$(P)$(M)_able.OUT") -#! Link("$(P)$(M)_able.OUT","$(P)$(M)_ableput.A") -#! Record("$(P)$(M)_vCh",440,702,0,0,"$(P)$(M)_vCh") +#! Field("$(P)$(M).SDIS",16777215,1,"$(P)$(M).SDIS") +#! Link("$(P)$(M).SDIS","$(P)$(M)_able.VAL") +#! Record("$(P)$(M)_able",1140,854,0,0,"$(P)$(M)_able") +#! Field("$(P)$(M)_able.OUT",16777215,0,"$(P)$(M)_able.OUT") +#! Link("$(P)$(M)_able.OUT","$(P)$(M).DISP") +#! Field("$(P)$(M)_able.VAL",16777215,0,"$(P)$(M)_able.VAL") +#! Record("$(P)$(M)_vCh",440,700,0,0,"$(P)$(M)_vCh") #! Field("$(P)$(M)_vCh.OUT",16777215,1,"$(P)$(M)_vCh.OUT") #! Link("$(P)$(M)_vCh.OUT","$(P)$(M).S") #! Field("$(P)$(M)_vCh.INPB",16777215,1,"$(P)$(M)_vCh.INPB") @@ -98,7 +77,7 @@ record(scalcout, "$(P)$(M)_twCh") { #! Link("$(P)$(M)_vCh.INPC","$(P)$(M).SBAS") #! Field("$(P)$(M)_vCh.INPD",16777215,1,"$(P)$(M)_vCh.INPD") #! Link("$(P)$(M)_vCh.INPD","$(P)$(M).SMAX") -#! Record("$(P)$(M)_twCh",440,927,0,0,"$(P)$(M)_twCh") +#! Record("$(P)$(M)_twCh",440,926,0,0,"$(P)$(M)_twCh") #! Field("$(P)$(M)_twCh.OUT",16777215,1,"$(P)$(M)_twCh.OUT") #! Link("$(P)$(M)_twCh.OUT","$(P)$(M).TWV") #! Field("$(P)$(M)_twCh.INPB",16777215,1,"$(P)$(M)_twCh.INPB")