Managing Slave Devices Operating Modes

Overview

The operating modes of slave devices are managed by the protocol manager with the following scanners and their dedicated libraries:

These libraries contain function blocks that allow you to:

  • Control the Modbus TCP IOScanner,

  • Manage cyclic data exchanges (implicit messages),

  • Manage the status variables,

  • Send non-cyclic data exchange requests (explicit messages).

Other libraries can be used depending on the devices.

Status Variables of the Modbus TCP IOScanner

There are two status variable types:

  • Health bits: variables to indicate the communication state of the channels. There is one health bit per channel.

  • Global scanner status: variable to indicate the Modbus TCP IOScanner state.

This table presents the health bit values:

Health bit value

Communication state of the channel

0

Health timeout expired without receiving a reply.

1

No errors detected. Request and reply are received.

I/O Image Variables

The scanners collect and write data from/to the devices. These variables constitutes the I/O image.

Variables Addresses

Each variable gets its own address:

Variable

Type

Amount

I/O image variables

%IW for inputs

%QW for outputs

A table of words is created per channel/connection.

Health bit

%IW

Four consecutive words for Modbus TCP

Global scanner status

%IW

One word for Modbus TCP

Function Blocks to Control the Modbus TCP IOScanner

Modbus TCP IOScanner library contains function blocks used by the application to communicate with the controller and the Modbus TCP slave devices:

  • CONFIGURE_OTB: Send the software configuration of the Advantys OTB

  • IOS_CONTROLCHANNEL: Enables or disables a communication channel

  • IOS_GETSTATE: Read the state of the Modbus TCP IOScanner

  • IOS_START: Launch the Modbus TCP IOScanner

  • IOS_GETHEALTH: Read the health bit value

  • IOS_STOP: Stop the Modbus TCP IOScanner

For more details, refer to Modbus TCP IOScanner.

Function Blocks to Control ATV and Lexium Devices

Use the PLC Open and other function blocks dedicated to drives to control ATV and Lexium devices. These function blocks can be accessed in the GMC Independent PLCopen MC library, GMC Independent Altivar library, and GMC Independent Lexium library. For more information, refer to the Motion Control Library Guide.

Bus Cycle Task

The protocol manager and the slave devices exchange data at each cycle of an application task.

The Bus Cycle Task parameter allows you to select the application task that manages the scanner:

  • Use parent bus cycle setting: associate the scanner with the application task that manages the controller.

  • MAST: associate the scanner with the MAST task.

  • Another existing task: you can select an existing task and associate it to the scanner.

For more information about the application tasks, refer to the EcoStruxure Machine Expert Programming Guide.