Sensoray 417 Manuel d'utilisateur Page 11

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 37
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 36 37

Commentaires sur ces manuels

Pas de commentaire