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.
67 lines
1.9 KiB
C++
67 lines
1.9 KiB
C++
// MotionControllerBase.h: interface for the CMotionControllerBase class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_MOTIONCONTROLLERBASE_H__500C0017_A68D_4C47_8F71_B32C3724F255__INCLUDED_)
|
|
#define AFX_MOTIONCONTROLLERBASE_H__500C0017_A68D_4C47_8F71_B32C3724F255__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "Motor.h"
|
|
#include "hardwareini.h"
|
|
|
|
class CMotionControllerBase : public CCard
|
|
{
|
|
public:
|
|
CMotionControllerBase(CString csMutexName);
|
|
virtual ~CMotionControllerBase();
|
|
|
|
virtual BOOL Init(int nCardType, CArray<stCard, stCard> &astCard, int &nNoOfMtr);
|
|
virtual void Close(int nCardType);
|
|
|
|
// get the IOs status of the motor
|
|
virtual unsigned short GetMotionIOStatus(CMtrProfile mtrProfile);
|
|
|
|
// get Motion status of motor
|
|
virtual int GetMotionStatus(CMtrProfile mtrProfile);
|
|
|
|
// get Motor Pos value
|
|
virtual double GetMtrPos(CMtrProfile mtrProfile);
|
|
|
|
// get position error value
|
|
virtual double GetPosErr(CMtrProfile mtrProfile);
|
|
|
|
// check if motor is at home sensor position
|
|
virtual BOOL IsHomed(CMtrProfile mtrProfile);
|
|
|
|
// check motor in position signal
|
|
virtual BOOL IsInPosition(CMtrProfile mtrProfile);
|
|
|
|
// check if motor negative/ccw limit is triggered
|
|
virtual BOOL IsNegLimHit(CMtrProfile mtrProfile);
|
|
|
|
// check if motor positive/cw limit hit
|
|
virtual BOOL IsPosLimHit(CMtrProfile mtrProfile);
|
|
|
|
// check if motor driver alarm
|
|
virtual BOOL IsMotorAlarm(CMtrProfile mtrProfile);
|
|
|
|
// check if Motor type is servo motor
|
|
virtual BOOL IsServoMtrType(CMtrProfile mtrProfile);
|
|
|
|
// check if motor is ready
|
|
virtual BOOL IsMotorReady(CMtrProfile mtrProfile);
|
|
|
|
// check if motor is on
|
|
virtual BOOL IsMtrOn(CMtrProfile mtrProfile);
|
|
|
|
protected:
|
|
CMutex m_mutexMotion;
|
|
|
|
CHardwareIni m_iniHardware;
|
|
};
|
|
|
|
#endif // !defined(AFX_MOTIONCONTROLLERBASE_H__500C0017_A68D_4C47_8F71_B32C3724F255__INCLUDED_)
|