add galil gclib
parent
1a94b8025b
commit
41a52a0804
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
// MotionController_GALIL.h: interface for the CMotionController_GALIL class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_MOTIONCONTROLLER_GALIL_H__CDB6D2BC_791A_4C32_B162_0BB564FFED61__INCLUDED_)
|
||||
#define AFX_MOTIONCONTROLLER_GALIL_H__CDB6D2BC_791A_4C32_B162_0BB564FFED61__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "MotionControllerBase.h"
|
||||
|
||||
class CMotionController_GALIL : public CMotionControllerBase
|
||||
{
|
||||
public:
|
||||
CMotionController_GALIL(int index);
|
||||
virtual ~CMotionController_GALIL();
|
||||
|
||||
BOOL Init(int &nNoOfMtr) override;
|
||||
void Close() override;
|
||||
|
||||
// get Motion status of motor
|
||||
int GetMotionStatus(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
void SetGalilMotionInt(int nAxisNo);
|
||||
|
||||
int m_nCurrentGalilCard;
|
||||
int m_nCurrentIndex;
|
||||
|
||||
private:
|
||||
CWinThread *m_pGalilIntThread[4];
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_MOTIONCONTROLLER_GALIL_H__CDB6D2BC_791A_4C32_B162_0BB564FFED61__INCLUDED_)
|
||||
@ -0,0 +1,176 @@
|
||||
// Motor_GALIL.h: interface for the CMotor_GALIL class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_MOTOR_GALIL_H__B32C658E_7AF3_44AE_A7F0_CA13719016EA__INCLUDED_)
|
||||
#define AFX_MOTOR_GALIL_H__B32C658E_7AF3_44AE_A7F0_CA13719016EA__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "MotorBase.h"
|
||||
|
||||
class CMotor_GALIL : public CMotorBase
|
||||
{
|
||||
public:
|
||||
CMotor_GALIL(CMtrProfile mtrProfile, double *dpPos, CMotionControllerBase *pBaseController);
|
||||
virtual ~CMotor_GALIL();
|
||||
|
||||
// **************************************************************
|
||||
// Methods declaration
|
||||
// **************************************************************
|
||||
|
||||
// method to close the axis
|
||||
void CloseAxis() override;
|
||||
|
||||
// method to initialize and configure the axis
|
||||
void ConstructAxis() override;
|
||||
|
||||
// method to On/Off motor
|
||||
bool OnMotor() override;
|
||||
bool OffMotor() override;
|
||||
|
||||
// method to stop motor with decceleration
|
||||
bool DecelStop() override;
|
||||
|
||||
// method to trigger Emergency stop the motor int EStop();
|
||||
bool EmergStop() override;
|
||||
|
||||
// method to get commanded position
|
||||
bool GetMotorCommandedPosition(int iMtrNo, double *pRaw) override;
|
||||
|
||||
// method Check other axis home sensor
|
||||
BOOL IsHomed(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get other motor axis IO status
|
||||
int GetMotionIOStatus(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get Other axis motor ready status
|
||||
BOOL IsMotorReady(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get Other axis negative/ccw limit status
|
||||
BOOL IsNegLmtHit(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get Other axis positive/cw limit status
|
||||
BOOL IsPosLmtHit(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get Other axis home sensor status
|
||||
bool IsMtrOn(const CMtrProfile &mtrProfile) override;
|
||||
|
||||
// method to get other motor axis current position
|
||||
bool GetMotorPosition(const CMtrProfile &mtrProfile, double *pRawPosition) override;
|
||||
|
||||
// method to get motor axis current position error
|
||||
bool GetMotorPositionError(double *pRawPositionError) override;
|
||||
|
||||
int SetHomeMode(int iHomeMode) override;
|
||||
|
||||
// method to do homing by index signal
|
||||
BOOL HomeByIndex() override;
|
||||
|
||||
// method to do homing by Home Sensor
|
||||
BOOL HomeBySensor() override;
|
||||
|
||||
// method to move absolute
|
||||
bool AbsoluteMove(double dPosition, int nMode, PROFILE_CURVE curve) override;
|
||||
|
||||
// method to move relative distance
|
||||
bool RelativeMove(double dDistance, PROFILE_CURVE curve) override;
|
||||
|
||||
// method to move continuously
|
||||
int MoveContinuously(bool bCW = true) override;
|
||||
|
||||
// method to process interrupt to decode what happen to the motor
|
||||
void ProcessInt(int nIntCode = 0) override;
|
||||
|
||||
// method to reset single trigger
|
||||
int ResetSingleTrigger(double dPosition = 0.0) override;
|
||||
|
||||
// method to set the commanded position register
|
||||
bool SetMotorCommandedPosition(double dPosition) override;
|
||||
|
||||
// method to set the mechanical coversion factor
|
||||
bool RefreshMotorConversionFactor() override;
|
||||
|
||||
// method to force set the current position
|
||||
bool SetMotorPosition(double dPosition) override;
|
||||
|
||||
// method to arm controller axis for single trigger
|
||||
int SetSingleTrigger(double dPosition, int nCmpSource = 1, int nPulseStretch = STRETCH_NON) override;
|
||||
|
||||
// method to arm multiaxis for simultaneous motion
|
||||
int SimultaneousMove(int nNoOfAxis, CMtrProfile *mtrProfile, double *dPosition, double *dStartVel, double *dMaxVel, double *dAcc, int nMode = 0) override;
|
||||
|
||||
// method to move motor in s-curve continuously
|
||||
int SMoveContinuously(bool bCW = true) override;
|
||||
|
||||
void SetMotorProfile(double dValue, motion_profile::PROFILE_TYPE type) override;
|
||||
|
||||
/// Ported from v2.3.8.53
|
||||
// method to set multiple trigger based on point table
|
||||
int SetMultipleTrigger(double* pPosition, int nNoOfTrigger, int nCmpSource = 1) override;
|
||||
///
|
||||
bool SetMotorMultipleTrigger(const multiple_trigger &trigger) override;
|
||||
|
||||
// **************************************************************
|
||||
// Methods declaration applicable to GALIL ONLY - STARTS
|
||||
// **************************************************************
|
||||
// method to get motion stop code
|
||||
int GetStopCode() override;
|
||||
|
||||
// method to get motion stop code
|
||||
CString GetVariable(CString csVariableName) override;
|
||||
|
||||
// method to send direct command string to controller
|
||||
int SendCommand(CString csCommand) override;
|
||||
|
||||
// method to stop any running script program and stop all motion
|
||||
int StopProgramAndMotion() override;
|
||||
|
||||
// method to update motion profile
|
||||
int UpdateProfile() override;
|
||||
// **************************************************************
|
||||
// Methods declaration applicable to GALIL ONLY - ENDS
|
||||
// **************************************************************
|
||||
|
||||
private:
|
||||
int GalilFindHomeIndex(HOME_DIR homeDir, MOTION_SPEED speed);
|
||||
|
||||
int GalilUpdateHomeSlowProfile();
|
||||
|
||||
bool GalilUpdateProfile(MOTION_SPEED speed);
|
||||
|
||||
int GalilFindHomeSensor(HOME_DIR homeDir, MOTION_SPEED speed);
|
||||
|
||||
int GalilMove();
|
||||
|
||||
// Gary 20Sep11, V1.29.03, cater configurable trigger pulse width
|
||||
int m_nPulseWidth;
|
||||
|
||||
bool SendCommand(GCon handle, char *format, ...);
|
||||
|
||||
bool SendStartMove(GCon handle, int nMotorNo);
|
||||
|
||||
bool SendStartWaitHomeThread(GCon handle, int nMotorNo);
|
||||
|
||||
bool SendStartWaitMotionDoneThread(GCon handle, int nMotorNo);
|
||||
|
||||
bool SendCommandGetResponse(GCon handle, char *pResponse, size_t size, char *format, ...);
|
||||
|
||||
bool SendHomeSensorLogic(GCon handle, int nLogic);
|
||||
|
||||
bool SendJog(GCon handle, int nMotorNo, int nDir, long lSpeed);
|
||||
|
||||
GCon m_handle;
|
||||
|
||||
const char m_cGalilAxis;
|
||||
|
||||
bool FindHome(MOTION_SPEED speed);
|
||||
|
||||
void SetVirtualHomePosition();
|
||||
|
||||
CCriticalSection m_CritSection;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_MOTOR_GALIL_H__B32C658E_7AF3_44AE_A7F0_CA13719016EA__INCLUDED_)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue