예제 #1
0
AMAction3 *CLSMAXvMotor::createStopAction()
{
	if(!isConnected())
		return 0;

	AMControlInfo info = toInfo();
	AMControlStopActionInfo *actionInfo = new AMControlStopActionInfo(info);
	AMAction3 *action = new AMControlStopAction(actionInfo, this);

	return action;
}
예제 #2
0
//-----------------------------------------------------------------------------
// Function: FileDependencyInfoWidget::updateFileLabel()
//-----------------------------------------------------------------------------
void FileDependencyInfoWidget::updateFileLabel()
{
    QString fileLabelText = tr("Dependency Information: ");
    QFileInfo fromInfo(dependency_->getFile1());
    QFileInfo toInfo(dependency_->getFile2());
    fileLabelText += fromInfo.fileName();
    if(dependency_->isBidirectional())
    {
        fileLabelText += " <--> ";
    }
    else
    {
        fileLabelText += " ---> ";
    }
    fileLabelText += toInfo.fileName();
    this->setTitle(fileLabelText);
}
예제 #3
0
AMAction3* AMDetector::createSetDarkCurrentValidStateAction(bool isValid)
{
    return new AMDetectorSetDarkCurrentValidStateAction(new AMDetectorSetDarkCurrentValidStateActionInfo(isValid, toInfo()), this);
}
예제 #4
0
AMAction3* AMDetector::createSetDarkCurrentTimeAction(double newTime)
{
    return new AMDetectorSetDarkCurrentTimeAction(new AMDetectorSetDarkCurrentTimeActionInfo(newTime, toInfo()), this);
}
예제 #5
0
AMAction3* AMDetector::createSetDarkCurrentValueAction(double newValue)
{
    return new AMDetectorSetDarkCurrentValueAction(new AMDetectorSetDarkCurrentValueActionInfo(newValue, toInfo(), this), this);
}
예제 #6
0
AMAction3* AMDetector::createSetLastMeasurementAsDarkCurrentAction()
{
    return new AMDetectorSetLastMeasurementAsDarkCurrentAction(new AMDetectorSetLastMeasurementAsDarkCurrentActionInfo(toInfo()), this);
}
예제 #7
0
AMAction3* AMDetector::createCleanupActions() {
    return new AMDetectorCleanupAction(new AMDetectorCleanupActionInfo(toInfo()), this);
}
예제 #8
0
AMAction3* AMDetector::createReadAction() {
    return new AMDetectorReadAction(new AMDetectorReadActionInfo(toInfo(), this));
}
예제 #9
0
AMAction3* AMDetector::createTriggerAction(AMDetectorDefinitions::ReadMode readMode) {
    return new AMDetectorTriggerAction(new AMDetectorTriggerActionInfo(toInfo(), readMode, this));
}
예제 #10
0
AMAction3* AMDetector::createSetAcquisitionTimeAction(double seconds) {
    return new AMDetectorDwellTimeAction(new AMDetectorDwellTimeActionInfo(toInfo(), seconds), this);
}
예제 #11
0
AMAction3* AMDetector::createInitializationActions() {
    return new AMDetectorInitializeAction(new AMDetectorInitializeActionInfo(toInfo()), this);
}
예제 #12
0
AMAction3 * SGMGratingAngleControl::createMoveAction(double setpoint)
{
	AMListAction3* moveAction = new AMListAction3(new AMListActionInfo3("Moving Grating Angle",
	                                                                    "Moving Grating Angle"),
	                                              AMListAction3::Sequential);


	if(isClosedLoop()) {

		moveAction->addSubAction(AMActionSupport::buildControlMoveAction(encoderControl_, setpoint));
	} else {

		// Get distance to move in terms of the encoder
		double deltaDistanceEncoder = setpoint - value();

		// Convert into steps
		double deltaDistanceSteps = deltaDistanceEncoder * stepsPerEncoderCount();

		// Get current step position
		double currentStepPosition = stepMotorControl_->value();
		// Get the setpoint in terms of steps
		double stepSetpoint = currentStepPosition + deltaDistanceSteps;

		// Up our tolerance
		moveAction->addSubAction(new AMChangeToleranceAction(new AMChangeToleranceActionInfo(toInfo(), 400),this));

		// Do the move
		moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepMotorControl_, stepSetpoint));

	}

	return moveAction;
}
예제 #13
0
AMAction3 * SGMGratingAngleControl::createDefaultsAction()
{
	AMListAction3* returnAction = new AMListAction3(new AMListActionInfo3("Set Grating Angle Defaults",
	                                                                      "Set Grating Angle Defaults"),
	                                                AMListAction3::Sequential);

	returnAction->addSubAction(new AMChangeToleranceAction(new AMChangeToleranceActionInfo(toInfo(), 5),this));

	AMListAction3* moveAction = new AMListAction3(new AMListActionInfo3("Set Values",
	                                                                    "Set Values"),
	                                              AMListAction3::Parallel);

	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepVelocityControl_, DEFAULT_GRATING_ANGLE_VELOCITY));
	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepAccelerationControl_, DEFAULT_GRATING_ANGLE_ACCELERATION));
	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(movementTypeControl_, DEFAULT_GRATING_ANGLE_MOVE_TYPE));

	AMListAction3* waitAction = new AMListAction3(new AMListActionInfo3("Wait for Values",
	                                                                    "Wait for Values"),
	                                              AMListAction3::Parallel);

	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(stepVelocityControl_, DEFAULT_GRATING_ANGLE_VELOCITY, 10, AMControlWaitActionInfo::MatchWithinTolerance));
	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(stepAccelerationControl_, DEFAULT_GRATING_ANGLE_ACCELERATION, 10, AMControlWaitActionInfo::MatchWithinTolerance));
	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(movementTypeControl_, DEFAULT_GRATING_ANGLE_MOVE_TYPE, 10, AMControlWaitActionInfo::MatchWithinTolerance));

	returnAction->addSubAction(moveAction);
	returnAction->addSubAction(waitAction);

	return returnAction;
}