I still have problems with adc100_get_unit_info and I know that there is something wrong in my syntax but what it is?
The other problem I have is that this function always return TRUE even if Pico unit is not attached to computer and it causes other problems in my program.
I can get the adc100 working so drivers etc. are no problem. I want to make the program more robust and for that I need to know what Pico unit is doing.
Thanks for any help
Public Function openPico(ByVal settings As settings, ByVal mainForm As mainForm) As Boolean
Dim port, i, j As Integer
Dim portOpened As Boolean
Dim buffer(255) As Char
Dim whyNotOpened As String
port = CInt(settings.getField("port"))
portOpened = adc100_open_unit(port)
If portOpened = False Then
For i = 0 To 3
j = adc100_get_unit_info(buffer, 255, i, port)
whyNotOpened = New String(buffer)
adc100_set_range(CInt(settings.getField("channel1Range")) * 1000, CInt(settings.getField("channel2Range")) * 1000)