3.7.5 P1602_SaveScan
z
Description :
This function will specify the starting address of A/D data buffer for
MagicScan.
z
Syntax :
void P1602_SaveScan(WORD wAdChannel, WORD wBuf[]);
z
Input Parameter :
wAdChannel : Scan number in the scan queue.
(Note: not the A/D channel number.)
wBuf : starting address of the A/D data buffer for the channel specified in
wAdChannel
z
Return Value
:
NoError : Ok
ExceedBoardNumber: invalid board number
FindBoardError : cannot find the OME-PCI-1602 board
AdChannelError : invalid A/D channel
z
Demo Program :
.
DEMO11.C
•
Code Fragment
WORD wV0[100000]; // A/D ch:0 buffer
WORD wV2[100000]; // A/D ch:2 buffer
:
:
wRetVal=P1602_ClearScan();
//**** For OME-PCI-1602L
w= P1602_AddToScan(0,0,1,0,0,0); // CH:0 to scan
w= P1602_SaveScan(0,wV0);
w= P1602_AddToScan(2,0,1,0,0,0); // CH:2 to scan
w= P1602_SaveScan(1,wV2); // Notice: 1 not 2
// ^ Notice: This is a ordinal number in
// Scan Queue not a channel number.
wSampleRateDiv=80; // sample rate=8M/wSampleRateDiv
P1602_StartScan(wSampleRateDiv,DATALENGTH,nPriority);
47
Содержание OME-PCI-1602
Страница 37: ... Demo Program DEMO9 C 37 ...