Lex 3I170DW Manual page 52

Table of Contents

Advertisement

Function SetDOValue
Function SetDOValue(dovalue As Integer)
Dim Data As Integer
Dim Value As Integer
Data = 0
Value = dovalue
If (Value And &H1) <> 0 Then
Data = Data + &H1
End If
If (Value And &H2) <> 0 Then
Data = Data + &H2
End If
If (Value And &H4) <> 0 Then
Data = Data + &H4
End If
If (Value And &H80) <> 0 Then
Data = Data + &H8
End If
If (Value And &H40) <> 0 Then
Data = Data + &H10
End If
If (Value And &H20) <> 0 Then
Data = Data + &H20
End If
If (Value And &H10) <> 0 Then
Data = Data + &H40
End If
If (Value And &H8) <> 0 Then
Data = Data + &H80
End If
Call WriteI2CByte(&H23, &H0)
Call WriteI2CByte(&H20, &HFF)
Call WriteI2CByte(&H2B, &HFF)
Call WriteI2CByte(&H21, Data)
End Function
47

Advertisement

Table of Contents
loading

Table of Contents