
public final class BladeSetConfiguration extends Object implements Serializable
At the moment each instance contains hard-coded information about only one set of hardware, that used in the one-blade prototype shutter constructed in 2009:
Although the prototype has only one physical blade, two blade sets are simulated. Set 0 is assigned a home/open position at low absolute position. Moving this blade set forward decreases the motor position encoder reading, so pulses/mm is negative. The forward direction for the "other" blade set, set 1, increases encoder values so pulses/mm is positive but has the same magnitude. However, the position conversion routines assume that encoder values are near zero for each blade set near its home position, which is impossible for a single axis unless the encoder zero point is reset when changing blade sets. It shouldn't matter if the motion commands use differences in position. In fact the ACR's "JOG INC" is used for all motions; as it takes only position changes as argument things appear to be OK.
org.lsst.ccs.drivers.iocard,
org.lsst.ccs.drivers.parker,
org.lsst.ccs.subsystems.shutter.BladeSetDrvr,
Serialized Form| Constructor and Description |
|---|
BladeSetConfiguration(int index)
Constructs a configuration for a given blade set.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAdAddr()
Gets the ISA base address of the Helios ADC unit.
|
int |
getAdLevel()
Gets the IRQ level of the Helios ADC unit.
|
int |
getAdTempChn()
Gets the number of the Helios ADC channel connected to the motor temperature output.
|
BladeSetCalibration |
getCalibration()
Gets the current Hall sensor calibration for the blade set.
|
double |
getClosed()
Gets the absolute position in mm of the blade set when it's considered fully extended.
|
int |
getDioAddr()
Gets the base address in ISA space of the Acces I/O card.
|
int |
getDioConf()
Gets the value to place in the configuration register of the Acces I/O card.
|
int |
getDioHPort()
Gets the ISA space offset of the Acces I/O register serving inputs from the Hall sensors.
|
int |
getDioILine()
Gets the number of the Acces input line connected to the motor controller's "output 33".
|
int |
getDioIPort()
Gets the ISA space offset of the Acces I/O register serving inputs from the motor controller.
|
int |
getDioLevel()
Gets the IRQ level of the Acces I/O card.
|
int |
getDioOLine()
Gets the number of the Acces output line connected to the motor controller's "input 4".
|
int |
getDioOPort()
Gets the ISA space offset of the Acces I/O register serving outputs to the motor controller.
|
double |
getHome()
Gets the absolute home position of the blade set in mm.
|
int |
getIndex()
Gets the index, 0 or 1, of the blade set described by this object.
|
double |
getMoveTime()
Gets the default duration in seconds of each blade set motion.
|
String |
getNode()
Gets the IP address of the motor controller for the blade set.
|
int |
getNumSamp()
Gets the number of motor position samples to be taken during each blade set motion.
|
double |
getOpen()
Gets the absolute position in mm of the blade set when it's considered fully retracted and
ready for motion.
|
double |
getPpMm()
Gets the pulses-per-millimeter for the blade set's motor position encoder.
|
double |
motorDistance(double dist)
Converts a blade set travel distance, e.g., a step size, into a change in motor coordinates.
|
double |
negSoftLimit()
Calculates the software lower limit on the blade set's absolute position.
|
double |
position(double relPosition)
Converts a blade set relative position into an absolute position.
|
double |
position(int encoder)
Converts a motor position encoder reading into absolute blade set position in mm.
|
double |
posSoftLimit()
Calculates the software upper limit on the blade set's absolute position.
|
double |
ppu()
Gets the pulses per unit value given to the motor controller, the absolute value
of what getPpm() returns.
|
static BladeSetCalibration |
readCalibration(int index)
Reads a text file of Hall sensor calibration data (transition positions)
from the current working directory.
|
static BladeSetCalibration |
readCalibration(String file)
Reads a file of Hall sensor calibration data (transition positions)
from a text file with the given path name (relative or absolute).
|
double |
relPosition(double position)
Calculates the relative position of the blade set given the absolute position.
|
double |
relPosition(int encoder)
Converts a motor encoder position into a relative position.
|
void |
writeCalibration()
Saves the currently loaded Hall sensor calibration data (transition positions).
|
void |
writeCalibration(BladeSetCalibration calib)
Saves an arbitrary Hall sensor calibration.
|
static void |
writeCalibration(BladeSetCalibration calib,
String file)
Saves an arbitrary Hall sensor calibration in a non-standard location.
|
void |
writeCalibration(String file)
Saves the currently loaded Hall sensor calibration in a non-standard location.
|
public BladeSetConfiguration(int index)
readCalibration(int).index - the index, 0 or 1, designating the blade set.public int getIndex()
public BladeSetCalibration getCalibration()
public String getNode()
public double getPpMm()
public double getHome()
public double getOpen()
public double getClosed()
public double getMoveTime()
public int getNumSamp()
public int getDioAddr()
public int getDioLevel()
public int getDioConf()
public int getDioHPort()
public int getDioIPort()
public int getDioILine()
public int getDioOPort()
public int getDioOLine()
public int getAdAddr()
public int getAdLevel()
public int getAdTempChn()
public double ppu()
public double motorDistance(double dist)
dist - the travel distance in mm where a positive value means forward or away from home
and a negative value means backward or toward homepublic double position(int encoder)
encoder - the encoder valuepublic double position(double relPosition)
relPosition - the dimensionless relative position in the interval [0, 1]public double relPosition(int encoder)
encoder - the encoder position value.public double relPosition(double position)
position - the absolute position in mmpublic double posSoftLimit()
public double negSoftLimit()
public static BladeSetCalibration readCalibration(int index)
readCalibration(String).index - the blade set index, 0 or 1.public static BladeSetCalibration readCalibration(String file)
file - the file's pathnamepublic void writeCalibration()
public void writeCalibration(BladeSetCalibration calib)
calib - the calibration to savepublic void writeCalibration(String file)
file - the absolute or relative pathname of the file to be createdpublic static void writeCalibration(BladeSetCalibration calib, String file)
calib - the calibration to savefile - the absolute or relative pathname of the file to be createdCopyright © 2016 LSST. All rights reserved.