Commreq command block, Modbus/tcp channel commands, Status data – FANUC Robotics America GFK-1541B User Manual

Page 118

Advertising
background image

GFK-1541B

Chapter 4 Programming Modbus/TCP Channel Commands

4-3

4

COMMREQ Command Block

The COMMREQ Command Block is a structure that contains information about the Channel
command to be executed. The Command Block consists of two parts:

Common Area - includes the address of the COMMREQ Status word (CRS word).

Data Block Area - describes the Channel command to be executed.

When the COMMREQ function is initiated, the Command Block is transferred to the Ethernet
Interface for action.

Modbus/TCP Channel Commands

The Channel commands are a set of client PLC commands used to communicate with a server.
Up to 16 channels (numbered 1–16) can be established by a Series 90-30 Ethernet Interface. The
channel number is specified in the Command Block for the Channel command. The channel can
be monitored using the Channel Status bits.

Status Data

There are several types of status available to the client PLC logic program.

LAN Interface Status Bits (LIS Bits):

The LIS bits comprise bits 1–16 of the 80-bit status area. The

location of this 80-bit status area is assigned using the Configuration software in the “Status
Address” field. The LIS bits contain information on the status of the Local Area Network (LAN)
and the Ethernet Interface itself.

Channel Status Bits:

The Channel Status bits comprise bits 17–80 (64 bits) of the 80-bit status

area. When used for Modbus/TCP channels, these bits consist of a connection open bit and a unused
bit, reserved for future use, for each of the 16 channels that can be established. Status bits for
unused channels are always set to zero.

COMMREQ Status Word (CRS Word):

The 16-bit CRS word will receive the initial status of the

communication request. The location of the CRS word is assigned for each COMMREQ function
in the COMMREQ Command Block.

FT Output of the COMMREQ Function Block:

This output indicates that the PLC CPU detected

errors in the COMMREQ Function Block and/or Command Block and did not pass the Command
Block to the Ethernet Interface.

The Logic Program Controlling Execution of the COMMREQ Function Block

Care must be taken in developing the logic that controls the execution of the COMMREQ function.
The COMMREQ function must be initiated by a one-shot to prevent the COMMREQ from being
executed repeatedly each CPU scan, as this will overrun the capability of the Ethernet Interface and
possibly require a manual restart. Checking certain status bits before initiating a COMMREQ
function is also important. In particular, the LAN Interface OK bit should be used as an interlock to
prevent execution of the COMMREQ function when the Ethernet Interface is not operational.
Following initiation of a COMMREQ on a channel, no further COMMREQs should be issued to
that channel until a non-zero CRS word has been returned to the program from the Ethernet
Interface.

www.cadfamily.com EMail:[email protected]
The document is for study only,if tort to your rights,please inform us,we will delete

Advertising