Binding evergy scan
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.logging.Logger;
|
||||
* Implementation of Scienta spectrometer analyser.
|
||||
*/
|
||||
public class Scienta extends AreaDetector {
|
||||
|
||||
final ChannelInteger acquire2;
|
||||
final ChannelInteger slices, frames;
|
||||
final ChannelDouble lowEnergy, centerEnergy, highEnergy, stepSize, stepTime, energyWidth;
|
||||
final ChannelDoubleArray spectrum, image, extio, spectrumX;
|
||||
@@ -40,6 +40,9 @@ public class Scienta extends AreaDetector {
|
||||
public Scienta(String name, String channelCtrl, String channelData) {
|
||||
super(name, channelCtrl, channelData);
|
||||
this.channelCtrl = channelCtrl;
|
||||
|
||||
acquire2 = new ChannelInteger(name + " aquire2", channelCtrl + ":Acquire2", false);
|
||||
|
||||
slices = new ChannelInteger(name + " slices", channelCtrl + ":SLICES", false);
|
||||
frames = new ChannelInteger(name + " frames", channelCtrl + ":FRAMES", false);
|
||||
|
||||
@@ -109,7 +112,7 @@ public class Scienta extends AreaDetector {
|
||||
totalPoints = new ChannelDouble(name + " total points", channelCtrl + ":TOTAL_POINTS_RBV", 0, false);
|
||||
totalPoints.setAccessType(AccessType.Read);
|
||||
|
||||
addChildren(new Device[]{slices, frames,
|
||||
addChildren(new Device[]{acquire2, slices, frames,
|
||||
lowEnergy, centerEnergy, highEnergy, stepSize, stepTime, energyWidth,
|
||||
spectrum, image, extio, spectrumX,
|
||||
currentChannel, totalPoints, totalDataPoints,
|
||||
@@ -192,6 +195,7 @@ public class Scienta extends AreaDetector {
|
||||
@Override
|
||||
protected void doSetSimulated() {
|
||||
super.doSetSimulated();
|
||||
setCache(acquire2, 1);
|
||||
setCache(channelBegin, 50.0);
|
||||
setCache(channelEnd, 150.0);
|
||||
setCache(sliceBegin, -20.0);
|
||||
@@ -217,9 +221,17 @@ public class Scienta extends AreaDetector {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws IOException, InterruptedException {
|
||||
|
||||
acquire2.write(1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void doUpdate() throws IOException, InterruptedException {
|
||||
super.doUpdate();
|
||||
acquire2.update();
|
||||
numChannels.update();
|
||||
currentChannel.update();
|
||||
slices.update();
|
||||
@@ -244,6 +256,7 @@ public class Scienta extends AreaDetector {
|
||||
@Override
|
||||
protected void doSetMonitored(boolean value) {
|
||||
super.doSetMonitored(value);
|
||||
acquire2.setMonitored(value);
|
||||
numChannels.setMonitored(value);
|
||||
currentChannel.setMonitored(value);
|
||||
slices.setMonitored(value);
|
||||
@@ -437,6 +450,10 @@ public class Scienta extends AreaDetector {
|
||||
}
|
||||
|
||||
//Direct register access
|
||||
public ChannelInteger getAcquire2() {
|
||||
return acquire2;
|
||||
}
|
||||
|
||||
public ChannelInteger getSlices() {
|
||||
return slices;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user