add galil gclib

REL_2019_x64
yikth 6 years ago
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.

@ -10,8 +10,8 @@
#endif // _MSC_VER > 1000
#include "Afxtempl.h"
#include "dmccom.h"
#include "gclib.h"
#include "gclibo.h"
// ETEL
#ifdef WITH_ETEL
#include "dsa30.h"
@ -154,8 +154,8 @@ const char GalilAxis[MAX_GALIL_AXIS] = {
class CCard
{
public:
HANDLEDMC GetGalilCardHandle(int nCardType, int nCardNo);
void SetGalilCardHandle(int nCardType, int nCardNo, HANDLEDMC hDMC);
GCon GetGalilCardHandle(int nCardType, int nCardNo);
void SetGalilCardHandle(int nCardType, int nCardNo, GCon hDMC);
int Get7296PortNo(int nPoint);
BOOL GetOutputStatus(int nIndex);
CCard();
@ -220,7 +220,7 @@ private:
// track the Galil cards initialised handle
// currently this is used for Galil Cards only
// for up to 5 different type of cards with 5 cards in each type per system
static HANDLEDMC m_hdmcGalil[5][5];
static GCon m_hdmcGalil[5][5];
};
#endif // !defined(AFX_HARDWAREINI_H__72E28502_940B_4759_854A_B4A6879C3115__INCLUDED_)

@ -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.

@ -107,8 +107,8 @@ VS_VERSION_INFO$(VERSION_CONTROL) VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 10,0,0,1
PRODUCTVERSION 10,0,0,1
FILEVERSION 10,0,0,0
PRODUCTVERSION 10,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
@ -126,15 +126,15 @@ BEGIN
VALUE "Comments", "x64"
VALUE "CompanyName", "MIT "
VALUE "FileDescription", "Utility"
VALUE "FileVersion", "10.0.0.1\0"
VALUE "FileVersion", "10.0.0.0"
VALUE "InternalName", "Utility"
VALUE "LegalCopyright", "Copyright © 2020"
VALUE "LegalTrademarks", " "
VALUE "OriginalFilename", "Utility.dll"
VALUE "PrivateBuild", " "
VALUE "ProductName", "MIT Utility"
VALUE "ProductVersion", "10.0.0.1\0"
VALUE "SpecialBuild", "mitlib-release-10-1\0"
VALUE "ProductVersion", "10.0.0.0"
VALUE "SpecialBuild", "mitlib-release-10-0"
END
END
BLOCK "VarFileInfo"

@ -43,6 +43,8 @@
// CBR_xxxx, PCF_xxx, EV_xxx, CE_xxx, etc).
// ========================================================================
#include <vector>
#define SEVENDATABITS 7 // No equivalents in WINBASE.H
#define EIGHTDATABITS 8
#define PCF_NOFLOWCTL 0
@ -190,7 +192,7 @@ public:
BOOL SetupComm(DWORD cbInQueue, DWORD cbOutQueue);
// Get Com port name and return number of com port in the system
static int GetAllComPort(CStringArray &csaComPortName);
static int GetAllComPort(std::vector<std::string> &vecComPortName);
};
// Inline function bodies

@ -71,8 +71,8 @@ VS_VERSION_INFO$(VERSION_CONTROL) VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 10,0,0,1
PRODUCTVERSION 10,0,0,1
FILEVERSION 10,0,0,0
PRODUCTVERSION 10,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -90,15 +90,15 @@ BEGIN
VALUE "Comments", "x64"
VALUE "CompanyName", "MIT "
VALUE "FileDescription", "mcctrdll"
VALUE "FileVersion", "10.0.0.1\0"
VALUE "FileVersion", "10.0.0.0"
VALUE "InternalName", "mcctrdll"
VALUE "LegalCopyright", "Copyright © 2020"
VALUE "LegalTrademarks", " "
VALUE "OriginalFilename", "mcctrdll.dll"
VALUE "PrivateBuild", " "
VALUE "ProductName", "MIT mcctrdll"
VALUE "ProductVersion", "10.0.0.1\0"
VALUE "SpecialBuild", "mitlib-release-10-1\0"
VALUE "ProductVersion", "10.0.0.0"
VALUE "SpecialBuild", "mitlib-release-10-0"
END
END
BLOCK "VarFileInfo"

@ -149,7 +149,7 @@ public:
// inside critical section
{
size = m_queue.size();
size = (int)m_queue.size();
}
return size;

Loading…
Cancel
Save