Variables and fieldbus

From Axel Public Wiki
Revision as of 15:52, 26 February 2018 by Axelpwiki (talk | contribs)
Jump to navigation Jump to search

Introduction

This article gives an overview of the relationship between the variables of a PLC application and the different fieldbus either in master or slave configuration. The topics covered here mainly apply to the binary LLExec PLC runtime but can also be applied to most of the LogicLab PLC runtime portings.

Fieldbus master

When the device is configured as a fieldbus master (Modbus, CANopen, EtherCAT etc.), the basic concept relies on the mapping of PLC variables on the slave devices input and outputs datagrams.
The key points of fieldbus PLC variables mapping are the following:

  1. the fieldbus master exchanges datagrams with the slave devices
  2. the datagrams can be input datagrams (from slave to master) or output datagrams (from master to slave)
  3. input datagrams contain values that are read from specific data objects of the slave device
  4. output datagrams contain values that are written into specific data objects of the slave device
  5. the configuration of the datagrams exchanged with each slave device are defined by means of the LogicLab embedded fieldbus configurator
  6. the values in the datagrams are mapped on PLC global variables using the fieldbus configurator
  7. at run-time the values of the PLC variables are automatically updated from/written into the datagrams by the fieldbus master stack

FieldbusMapping.png

Mapping procedure

In the following description a Modbus TCP master example is used. The same concepts apply to almost all others fieldbus master configurations.
The goal of this example is to map two slave objects (ActualValue and StatusWord) onto two PLC variables using different procedures (new variable definition and existing variable mapping).

  1. enable the modbus TCP master stack on the Ethernet node
  2. add a slave node under the Modbus TCP master
  3. select the "Input" tab to configure the input datagram
  4. press the "Add" button to add a slave object to the input datagram

Map 01.png