Sub convert2BytesToINT(b1 As Byte,b2 As Byte,blittleEndian As Boolean) As Int
'use byteconverter
Dim retint As Int=0 'return value
Dim bc As ByteConverter
bc.LittleEndian=blittleEndian
'Dim i As Int = bc.IntsFromBytes(Array As Byte(1, 2, 3, 4))(0) 'Erels examplecode
Try
retint=bc.IntsFromBytes(Array As Byte(b1,b2))(0)
Log("retint=" & retint)
Catch
Log("Err in byteconverter" & CRLF & LastException.Message)
End Try
Return retint