Important: Works only under Linux. The reason for this is, that the interfaced Comedi device drivers are only available for Linux.
Example tested with USB-DUX D. Assuming input channels are electrical connected to corresponding output channels we should read what we wrote