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.

39 lines
872 B
C++

#pragma once
class CAdlinkCommon_HSL
{
public:
CAdlinkCommon_HSL(int nPhysicalCardID, int nSlaveID, int nPointNo);
~CAdlinkCommon_HSL(void);
int InitCard(int nTypeCardNo);
int CloseCard(int nPhysicalCardID);
bool ReadVoltage(double& dVoltage);
bool ReadInput(unsigned short& usState);
bool SetLastAnalogChannel(int nLastChannel);
bool SetAnalogRange(int nRange);
bool WriteOutputBit(bool bState);
bool WriteVoltage(double dVoltage);
// Analog Input
bool StartAIScan();
bool StopAIScan();
bool ReadVoltageOnly(double& dVoltage);
// To read all slave
bool ReadInputs(std::vector<unsigned short> &vecInData);
private:
short m_sPhysicalCardID; // only used for CInput class
short m_sSlaveID; // only used for CInput class
short m_sPointNo; // only used for CInput class
};