Skip to content

Commit 810b3a4

Browse files
committed
Disable any ADBase records that are N/A. Modify trigger mode and image mode to show only permitted options
1 parent 604e962 commit 810b3a4

File tree

2 files changed

+73
-39
lines changed

2 files changed

+73
-39
lines changed

xspdApp/Db/ADXSPD.template

Lines changed: 71 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,42 @@ include "ADBase.template"
2323

2424
# ADBase record overrides
2525

26-
# record(mbbo, "$(P)$(R)ImageMode") {
27-
# field(TWVL, "")
28-
# field(TWST, "")
29-
# field(VAL, "1")
30-
# }
26+
record(mbbo, "$(P)$(R)ImageMode") {
27+
field(TWVL, "")
28+
field(TWST, "")
29+
}
3130

32-
# record(mbbi, "$(P)$(R)ImageMode_RBV") {
33-
# field(TWVL, "")
34-
# field(TWST, "")
35-
# }
31+
record(mbbi, "$(P)$(R)ImageMode_RBV") {
32+
field(TWVL, "")
33+
field(TWST, "")
34+
}
3635

37-
# record(mbbo, "$(P)$(R)TriggerMode") {
38-
# field(DESC, "Trigger mode")
39-
# field(DTYP, "asynInt32")
40-
# field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))TRIGGER_MODE")
41-
# field(ZRVL, "0")
42-
# field(ZRST, "Software")
43-
# field(ONVL, "1")
44-
# field(ONST, "External Frames")
45-
# field(TWVL, "2")
46-
# field(TWST, "External Sequence")
47-
# field(VAL, "0")
48-
# field(PINI, "YES")
49-
# }
36+
record(mbbo, "$(P)$(R)TriggerMode") {
37+
field(DESC, "Trigger mode")
38+
field(DTYP, "asynInt32")
39+
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))TRIGGER_MODE")
40+
field(ZRVL, "0")
41+
field(ZRST, "Software")
42+
field(ONVL, "1")
43+
field(ONST, "External Frames")
44+
field(TWVL, "2")
45+
field(TWST, "External Sequence")
46+
field(VAL, "0")
47+
field(PINI, "YES")
48+
}
5049

51-
# record(mbbi, "$(P)$(R)TriggerMode_RBV") {
52-
# field(DESC, "Trigger mode readback")
53-
# field(DTYP, "asynInt32")
54-
# field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))TRIGGER_MODE")
55-
# field(ZRVL, "0")
56-
# field(ZRST, "Software")
57-
# field(ONVL, "1")
58-
# field(ONST, "External Frames")
59-
# field(TWVL, "2")
60-
# field(TWST, "External Sequence")
61-
# field(SCAN, "I/O Intr")
62-
# }
50+
record(mbbi, "$(P)$(R)TriggerMode_RBV") {
51+
field(DESC, "Trigger mode readback")
52+
field(DTYP, "asynInt32")
53+
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))TRIGGER_MODE")
54+
field(ZRVL, "0")
55+
field(ZRST, "Software")
56+
field(ONVL, "1")
57+
field(ONST, "External Frames")
58+
field(TWVL, "2")
59+
field(TWST, "External Sequence")
60+
field(SCAN, "I/O Intr")
61+
}
6362

6463
# XSPD specific records
6564

@@ -483,3 +482,41 @@ record(ai, "$(P)$(R)StatusInterval_RBV"){
483482
field(VAL, "5")
484483
field(SCAN, "I/O Intr")
485484
}
485+
486+
487+
# Disable any ADBase records we don't want to use
488+
489+
# On-chip ROI size set by ROIRows PV
490+
record(ao, "$(P)$(R)SizeX") {
491+
field(DISA, 1)
492+
}
493+
494+
record(ao, "$(P)$(R)SizeY") {
495+
field(DISA, 1)
496+
}
497+
498+
# Only mono supported, and data type set by bit depth parameter
499+
record(mbbo, "$(P)$(R)DataType") {
500+
field(DISA, 1)
501+
}
502+
503+
record(mbbo, "$(P)$(R)ColorMode") {
504+
field(DISA, 1)
505+
}
506+
507+
# Binning not supported on-chip
508+
record(ao, "$(P)$(R)BinX") {
509+
field(DISA, 1)
510+
}
511+
512+
record(ao, "$(P)$(R)BinY") {
513+
field(DISA, 1)
514+
}
515+
516+
record(ao, "$(P)$(R)AcquirePeriod") {
517+
field(DISA, 1)
518+
}
519+
520+
record(ao, "$(P)$(R)Gain") {
521+
field(DISA, 1)
522+
}

xspdApp/src/ADXSPD.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,11 @@ void ADXSPD::monitorThread() {
402402
}
403403
setIntegerParam(ADStatus, adStatus);
404404

405-
// Update the state of counter mode and frames queued
406-
setIntegerParam(
407-
ADXSPD_CounterMode,
408-
static_cast<int>(this->pDetector->GetVar<XSPD::CounterMode>("counter_mode")));
409405
setIntegerParam(ADXSPD_FramesQueued,
410406
this->pDetector->GetActiveDataPort()->GetVar<int>("frames_queued"));
411407

412-
// Reading out module status takes too long.
408+
// Reading out module status takes too long. Probably should become a "GetModuleStatus"
409+
// PV that can have its Scan rate updated from I/O Intr to some rate.
413410
// for (auto& module : this->modules) {
414411
// module->checkStatus();
415412
//}

0 commit comments

Comments
 (0)