Berkeley Nuclear Data Software
StepnetControl.h
Go to the documentation of this file.
1 #include "StepnetMotorSettings.h"
2 #include "RS232Interface.h"
3 #include <string>
4 namespace NSDInstControl
5 {
7 {
8 public:
9  StepnetControl(int a_portNum,
10  std::string a_motorConfig=""
11  );
12 
13  void connectAndConfig();
14  // ~StepnetControl();
15  //go home
16  void home(bool a_waitToComplete= true);
17 
18  void relativeMove(int a_numSteps,bool a_fastReturn = true);
19  void relativeMovecm(double a_dxCm);
20 
21  void absMove(int a_loc,bool a_fastReturn = true);
22  void absMovecm(double a_loc);
23  void absMoveIn(double a_loc);
24 
25  void getPosition(double& a_x);
26  void getPositioncm(double & a_x);
27 
28  bool isMoving();
29 
30  void setPositiveLimitHome();
31 private:
32  StepnetControl(){};
33  int m_portEnum;
34  StepnetMotorSettings motorSet;
35  RS232Interface m_port;
36  bool m_isConnected;
37  double m_cmPerStep;
38  bool m_verbose;
39 };
40 
41 
42 }
used as a c++ abstraction of the rs232 c functions in the RS232 folder
Definition: RS232Interface.h:13
Definition: StepnetControl.h:7
bool isMoving()
Definition: StepnetControl.cpp:209
void getPosition(double &a_x)
Definition: StepnetControl.cpp:238
void connectAndConfig()
Definition: StepnetControl.cpp:18
void absMovecm(double a_loc)
Definition: StepnetControl.cpp:199
void absMoveIn(double a_loc)
Definition: StepnetControl.cpp:204
void relativeMovecm(double a_dxCm)
Definition: StepnetControl.cpp:194
void getPositioncm(double &a_x)
Definition: StepnetControl.cpp:251
void home(bool a_waitToComplete=true)
Definition: StepnetControl.cpp:113
void relativeMove(int a_numSteps, bool a_fastReturn=true)
Definition: StepnetControl.cpp:136
void setPositiveLimitHome()
Definition: StepnetControl.cpp:257
void absMove(int a_loc, bool a_fastReturn=true)
Definition: StepnetControl.cpp:164
Definition: StepnetMotorSettings.h:15
CONF:HVMICC? is required before switching high voltage on.
Definition: bk9174BControl.h:9