Sensoray 417 Manuale Utente Pagina 11

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 37
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 36 37

Commenti su questo manuale

Nessun commento