Jump to content
  • 0

UL Function Call error with legacy project - MCC elders please help.


Jon Morris

Question

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

  • 0

Hello @Jon Morris

When InstaCal finds your board as board 0 and has no problems accessing yet your VB6 program does, the most likely reason is because you have multiple copies of cbw32.DLL on your system, and they are not all the same rev number.

Easy fix though, starting at C:\ have your system search for cbw32.dll.  I'm sure you'll find more than one.

The only one that needs to be there is the one installed in C:\Program files (x86)\Measurement Computing\DAQ.

note if you are running 32 bit Windows 7 the path is  C:\Program files\Measurement Computing\DAQ.

If you find any others, delete them.  if you are not comfortable with that, at least rename them such as cbw32.old

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...