Skip to content

Commit 963396c

Browse files
Merge pull request #498 from ISISComputingGroup/Ticket5268_danfysik_hide_autoonoff
Allow disabling of DFKPS AUTOONOFF PV with DISABLE_AUTOONOFF macro
2 parents ebdfed1 + 2a97695 commit 963396c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

DFKPS/DFKPS-IOC-01App/Db/DFKPS_common.db

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ record(bo, "$(P)AUTOONOFF")
5959
field(PINI, "YES")
6060
field(SIML, "$(P)SIM")
6161
field(SIOL, "$(P)SIM:AUTOONOFF")
62-
field(SDIS, "$(P)DISABLE")
62+
field(DISP, "$(DISABLE_AUTOONOFF)")
6363
info(autosaveFields, "VAL")
6464
info(archive, "VAL")
6565
}

DFKPS/iocBoot/iocDFKPS-IOC-01/config.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
<macro name="STAB_TOLERANCE" pattern="^-?[0-9]+\.?[0-9]*$" description="If value of current in Amps is within this tolerance of the setpoint, consider the field as stable" defaultValue="2" hasDefault="YES" />
2626
<macro name="OFF_TOLERANCE" pattern="^-?[0-9]+\.?[0-9]*$" description="If value of current in Amps is within this tolerance of 0, consider the field as off." defaultValue="0" hasDefault="YES" />
27+
28+
<macro name="DISABLE_AUTOONOFF" pattern="^(0|1)$" description="Disable automatic PSU on/off feature" defaultValue="1" hasDefault="YES" />
29+
2730
</macros>
2831
</config_part>
2932
</ioc_config>

DFKPS/iocBoot/iocDFKPS-IOC-01/st-common.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stringiftest "SLEW" "$(USE_SLEW=0)" 5 "1"
4747
epicsEnvSet "SP_PINI" "$(SP_AT_STARTUP=NO)"
4848

4949
## Load record instances
50-
dbLoadRecords("$(TOP)/db/DFKPS_common.db", "device=$(MYPVPREFIX)$(IOCNAME), P=$(MYPVPREFIX)$(IOCNAME):, FWI=$(FACTOR_WRITE_I=1000), FRI=$(FACTOR_READ_I=1), FRV=$(FACTOR_READ_V=1), port=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),SP_PINI=$(SP_PINI), VADC=$(VADC=2), DEV_TYPE=$(DEV_TYPE=8000), CALIBRATED=$(CALIBRATED=1), USE_SLEW=$(USE_SLEW=0), POLARITY=$(POLARITY=BIPOLAR), MAX_RAW_SETPOINT=$(MAX_RAW_SETPOINT=1000000), OFF_TOLERANCE=$(OFF_TOLERANCE=0)")
50+
dbLoadRecords("$(TOP)/db/DFKPS_common.db", "device=$(MYPVPREFIX)$(IOCNAME), P=$(MYPVPREFIX)$(IOCNAME):, FWI=$(FACTOR_WRITE_I=1000), FRI=$(FACTOR_READ_I=1), FRV=$(FACTOR_READ_V=1), port=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),SP_PINI=$(SP_PINI), VADC=$(VADC=2), DEV_TYPE=$(DEV_TYPE=8000), CALIBRATED=$(CALIBRATED=1), USE_SLEW=$(USE_SLEW=0), POLARITY=$(POLARITY=BIPOLAR), MAX_RAW_SETPOINT=$(MAX_RAW_SETPOINT=1000000), OFF_TOLERANCE=$(OFF_TOLERANCE=0), DISABLE_AUTOONOFF=$(DISABLE_AUTOONOFF=1)"
5151
dbLoadRecords("$(UTILITIES)/db/check_stability.db", "P=$(MYPVPREFIX)$(IOCNAME):,INP_VAL=$(MYPVPREFIX)$(IOCNAME):CURR,SP=$(MYPVPREFIX)$(IOCNAME):CURR:SP:RBV,NSAMP=5,TOLERANCE=$(STAB_TOLERANCE=2)")
5252
$(IFPOLAR) dbLoadRecords("$(TOP)/db/DFKPS_polarity.db", "device=$(MYPVPREFIX)$(IOCNAME), P=$(MYPVPREFIX)$(IOCNAME):, port=L0")
5353
$(IFCALIB) dbLoadRecords("$(TOP)/db/DFKPS_calibrated.db", "device=$(MYPVPREFIX)$(IOCNAME), P=$(MYPVPREFIX)$(IOCNAME):, CALIB_BASE_DIR=$(CALIB_BASE_DIR),CALIB_DIR=$(CALIB_DIR),CALIB_FILE=$(CALIB_FILE=default_calib.dat),DRVHI=$(DRIVE_HIGH=5000000),DRVLO=$(DRIVE_LOW=-5000000), port=L0, FWI=$(FACTOR_WRITE_I=1000)")

0 commit comments

Comments
 (0)