Ejemplo n.º 1
0
int PIZStage::OnPosition(MM::PropertyBase* pProp, MM::ActionType eAct)
{
   if (eAct == MM::BeforeGet)
   {
	   if (!initialized_)
	   {
		   pProp->Set(0.0);
		   return DEVICE_OK;
	   }
      double pos;
      int ret = GetPositionUm(pos);
      if (ret != DEVICE_OK)
         return ret;

      pProp->Set(pos);
   }
   else if (eAct == MM::AfterSet)
   {
 	   if (!initialized_)
	   {
		   return DEVICE_OK;
	   }
     double pos;
      pProp->Get(pos);
      int ret = SetPositionUm(pos);
      if (ret != DEVICE_OK)
         return ret;

   }

   return DEVICE_OK;
}
Ejemplo n.º 2
0
int CPI_E761_ZStage::OnPosition(MM::PropertyBase* pProp, MM::ActionType eAct) {
	MMThreadGuard guard(g_PI_ThreadLock);

	if (eAct == MM::BeforeGet) {
		double pos;
		int ret = GetPositionUm(pos);
		if (ret == DEVICE_OK) {
			pProp->Set(pos);
			LogMessage(
					"Get position: "
							+ boost::lexical_cast<std::string, float>(
									(float) pos) + "\tZephyre");
		}
		return ret;
	} else if (eAct == MM::AfterSet) {
		double pos;
		pProp->Get(pos);
		int ret = SetPositionUm(pos);
		LogMessage(
				"Set position: "
						+ boost::lexical_cast<std::string, float>((float) pos)
						+ "\tZephyre");
		OnStagePositionChanged(pos);
		return ret;
	}
	return DEVICE_OK;
}
Ejemplo n.º 3
0
int MCL_NanoDrive_XYStage::SetRelativePositionUm(double x, double y)
{
	double currX = 0;
	double currY = 0;

	GetPositionUm(currX, currY);
	return SetPositionUm(x + currX, y + currY);
}
Ejemplo n.º 4
0
int PIZStage::GetPositionSteps(long& steps)
{
   double pos;
   int ret = GetPositionUm(pos);
   if (ret != DEVICE_OK)
      return ret;
   steps = (long) ((pos / stepSizeUm_) + 0.5);
   return DEVICE_OK;
}
Ejemplo n.º 5
0
int CPI_E761_ZStage::GetPositionSteps(long& steps) {
	double pos;
	BOOL ret = GetPositionUm(pos);
	if (ret != DEVICE_OK)
		return ret;

	steps = (long) (pos / stepSizeUm_);
	return DEVICE_OK;
}
Ejemplo n.º 6
0
int MCL_NanoDrive_XYStage::GetPositionSteps(long &x, long &y)
{
	int err;
	double xPos, yPos;

	err = GetPositionUm(xPos, yPos);
	if (err != DEVICE_OK)
		return err;

	x = (long) (xPos / stepSizeX_um_);
	y = (long) (yPos / stepSizeY_um_);

	return DEVICE_OK;
}
Ejemplo n.º 7
0
int CPI_E761_XYStage::OnYPosition(MM::PropertyBase* pProp,
		MM::ActionType eAct) {
	if (eAct == MM::BeforeGet) {
		double x, y;
		int ret = GetPositionUm(x, y);
		if (ret == DEVICE_OK)
			pProp->Set(y);
		return ret;
	} else if (eAct == MM::AfterSet) {
		double y;
		pProp->Get(y);
		int ret = SetYPositionUm(y);
		if (ret != DEVICE_OK)
			return ret;
	}
	return DEVICE_OK;
}