ICP DAS USA PCI-1202L User Manual page 70

Multi-function boards
Table of Contents

Advertisement

PCI-1202/1602/180x Series Card
Multi-Function Boards
The demo program of post-trigger is given as follows:
wRetVal=P180X_ClearScan();
wRetVal += P180X_AddToScan(0,0,1,0,0,0);
wRetVal += P180X_SaveScan(0,wV0);
wRetVal += P180X_AddToScan(2,0,1,0,0,0);
wRetVal += P180X_SaveScan(1,wV2);
wRetVal += P180X_StartScanPostTrg(wSampleRateDiv,DATALENGTH,nPriority);
if (wRetVal==0) sprintf(cShow,"2. External Post-Trigger Setup OK");
else sprintf(cShow,"2. External Post-Trigger Setup Error");
TextOut(hdc,x*dx,(y+iLine)*dy,cShow,strlen(cShow)); iLine++;
for (; ;)
{
P180X_ReadScanStatus(&wStatus,&dwLowAlarm,&dwHighAlarm);
if (wStatus>1) break;
Sleep(10);
}
sprintf(cShow,"3. ScanStatus=%x",wStatus);
TextOut(hdc,x*dx,(y+iLine)*dy,cShow,strlen(cShow)); iLine++;
wRetVal=P180X_StopMagicScan();
if (wRetVal!=NoError)
{
sprintf(cShow,"4. StopMagicScan Error");
TextOut(hdc,x*dx,(y+iLine)*dy,cShow,strlen(cShow)); iLine++;
for (dwI=0; dwI<100; dwI++) Beep(10,10);
}
SHOW_WAVE(hwnd,LINE1,wV0,1);
SHOW_WAVE(hwnd,LINE2,wV2,1);
★ Refer to DEMO23.C for completely source program
// CH:0 to scan
// CH:2 to scan
// Notice: 1 not 2
//
^ : This is a ordinal number in
//
Scan Queue not a channel number.
User Manual/ Ver. 4.8/ Mar. 2015/ PMH-0014-48/ Page: 70

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents