12 XYZControl::XYZControl()
13 : xpos(0, -10000, 10000, L
"XPosition_um")
14 , ypos(0, -10000, 10000, L
"YPosition_um")
15 , zpos(0, -10000, 10000, L
"ZPosition_um")
16 , pollinterval(1000, 0, 10000, L
"PollInterval_ms") {
33 XYZControlGalil::XYZControlGalil()
34 : comstring(L
"COM7 19200", L
"RS232Connection")
35 , xcountspermicron(2, 1.0, 100, L
"XEncoderCountsPerMicrometer")
36 , ycountspermicron(2, 1.0, 100.0, L
"YEncoderCountsPerMicrometer")
37 , zcountspermicron(4, 1.0, 100.0, L
"ZEncoderCountsPerMicrometer"){
56 XYZControlSutter::XYZControlSutter()
57 : comstring(L
"COM10", L
"RS232COMPORT")
58 , microstepspermicron(1.0, 1.0, 2000.0, L
"MicrostepsPerMicrometer") {
73 FastZControl::FastZControl()
74 : minoutput(0, -10, 10, L
"MinOutput_V")
75 , maxoutput(4, -10, 10, L
"MaxOutput_V")
76 , calibrationfile(L
"None", L
"CalibrationFile") {
77 calibration.emplace(std::pair<double, double>(0.0, 0.0));
81 std::ifstream file(_filepath);
83 DBOUT(L
"FastZControl::LoadCalibration file is not good, load aborted");
89 while ( file.good() ) {
91 calibration.emplace(std::pair<double, double>(key, value));
94 DBOUT(L
"FastZControl::LoadCalibration loaded file " << _filepath);
107 zvolt = lower->second;
112 auto upper = lower == (
calibration.begin())?lower:lower--;
115 double divider = (upper->first - lower->first);
116 divider = (divider==0)?1:divider;
117 zvolt = ((upper->second - lower->second) / divider ) * (_positionum - lower->first) + lower->second;
118 DBOUT(L
"New ETL voltage: " << zvolt);
137 FastZControlETL::FastZControlETL() {
148 XYControl::XYControl()
149 : xpos(0, -100000, 100000, L
"XPosition_um")
150 , ypos(0, -100000, 100000, L
"YPosition_um")
151 , pollinterval(1000, 0, 10000, L
"PollInterval_ms")
152 , buttonstepsize(10, 0, 1000, L
"StepSizeForButtons_um")
153 , stageinfo(L
"", L
"StageInformation") {
170 XYControlGalil::XYControlGalil()
171 : comstring(L
"COM5 19200", L
"RS232Connection")
172 , countspermicron(1024.0, 1.0, 10000.0, L
"EncoderCountsPerMicrometer") {
185 XYControlStanda::XYControlStanda()
186 : devicex(0, 0, 10, L
"DeviceNumberX")
187 , devicey(1, 0, 10, L
"DeviceNumberY")
188 , speed(10, 0, 500, L
"MovementSpeed_stepspersec")
189 , microstepspermicron(3.226, 0.1, 100.0, L
"MicrostepsPerMicrometer") {
ScopeNumber< double > minoutput
Minimum output voltage to fast z, for ETL usually 0V.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
ScopeNumber< double > zpos
position in micron of z axis
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void Load(const wptree &pt) override
load parameters from a boost::property_tree
ScopeNumber< uint32_t > devicey
Standa device number for y axis.
virtual bool LoadCalibration(const std::wstring &_filepath)
Loads calibration data from a file, overwrites old calibration map.
void AddToPropertyTree(boost::property_tree::wptree &pt) const
Adds the value to a Boost property tree, using its name and value.
ScopeNumber< double > speed
movement speed in steps/sec
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void Load(const wptree &pt) override
load parameters from a boost::property_tree
ScopeNumber< double > ypos
position in micron of y axis
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void Save(wptree &pt) const override
save parameters into a boost:property_tree
ScopeNumber< double > xpos
position in micron of x axis
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void Save(wptree &pt) const override
save parameters into a boost:property_tree
ScopeNumber< double > xcountspermicron
conversion factor between encoder counts and micrometers for x axis
ScopeNumber< double > pollinterval
interval in milliseconds to poll device, be careful: long intervals slow quitting of Scope (since to ...
ScopeString calibrationfile
calibration file name
ScopeNumber< double > zcountspermicron
conversion factor between encoder counts and micrometers for z axis
This is the include file for standard system include files, or project specific include files that ar...
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void Load(const wptree &pt) override
load parameters from a boost::property_tree
virtual double PositionToVoltage(const double &_positionum)
Converts a position in micron to voltage.
#define DBOUT(s)
A debug output to the debug console.
void Save(wptree &pt) const override
save parameters into a boost:property_tree
ScopeNumber< uint32_t > devicex
Standa device number for x axis.
ScopeNumber< double > buttonstepsize
size of the step for up/down/left/right buttons
ScopeNumber< double > ycountspermicron
conversion factor between encoder counts and micrometers for y axis
ScopeString comstring
connection string for Galil controller
ScopeString comstring
connection string for Galil controller
ScopeNumber< double > xpos
x position of xy device
ScopeNumber< double > pollinterval
interval in milliseconds to poll device, be careful: long intervals slow quitting of Scope (since to ...
void Load(const wptree &pt) override
load parameters from a boost::property_tree
void SetFromPropertyTree(const boost::property_tree::wptree &pt)
Set value from a Boost property, using its name as a key.
std::map< double, double > calibration
calibration map, key is absolute position in microns, value is corresponding output voltage ...
ScopeString comstring
connection string for Sutter controller
ScopeNumber< double > ypos
y position of xy device
ScopeNumber< double > microstepspermicron
number of microsteps (1/8 full step) per micrometer, 3.226 microsteps per micrometer from Standa 8MTF...
ScopeNumber< double > microstepspermicron
conversion factor between encoder counts (microsteps) and micrometers for x axis usually 0...
void Save(wptree &pt) const override
save parameters into a boost:property_tree
void Save(wptree &pt) const override
save parameters into a boost:property_tree
ScopeNumber< double > maxoutput
Maximum output voltage to fast z, for ETL usually 4V.