Skip to content

Commit

Permalink
#105 WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Mar 8, 2019
1 parent dcd8500 commit 1885065
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 11 additions & 9 deletions apstools/synApps_ophyd/sscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,27 +171,29 @@ class sscanRecord(Device):
scan_busy = Cpt(EpicsSignalRO, '.BUSY')
alert_flag = Cpt(EpicsSignalRO, '.ALRT')
alert_message = Cpt(EpicsSignalRO, '.SMSG')
npts = Cpt(EpicsSignal, '.NPTS')
number_points = Cpt(EpicsSignal, '.NPTS', kind=Kind.config)
maximum_number_points = Cpt(EpicsSignal, '.MPTS', kind=Kind.config)
current_point = Cpt(EpicsSignalRO, '.CPT')
pasm = Cpt(EpicsSignal, '.PASM')
exsc = Cpt(EpicsSignal, '.EXSC')
bspv = Cpt(EpicsSignal, '.BSPV')
execute_scan = Cpt(EpicsSignal, '.EXSC')
bspv = Cpt(EpicsSignal, '.BSPV', kind=Kind.config)
bscd = Cpt(EpicsSignal, '.BSCD')
bswait = Cpt(EpicsSignal, '.BSWAIT')
cmnd = Cpt(EpicsSignal, '.CMND')
ddly = Cpt(EpicsSignal, '.DDLY')
pdly = Cpt(EpicsSignal, '.PDLY')
refd = Cpt(EpicsSignal, '.REFD')
detector_delay = Cpt(EpicsSignal, '.DDLY')
positioner_delay = Cpt(EpicsSignal, '.PDLY')
reference_detector = Cpt(EpicsSignal, '.REFD', kind=Kind.config)
wait = Cpt(EpicsSignal, '.WAIT')
wcnt = Cpt(EpicsSignalRO, '.WCNT')
awct = Cpt(EpicsSignal, '.AWCT')
acqt = Cpt(EpicsSignal, '.ACQT')
acqm = Cpt(EpicsSignal, '.ACQM')
atime = Cpt(EpicsSignal, '.ATIME')
copyto = Cpt(EpicsSignal, '.COPYTO')
a1pv = Cpt(EpicsSignal, '.A1PV')
a1pv = Cpt(EpicsSignal, '.A1PV', kind=Kind.config)
a1nv = Cpt(EpicsSignal, '.A1NV', kind=Kind.config)
a1cd = Cpt(EpicsSignal, '.A1CD')
aspv = Cpt(EpicsSignal, '.ASPV')
aspv = Cpt(EpicsSignal, '.ASPV', kind=Kind.config)
ascd = Cpt(EpicsSignal, '.ASCD')

positioners = DDC(
Expand Down Expand Up @@ -231,7 +233,7 @@ def exsc_cb(value, timestamp, **kwargs):
def reset(self):
"""set all fields to default values"""
self.desc.put(self.desc.pvname.split(".")[0])
self.npts.put(1000)
self.number_points.put(1000)
for part in (self.positioners, self.detectors, self.triggers):
for ch_name in part.component_names:
channel = getattr(part, ch_name)
Expand Down
3 changes: 2 additions & 1 deletion apstools/synApps_ophyd/swait.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class swaitRecord(Device):
calc = Cpt(EpicsSignal, '.CALC')
val = Cpt(EpicsSignalRO, '.VAL')
prec = Cpt(EpicsSignal, '.PREC')
process = Cpt(EpicsSignal, '.PROC')
oevt = Cpt(EpicsSignal, '.OEVT')
outn = Cpt(EpicsSignal, '.OUTN')
odly = Cpt(EpicsSignal, '.ODLY')
Expand Down Expand Up @@ -122,7 +123,7 @@ def reset(self):
self.oopt.put("Every Time")
self.outn.put("")
for letter in self.channels.read_attrs:
channel = self.channels.__getattr__(letter)
channel = getattr(self.channels, letter)
if isinstance(channel, swaitRecordChannel):
channel.reset()
self.hints = {'fields': ["channels.%s" % c for c in "A B C D E F G H I J K L".split()]}
Expand Down

0 comments on commit 1885065

Please sign in to comment.