Using VB6 on a legacy project with MCC USB-ctr04. Migrating from XP to Win7.
ULStat = cbDConfigPort(mlngBoardNum, PortNum, Direction) returns a value of 1. Error checking shows a dialog saying "invalid board number". Instacal identifies the board as 0 yet I still get this error. Any suggestions?
Relevant Code:
' configure and initialize DIO/ Timer board
' declarations
Dim ReportError As Long, HandleError As Long
Dim PortNum, Direction, ULStat As Long
ReportError = PRINTALL
HandleError = DONTSTOP
PortNum = 1
Direction = DIGITALOUT
' configure error handling
If gblnSimulateDAQ = False Then
ULStat = cbErrHandling(ReportError, HandleError)
If ULStat <> 0 Then Stop
' configure port as digital outputs
ULStat = cbDConfigPort(mlngBoardNum, PortNum, Direction)
If ULStat <> 0 Then End
ULStat = cbDOut(mlngBoardNum, PortNum, 7)
If ULStat <> 0 Then Stop
ULStat = cbPulseOutStop(mlngBoardNum, 0)
If ULStat <> 0 Then Stop
End If
Thanks for your assistance,
Jon Morris
AVID Innovation