Example #1
0
MCL_NanoDrive_XYStage::MCL_NanoDrive_XYStage():
	busy_(false),
	initialized_(false),
	settlingTimeX_ms_(100),
	settlingTimeY_ms_(100),
	curXpos_(0),
	curYpos_(0),
	firstWriteX_(true),
	firstWriteY_(true),
	MCLhandle_(0)
{
	// Basically only set error messages in the constructor
	InitializeDefaultErrorMessages();

	// MCL error messages 
	SetErrorText(MCL_GENERAL_ERROR, "MCL Error: General Error");
	SetErrorText(MCL_DEV_ERROR, "MCL Error: Error transferring data to device");
	SetErrorText(MCL_DEV_NOT_ATTACHED, "MCL Error: Device not attached");
	SetErrorText(MCL_USAGE_ERROR, "MCL Error: Using a function from library device does not support");
	SetErrorText(MCL_DEV_NOT_READY, "MCL Error: Device not ready");
	SetErrorText(MCL_ARGUMENT_ERROR, "MCL Error: Argument out of range");
	SetErrorText(MCL_INVALID_AXIS, "MCL Error: Invalid axis");
	SetErrorText(MCL_INVALID_HANDLE, "MCL Error: Handle not valid");
	SetErrorText(MCL_INVALID_DRIVER, "MCL Error: Invalid Driver");
}
LCDA::LCDA() :
      busy_(false), 
      minV_(0.0), 
      maxV_(10.0), 
      bitDepth_(14),
      volts_(0.0),
      gatedVolts_(0.0),
      encoding_(0), 
      resolution_(8), 
      channel_(1), 
      name_(""),
      gateOpen_(true)
{
   InitializeDefaultErrorMessages();

   // add custom error messages
   SetErrorText(ERR_BOARD_NOT_FOUND,GS_ERR_BOARD_NOT_FOUND);
   SetErrorText(ERR_UNKNOWN_POSITION, "Invalid position (state) specified");
   SetErrorText(ERR_INITIALIZE_FAILED, "Initialization of the device failed");
   SetErrorText(ERR_WRITE_FAILED, "Failed to write data to the device");
   SetErrorText(ERR_CLOSE_FAILED, "Failed closing the device");

   CPropertyAction* pAct = new CPropertyAction(this, &LCDA::OnChannel);
   CreateProperty("Channel", "1", MM::Integer, false, pAct, true);
   // TODO: The SDK can give us the number of channels, but only after the board is open
   for (int i=1; i< 5; i++){
      std::ostringstream os;
      os << i;
      AddAllowedValue("Channel", os.str().c_str());
   }

}
Example #3
0
Cobolt::Cobolt() :
port_("Undefined"),
initialized_(false),
busy_(false),
answerTimeoutMs_(1000),
power_(0.00),
maxPower_(0.00),
laserOn_("On"),
laserStatus_("Undefined"),
interlock_ ("Interlock Open"),
fault_("No Fault"),
serialNumber_("0"),
version_("0")
{
    InitializeDefaultErrorMessages();
    SetErrorText(ERR_PORT_CHANGE_FORBIDDEN, "You can't change the port after device has been initialized.");
    
    // Name
    CreateProperty(MM::g_Keyword_Name, g_DeviceCoboltName, MM::String, true);
    
    // Description
    CreateProperty(MM::g_Keyword_Description, "Cobolt Laser Power Controller", MM::String, true);
    
    // Port
    CPropertyAction* pAct = new CPropertyAction (this, &Cobolt::OnPort);
    CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);
    // Max Power
    pAct = new CPropertyAction (this, &Cobolt::OnPowerMax);
    CreateProperty("Max Power", "Undefined", MM::Float, false, pAct, true);
  
}
Example #4
0
/**
 * MUCamSource constructor.
 * Setup default all variables and create device properties required to exist
 * before intialization. In this case, no such properties were required. All
 * properties will be created in the Initialize() method.
 *
 * As a general guideline Micro-Manager devices do not access hardware in the
 * the constructor. We should do as little as possible in the constructor and
 * perform most of the initialization in the Initialize() method.
 */
