// InputController_9222.h: interface for the CInputController_9222 class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_INPUTCONTROLLER_9222_H__42D3A85D_CF16_4F00_8E0D_F0B555E73D6B__INCLUDED_) #define AFX_INPUTCONTROLLER_9222_H__42D3A85D_CF16_4F00_8E0D_F0B555E73D6B__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "InputControllerBase.h" // NOTE: the Channel/Point number for analog input is 0 to 15 only // However, MIT internal setting is 16 to 31. class CInputController_9222 : public CInputControllerBase { public: CInputController_9222(); virtual ~CInputController_9222(); // method to initialise the input controller card BOOL Init(int nCardType, CArray &astCard); // method to close the input controller card void Close(int nCardType); // method to query if the input is OFF BOOL IsOff(const CInputSetting &InputSetting); // method to query if the input is ON BOOL IsOn(const CInputSetting &InputSetting); // nRange setting /* #define AD_B_10_V 1 #define AD_B_5_V 2 #define AD_B_2_5_V 3 #define AD_B_1_25_V 4 #define AD_B_0_625_V 5 #define AD_B_0_3125_V 6 #define AD_B_0_5_V 7 #define AD_B_0_05_V 8 #define AD_B_0_005_V 9 #define AD_B_1_V 10 #define AD_B_0_1_V 11 #define AD_B_0_01_V 12 #define AD_B_0_001_V 13 #define AD_U_20_V 14 #define AD_U_10_V 15 #define AD_U_5_V 16 #define AD_U_2_5_V 17 #define AD_U_1_25_V 18 #define AD_U_1_V 19 #define AD_U_0_1_V 20 #define AD_U_0_01_V 21 #define AD_U_0_001_V 22 #define AD_B_2_V 23 #define AD_B_0_25_V 24 #define AD_B_0_2_V 25 #define AD_U_4_V 26 #define AD_U_2_V 27 #define AD_U_0_5_V 28 #define AD_U_0_4_V 29 */ // method to query for current analog voltage of analog output BOOL GetVoltage(const CInputSetting &InputSetting, double &dVoltage, int nRange); /* Mode SimpleGatedEventCNT SinglePeriodMSR SinglePulseWidthMSR SingleGatedPulseGen SingleTrigPulseGen RetrigSinglePulseGen SingleTrigContPulseGen ContGatedPulseGen EdgeSeparationMSR SingleTrigContPulseGenPWM ContGatedPulseGenPWM CW_CCW_Encoder x1_AB_Phase_Encoder x2_AB_Phase_Encoder x4_AB_Phase_Encoder Phase_Z */ BOOL SetupCounter(const CInputSetting &InputSetting, int nMode); // Gary 5Mar12, V1.29.05, // new method to cater for auto reset counter using Org Signal BOOL SetupCounter(const CInputSetting &InputSetting, int nMode, unsigned int LReg1_Val, unsigned int LReg2_Val); BOOL ClearCounter(const CInputSetting &InputSetting); BOOL EnableCounter(const CInputSetting &InputSetting); BOOL DisableCounter(const CInputSetting &InputSetting); unsigned long ReadCounter(const CInputSetting &InputSetting); }; #endif // !defined(AFX_INPUTCONTROLLER_9222_H__42D3A85D_CF16_4F00_8E0D_F0B555E73D6B__INCLUDED_)