Software support for the VM110N unit

It was a little tricky to get the VM110N communication to work with the Liberty Basic.
Now it works.
After running this program the digital outputs 1 and 5 are set on.

[code] open “K8055D.dll” for dll as #user

calldll #user,"OpenDevice", 0 as long, h as long
print h
calldll #user,"ClearAllDigital", h as long
print h
calldll #user,"SetDigitalChannel", 5 as long, h as long
print h
calldll #user,"SetDigitalChannel", 1 as long, h as long
print h
calldll #user,"CloseDevice", h as long
print h

close #user [/code]

Card address ‘0’ (jumpers SK5 and SK6 are set ‘on’).

This is the output on the screen:0 1 1 1 1

Here an example with some more functions:

[code]
struct result1, value as long
struct result2, value as long

open "K8055D.dll" for dll as #user

calldll #user,"OpenDevice", 0 as long, h as long
if h = 0 then
    print "Card address "; h; " opened"
else
    print "Card not opened. Return value = "; h
end if

calldll #user,"ClearAllDigital", h as long
calldll #user,"SetDigitalChannel", 5 as long, h as long
calldll #user,"SetDigitalChannel", 1 as long, h as long

calldll #user,"ClearDigitalChannel", 1 as long, h as void

calldll #user,"ReadDigitalChannel", 1 as long, h as long, result as long
print "Digital Input I1 = ";result

calldll #user,"ReadAllDigital", h as long, result as long
print "Digital Inputs = ";result

calldll #user,"ReadAnalogChannel", 1 as long, result as long
print "A1 = "; result
calldll #user,"ReadAnalogChannel", 2 as long, result as long
print "A2 = "; result

calldll #user,"ReadAllAnalog",  result1 as struct,  result2 as struct,  h as long
print "A1 = "; result1.value.struct
print "A2 = "; result2.value.struct

calldll #user,"OutputAnalogChannel", 1 as long, 120 as long, h as long

calldll #user,"CloseDevice", h as long

close #user[/code]