Sensoray 417 Manual de usuario Pagina 11

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 37
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 36 37

Comentarios a estos manuales

Sin comentarios