发表于:2005-04-27 15:30:00
楼主
如何让采集卡不在软件时钟控制下实现连续采集,请高人指点啊!
我使用一片凌华的PCI-9118,在编程中遇到了一些问题,请各位帮忙解决啊
Dim result As Integer,buf(95) As Integer,volt(47) as integer
Dim halfready As Byte,stopflag As Byte
Private Sub Command1_Click()
card = -1
card_number = 0
card = Register_Card(PCI_9118DG, card_number)
result = AI_9118_Config(card, P9118_AI_BiPolar, 0, 0, 0)
result = AI_AsyncDblBufferMode(card, 0)
result = AI_ContScanChannels(card, 15, 2, buf(0), 96, P9118_AI_SampleHold, ASYNCH_OP)
''###
result = AI_AsyncDblBufferHalfReady(card, halfready, stopflag) 'errorline
MsgBox hbready & ":" & hstop & ":" & result & ":2"
Do
result = AI_AsyncDblBufferTransfer(card, buf(0))
MsgBox hbready & ":" & hstop & ":" & result
result = AI_ContVScale(card, 2, buf(0), volt(0), 48)
Loop Until halfready
End Sub
在上面这段程序中,执行到###下面那句(errorline)时,result返回值为-204 对应错误为
Global Const ErrorDBHalfReadyIoctl = -204
希望使用过凌华卡的朋友帮帮忙啊,这个问题怎么解决啊??
同时希望有“让采集卡不在软件时钟控制下实现连续采集”工作经验的朋友,指点指点。。。
我的QQ:89698524
希望工控界的朋友多加我啊!