You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#define CORE_NUM 1
|
|
#define CYCLIC_SYNC_POSITION 8 //操作模式为循环运动操作模式
|
|
|
|
#include <windows.h>
|
|
#include <vector>
|
|
#include "IGugaoDriver.h"
|
|
#include "Logger.h"
|
|
class _declspec(dllexport) CGugaoDriver : public IGugaoDriver
|
|
{
|
|
public:
|
|
CGugaoDriver();
|
|
~CGugaoDriver();
|
|
|
|
public:
|
|
virtual bool OpenCard(std::vector<int>& axisIdVec);
|
|
virtual bool CloseCard(std::vector<int>& axisIdVec);
|
|
virtual int AbsMove(int iAxisId,
|
|
int pulseTo1mm,
|
|
double dPos,
|
|
double dAcc,
|
|
double dDec,
|
|
double dMoveSpeed,
|
|
bool bWaitFinished);
|
|
virtual int WriteIO(short sSlaveNo, short sIoIndex, unsigned char ucValue);
|
|
virtual int WriteAO(short sSlaveNo, short sIoIndex, short sValue); //设置模拟量
|
|
virtual short ReadDo(short sSlaveNo, short sIoIndex);
|
|
virtual unsigned char ReadDi(short sSlaveNo, short sIoIndex);
|
|
virtual double GetCurPos(int iAxisId, int pulseTo1mm);
|
|
virtual void stopMove(int iAxisId);
|
|
virtual int home(int iAxisId, double dSearchSpeed, double iIndexSpeed, double sSearchAcc, short sModule);
|
|
|
|
//状态判断
|
|
virtual bool IsHome(int iAxisId);
|
|
virtual bool IsHoming(int iAxisId);
|
|
virtual bool IsMoveing(int iAxisId);
|
|
virtual bool IsMoveEnd(int iAxisId);
|
|
virtual bool IsAxisEnable(int iAxisId);
|
|
virtual bool IsAxisError(int iAxisId);
|
|
virtual bool GetAxisErrorCode(int iAxisId);
|
|
virtual bool IsAxisPaslimit(int iAxisId);
|
|
virtual bool isAxisNagLimit(int iAxisId);
|
|
|
|
private:
|
|
bool m_open = false;
|
|
};
|
|
|