Resumen del contenido incluido en la página 1
User’s Guide
Shop online at
www.omega.com
e-mail: info@omega.com
OME-A826PG
ISA-Bus Multi-Functional Board
Software Manual
Resumen del contenido incluido en la página 2
® OMEGAnet Online Service Internet e-mail www.omega.com info@omega.com Servicing North America: USA: One Omega Drive, P.O. Box 4047 ISO 9001 Certified Stamford CT 06907-0047 TEL: (203) 359-1660 FAX: (203) 359-7700 e-mail: info@omega.com Canada: 976 Bergar Laval (Quebec) H7L 5A1, Canada TEL: (514) 856-6928 FAX: (514) 856-6886 e-mail: info@omega.ca For immediate technical or application assistance: ® USA and Canada: Sales Service: 1-800-826-6342 / 1-800-TC-OMEGA ® Customer Service: 1-800-622-2378
Resumen del contenido incluido en la página 3
OME-A-826PG Software Manual [Win 95/98/NT] OME-A-826PG Software Manual [ For Windows 95/98/NT ] Date: Aug-15-2000 Ver: 2.2 Page 1
Resumen del contenido incluido en la página 4
OME-A-826PG Software Manual [Win 95/98/NT] Table of Contents 1 Introduction..................................................................................................................4 1.1 References.............................................................................................................5 1.2 Range Configuration Code .................................................................................... 6 2 Declaration Files..........................................
Resumen del contenido incluido en la página 5
OME-A-826PG Software Manual [Win 95/98/NT] 3.4.4 A826_Check_Address .............................................................................. 43 3.5 AD, Interrupt functions........................................................................................ 44 3.5.1 A826_InstallIrq.............................................................................................44 3.5.2 A826_AD_INT_Start...................................................................................
Resumen del contenido incluido en la página 6
OME-A-826PG Software Manual [Win 95/98/NT] 1 Introduction The OME-A-826PG is a multifunction, 16 bits resolution A/D, D/A and digital I/O card. The feature of the OME-A-826PG are given as below: 1. A/D=16 bits, 16 channels(single-ended) or 8 channels(differential) 2. A-826PG : low gain (1/2/4/8), the analog input signal range configuration code is given in Sec. 4.1 3. DA=12 bits, 2 channels, 0-5V or 0-10V output by hardware JP1 setting 4. 16 channels TTL compatible digital inp
Resumen del contenido incluido en la página 7
OME-A-826PG Software Manual [Win 95/98/NT] 1.1 References Please refer to the following user manuals: • SoftInst.pdf: Describes how to install the software package under Windows 95/98/NT. • CallDll.pdf: Describes how to call the DLL functions with VC++5, VB5, Delphi3 and Borland C++ Builder 3. • ResCheck.pdf: Describes how to check the resources I/O Port address, IRQ number and DMA number for add-on cards under Windows 95/98/NT. Date: Aug-15-2000 Ver: 2.2
Resumen del contenido incluido en la página 8
OME-A-826PG Software Manual [Win 95/98/NT] 1.2 Range Configuration Code The AD converter of the OME-A-826PG is 16 bits under all configuration code. If the analog input range is configured to ±5V range, the resolution of one bit is equal to 2.44 mV. If the analog input range is configured to ±2.5V range, the resolution will be 1.22 mV. If the analog input signal is about 1 V, use configuration 0/1/2 (for OME-A-826PG), it will get nearly the same result except resolution. So choose t
Resumen del contenido incluido en la página 9
OME-A-826PG Software Manual [Win 95/98/NT] 2 Declaration Files For the Windows 95/98 user: |--\Driver | |--\A826.DLL <-- Dynamic Linking Library | |--\A826.Vxd <-- Device driver for A826PG | |--\BCB3 | | |--\A826.h <-- Header file | | |--\A826.Lib <-- Import Library for BCB | | +--\A826u.cpp <-- Some function for BCB | |--\Delphi3 | | |--\A826.pas <--
Resumen del contenido incluido en la página 10
OME-A-826PG Software Manual [Win 95/98/NT] 2.1 For C user 2.1.1 A826.H (for Win 95/98) #ifdef __cplusplus #define EXPORTS extern "C" __declspec (dllimport) #else #define EXPORTS #endif /***************** DEFINE A826 RELATIVE ADDRESS *****************/ #define TIMER0 0x00 #define TIMER1 0x01 #define TIMER2 0x02 #define TIMER_MODE 0x03 #define AD_LO 0x04 /* Analog to Digital, Low Byte */ #define AD_HI 0x05 /* Ana
Resumen del contenido incluido en la página 11
OME-A-826PG Software Manual [Win 95/98/NT] #define NoError 0 #define DriverOpenError 1 #define DriverNoOpen 2 #define GetDriverVersionError 3 #define InstallIrqError 4 #define ClearIntCountError 5 #define GetIntCountError 6 #define AdError1 100 #define AdError2 -200.0 #define InstallBufError 9 #define GetBufferError 10 #define INTStartError 11 #define INTStopError 12 #define InstallDmaIrqError 13 #define RemoveDmaIrqError
Resumen del contenido incluido en la página 12
OME-A-826PG Software Manual [Win 95/98/NT] //********* IRQ Functios ************ EXPORTS WORD CALLBACK A826_InstallIrq (WORD wBase, WORD wIrq, HANDLE *hEvent, DWORD dwCount); EXPORTS WORD CALLBACK A826_AD_INT_Start(WORD Ch, WORD Gain, WORD c1, WORD c2); EXPORTS WORD CALLBACK A826_AD_INT_Stop(void); EXPORTS WORD CALLBACK A826_GetIntCount(DWORD *dwVal); EXPORTS WORD CALLBACK A826_GetBuffer(DWORD dwNum, short wBuffer[]); EXPORTS WORD CALLBACK A826_GetFloatBuffer(DWORD dwNum, float fBuffer
Resumen del contenido incluido en la página 13
OME-A-826PG Software Manual [Win 95/98/NT] 2.1.2 A826.H (for Win NT) #ifdef __cplusplus #define EXPORTS extern "C" __declspec (dllimport) #else #define EXPORTS #endif /***************** DEFINE A826 RELATIVE ADDRESS *****************/ #define TIMER0 0x00 #define TIMER1 0x01 #define TIMER2 0x02 #define TIMER_MODE 0x03 #define AD_LO 0x04 /* Analog to Digital, Low Byte */ #define AD_HI 0x0
Resumen del contenido incluido en la página 14
OME-A-826PG Software Manual [Win 95/98/NT] #define NoError 0 #define DriverOpenError 1 #define DriverNoOpen 2 #define GetDriverVersionError 3 #define InstallIrqError 4 #define ClearIntCountError 5 #define GetIntCountError 6 #define AdError1 100 #define AdError2 -200 #define InstallBufError 9 #define AllocateMemoryError 10 #define CardTypeError 11 #define GetBufferError 12 #define TimeoutError
Resumen del contenido incluido en la página 15
OME-A-826PG Software Manual [Win 95/98/NT] 2.1.3 A826U.Cpp (for BCB) #include //*-----------------------------------------------------* //* Return voltage value or -100.0 if any error occurs * //* or parameter is out of range. * //* HiLo : 1 --> High Gain , 0 --> Low Gain * //* Gain : 0-3 * //*-----------------------------------------------------* float A826_AD2F(Word hex, int Gain ) { float ZeroBase, VoltageRange, FullRan
Resumen del contenido incluido en la página 16
OME-A-826PG Software Manual [Win 95/98/NT] 2.1.4 The VC++ Demo Result: 2.1.5 Borland C++ Builder Demo Result Date: Aug-15-2000 Ver: 2.2 Page 14
Resumen del contenido incluido en la página 17
OME-A-826PG Software Manual [Win 95/98/NT] 2.2 For The VB user 2.2.1 A826.BAS (for Win 95/98) Attribute VB_Name = "A826" '********************************************************************************* ' The Declare of A826.DLL for A826 DAQ Card '********************************************************************************* Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '***************** DEFINE A826 RELATIVE ADDRESS ***************** Global Con
Resumen del contenido incluido en la página 18
OME-A-826PG Software Manual [Win 95/98/NT] Global Const A826_BI_2 = 1 Global Const A826_BI_4 = 2 Global Const A826_BI_8 = 3 Global Const A826_UNI_2 = 5 Global Const A826_UNI_4 = 6 Global Const A826_UNI_8 = 7 Global Const NoError = 0 Global Const DriverOpenError = 1 Global Const DriverNoOpen = 2 Global Const GetDriverVersionError = 3 Global Const InstallIrqError = 4 Global Const ClearIntCountError = 5 Global Const GetIntCountError = 6 Global Const AdError1 =
Resumen del contenido incluido en la página 19
OME-A-826PG Software Manual [Win 95/98/NT] Declare Sub A826_Uni10_DA Lib "A826.DLL" (ByVal wBase As Integer, _ ByVal wChannel As Integer, ByVal fValue As Single) '******* Driver Functions *********** Declare Function A826_DriverInit Lib "A826.DLL" () As Integer Declare Sub A826_DriverClose Lib "A826.DLL" () Declare Function A826_DELAY Lib "A826.DLL" (ByVal wBase As Integer, _ ByVal wDownCount As Integer) As Integer Declare Function A826_Check_Address Lib "A826.DLL" (ByV
Resumen del contenido incluido en la página 20
OME-A-826PG Software Manual [Win 95/98/NT] 2.2.2 A826.BAS (for Win NT) Attribute VB_Name = "A826" '********************************************************************************* ' The Declare of A826.DLL for A826 DAQ Card '********************************************************************************* Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '***************** DEFINE A826 RELATIVE ADDRESS ***************** Global Const TIMER0 = &H0 Global Const