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
Question
Jon Morris
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
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now