Getting relay status

Hi

I’m trying to get the status of the relays on the K8090 but I don’t get if fixed.

I’m using Microsoft Visual Basic 2010 Express.

Switching on and off of the relays is working fine but mij program crashes when I try to toggle on a relays that’s already on.
So I first want to check the relays status before switching it but i don’t know how. I viewed al the documentation several times but I
don’t get it fixed.

Can anyone help me finding a solution for my problem?

Thanks in advance

Greetings

You will need to provide a lot more information about your program.

Did you start from the sample project?
C:\Program Files\Velleman\K8090\Samples\Visual Basic 2008 Express Edition\Sample02\Sample02.sln