Tips for connect k8055 and k8061 in the same project (vb)

Hello, If you want to connect two differents type of cards, like a K8055 and a K8061 (VM110 & VM140)
You can use this module (VB.NET)
regards

[code]Module DLL_VM110_et_VM140
#Region “déclaration des DLL de la K8055 et de la K8061”
Public Declare Function VM110_OpenDevice Lib “k8055d.dll” Alias “OpenDevice” (ByVal CardAddress As Integer) As Integer
Public Declare Sub VM110_CloseDevice Lib “k8055d.dll” Alias “CloseDevice” ()
Public Declare Sub VM110_version Lib “k8055d.dll” Alias “Version” ()
Public Declare Function VM110_SearchDevices Lib “k8055d.dll” Alias “SearchDevices” () As Integer
Public Declare Function VM110_SetCurrentDevice Lib “k8055d.dll” Alias “SetCurrentDevice” (ByVal CardAddress As Integer) As Integer
Public Declare Function VM110_ReadAnalogChannel Lib “k8055d.dll” Alias “ReadAnalogChannel” (ByVal Channel As Integer) As Integer
Public Declare Sub VM110_ReadAllAnalog Lib “k8055d.dll” Alias “ReadAllAnalog” (ByRef Data1 As Integer, ByRef Data2 As Integer)
Public Declare Sub VM110_OutputAnalogChannel Lib “k8055d.dll” Alias “OutputAnalogChannel” (ByVal Channel As Integer, ByVal Data As Integer)
Public Declare Sub VM110_OutputAllAnalog Lib “k8055d.dll” Alias “OutputAllAnalog” (ByVal Data1 As Integer, ByVal Data2 As Integer)
Public Declare Sub VM110_ClearAnalogChannel Lib “k8055d.dll” Alias “ClearAnalogChannel” (ByVal Channel As Integer)
Public Declare Sub VM110_SetAllAnalog Lib “k8055d.dll” Alias “SetAllAnalog” ()
Public Declare Sub VM110_ClearAllAnalog Lib “k8055d.dll” Alias “ClearAllAnalog” ()
Public Declare Sub VM110_SetAnalogChannel Lib “k8055d.dll” Alias “SetAnalogChannel” (ByVal Channel As Integer)
Public Declare Sub VM110_WriteAllDigital Lib “k8055d.dll” Alias “WriteAllDigital” (ByVal Data As Integer)
Public Declare Sub VM110_ClearDigitalChannel Lib “k8055d.dll” Alias “ClearDigitalChannel” (ByVal Channel As Integer)
Public Declare Sub VM110_ClearAllDigital Lib “k8055d.dll” Alias “ClearAllDigital” ()
Public Declare Sub VM110_SetDigitalChannel Lib “k8055d.dll” Alias “SetDigitalChannel” (ByVal Channel As Integer)
Public Declare Sub VM110_SetAllDigital Lib “k8055d.dll” Alias “SetAllDigital” ()
Public Declare Function VM110_ReadDigitalChannel Lib “k8055d.dll” Alias “ReadDigitalChannel” (ByVal Channel As Integer) As Boolean
Public Declare Function VM110_ReadAllDigital Lib “k8055d.dll” Alias “ReadAllDigital” () As Integer
Public Declare Function VM110_ReadCounter Lib “k8055d.dll” Alias “ReadCounter” (ByVal CounterNr As Integer) As Integer
Public Declare Sub VM110_ResetCounter Lib “k8055d.dll” Alias “ResetCounter” (ByVal CounterNr As Integer)
Public Declare Sub VM110_SetCounterDebounceTime Lib “k8055d.dll” Alias “SetCounterDebounceTime” (ByVal CounterNr As Integer, ByVal DebounceTime As Integer)

' déclaration de la dll de la carte VM140
Public Declare Function VM140_OpenDevice Lib "k8061.dll" Alias "OpenDevice" () As Integer
Public Declare Sub VM140_CloseDevices Lib "k8061.dll" Alias "CloseDevices" ()
Public Declare Function VM140_ReadAnalogChannel Lib "k8061.dll" Alias "ReadAnalogChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer) As Integer
Public Declare Function VM140_PowerGood Lib "k8061.dll" Alias "PowerGood" (ByVal intCardNumber As Integer) As Boolean
Public Declare Function VM140_Connected Lib "k8061.dll" Alias "Connected" (ByVal intCardNumber As Integer) As Boolean
Public Declare Sub VM140_ReadVersion Lib "k8061.dll" Alias "ReadVersion" (ByVal intCardNumber As Integer, ByRef Buffer As Integer)
Public Declare Sub VM140_ReadAllAnalog Lib "k8061.dll" Alias "ReadAllAnalog" (ByVal intCardNumber As Integer, ByRef Buffer As Integer)
Public Declare Sub VM140_OutputAnalogChannel Lib "k8061.dll" Alias "OutputAnalogChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer, ByVal Data As Integer)
Public Declare Sub VM140_OutputAllAnalog Lib "k8061.dll" Alias "OutputAllAnalog" (ByVal intCardNumber As Integer, ByRef Buffer As Integer)
Public Declare Sub VM140_ClearAnalogChannel Lib "k8061.dll" Alias "ClearAnalogChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer)
Public Declare Sub VM140_SetAllAnalog Lib "k8061.dll" Alias "SetAllAnalog" (ByVal intCardNumber As Integer)
Public Declare Sub VM140_ClearAllAnalog Lib "k8061.dll" Alias "ClearAllAnalog" (ByVal intCardNumber As Integer)
Public Declare Sub VM140_SetAnalogChannel Lib "k8061.dll" Alias "SetAnalogChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer)
Public Declare Sub VM140_OutputAllDigital Lib "k8061.dll" Alias "OutputAllDigital" (ByVal intCardNumber As Integer, ByVal Data As Integer)
Public Declare Sub VM140_ClearDigitalChannel Lib "k8061.dll" Alias "ClearDigitalChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer)
Public Declare Sub VM140_ClearAllDigital Lib "k8061.dll" Alias "ClearAllDigital" (ByVal intCardNumber As Integer)
Public Declare Sub VM140_SetDigitalChannel Lib "k8061.dll" Alias "SetDigitalChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer)
Public Declare Sub VM140_SetAllDigital Lib "k8061.dll" Alias "SetAllDigital" (ByVal intCardNumber As Integer)
Public Declare Function VM140_ReadDigitalChannel Lib "k8061.dll" Alias "ReadDigitalChannel" (ByVal intCardNumber As Integer, ByVal Channel As Integer) As Boolean
Public Declare Function VM140_ReadAllDigital Lib "k8061.dll" Alias "ReadAllDigital" (ByVal intCardNumber As Integer) As Integer
Public Declare Sub VM140_OutputPWM Lib "k8061.dll" Alias "OutputPWM" (ByVal intCardNumber As Integer, ByVal Data As Integer)
Public Declare Sub VM140_Version Lib "k8061.dll" Alias "Version" ()

#End Region 'Dll V3 à copier dans system32 pour la VM110 et driver vistapack à installer lors de la premiére connection de la carte VM140.
End Module[/code]

This looks nice!
You got it working with the boards K8055 (VM110) AND K8061 (VM140). :slight_smile:

you can’t make it a post it for another ?
:smiley:

UP :unamused:

Post it is’nt possible ?
:neutral_face: