Trouble attaching first input on 16/16/0 board using VB
Posted: Mon Dec 17, 2018 11:52 pm
Have just installed latest Phidgets software and have converted visual basic software for Phidget22 API. Our application uses two 16/16/0 boards and the new Phidget Control panel shows both are working.
But when I run our code, the first input on both boards does not attach. All other inputs are fine. Any ideas?
Below is the code where I open the inputs:
But when I run our code, the first input on both boards does not attach. All other inputs are fine. Any ideas?
Below is the code where I open the inputs:
Code: Select all
Private Sub attachEvent(ByVal sender As Object, ByVal e As Phidget22.Events.AttachEventArgs) Handles kit.Attach
'When the Phidget Stepper# attaches update the form text boxes
' Try
Dim attachedDevice As Phidget22.DigitalInput = CType(sender, Phidget22.DigitalInput)
numInputs = kit.GetDeviceChannelCount(ChannelClass.DigitalInput)
For i As Integer = 0 To numInputs - 1
Dim input As New DigitalInput
input.Channel = i
input.Open()
inputs.Add(input)
Next
numOutputs = kit.GetDeviceChannelCount(ChannelClass.DigitalInput)
For i As Integer = 0 To numOutputs - 1
Dim output As New DigitalOutput
output.Channel = i
output.Open()
outputs.Add(output)
Next
connected = True
txtStatus = "Connected" ' must be last
' Catch ex As Exception
' End Try
End Sub