
PCI-1202/1602/180x Series Card
Multi-Function Boards
User Manual/ Ver. 4.8/ Mar. 2015/ PMH-0014-48/ Page: 70
The demo program of post-trigger is given as follows:
wRetVal=
P180X_ClearScan
();
w=
P180X_AddToScan
(0,0,1,0,0,0);
// CH:0 to scan
w=
P180X_SaveScan
(0,wV0);
w=
P180X_AddToScan
(2,0,1,0,0,0);
// CH:2 to scan
w=
P180X_SaveScan
(1,wV2);
// Notice: 1 not 2
// ^ : This is a ordinal number in
// Scan Queue not a channel number.
w=
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