MUCamSource::MUCamSource() :
binning_ (0),
gain_(1.0),
gains_(0),
bytesPerPixel_(4),
colorChannel_(3),
initialized_(false),
exposureMs_(10.0),
exposureMin_(0),
exposureMax_(10.0),
roiX_(0),
roiY_(0),
//thd_(0),
cameraCnt_(0),
currentCam_(-1),
bitDepth_(8),
bitCnt_(0),
tmpbuf_(0),
handle_(0),
bufferSize_(0)
{
    // call the base class method to set-up default error codes/messages
    InitializeDefaultErrorMessages();
    
    // add custom messages
    SetErrorText(ERR_NO_CAMERAS_FOUND, "No cameras found.  Please connect a Motic camera and turn it on");
    SetErrorText(ERR_BUSY_ACQUIRING,   "Motic camera is already acquiring images.");
    SetErrorText(ERR_SOFTWARE_TRIGGER_FAILED, "Motic camera is not in software trigger mode.");

    // create live video thread
    //thd_ = new MSequenceThread(this);
}
Example #5
0
CPI_E761_ZStage::CPI_E761_ZStage() :
		stepSizeUm_(0.001), axisLimitUm_(100.0), busy_(false), initialized_(
				false), currentAxis_(3) {
	memset(axisName_, 0, 64);
	InitializeDefaultErrorMessages();
	//SetErrorText(PI_CNTR_PARAM_SYNTAX, "Parameter syntax error");
	//SetErrorText(PI_CNTR_UNKNOWN_COMMAND, "Unknown command");
	//SetErrorText(PI_CNTR_MOVE_WITHOUT_REF_OR_NO_SERVO, "Unallowable move attempted on unreferenced axis, or move attempted with servo off");
	//SetErrorText(PI_CNTR_POS_OUT_OF_LIMITS, "Position out of limits");
	//SetErrorText(PI_CNTR_VEL_OUT_OF_LIMITS, "Velocity out of limits");
	//SetErrorText(PI_CNTR_INVALID_AXIS_IDENTIFIER, "Invalid axis identifier");
	//SetErrorText(PI_CNTR_INVALID_STAGE_NAME, "Unknown stage name");
	//SetErrorText(PI_CNTR_PARAM_OUT_OF_RANGE, "Parameter out of range");
	//SetErrorText(PI_CNTR_OPENLOOP_VALUE_SET_WHEN_SERVO_ON, "Open-loop commands (SVA, SVR) are not allowed when servo is on");
	//SetErrorText(PI_CNTR_SEND_BUFFER_OVERFLOW, "Send buffer overflow");
	//SetErrorText(PI_CNTR_VOLTAGE_OUT_OF_LIMITS, "Voltage out of limits");
	//SetErrorText(PI_CNTR_OPEN_LOOP_MOTION_SET_WHEN_SERVO_ON, "Open-loop motion attempted when servo ON");

	// create pre-initialization properties
	// ------------------------------------

	// Name
	CreateProperty(MM::g_Keyword_Name, g_StageDeviceName, MM::String, true);

	// Description
	CreateProperty(MM::g_Keyword_Description,
			"Physik Instrumente (PI) E761 Adapter / Z-Stage", MM::String, true);

	//// axis limit in um
	//pAct = new CPropertyAction (this, &CPI_E761_ZStage::OnAxisLimit);
	//CreateProperty(g_PI_ZStageAxisLimitUm, "500.0", MM::Float, false, pAct, true);
}
Example #6
0
Controller::Controller(const char* name) :
	initialized_(false),
	name_(name),
	busy_(false),
	error_(0),
	changedTime_(0.0),
	mThread_(0)
{
	assert(strlen(name) < (unsigned int)MM::MaxStrLength);

	InitializeDefaultErrorMessages();

	// create pre-initialization properties
	// ------------------------------------

	// Name
	CreateProperty(MM::g_Keyword_Name, name_.c_str(), MM::String, true);

	// Port
	CPropertyAction* pAct = new CPropertyAction(this, &Controller::OnPort);
	CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);

	EnableDelay(); // signals that the delay setting will be used
	UpdateStatus();
}
Example #7
0
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// Stradus Object Initialization
Stradus::Stradus() :
   port_("Undefined"),
   initialized_(false),
   busy_(false),
   power_(1.00),
   pulPwr_(1),
   laserOn_("Undefined"),
   epc_("Undefined"),
   digMod_("Undefined"),
   emissionStatus_("Undefined"),
   interlock_ ("Undefined"),
   fault_("Undefined"),
   faultCode_("Undefined"),
   serialNumber_("Undefined"),
   version_("Undefined")
{
     InitializeDefaultErrorMessages();

     SetErrorText(ERR_PORT_CHANGE, "Cannot update COM port after intialization.");

     // Name
     CreateProperty(MM::g_Keyword_Name, DEVICE_NAME, MM::String, true);

     // Description
     CreateProperty(MM::g_Keyword_Description, "VORTRAN Stradus Laser", MM::String, true);

     // Port
     CPropertyAction* pAct = new CPropertyAction (this, &Stradus::OnPort);
     CreateProperty(MM::g_Keyword_Port, "No Port", MM::String, false, pAct, true);

}
Example #8
0
///////////////////////////////////////////////////////////////////////////////
// RappScanner
//
RappScanner::RappScanner() :
   initialized_(false), port_(""), calibrationMode_(0), polygonAccuracy_(10), polygonMinRectSize_(10),
   ttlTriggered_("Rising Edge"), rasterFrequency_(500), spotSize_(10), laser2_(false)
{
   InitializeDefaultErrorMessages();

   // create pre-initialization properties
   // ------------------------------------

   // Name
   CreateProperty(MM::g_Keyword_Name, g_RappScannerName, MM::String, true);

   // Description
   CreateProperty(MM::g_Keyword_Description, "Rapp UGA-40 galvo phototargeting adapter", MM::String, true);

   // Port
   CPropertyAction* pAct = new CPropertyAction (this, &RappScanner::OnPort);
   
   obsROE_Device* dev = new obsROE_Device();

	std::vector<std::string> s = dev->SearchDevices();
	if (s.size() <= 0)
	{
      s.push_back(std::string("Undefined"));
	}

   // The following line crashes hardware wizard if compiled in a Debug configuration:
   CreateProperty("VirtualComPort", s.at(0).c_str(), MM::String, false, pAct, true);
	for (unsigned int i = 0; i < s.size(); i++)
   {
      AddAllowedValue("VirtualComPort", s.at(i).c_str());
   }


}  
///////////////////////////////////////////////////////////////////////////////
// XYStageH128
//
XYStage::XYStage() : // LIN 01/01/2012 DIDN'T RENAME FUNCTION. ASSUMING MMCORE WILL EXPECT TO CALL ON XYStage()
   CXYStageBase<XYStage>(),
   initialized_(false), 
   port_("Undefined"), 
   stepSizeXUm_(0.1), // LIN 01/02/2012 changed initial value from 0.0 to 0.1
   stepSizeYUm_(0.1), // LIN 01/02/2012 changed initial value from 0.0 to 0.1
   answerTimeoutMs_(1000),
   originX_(0),
   originY_(0),
   mirrorX_(false),
   mirrorY_(false),
   busy_(false) // LIN 01/01/2012 ADDED
{
   InitializeDefaultErrorMessages();

   // create pre-initialization properties
   // ------------------------------------

   // Name
   // CreateProperty(MM::g_Keyword_Name, g_LegacyXYStageDeviceName, MM::String, true); // LIN 01/01/2012 RENAMED

   // Description 
   CreateProperty(MM::g_Keyword_Description, "Prior H128 XY stage driver adapter", MM::String, true); // LIN 01/01/2012 RENAMED
   // Port
   CPropertyAction* pAct = new CPropertyAction (this, &XYStage::OnPort);
   CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);

   EnableDelay(); // LIN 01-01-2012 ADDED SO WE CAN SET DELAY INSTEAD OF QUERYING H128 BUSY STATUS

}
Example #10
0
H101CryoControl::H101CryoControl() :
   initialized_(false)  
{
 InitializeDefaultErrorMessages();

 CreateProperty(MM::g_Keyword_Name, g_H101CryoControl , MM::String, true);
 CreateProperty(MM::g_Keyword_Description, "Okolab H101 Cryo Control adapter", MM::String, true);
}
// Implement Illumination
Illumination::Illumination()
{
    InitializeDefaultErrorMessages();

    CreateHubIDProperty();

    _init = false;
    _busy = false;
}
Example #12
0
/*---------------------------------------------------------------------------
 Default constructor.
---------------------------------------------------------------------------*/
Mightex_Sirius_SLC_USB::Mightex_Sirius_SLC_USB() :
	dev_num(0),
	cur_dev(0),
	devHandle(-1),
	channels(-1),
	devModuleType(MODULE_AA),
	mode(DISABLE_MODE),
	m_ratio(50),
	m_period(1),
	m_channel(1),
	m_name(""),
    m_LEDOn("Off"),
	m_mode("DISABLE"),
   m_status("No Fault"),
	m_serialNumber("n/a"),
   m_busy(false),
   m_initialized(false)
{
	InitializeDefaultErrorMessages();
	SetErrorText(ERR_PORT_CHANGE_FORBIDDEN, "You can't change the port after device has been initialized.");
	SetErrorText(ERR_INVALID_DEVICE, "The selected plugin does not fit for the device.");


	// Name
	CreateProperty(MM::g_Keyword_Name, g_DeviceSiriusSLCUSBName, MM::String, true);

	// Description
	CreateProperty(MM::g_Keyword_Description, "Mightex Sirius SLC LED Driver(USB)", MM::String, true);

	CPropertyAction* pAct = new CPropertyAction (this, &Mightex_Sirius_SLC_USB::OnDevices);
	CreateProperty("Devices", "", MM::String, false, pAct, true);

	AddAllowedValue( "Devices", ""); // no device yet

	HidInit();

	char ledName[64];
	char devName[32];
	char serialNum[32];
	int dev_Handle;
	std::string s_devName;
	dev_num = MTUSB_LEDDriverInitDevices();
	for(int i = 0; i < dev_num; i++)
	{
		dev_Handle = MTUSB_LEDDriverOpenDevice(i);
		if(dev_Handle >= 0)
			if(HidGetDeviceName(dev_Handle, devName, sizeof(devName)) > 0)
				if(MTUSB_LEDDriverSerialNumber(dev_Handle, serialNum, sizeof(serialNum)) > 0)
				{
					sprintf(ledName, "%s:%s", devName, serialNum);
					AddAllowedValue( "Devices", ledName);
					s_devName = ledName;
					devNameList.push_back(s_devName);
				}
		MTUSB_LEDDriverCloseDevice(dev_Handle);
	}
}
PIGCSControllerDLLDevice::PIGCSControllerDLLDevice() :
   dllName_("GCS_DLL.dll"),
   interfaceType_(""),
   interfaceParameter_(""),
   initialized_(false),
   ctrl_(NULL),
   bShowInterfaceProperties_(true)
{
   InitializeDefaultErrorMessages();
}
// Implement Hub
Hub::Hub()
{
    _init = false;
    _busy = false;
    InitializeDefaultErrorMessages();
    SetErrorText(ERR_HUB_PATH,
                 "Motic microscope sdk environment variable 'MMSDKPath' is incorrect");
    _event = CreateEvent(0, TRUE, FALSE, 0);
    _timeout = 10000;
}
Example #15
0
MT20HUB::MT20HUB() : 
	initialized_(false),
	busy_(false)
{
	InitializeDefaultErrorMessages();

	SetErrorText(ERR_UNABLE_TO_CONNECT, "Unable to connect to the MT20");
	SetErrorText(ERR_EXECUTING_CMD, "MT20 failed to execute requested operation (MT20 shutdown)");
	SetErrorText(ERR_REPLACE_BURNER_SOON, "MT20 burner has exceeded 1000 hours of use and should be replaced soon.");
}
Example #16
0
LMM5Shutter::LMM5Shutter() :
   changedTime_(0.0),
   state_(0),
   open_ (false),
   nrOutputs_(0)
{
   InitializeDefaultErrorMessages();

   EnableDelay();
}
Example #17
0
MT20Shutter::MT20Shutter() :
	state_(false),
	initialized_(false),
	busy_(false)
{
	InitializeDefaultErrorMessages();

	SetErrorText(ERR_INVALID_STATE, "Invalid MT20-Shutter state requested");
	SetErrorText(ERR_EXECUTING_CMD, "MT20-Shutter failed to execute requested operation");
	SetErrorText(ERR_SET_FAILED, "MT20-Shutter failed to successfuly set the requested state");
}
// Implement Objectives
Objectives::Objectives()
{
    InitializeDefaultErrorMessages();
    SetErrorText(ERR_OBJECTIVE_NOTFOUND, "Specified objective not found");
    SetErrorText(ERR_OBJECTIVE_TIMEOUT, "Objective move timeout");

    CreateHubIDProperty();

    _init = false;
    _busy = false;
}
Example #19
0
LStepOld::LStepOld() : initialized_(false),
   answerTimeoutMs_(5000),
   motor_speed_(5.0),
   joystick_command_("False")
{
   // call the base class method to set-up default error codes/messages
   InitializeDefaultErrorMessages();

   CPropertyAction* pAct = new CPropertyAction (this, &LStepOld::OnPort);
   CreateProperty(MM::g_Keyword_Port, "Unefined", MM::String, false, pAct, true);
}
// Z implement
ZStage::ZStage()
{
    InitializeDefaultErrorMessages();
    SetErrorText(ERR_Z_INVALID, "Z axis unavailable");
    SetErrorText(ERR_Z_TIMEOUT, "Z move timeout");
    SetErrorText(ERR_Z_MOVE, "Z move error");

    CreateHubIDProperty();

    _init = false;
    _busy = false;
}
// XYStage implement
XYStage::XYStage()
{
    InitializeDefaultErrorMessages();
    SetErrorText(ERR_XY_INVALID, "XY stage unavailable");
    SetErrorText(ERR_XY_TIMEOUT, "XY move timeout");
    SetErrorText(ERR_XY_MOVE, "XY move error");

    CreateHubIDProperty();

    _init = false;
    _busy = false;
}
LCShutter::LCShutter() : 
   initialized_(false), 
   nrLines_(4),
   state_(0),
   name_(g_DeviceNameLCShutter)
{
   InitializeDefaultErrorMessages();
   
   // custom error messages
   SetErrorText(ERR_BOARD_NOT_FOUND,GS_ERR_BOARD_NOT_FOUND);
   EnableDelay();
}
Example #23
0
MT20Attenuator::MT20Attenuator() :
	numPos_(14),
	busy_(false),
	initialized_(false),
	position_(0)
{
	InitializeDefaultErrorMessages();
	
	SetErrorText(ERR_INVALID_STATE, "Invalid MT20-Attenuator state requested");
	SetErrorText(ERR_EXECUTING_CMD, "MT20-Attenuator failed to execute requested operation");
	SetErrorText(ERR_SET_FAILED, "MT20-Attenuator failed to successfuly set the requested position");
}
Example #24
0
MT20Filterwheel::MT20Filterwheel() :
	numPos_(8),
	busy_(false),
	initialized_(false),
	position_(0)
{
	InitializeDefaultErrorMessages();
	
	SetErrorText(ERR_INVALID_POSITION, "Invalid MT20-Filterwheel position requested");
	SetErrorText(ERR_EXECUTING_CMD, "MT20-Filterwheel failed to execute requested operation");
	SetErrorText(ERR_SET_FAILED, "MT20-Filterwheel failed to successfuly set the requested position");
}
LCSafetyShutter::LCSafetyShutter() :
   changedTime_(0),
   initialized_(false),
   state_(0),
   name_(g_DeviceNameLCShutter)
{
   InitializeDefaultErrorMessages();
   
   // custom error messages
   SetErrorText(ERR_BOARD_NOT_FOUND,GS_ERR_BOARD_NOT_FOUND);
   SetErrorText(ERR_NOT_IN_THIS_FIRMWARE, GS_NOT_IN_THIS_FIRMWARE);
   EnableDelay();
}
Example #26
0
MT20Burner::MT20Burner() :
	numStates_(2),
	busy_(false),
	initialized_(false),
	state_(0)
{
	InitializeDefaultErrorMessages();

	SetErrorText(ERR_INVALID_STATE, "Invalid MT20-Burner state requested");
	SetErrorText(ERR_EXECUTING_CMD, "MT20-Burner failed to execute requested operation");
	SetErrorText(ERR_SET_FAILED, "MT20-Burner failed to successfuly set the requested state");
	SetErrorText(ERR_REPLACE_BURNER_SOON, "MT20-Burner reports burner near end of life. Replace burner soon");
}
Example #27
0
LMM5Hub::LMM5Hub() :
majorFWV_('0'),
minorFWV_('0'),
triggerOutConfig_ (0),
port_ ("Undefined"),
initialized_ (false),
flicrAvailable_(false)
{
   InitializeDefaultErrorMessages();

   // SetErrorText(ERR_UNEXPECTED_ANSWER, "Unexpected answer.  Is the LMM5 controller connected and switched on?");

   CPropertyAction* pAct = new CPropertyAction(this, &LMM5Hub::OnPort);
   CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);
}
Example #28
0
Xcite120PC::Xcite120PC() :
   initialized_(false),
   port_("Undefined"),
   is_open_(false),
   is_locked_("False"),
   lamp_intensity_("100"),
   lamp_state_("On"),
   exposure_time_s_(0.2)
{
  InitializeDefaultErrorMessages();
  CreateProperty(MM::g_Keyword_Name, g_Xcite120PCName, MM::String, true);

  CPropertyAction* pAct = new CPropertyAction (this, &Xcite120PC::OnPort);
  CreateProperty(MM::g_Keyword_Port, "Unefined", MM::String, false, pAct, true);
}
Example #29
0
RAMPSXYStage::RAMPSXYStage() :
    CXYStageBase<RAMPSXYStage>(),
    stepSize_um_(0.025),
    posX_um_(0.0),
    posY_um_(0.0),
    busy_(false),
    initialized_(false),
    lowerLimit_(0.0),
    upperLimit_(20000.0),
	status_("")
{
  InitializeDefaultErrorMessages();

  // parent ID display
  CreateHubIDProperty();
}
Example #30
0
Sapphire::Sapphire(const char* name) :
   initialized_(false), 
   //powerSetpoint_(0),
	//powerReadback_(0),
   state_(0),
   name_(name), 
   busy_(false),
   error_(0),
   changedTime_(0.0),
	queryToken_("?"),
	powerSetpointToken_("P"),
	powerReadbackToken_("P"),
	//CDRHToken_("CDRH"),  // if this is on, laser delays 5 SEC before turning on
   //CWToken_("CW"),
	laserOnToken_("L"),
	TECServoToken_("T"),
	headSerialNoToken_("HID"),
	headUsageHoursToken_("HH")
	//wavelengthToken_("WAVE"),
	//externalPowerControlToken_("EXT")



{
	//pDevImpl = new DevImpl(*this);
   assert(strlen(name) < (unsigned int) MM::MaxStrLength);

   InitializeDefaultErrorMessages();
   SetErrorText(ERR_DEVICE_NOT_FOUND, "No answer received.  Is the Coherent Sapphire connected to this serial port?");
   // create pre-initialization properties
   // ------------------------------------

   // Name
   CreateProperty(MM::g_Keyword_Name, name_.c_str(), MM::String, true);

   // Description
   CreateProperty(MM::g_Keyword_Description, "Coherent Sapphire Laser", MM::String, true);

   // Port
   CPropertyAction* pAct = new CPropertyAction (this, &Sapphire::OnPort);
   CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);

   EnableDelay(); // signals that the delay setting will be used
   UpdateStatus();
}