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.
|
|
|
|
#pragma once
|
|
|
|
|
class CAdlinkCommon_APS
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CAdlinkCommon_APS(long lPhysicalCardID, long lSlaveID, long lPointNo);
|
|
|
|
|
~CAdlinkCommon_APS(void);
|
|
|
|
|
|
|
|
|
|
int InitCard(int nTypeCardNo);
|
|
|
|
|
|
|
|
|
|
int CloseCard(int nPhysicalCardID);
|
|
|
|
|
|
|
|
|
|
bool ReadVoltage(int nRange, double& dVoltage);
|
|
|
|
|
|
|
|
|
|
bool ReadInput(unsigned short& usState);
|
|
|
|
|
|
|
|
|
|
bool WriteOutputBit(bool bState);
|
|
|
|
|
|
|
|
|
|
bool WriteVoltage(double dVoltage);
|
|
|
|
|
|
|
|
|
|
// etherCAT version
|
|
|
|
|
bool ReadECATVoltage(int nRange, double& dVoltage);
|
|
|
|
|
|
|
|
|
|
bool ReadECATInput(unsigned short& usState);
|
|
|
|
|
|
|
|
|
|
bool WriteECATOutputBit(bool bState);
|
|
|
|
|
|
|
|
|
|
bool WriteECATVoltage(double dVoltage);
|
|
|
|
|
|
|
|
|
|
bool ReadECATPDO(unsigned short nIndex, unsigned short nSubIndex, std::vector<unsigned char>& vecData, unsigned long LenInBits, unsigned long& outLenInBit);
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
};
|