3.3 The M_Functions
3.3.1 P1602_M_FUN_1
z
Description :
The P1602_M_FUN_1 will calculate the waveform image automatically. (Refer to the
“OME-PCI-1602 Hardware Manual” chapter-5 for details) (input=A/D channel_0,
output=D/A channel_0)
•
Syntax :
WORD P1602_M_FUN_1(WORD wDaFrequency, WORD wDaWave, float
fDaAmplitude, WORD wAdClock, WORD wAdNumber, WORD wAdConfig,
float fAdBuf[], float fLowAlarm, float fHighAlarm)
z
Input Parameter :
wDaFrequency :
D/A output frequency = 1.8M/wDaFrequency (Pentium 120)
wDaWave : Number of D/A waveform to be output
fDaAmplitude : Amplitude of D/A output. NOTE : the hardware J1 must /-10V
wAdClock :
A/D sampling clock = 8000000/wAdClock
samples/sec
wAdNumber: Number of A/D data to be read
wAdConfig :
A/D input range configuration code
Refer to "
Section 3.1 Configuration Table
"
fAdBuf[] : the starting address of
fAdBuf
which store the A/D data
fLowAlarm : low alarm limit. if
fAdBuf[?]< fLowAlarm
Æ
LowAlarm
fHighAlarm : high alarm limit. if
fAdBuf[?]>fHighAlarm
Æ
HighAlarm
z
Return Value :
NoError : OK
DriverHandleError : Invalid VxD/SYS handle
DriverCallError : VxD/SYS function call error
ExceedBoardNumber: invalid board number
FindBoardError: no OME-PCI-1602 board
AdControllerError : embedded controller handshake error
M_FunExecError : M_Functions return code error
ConfigCodeError :
wAdConfig
configuration code error
Refer to "
Section 3.1 Configuration Table
"
HighAlarm :
fAdBuf[?]>fHighAlarm
LowAlarm :
fAdBuf[?]< fLowAlarm
z
Demo Program :
DEMO5.C
34
Summary of Contents for OME-PCI-1602
Page 37: ... Demo Program DEMO9 C 37 ...