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.

36 lines
976 B
C

2 years ago
#pragma once
class CAdlinkCommon_APS
{
public:
CAdlinkCommon_APS(long lPhysicalCardID, long lSlaveID, long lPointNo);
~CAdlinkCommon_APS(void);
int InitCard(int nTypeCardNo);
2 years ago
int CloseCard(int nPhysicalCardID);
3 months ago
bool ReadVoltage(int nRange, double& dVoltage);
2 years ago
3 months ago
bool ReadInput(unsigned short& usState);
2 years ago
bool WriteOutputBit(bool bState);
bool WriteVoltage(double dVoltage);
3 months ago
// etherCAT version
bool ReadECATVoltage(int nRange, double& dVoltage);
bool ReadECATInput(unsigned short& usState);
bool WriteECATOutputBit(bool bState);
bool WriteECATVoltage(double dVoltage);
2 months ago
bool ReadECATPDO(unsigned short nIndex, unsigned short nSubIndex, std::vector<unsigned char>& vecData, unsigned long LenInBits, unsigned long& outLenInBit);
2 years ago
private:
long m_lPhysicalCardID; // only used for CInput class
long m_lSlaveID; // only used for CInput class
long m_lPointNo; // only used for CInput class
};