Brian

#Dim All #Compile Exe Declare Function OpenDevice Lib "k8055d.dll" Alias "OpenDevice" (ByVal CardAddress As Long) As Long Declare Sub CloseDevice Lib "k8055d.dll" Alias "CloseDevice" () Declare Function ReadAnalogChannel Lib "k8055d.dll" Alias "ReadAnalogChannel" (ByVal Channel As Long) As Long Declare Sub ReadAllAnalog Lib "k8055d.dll" Alias "ReadAllAnalog" (Data1 As Long, Data2 As Long) Declare Sub OutputAnalogChannel Lib "k8055d.dll" Alias "OutputAnalogChannel" (ByVal Channel As Long, ByVal Data As Long) Declare Sub OutputAllAnalog Lib "k8055d.dll" Alias "OutputAllAnalog" (ByVal Data1 As Long, ByVal Data2 As Long) Declare Sub ClearAnalogChannel Lib "k8055d.dll" Alias "ClearAnalogChannel" (ByVal Channel As Long) Declare Sub SetAllAnalog Lib "k8055d.dll" Alias "SetAllAnalog" () Declare Sub ClearAllAnalog Lib "k8055d.dll" Alias "ClearAllAnalog" () Declare Sub SetAnalogChannel Lib "k8055d.dll" Alias "SetAnalogChannel" (ByVal Channel As Long) Declare Sub WriteAllDigital Lib "k8055d.dll" Alias "WriteAllDigital" (ByVal Data As Long) Declare Sub ClearDigitalChannel Lib "k8055d.dll" Alias "ClearDigitalChannel" (ByVal Channel As Long) Declare Sub ClearAllDigital Lib "k8055d.dll" Alias "ClearAllDigital" () Declare Sub SetDigitalChannel Lib "k8055d.dll" Alias "SetDigitalChannel" (ByVal Channel As Long) Declare Sub SetAllDigital Lib "k8055d.dll" Alias "SetAllDigital" () Declare Function ReadDigitalChannel Lib "k8055d.dll" Alias "ReadDigitalChannel" (ByVal Channel As Long) As Long Declare Function ReadAllDigital Lib "k8055d.dll" Alias "ReadAllDigital" () As Long Declare Function ReadCounter Lib "k8055d.dll" Alias "ReadCounter" (ByVal CounterNr As Long) As Long Declare Sub ResetCounter Lib "k8055d.dll" Alias "ResetCounter" (ByVal CounterNr As Long) Declare Sub SetCounterDebounceTime Lib "k8055d.dll" Alias "SetCounterDebounceTime" (ByVal CounterNr As Long, ByVal DebounceTime As Long) Function PBMain Dim CardAddress As Long Dim h As Long Dim Value1 As Long Dim Value2 As Long ' Enter values for Value1 and Value2 'Value1 = ??? 'Value2 = ??? CardAddress = 0 CardAddress = 3 - (Value1 + Value2 * 2) h = OpenDevice(CardAddress) Select Case h Case 0, 1, 2, 3 ? "Card " + Str$(h) + " connected" Case -1 ? "Card " + Str$(CardAddress) + " not found" End Select CloseDevice End Function
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: