示例#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;
}
示例#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;
}
示例#3
0
int MCL_NanoDrive_XYStage::Home()
{
	int err = DEVICE_OK;

	err = SetPositionUm(xMin_, yMin_);

	return DEVICE_OK;
}
示例#4
0
int MCL_NanoDrive_XYStage::SetPositionSteps(long x, long y)
{
	int err = DEVICE_OK;

	err = SetPositionUm(x * stepSizeX_um_, y * stepSizeY_um_);

	return err;
}
示例#5
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);
}
int ZStage::SetPositionSteps(long steps)
{
    if(z_Available())
    {
        return SetPositionUm(steps * z_GetHardwareMotionScale());
    }
    return ERR_Z_INVALID;
}
示例#7
0
int PIZStage::SetPositionSteps(long steps)
{
   double pos = steps * stepSizeUm_;
   return SetPositionUm(pos);
}
示例#8
0
int LStepOld::SetPositionSteps(long x, long y)
{
   return SetPositionUm( x, y );
}