Sensoray 417 Instrukcja Użytkownika Strona 11

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 37
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 10
Instruction Manual 10
‘*******************************************************************
‘ Read a signed, 16-bit integer value from the 417, MSB first.
‘*******************************************************************
Function ReadWord%(BasePort As Integer)
Dim Lval As Long
‘ Handshake the high byte (MSB) from Model 417
Lval = ReadByte(BasePort)
‘ Handshake LSB from Model 417 & concatenate with high byte
Lval = Lval * 256 + ReadByte(BasePort)
‘ Adjust sign, if necessary
If Lval > 32767 Then Lval = Lval - 65536
‘ Set return value
ReadWord = Lval
End Function
‘*******************************************************************
‘ Send a signed, 16-bit integer value to the 417, MSB first.
‘*******************************************************************
Sub SendWord(BasePort As Integer, Value As Integer)
‘ Handshake the high byte (MSB) to Model 417
Call SendByte(BasePort, Value \ 256)
‘ Handshake the low byte (LSB) to Model 417
Call SendByte(BasePort, Value)
End Sub
Przeglądanie stron 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 36 37

Komentarze do niniejszej Instrukcji

Brak uwag