In Phidget21, if you were using the InterfaceKit you could get the count via the InterfaceKitDigitalInputCollection.count member. You could then loop over the inputs field on the InterfaceKit using this count.
In Phidget22, you don't use the InterfaceKit class anymore, instead you open a DigitalInput on each of the channels. But I can't find a way to know how many channels are available? I could just hard code it (I'm using the DAQ1301_0 16x Isolated Digital Input, so 16 channels), but that seems... wrong from a coding perspective.
I seem to be able to get the number of channels using this code:
Code: Select all
digitalInput0 = new DigitalInput();
digitalInput0.Open();
digitalInput0.GetDeviceChannelCount(ChannelClass.None);
Thank you!