With vb.net the communication did work fine, until I started a test program that showed that the port still was occupied by the first program (although that was properly closed). Tried a hot disconnect and reconnect and the problem was solved, until I tried to switch all relais off (at the start of the testprogram): that did give a memory error:
System.AccessViolationException occurred
HResult=0x80004003
Message=Poging tot
het lezen of schrijven van beveiligd geheugen. Dit duidt er vaak op dat ander
geheugen is beschadigd.
Source=Velleman.Kits
StackTrace:
at
Velleman.Kits.K8090Native.SendCommand(IntPtr hDevice, Byte cmd, Byte mask, Byte
hparam, Byte lparam)
at Velleman.Kits.K8090Board.SwitchRelayOff(Byte
mask)
…
…
It looks like that part of the memory is damaged by the “hot disconnect” and reconnect. Is it possible to exchange the firmware chip for an undamaged one?