29
8300 8315 L&J Tankway Software Description
4.5 Modbus Communications
The TankGate is capable of communicating with Modbus compatible devices. It is
possible to communicate with both Modbus Masters and Slave devices. The TankGate is
flexible, allowing communications with devices that strictly comply with the Modicon
Modbus protocol, as well as devices with more advanced Modbus implementations such
as Honeywell’s APM-SIO.
The Modbus Slave protocol handler responds to read and write requests from a Modbus
master system. A detailed description of the Modbus Slave protocol handlers follows.

4.5.1 Modbus Slave

The Modbus Slave protocol handler is enabled by setting the Protocol parameter of a
COM point to Modbus Slave. COM 0 of the TankGate is auto sensing. If a Modbus Master
requests data from the TankGate, the TankGate will automatically detect that Modbus is
being used and invoke the Modbus Slave protocol handler. The Modbus Slave protocol
handler responds to requests from Modbus masters. A MODGW point is automatically
created to provide user access to the operation of the protocol handler. The MODGW
point also provides dynamic information about the communications requests from the
Modbus master.
The Modbus Slave protocol handler is flexible, allowing the user to set options for
handling several aspects of Modbus communications. The Modbus Slave uses the
GWBLK Gateway Block as a lookup table for data addresses.
The Gateway Block allows the user to specify data address and point reference
combinations. This allows the TankGate to be used with an existing system that is
already configured. The user defines a GWBLK point and specifies which parameter in
the TankGate will be used for a particular address. When a request from a master is
received, the Modbus Slave protocol handler will first search for any GWBLK points and
determine if the data address of the request is specified in one of the GWBLK points. If
the data address is contained in a GWBLK point, then the corresponding point reference
is used to provide the data for the reply to the master.
COM 0 will automatically sense whether the host system is ViewRTU or a Modbus Master.
The communications parameters for COM 0 are 9600 baud, 8 data bits and No Parity.
When switching between ViewRTU and Modbus communications, it is necessary to wait
60 seconds for the current protocol to time-out. The TankGate will go back to the auto
sensing mode and wait for a request. When a request is received, the TankGate will
determine if the request is from ViewRTU or a Modbus Master. If the TankGate has
problems switching, press the Reset button and this will force the TankGate back into
the auto sensing mode.
COM 1 (if available) is always a Modbus Slave. The communications parameters for COM
1 are 9600 baud, 8 data bits and No Parity.
The TankGate uses the ID switch in determining to which address on the
communications bus to respond.