123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- #pragma once
- #include "JAxis.h"
- #include "CAxis.h"
- #include "dt.h"
- #include <vector>
- #include "CMachineCalibration.h"
- #include "CManageDB.h"
- #include "CMath.h"
- #include "CIO.h"
- #define BufferNo 6
- using namespace ns_db;
- class __declspec(dllexport) CForceControl {
- public:
-
- CForceControl(int HeadID, CAxis* xAxis, CAxis* yAxis, CAxis* zAxis, CIO* forceAxis, CIO* forceScale = nullptr);
-
- ~CForceControl();
-
- LONG ForceTest(double current, double& force);
-
- LONG HightTest(double givenForceZ, double searchPos, double& hight);
-
- LONG FindForce(double searchForce, double actForce,double givenForceZ);
-
- LONG EjectorHightTest(double givenForceZ, double searchPos, double& hight);
-
- LONG UpdateForce(double force, double givenForceZ);
-
- LONG ToTestPos(XY_DOUBLE_STRUCT pos);
- LONG MoveToTestPos();
-
- LONG CurrentForceCalib();
-
- LONG SpringForceCalib();
-
- void Calibration();
-
- LONG GetParam();
-
- double ChangeForceToCurrent(double force, double givenForceZ);
-
- double ChangeCurrentToForce(double current, double givenForceZ);
-
- double ChangeForceToForcerZPos();
- void Stop() { m_bStop = true; }
- std::string GetLineExpression();
-
-
-
- private:
- CAxis* m_pAxisX = nullptr;
- CAxis* m_pAxisY = nullptr;
- CAxis* m_pAxisZ = nullptr;
-
- CIO* m_pForcerAO = nullptr;
- CIO* m_pForceScale = nullptr;
- CMachineCalibration* m_pMcCalibDB = nullptr;
- FORCE_CONTROL m_stParam;
-
- int m_nHeadId = 0;
- std::string m_sHeadName = "";
- int m_nForcerBufferNO = 0;
- int m_nSpringForcerBufferNO = 0;
- string m_sParamName = "";
- bool m_bStop = false;
- };
|