FiveCo FMod-TCP BOX User Manual page 14

Ethernet converter device
Table of Contents

Advertisement

Registers access feature
TCP/IP works in big endian: most significant byte first, followed by least
significant byte.
The access to the data is done through an easy (6 byte header) protocol
over TCP.
Structure of each packet:
1. Function ID (2 bytes),
2. Transaction ID (2 bytes)
3. Length of the parameters (2 bytes)
4. Parameters (X byte)
5. Checksum (2 bytes) (described later in this chapter)
The user (sender) defines the values of the Transaction IDs himself. The
module that receives a command sends back an answer (for every
command). The answer contains the same Transaction ID as the
corresponding command sent. The user is also able to check execution of
each command.
Read register(s) command:
Byte#
0x00
Read (0x0021)
0x02
TransactionID
0x04
Number of registers to
read (X)
0x06
X * Registers Addresses
0x06+X
Checksum
The maximum number of registers that can be read at one time is almost
30. The answer sequence should not be greater than 180 bytes. If the
number of registers is too big, the FMod-TCP BOX will answer only with the
value of some of them.
The module answers with the following sequence:
Byte#
0x00
Read Answer (0x0023)
0x02
TransactionID (same as
demand)
0x04
Number of bytes in answer
0x06
Register address
...
Register value
The two previous entries are replicated for every register that has been asked for reading
...
Checksum
Number of bits
Example
16 bits
0x0021
16 bits
0x1B34
16 bits
0x0001
X * 8 bits
0x02
16 bits
0x...
Number of bits
Example
16 bits
0x0023
16 bits
0x1B34
16 bits
0x0019
8 bits
0x02
8—128 bits (16B) 0x12345
16 bits
0x...
FMod-TCP User Manual v.2.8
14 / 58

Advertisement

Table of Contents
loading

Related Products for FiveCo FMod-TCP BOX

This manual is also suitable for:

Fmod-tcp box 2

Table of Contents