United Kingdom:One Omega Drive, River Bend Technology Centre
ISO 9002 CertifiedNorthbank, Irlam, Manchester
M44 5BD United Kingdom
TEL: +44 (0)161 777 6611FAX: +44 (0)161 777 6622
Toll Free in United Kingdom: 0800-488-488
e-mail: sales@omega.co.uk
OMEGAnet®Online Service Internet e-mail
www.omega.com info@omega.com
It is the policy of OMEGA to comply with all worldwide safety and EMC/EMI regulations that
apply. OMEGA is constantly pursuing certification of its products to the European New Approach
Directives. OMEGA will add the CE mark to every appropriate device upon certification.
The information contained in this document is believed to be correct, but OMEGA Engineering, Inc. accepts
no liability for any errors it contains, and reserves the right to alter specifications without notice.
WARNING: These products are not designed for use in, and should not be used for, patient-connected applications.
3.6.8 Diagram of AD , DMA Mode....................................................................... 53
4 Program Architecture ................................................................................................. 55
5 Contact Us .................................................................................................................. 56
Date: Aug-15-2000 Ver: 2.2 Page 3
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 input
5. 16 channels TTL compatible digital output
The A826.DLL and A826.Vxd is a collection of data acquisition subroutines
for the OME-A-826PG Windows 95/98 Applications. These subroutines are
written with C language and perform a variety of data acquisition operations.
The subroutines in A826.DLL are easy understanding as its name standing
for. It provides powerful, easy-to-use subroutine for developing your data
acquisition application. Your program can call this DLL functions by VC++, VB ,
Delphi , Borland C++ Builder easily. To speed-up your developing process, some
demonstration source program are provided.
The OME-A-826PG consists of these DLLs and device driver :
For Windows 95/98
• A826.dll, A826.lib ÆLibraries for A826 PG card
• A826.Vxd Æ A826 Device driver for Windows 95/98
For Windows NT
• A826.dll, A826.lib ÆLibraries for OME-A826 PGL/PGH card
• A826.sys, Napwnt.sys ÆA826 Device driver for Windows NT
These DLLs can perform a variety of data acquisition operations as follows:
Date: Aug-15-2000 Ver: 2.2 Page 4
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 Page 5
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 the correct configuration code can achieve
the most high precision measurement.
OME-A-826PG Input Signal Range Configuration Code Table
Bipolar/Unipolar
Bipolar
Bipolar
Bipolar
Bipolar
Input Signal Range Configuration Code
± 10V
± 5V
± 2.5V
± 1.25V
0
1
2
3
Date: Aug-15-2000 Ver: 2.2 Page 6
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 <-- Declaration file
| | +--\A826u.pas <-- Some function for Delphi
| |--\VB5
| | |--\A826.bas <-- Declaration file
| | +--\A826u.bas <-- Some function for VB
| +--\VC5
| |--\A826.h <-- Header file
| +--\A826.Lib <-- Import Library for VC++
For the Windows NT user:
|--\Driver
| |--\A826.DLL <-- Dynamic Linking Library
| |--\A826.sys <-- device driver
| |--\Napwnt.sys <-- device driver | |--\BCB3
| | |--\A826.h <-- Header file
| | |--\A826.Lib <-- Import Library for BCB
| | +--\A826u.cpp <-- Some function for BCB
| |--\Delphi3
| | |--\A826.pas <-- Declaration file
| | +--\A826u.pas <-- Some function for Delphi
| |--\VB5
| | |--\A826.bas <-- Declaration file
| | +--\A826u.bas <-- Some function for VB
| +--\VC5
| |--\A826.h <-- Header file
| +--\A826.Lib <-- Import Library for VC++
//********* Test Functios ************
EXPORTS short CALLBACK SHORT_SUB_2(short nA, short nB);
EXPORTS float CALLBACK FLOAT_SUB_2(float fA, float fB);
EXPORTS WORD CALLBACK A826_Get_DLL_Version(void);
EXPORTS WORD CALLBACK A826_GetDriverVersion(WORD *wDriverVersion);
//********* DI/DO Functios ************
EXPORTS WORD CALLBACK A826_DI(WORD wBase);
EXPORTS void CALLBACK A826_DO(WORD wBase, WORD wHexValue);
//********* DA/AD Functios ************
EXPORTS float CALLBACK A826_AD(WORD wBase, WORD wChannel, WORD wConfig);
EXPORTS WORD CALLBACK A826_ADs_Hex(WORD wBase, WORD wChannel, WORD wConfig,
short wBuf[], WORD wCount);
EXPORTS WORD CALLBACK A826_ADs_Float(WORD wBase, WORD wChannel, WORD wConfig,
float fBuf[], WORD wCount);
EXPORTS void CALLBACK A826_DA(WORD wBase, WORD wChannel, WORD wHexValue);
EXPORTS void CALLBACK A826_Uni5_DA(WORD wBase, WORD wChannel, float fValue);
EXPORTS void CALLBACK A826_Uni10_DA(WORD wBase, WORD wChannel, float fValue);
//********* Driver Functios ************
EXPORTS WORD CALLBACK A826_DriverInit(void);
EXPORTS void CALLBACK A826_DriverClose(void);
EXPORTS WORD CALLBACK A826_DELAY(WORD wBase, WORD wDownCount);
EXPORTS WORD CALLBACK A826_Check_Address(WORD wBase);
EXPORTS void CALLBACK A826_OutputByte(WORD wPortAddr, UCHAR bOutputVal);
EXPORTS void CALLBACK A826_OutputWord(WORD wPortAddr, WORD wOutputVal);
EXPORTS WORD CALLBACK A826_InputByte(WORD wPortAddr);
EXPORTS WORD CALLBACK A826_InputWord(WORD wPortAddr);
Date: Aug-15-2000 Ver: 2.2 Page 9
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[]);
//********* DMA Functios ************
EXPORTS WORD CALLBACK A826_AD_DMA_InstallIrq(WORD wBase,WORD wIrq,WORD wDmaChan);
EXPORTS WORD CALLBACK A826_AD_DMA_RemoveIrq(void);
EXPORTS WORD CALLBACK A826_AD_DMA_Start(WORD Ch,WORD Gain,WORD c1,WORD c2,
int cnt, WORD wPassOut[]);
EXPORTS WORD CALLBACK A826_AD_DMA_Stop(void);
EXPORTS WORD CALLBACK A826_AD_DMA_IsNotFinished(void);
EXPORTS WORD CALLBACK A826_AD_DMA_GetBuffer(short wBuf[]);
EXPORTS WORD CALLBACK A826_AD_DMA_GetFloatBuffer(float fBuf[]);
//********* Test Functios ************
EXPORTS short CALLBACK SHORT_SUB_2(short nA, short nB);
EXPORTS float CALLBACK FLOAT_SUB_2(float fA, float fB);
EXPORTS WORD CALLBACK A826_Get_DLL_Version(void);
EXPORTS WORD CALLBACK A826_GetDriverVersion(WORD *wDriverVersion);
//********* DI/DO Functios ************
EXPORTS WORD CALLBACK A826_DI(WORD wBase);
EXPORTS void CALLBACK A826_DO(WORD wBase, WORD wHexValue);
//********* DA/AD Functios ************
EXPORTS float CALLBACK A826_AD(WORD wBase, WORD wChannel, WORD wConfig);
EXPORTS WORD CALLBACK A826_ADs_Hex(WORD wBase, WORD wChannel, WORD
wConfig, short wBuf[], WORD wCount);
EXPORTS WORD CALLBACK A826_ADs_Float(WORD wBase, WORD wChannel, WORD
wConfig, float fBuf[], WORD wCount);
EXPORTS void CALLBACK A826_DA(WORD wBase, WORD wChannel, WORD wHexValue);
EXPORTS void CALLBACK A826_Uni5_DA(WORD wBase, WORD wChannel, float fValue);
EXPORTS void CALLBACK A826_Uni10_DA(WORD wBase, WORD wChannel, float fValue);
//********* Driver Functios ************
EXPORTS WORD CALLBACK A826_DriverInit(void);
EXPORTS void CALLBACK A826_DriverClose(void);
EXPORTS WORD CALLBACK A826_DELAY(WORD wBase, WORD wDownCount);
EXPORTS WORD CALLBACK A826_Check_Address(WORD wBase);
EXPORTS void CALLBACK A826_OutputByte(WORD wPortAddr, UCHAR bOutputVal);
EXPORTS void CALLBACK A826_OutputWord(WORD wPortAddr, WORD wOutputVal);
EXPORTS WORD CALLBACK A826_InputByte(WORD wPortAddr);
EXPORTS WORD CALLBACK A826_InputWord(WORD wPortAddr);
//********* 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[]);
Date: Aug-15-2000 Ver: 2.2 Page 12
OME-A-826PG Software Manual [Win 95/98/NT]
2.1.3 A826U.Cpp (for BCB)
#include <math.h>
//*-----------------------------------------------------*
//* 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, FullRange ;
short int i ;
ZeroBase = 0.0 ;
FullRange = 32767.0 ;
VoltageRange = 10.0 ;
i = hex ;
Gain = Gain % 16;
Attribute VB_Name = "A826"
'*********************************************************************************
' The Declare of A826.DLL for A826 DAQ Card
'*********************************************************************************
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Global Const TIMER0 = &H0
Global Const Timer1 = &H1
Global Const TIMER2 = &H2
Global Const TIMER_MODE = &H3
Global Const AD_LO = &H4 '* Analog to Digital, Low Byte *
Global Const AD_HI = &H5 '* Analog to Digital, High Byte *
Global Const DA_CH0_LO = &H4 '* Digit to Analog, CH 0 *
Global Const DA_CH0_HI = &H5
Global Const DA_CH1_LO = &H6 '* Digit to Analog, CH 1 *
Global Const DA_CH1_HI = &H7
Global Const DI_LO = &H6 '* Digit Input *
Global Const DO_LO = &HD '* Digit Output *
Global Const CLEAR_IRQ = &H8
Global Const SET_GAIN = &H9
Global Const SET_CH = &HA
Global Const SET_MODE = &HB
Global Const SOFT_TRIG = &HC
Global Const POLLING_MODE = 1
Global Const DMA_MODE = 2
Global Const INTERRUPT_MODE = 6
'*** define the gain mode ***
Global Const A826_BI_1 = 0
Global Const A826_BI_10 = 1
Global Const A826_BI_100 = 2
Global Const A826_BI_1000 = 3
Global Const A826_UNI_1 = 4
Global Const A826_UNI_10 = 5
Global Const A826_UNI_100 = 6
Global Const A826_UNI_1000 = 7
Global Const A826_BI_05 = 8
Global Const A826_BI_5 = 9
Global Const A826_BI_50 = 10
Global Const A826_BI_500 = 11
Date: Aug-15-2000 Ver: 2.2 Page 15
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 = 100
Global Const AdError2 = -200#
Global Const InstallBufError = 9
Global Const GetBufferError = 10
Global Const INTStartError = 11
Global Const INTStopError = 12
Global Const InstallDmaIrqError = 13
Global Const RemoveDmaIrqError = 14
Global Const DmaStartError = 15
Global Const DmaStopError = 16
Global Const DmaGetDataError = 17
Global Const TimeoutError = 18
Global Const AllocateMemoryError = 19
Global Const OtherError = 20
'******* Test Functions ***********
Declare Function SHORT_SUB_2 Lib "A826.DLL" (ByVal nA As Integer, _
ByVal nB As Integer) As Integer
Declare Function FLOAT_SUB_2 Lib "A826.DLL" (ByVal fA As Single, _
ByVal fB As Single) As Single
Declare Function A826_Get_DLL_Version Lib "A826.DLL" () As Integer
Declare Function A826_GetDriverVersion Lib "A826.DLL" _
(wDriverVersion As Integer) As Integer
'******* DI/DO Functions ***********
Declare Function A826_DI Lib "A826.DLL" (ByVal wBase As Integer) As Integer
Declare Sub A826_DO Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wHexValue As Integer)
'******* AD/DA Functions ***********
Declare Function A826_AD Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wChannel As Integer, ByVal wConfig As Integer) As Single
Declare Function A826_ADs_Hex Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wChannel As Integer, ByVal wConfig As Integer, _
wBuf As Integer, ByVal wCount As Integer) As Integer
Declare Function A826_ADs_Float Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wChannel As Integer, ByVal wConfig As Integer, _
fBuf As Single, ByVal wCount As Integer) As Integer
Declare Sub A826_DA Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wChannel As Integer, ByVal wHexValue As Integer)
Declare Sub A826_Uni5_DA Lib "A826.DLL" (ByVal wBase As Integer, _
ByVal wChannel As Integer, ByVal fValue As Single)
Date: Aug-15-2000 Ver: 2.2 Page 16
Loading...
+ 42 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.