Dynasonics TFXP Series Transit Time Ultrasonic Flow Meter Manual do Utilizador Página 118

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 132
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 117
Digital Communications Protocol for TFX Flow Meters
Host protocol
A digital communications protocol is utilized. Each message is guarded with the standard CRC-16
error detection (C source code is included)
The host protocol is a master-slave type protocol with the flowmeter being the slave. The
messages have the following format:
<addr><command><data>…<data><crc-16>
A unit may be assigned an address that responds to (valid addresses are 1-7E). All devices
respond to address 7F (ie. this address may not be used for multidrop) and all devices listen to
address 0 but do not respond (this is the “broadcast” address).
The following special commands are defined:
Command Description
65 Special “short” commands
66 Special “long” commands
Command 65 allows up to 255 data items to be transferred while command 66 allows up to
65535 items (The actual maximum size is limited by the memory allocated for the communication
buffers and for TOF it is 2048 bytes). There is special encoding for the data for commands 65 and
66 as follows:
Command 65:
<size><code><data
1
>…<data
N-1
> N = <size>
Command 66:
<size_h><size_l><code><data
1
>…<data
N-1
> N = <size_h>*256 + <size_l>
The target device will respond the same for both 65 and 66 commands. The host program needs
to make sure that the proper opcode will be used based on the data size requested.
In case of an error, the target will reject the message by replying with an error code. The target
will not reply to an ill-formed command (ie. incomplete or CRC-16 error). The error reply is:
<addr><opcode><errorcode><crc-16>
where:
<opcode> is the requested opcode with the Most Significant bit turned on.
The following error codes are defined:
Error Code Description
1 Bad Command (Invalid command)
2 Bad Command Data
71h Command not allowed.
72h Buffer overflow (data exceeded internal allocated memory)
73h Command not implemented in this version
Vista de página 117
1 2 ... 113 114 115 116 117 118 119 120 121 122 123 ... 131 132

Comentários a estes Manuais

Sem comentários