@Viewty-Fan:
Wo liegt jetzt genau das Problem?! Dafür gibts doch die Funktionen:

ReadDigitalChannel(Channel)
ReadAllDigital(Buffer)

Lad dir mal die Software von Vellemann runter und lese dir die Doku durch.

Gruß,
SIGINT