Modicon M340 Serial Link User Manual
Modicon M340 Serial Link User Manual
35012430 12/2018
Modicon M340
Serial Link
User Manual
(Original Document)
12/2018
35012430.14
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2018 Schneider Electric. All rights reserved.
2 35012430 12/2018
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Part I Hardware Installation for Modbus Serial and
Character Mode Communications . . . . . . . . . . . . . . 15
Chapter 1 Introduction to Serial Communications . . . . . . . . . . . . . . 17
Modbus Serial and Character Mode Communications . . . . . . . . . . . . 18
Presentation of the Serial Link on Modicon M340 Processors. . . . . . . 19
Standards and Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Wiring Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 2 Serial Communication Architectures. . . . . . . . . . . . . . . . 27
Modbus Line Termination and Polarization (RS485) . . . . . . . . . . . . . . 28
Connecting Modbus Devices (RS485) . . . . . . . . . . . . . . . . . . . . . . . . 30
Connecting Data Terminal Equipment (DTE) (RS232) . . . . . . . . . . . . 33
Connecting Data Circuit-terminating Equipment (DCE) (RS232) . . . . 35
Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Part II Software Implementation of Modbus Serial and
Character Mode Communications . . . . . . . . . . . . . . 41
Chapter 3 Installation Methodology . . . . . . . . . . . . . . . . . . . . . . . . . 43
Introduction to the Installation Phase . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 4 Modbus Serial Communication for Modicon M340
Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
About Modbus Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
How to Access the Serial Link Parameters . . . . . . . . . . . . . . . . . . . . . 50
4.2 Modbus Serial Communication Configuration . . . . . . . . . . . . . . . . . . . 53
Modbus Serial Communication Configuration Screen . . . . . . . . . . . . . 54
Application-linked Modbus Parameters . . . . . . . . . . . . . . . . . . . . . . . . 56
Signal and Physical Line Parameters in Modbus . . . . . . . . . . . . . . . . 58
Transmission-linked Modbus Parameters . . . . . . . . . . . . . . . . . . . . . . 60
4.3 Modbus Serial Communication Programming . . . . . . . . . . . . . . . . . . . 62
Services Supported by a Modbus Link Master Processor . . . . . . . . . . 63
Services Supported by a Modbus Link Slave Processor . . . . . . . . . . . 65
35012430 12/2018 3
4.4 Debugging Modbus Serial Communication . . . . . . . . . . . . . . . . . . . . . 67
Modbus Serial Communication Debug Screen . . . . . . . . . . . . . . . . . . 67
Chapter 5 Character Mode Communication for Modicon M340
Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.1 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
About Character Mode Communication . . . . . . . . . . . . . . . . . . . . . . . . 71
Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.2 Character Mode Communication Configuration . . . . . . . . . . . . . . . . . . 73
Character Mode Communication Configuration Screen. . . . . . . . . . . . 74
Message End Detection Parameters in Character Mode. . . . . . . . . . . 76
Signal and Physical Line Parameters in Character Mode . . . . . . . . . . 78
Transmission Parameters in Character Mode . . . . . . . . . . . . . . . . . . . 80
5.3 Character Mode Communication Programming. . . . . . . . . . . . . . . . . . 82
Character Mode Communication Functions. . . . . . . . . . . . . . . . . . . . . 82
5.4 Debugging Character Mode communication . . . . . . . . . . . . . . . . . . . . 84
Character Mode Communication Debug Screen . . . . . . . . . . . . . . . . . 84
Chapter 6 Language Objects of Modbus and Character Mode
Communications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.1 Language Objects and IODDTs of Modbus and Character Mode
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Introduction to the Language Objects for Modbus and Character Mode
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Implicit Exchange Language Objects Associated with the Application-
Specific Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Explicit Exchange Language Objects Associated with the Application-
Specific Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Management of Exchanges and Reports with Explicit Objects . . . . . . 93
6.2 General Language Objects and IODDTs for Communication Protocols 96
Details of IODDT Implicit Exchange Objects of Type
T_COM_STS_GEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Details of IODDT Explicit Exchange Objects of Type
T_COM_STS_GEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4 35012430 12/2018
6.3 Language Objects and IODDTs Associated with Modbus
Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Details concerning Explicit Exchange Language Objects for a Modbus
Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Details of the IODDTs Implicit Exchange Objects of Types
T_COM_MB_BMX and T_COM_MB_BMX_CONF_EXT . . . . . . . . . . . 102
Details of the IODDTs Explicit Exchange Objects of Types
T_COM_MB_BMX and T_COM_MB_BMX_CONF_EXT . . . . . . . . . . . 103
Details of language objects associated with configuration Modbus
mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.4 Language Objects and IODDTs associated with Character Mode
Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Details concerning Explicit Exchange Language Objects for
Communication in Character Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Details of IODDT Implicit Exchange Objects of Type
T_COM_CHAR_BMX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Details of IODDT Explicit Exchange Objects of Type
T_COM_CHAR_BMX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Details of language objects associated with configuration in Character
mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.5 The IODDT Type T_GEN_MOD Applicable to All Modules . . . . . . . . . 115
Details of the Language Objects of the IODDT of Type T_GEN_MOD 115
Chapter 7 Dynamic Protocol Switching . . . . . . . . . . . . . . . . . . . . . . 117
Changing Protocol with Modicon M340 Processors . . . . . . . . . . . . . . 117
Part III Quick Start : Example of Serial Link Implementation 119
Chapter 8 Description of the Application . . . . . . . . . . . . . . . . . . . . . 121
Overview of the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Chapter 9 Installing the Application Using Control Expert. . . . . . . . 123
9.1 Presentation of the Solution Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
The Different Steps in the Process Using Control Expert . . . . . . . . . . 124
9.2 Developing the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Declaration of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Using a Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Procedure for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Programming Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Chapter 10 Starting the Application . . . . . . . . . . . . . . . . . . . . . . . . . 151
Execution of the Application in Standard Mode. . . . . . . . . . . . . . . . . . 151
Glossary ......................................... 155
Index ......................................... 163
35012430 12/2018 5
6 35012430 12/2018
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, service, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
35012430 12/2018 7
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
WARNING
UNGUARDED EQUIPMENT
Do not use this software and related automation equipment on equipment which does not have
point-of-operation protection.
Do not reach into machinery during operation.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
This automation equipment and related software is used to control a variety of industrial processes.
The type or model of automation equipment suitable for each application will vary depending on
factors such as the control function required, degree of protection required, production methods,
unusual conditions, government regulations, etc. In some applications, more than one processor
may be required, as when backup redundancy is needed.
Only you, the user, machine builder or system integrator can be aware of all the conditions and
factors present during setup, operation, and maintenance of the machine and, therefore, can
determine the automation equipment and the related safeties and interlocks which can be properly
used. When selecting automation and control equipment and related software for a particular
application, you should refer to the applicable local and national standards and regulations. The
National Safety Council's Accident Prevention Manual (nationally recognized in the United States
of America) also provides much useful information.
In some applications, such as packaging machinery, additional operator protection such as point-
of-operation guarding must be provided. This is necessary if the operator's hands and other parts
of the body are free to enter the pinch points or other hazardous areas and serious injury can occur.
Software products alone cannot protect an operator from injury. For this reason the software
cannot be substituted for or take the place of point-of-operation protection.
8 35012430 12/2018
Ensure that appropriate safeties and mechanical/electrical interlocks related to point-of-operation
protection have been installed and are operational before placing the equipment into service. All
interlocks and safeties related to point-of-operation protection must be coordinated with the related
automation equipment and software programming.
NOTE: Coordination of safeties and mechanical/electrical interlocks for point-of-operation
protection is outside the scope of the Function Block Library, System User Guide, or other
implementation referenced in this documentation.
WARNING
EQUIPMENT OPERATION HAZARD
Verify that all installation and set up procedures have been completed.
Before operational tests are performed, remove all blocks or other temporary holding means
used for shipment from all component devices.
Remove tools, meters, and debris from equipment.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Follow all start-up tests recommended in the equipment documentation. Store all equipment
documentation for future references.
Software testing must be done in both simulated and real environments.
Verify that the completed system is free from all short circuits and temporary grounds that are not
installed according to local regulations (according to the National Electrical Code in the U.S.A, for
instance). If high-potential voltage testing is necessary, follow recommendations in equipment
documentation to prevent accidental equipment damage.
Before energizing equipment:
Remove tools, meters, and debris from equipment.
Close the equipment enclosure door.
Remove all temporary grounds from incoming power lines.
Perform all start-up tests recommended by the manufacturer.
35012430 12/2018 9
OPERATION AND ADJUSTMENTS
The following precautions are from the NEMA Standards Publication ICS 7.1-1995 (English
version prevails):
Regardless of the care exercised in the design and manufacture of equipment or in the selection
and ratings of components, there are hazards that can be encountered if such equipment is
improperly operated.
It is sometimes possible to misadjust the equipment and thus produce unsatisfactory or unsafe
operation. Always use the manufacturer’s instructions as a guide for functional adjustments.
Personnel who have access to these adjustments should be familiar with the equipment
manufacturer’s instructions and the machinery used with the electrical equipment.
Only those operational adjustments actually required by the operator should be accessible to
the operator. Access to other controls should be restricted to prevent unauthorized changes in
operating characteristics.
10 35012430 12/2018
About the Book
At a Glance
Document Scope
This manual describes the principle for hardware and software implementation of character mode
and Modbus communication for Modicon M340 PLCs.
Validity Note
This documentation is valid for EcoStruxure™ Control Expert 14.0 or later.
The technical characteristics of the devices described in the present document also appear online.
To access the information online:
Step Action
1 Go to the Schneider Electric home page www.schneider-electric.com.
2 In the Search box type the reference of a product or the name of a product range.
Do not include blank spaces in the reference or product range.
To get information on grouping similar modules, use asterisks (*).
3 If you entered a reference, go to the Product Datasheets search results and click on the
reference that interests you.
If you entered the name of a product range, go to the Product Ranges search results and click
on the product range that interests you.
4 If more than one reference appears in the Products search results, click on the reference that
interests you.
5 Depending on the size of your screen, you may need to scroll down to see the data sheet.
6 To save or print a data sheet as a .pdf file, click Download XXX product datasheet.
The characteristics that are presented in the present document should be the same as those
characteristics that appear online. In line with our policy of constant improvement, we may revise
content over time to improve clarity and accuracy. If you see a difference between the document
and online information, use the online information as your reference.
35012430 12/2018 11
Related Documents
You can download these technical publications and other technical information from our website
at www.schneider-electric.com/en/download.
12 35012430 12/2018
Product Related Information
WARNING
UNINTENDED EQUIPMENT OPERATION
The application of this product requires expertise in the design and programming of control
systems. Only persons with such expertise should be allowed to program, install, alter, and apply
this product.
Follow all local and national safety codes and standards.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
35012430 12/2018 13
14 35012430 12/2018
Modicon M340
Hardware Installation for Serial Communications
35012430 12/2018
Part I
Hardware Installation for Modbus Serial and Character Mode Communications
In This Part
This part provides an introduction to hardware installation for Modbus serial and Character Mode
communications.
35012430 12/2018 15
Hardware Installation for Serial Communications
16 35012430 12/2018
Modicon M340
Serial Communications
35012430 12/2018
Chapter 1
Introduction to Serial Communications
Using the integrated port of the M340 CPU Using the BMX NOM 0200 communication
module (see Modicon X80, BMXNOM0200
Serial Link Module, User Manual)
- Limited transmission speed - Increased number of available
- Non isolated serial lines communication channels
- Provision of power supply to terminal - Handling of modem specific RS232 signals
equipment - Higher transmission speed
- Two isolated RS485 serial lines
35012430 12/2018 17
Serial Communications
General
The serial links support two communication protocols:
Modbus Serial
Character Mode
Modbus Protocol
Modbus is a standard protocol with the following properties:
Establishes client/server communication between different modules within a bus or serial link.
The client is identified by the master and the slave modules represent the servers.
Is based on a mode of data exchange composed of requests and responses offering services
via different function codes.
Establishes a means of exchanging frames from Modbus-type applications in two types of code:
RTU mode
ASCII mode
18 35012430 12/2018
Serial Communications
General
The following processors have an integrated communication channel dedicated to serial
communications, and enable communication via serial link:
BMX P34 1000
BMX P34 2000
BMX P34 2010
BMX P34 20102
BMX P34 2020
35012430 12/2018 19
Serial Communications
Address Description
1 Processor status LEDs on the front
2 Integrated channel (channel 0) dedicated to the serial link.
3 Serial port identification ring (black)
20 35012430 12/2018
Serial Communications
The RJ45 connector has eight pins. The pins used vary according to the physical link used.
The pins used by the RS232 serial link are:
Pin 1: RXD signal
Pin 2: TXD signal
Pin 3: RTS signal
Pin 6: CTS signal
Pin 8: Potential serial link grounding (0 V)
Pin 7 is used solely to supply power to human-machine interfaces or small devices via the serial
link cable:
Pin 7: Serial link power supply: 5 VDC/190 mA
Detailed characteristics
DC characteristics:
Maximum stabilized power consumption: 190 mA,
Minimum voltage on CPU connector for 190 mA: 4.9 V,
Maximum voltage on CPU connector for 190 mA: 5.25 V,
Maximum voltage on CPU connector with no load: 5.5 V.
35012430 12/2018 21
Serial Communications
AC characteristics:
Capacitor charge: (on 5 V)
Maximum 1 μF ceramic capacitor
10 μF tantalum
NOTE: The four-wire RS232, the two-wire RS485 and the two-wire RS485 with power supply all
use the same female RJ45 connector. Only the signal cabling is different.
The polarisation is not affected by dynamic protocol switching. The polarization resistors’ value is
560 ohms.
In RS232 mode, no polarization is required.
There is no built-in line termination.
22 35012430 12/2018
Serial Communications
Channel Specifications
The channel of these processors includes:
One non-isolated RS485 physical interface,
One non-isolated RS232 physical interface,
Modbus Serial (ASCII and RTU) and Character Mode communication types.
35012430 12/2018 23
Serial Communications
Online Help
From the Control Expert online help, you can access the standards and certifications that apply to
the modules in this product line by referring to the Modicon M580, M340, and X80 I/O Platforms,
Standards and Certifications guide.
Download
Click the link that corresponds to your preferred language to download the standards and
certifications (PDF format) that apply to the modules in this product line:
Language
English Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
French Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
German Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
Italian Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
Spanish Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
Chinese Modicon M580, M340, and X80 I/O Platforms, Standards and Certifications
24 35012430 12/2018
Serial Communications
Wiring Considerations
Operational Consideration
WARNING
UNINTENDED EQUIPMENT OPERATION
Although you can connect or disconnect the serial link wire on the BMX P34 20x0 CPUs while
the power to the station is on, doing so can interrupt the application in progress.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
The Link
The following situations can create a temporary disruption in the application or communications:
The RJ45 connector is connected or disconnected when the power is on.
Modules are re-initialized when the power is switched back on.
35012430 12/2018 25
Serial Communications
26 35012430 12/2018
Modicon M340
Introduction to Serial Communication Architectures
35012430 12/2018
Chapter 2
Serial Communication Architectures
35012430 12/2018 27
Introduction to Serial Communication Architectures
Overview
A multi-point Modbus network must have line termination and polarization.
Equipment connectable to this bus are:
Other PLCs like M340, Premium, Quantum, Twido or Nano
Schneider Automation devices like Altivar, Security module XPS, SEPAM, XBT or Momentum
Other Modbus protocol compliant devices
Modem, Hub
An example of multi-point Modbus network (see page 32) including a BMX P34 2010 processor is
presented in this manual.
NOTE: A point to point Modbus network can also be performed.
Electrical schema of line termination and polarization:
28 35012430 12/2018
Introduction to Serial Communication Architectures
Line Termination
Line termination is made externally: it consists of two 120 Ω resistors and 1 nF capacitor placed at
each end of the network (VW3 A8 306 RC or VW3 A8 306 DRC).
Don’t place line termination at the end of a derivation cable.
Line Polarization
On a Modbus line, polarization is needed for an RS485 network.
If the M340 CPU is used as a master, it is automatically driven by the system (see page 22) so
there is no need of external polarization.
If the M340 CPU is used as a slave, the polarization must be implemented by two 450 to 650 Ω
resistors (Rp) connected on the RS485 balanced pair:
a pull-up resistor to a 5 V voltage on the D1 circuit,
a pull-down resistor to the common circuit on D0 circuit.
35012430 12/2018 29
Introduction to Serial Communication Architectures
General
The following pages present two examples of Modbus devices connection and a Modbus serial link
architecture.
Connecting Modbus Devices that are Powered via the Serial Link
The illustration below shows how a BMX P34 2010 processor is connected to an XBT N200
console powered by the Modbus serial link:
30 35012430 12/2018
Introduction to Serial Communication Architectures
Connecting Modbus Devices that are not Powered via the Serial Link
This architecture consists of the following elements:
A BMX P34 2010 processor,
An XPSMC16 safety controller.
The illustration below shows how a BMX P34 2010 processor is connected to an XPSMC16 safety
controller:
BMX P34 2010 Processor
RUN ERR DL
COM0
COM1
35012430 12/2018 31
Introduction to Serial Communication Architectures
The diagram below represents the serial link architecture described above:
32 35012430 12/2018
Introduction to Serial Communication Architectures
General
Data terminal equipment is the term used to describe devices such as:
Common peripherals (printer, keyboard-screen, workshop terminal, etc.),
Specialized peripherals (barcode readers, etc.),
PCs.
All data terminal equipments are connected to a BMX P34 1000/2000/2010/20102/2020 processor
by a serial cross cable using the RS232 physical link.
35012430 12/2018 33
Introduction to Serial Communication Architectures
The illustration below shows the pin assignment for a TCS MCN 3M4F3C2 serial cross cable:
34 35012430 12/2018
Introduction to Serial Communication Architectures
General
Data Circuit-terminating Equipment (DCE) is the term used to describe devices such as modems.
For a DCE type device, the RTS and CTS pins are connected directly (not crossed).
All data circuit-terminating equipments are connected to a BMX P34 1000/2000/2010/20102/2020
processor by a serial direct cable using an RS232 physical link.
NOTE: The differences between DCE and DTE connections are largely in the plugs and the signal
direction of the pins (input or output). For example, a desktop PC is termed as a DTE device while
a modem is termed as a DCE device.
Modem Characteristics
M340 CPUs work with most modems on the market. To connect a modem to the serial port of a
BMX P34 1000/2000/2010/20102/2020 processor, the modem must have the following
characteristics:
Support 10 or 11 bits per character if the terminal port is used in Modbus Serial:
7 or 8 data bits
1 or 2 stop bits
Odd, even or no parity
NOTE: In Modbus Serial, the waiting time must be between 100 and 250 ms.
35012430 12/2018 35
Introduction to Serial Communication Architectures
The illustration below shows the pin assignment for a TCS MCN 3M4M3S2 serial direct cable:
36 35012430 12/2018
Introduction to Serial Communication Architectures
Cabling
Cabling System
Several cables and accessories are required in order to set up a serial link.
The figure below shows an example of Modbus serial link and character mode cabling system. The
cables (see page 38) and connecting accessories (see page 39) referenced in the figure are
described in the next tables:
35012430 12/2018 37
Introduction to Serial Communication Architectures
Cables
The table below shows the available cables that are compatible with serial communication on these
processors and module:
38 35012430 12/2018
Introduction to Serial Communication Architectures
Connecting Accessories
The table below shows the available connecting accessories that are compatible with serial
communication on these processors and module:
3 Passive 2-channel subscriber socket Two fifteen-pin SUB-D female TSX SCA 62
connectors
Two screw terminal blocks
RC line end adapter
4 Isolated RS485 T-junction box One RJ45 connectors TWD XCA ISO
One screw terminal block
- Line terminator for screw terminal block Resistance of 120 Ω VW3 A8 306 DRC
Capacity of 1 nF
- Adapter for non-standard devices Two 25-pin SUB-D male XBT ZG999
connectors
35012430 12/2018 39
Introduction to Serial Communication Architectures
40 35012430 12/2018
Modicon M340
35012430 12/2018
Part II
Software Implementation of Modbus Serial and Character Mode Communications
In This Part
This part provides an introduction to the software implementation of Modbus Serial and Character
Mode communications using Control Expert software.
35012430 12/2018 41
42 35012430 12/2018
Modicon M340
Methodology
35012430 12/2018
Chapter 3
Installation Methodology
Installation Methodology
Introduction
The software installation of application-specific modules is carried out from the various
Control Expert editors:
in offline mode
in online mode
If you do not have a processor to which you can connect, Control Expert allows you to carry out an
initial test using a simulator. In this case, the installation is different.
35012430 12/2018 43
Methodology
The printout is consistent with the configuration: not significant grayed information is not printed.
44 35012430 12/2018
Modicon M340
ModiconM340
35012430 12/2018
Chapter 4
Modbus Serial Communication for Modicon M340 Processors
35012430 12/2018 45
ModiconM340
Section 4.1
Generalities
Generalities
46 35012430 12/2018
ModiconM340
Introduction
Communicating via Modbus enables data exchange between all devices connected to the bus.
The Modbus Serial is a protocol that creates a hierarchical structure (one master and several
slaves).
The master manages all exchanges in two ways:
The master exchanges with the slave and awaits a response.
The master exchanges with all the slaves without waiting for a response (general broadcast).
NOTE: Be careful that two masters (on the same bus) do not send requests simultaneously
otherwise the requests are lost and each report will have a bad result which could be 16#0100
(request could not be processed) or 16#ODFF (slave is not present).
WARNING
CRITICAL DATA LOSS
Only use communication ports for non-critical data transfers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
35012430 12/2018 47
ModiconM340
Performance
At a Glance
The tables that follow can be used to evaluate typical Modbus communication exchange times
according to different criteria.
The results displayed correspond to the average operation period for the READ_VAR function in
milliseconds.
Exchange time in ms (the Modbus slave is a BMX P34 1000 Cycle time in ms
cyclic)
Cyclic 10 50
Baud rate of communication in bits per second 4800 68 72 100
9600 35 40 50
19200 20 27 50
38400 13 20 50
The BMX P34 2000/2010/20102 processor exchange times are similar to the BMX P34 2020
processor. The BMX P34 1000 exchange times are 10% lower than ones.
NOTE: All exchange times listed above come from measures with an accuracy margin of +/-10 ms.
48 35012430 12/2018
ModiconM340
Exchange time in ms (the Modbus slave is a BMX P34 1000 Cycle time in ms
cyclic) Cyclic 10 50
Baud rate of communication in bits per second 4800 500 540 595
9600 280 288 300
19200 142 149 150
38400 76 80 100
The BMX P34 2000/2010/20102 processor exchange times are similar to the BMX P34 2020
processor. The BMX P34 1000 exchange times are 10% lower than ones.
NOTE: All exchange times listed above come from measures with an accuracy margin of +/-10 ms.
35012430 12/2018 49
ModiconM340
At a Glance
The following pages explain how to access the serial port configuration screen for the following
processors as well as the general elements of Modbus and Character Mode link configuration and
debug screens:
BMX P34 1000,
BMX P34 2000,
BMX P34 2010/20102,
BMX P34 2020.
Step Action
1 In the project browser, open the following directory:
Project\Configuration\0: PLC bus\0: BMX XBP ••••\0: BMX P34 ••••\SerialPort.
Result: The following screen appears:
50 35012430 12/2018
ModiconM340
Step Action
2 Double-click on the SerialPort sub-directory.
Result: The configuration screen appears:
35012430 12/2018 51
ModiconM340
Display the channel name and symbol defined by the user using the variables editor.
3 General This enables you to choose the general parameters associated with the channel:
parameters Function: The available functions are Modbus and Character Mode. The default
zone configuration is with the Modbus function.
Task: Defines the master task in which the implicit exchange objects of the channel
will be exchanged. This zone is grayed out and therefore not configurable.
4 Configuration In configuration mode, this zone is used to configure the channel parameters. In debug
or debugging mode, it is used to debug the communication channel.
zone
52 35012430 12/2018
ModiconM340
Section 4.2
Modbus Serial Communication Configuration
35012430 12/2018 53
ModiconM340
General
The following pages provide an introduction to the configuration screen for Modbus serial
communication.
54 35012430 12/2018
ModiconM340
Description
These zones are used to configure channel parameters. In online mode, these zones are
accessible. In offline mode, the zone is accessible but some parameters may not be accessible
and are grayed out.
The following table shows the different zones of the Modbus link configuration screen:
Element Comment
Application parameters (see page 56) These parameters are accessible via three zones:
Type,
Master,
Slave.
Signal and physical line parameters These parameters are accessible via three zones:
(see page 58) Physical line,
Signals,
RTS/CTS delay.
NOTE: When configuring Modbus Serial communication in master mode, the Slave zone is grayed
out and cannot be modified and conversely.
Default Values
The following table shows the default values for Modbus Serial communication parameters:
35012430 12/2018 55
ModiconM340
At a Glance
After configuring the communication channel, you need to enter the application parameters.
These parameters are accessible from three configuration zones:
The Type zone,
The Master zone,
The Slave zone.
This zone enables you to select the type of Modbus Serial to be used:
Master: When the station concerned is the master.
Slave: When the station concerned is a slave.
56 35012430 12/2018
ModiconM340
35012430 12/2018 57
ModiconM340
At a Glance
The signal and physical line parameters are accessible via three zones:
The Physical line zone,
The Signals zone,
The RTS/CTS delay zone.
In this zone, you can choose between two types of physical line for the serial port on the
BMX P34 1000/2000/2010/20102/2020 processors:
The RS232 line,
The RS485 line.
In this zone, you can select the signals supported by the RS232 physical line:
RX/TX
RX/TX + RTS/CTS DTE mode
RX/TX + RTS/CTS DCE mode
If the RS485 is configured, the entire zone will be grayed out and the default value is RX/TX.
58 35012430 12/2018
ModiconM340
RTS/CTS delay zone is available only when both RS232 and RX/TX+RTS/CTS check boxes are
selected. An RTS/CTS flow control algorithm is selected if the default value is 0 ms. A value
different from 0 enables an RTS/CTS modem control algorithm.
The RTS/CTS flow control algorithm (DTE <-> DTE) is different from the RTS/CTS modem control
algorithm (DTE <-> DCE) as follows:
The RTS/CTS flow control algorithm is related to the overflow reception buffer (full duplex).
The RTS/CTS modem control algorithm deals with the shared transmission process, e.g. a radio
modem.
35012430 12/2018 59
ModiconM340
At a Glance
The transmission parameters are accessible from five zones:
The Transmission speed zone,
The Delay between frames zone,
The Data zone,
The Stop zone,
The Parity zone.
You can use it to select the transmission speed of the Modbus Serial. The selected speed has to
be consistent with the other devices. The configurable values are 300, 600, 1200, 2400, 4800,
9600, 19200 and 38400 bits per second.
The Delay between frames is the minimum time separating two frames on reception. This delay is
managed when the PLC (master or slave) is receiving messages.
NOTE: The default value depends on the selected transmission speed.
NOTE: The delay between frames should be the Default value in order to be Modbus compliant.
In case a Slave is not conform, the value can be changed and should be identical for the Master
and all Slaves on the Bus.
60 35012430 12/2018
ModiconM340
This zone allows you to enter the type of coding used to communicate using Modbus Serial. This
field is set according to the other devices connected on the bus. There are two configurable modes:
RTU mode:
The characters are coded over 8 bits.
The end of the frame is detected when there is a silence of at least 3.5 characters.
The integrity of the frame is checked using a word known as the CRC checksum, which is
contained within the frame.
ASCII mode:
The characters are coded over 7 bits.
The beginning of the frame is detected when the ":" character is received.
The end of the frame is detected by a carriage return and a line feed.
The integrity of the frame is checked using a byte called the LRC checksum, which is
contained within the frame.
The Stop zone allows you to enter the number of stop bits used for communication. This field is set
according to the other devices. The configurable values are:
1 bit
2 bits
This zones enables you to determine whether a parity bit is added or not, as well as its type. This
field is set according to the other devices. The configurable values are:
Even
Odd
None
35012430 12/2018 61
ModiconM340
Section 4.3
Modbus Serial Communication Programming
62 35012430 12/2018
ModiconM340
Communication Functions
Three specific communication functions are defined for sending and receiving data via a Modbus
communication channel:
READ_VAR: To read variables
WRITE_VAR: To write variables
DATA_EXCH: To send Modbus requests to another device over the selected protocol
For detailed information on these communication functions, refer to the chapter General
Information on M340 Communication Functions (see EcoStruxure™ Control Expert,
Communication, Block Library).
Data Exchanges
Reading or writing of variables are carried out by addressing following requests to the targeted
slave device.
These requests use the READ_VAR, WRITE_VAR, and DATA_EXCH communication functions:
NOTE: WRITE_VAR can be used in broadcast mode (READ_VAR can't be used in broadcast mode).
In this case, the PLC doesn't receive a response. Sending a broadcast request resets the activity
bit and the code 16#01 (Exchange stop on timeout) is returned into the EF second management
word.
NOTE: The objects read by Modicon M340 PLC can be of the type %I and %IW.In this case,
READ_VAR function generates a Modbus request: FC 0x2 or 0x4. In a Quantum PLC, it allows
accessing the Input Status or Input Status Registers.
More generally, it is possible to send any Modbus requests to a slave device by using the
DATA_EXCH communication function.
35012430 12/2018 63
ModiconM340
Cancelling an Exchange
There are two ways of programming that enable an exchange executed by the communication
functions to be cancelled:
Using the CANCEL function
Using the communication function cancel bit
64 35012430 12/2018
ModiconM340
At a Glance
When used as a slave processor in a Modbus link, the following processors support several
services:
BMX P34 1000,
BMX P34 2000,
BMX P34 2010/20102,
BMX P34 2020.
Data Exchanges
A slave processor manages the following requests:
35012430 12/2018 65
ModiconM340
66 35012430 12/2018
ModiconM340
Section 4.4
Debugging Modbus Serial Communication
General
The Modbus serial communication debug screen can only be accessed in online mode.
Step Action
1 Access the configuration screen for Modbus serial communication. (see page 54)
2 Select the "Debug" tab on the screen that appears.
It indicates the type of Modbus function configured (in this case, Master).
35012430 12/2018 67
ModiconM340
Counter Operation
The Modbus serial communication debugging counters are:
Bus message counter: This counter indicates the number of messages that the processor has
detected on the serial link. Messages with a negative CRC check result are not counted.
Bus communication error counter: This counter indicates the number of negative CRC check
results counted by the processor. If a character error (overflow, parity error) is detected, or if the
message is less than 3 bytes long, the system that receives the data cannot perform the CRC
check. In such cases, the counter is incremented accordingly.
Slave exception error counter: This counter indicates the number of Modbus exception errors
detected by the processor.
Slave message counter: This counter indicates the number of messages received and
processed by the Modbus link.
Slave "no response" counter: This counter indicates the number of messages sent by the
remote system for which it has received no response (neither a normal response, nor an
exception response). It also counts the number of messages received in broadcast mode.
Negative slave acknowledgement counter: This counter indicates the number of messages sent
to the remote system for which it has returned a negative acknowledgement.
Slave busy counter: This counter indicates the number of messages sent to the remote system
for which it has returned a "slave busy" exception message.
Bus character overflow counter: This counter indicates the number of messages sent to the
processor that it is unable to acquire because of character overflow on the bus. Overflow is
caused by:
Character-type data that are transmitted on the serial port more quickly than they can be
stored,
A loss of data due to a hardware anomaly.
NOTE: For all counters, the count begins at the most recent restart, clear counters operation or
processor power-up.
68 35012430 12/2018
Modicon M340
ModiconM340
35012430 12/2018
Chapter 5
Character Mode Communication for Modicon M340 Processors
35012430 12/2018 69
ModiconM340
Section 5.1
Generalities
Generalities
70 35012430 12/2018
ModiconM340
Introduction
Communication in Character Mode enables dialog and communication functions to be carried out
with the following devices:
Regular peripherals (printer, keyboard-screen, workshop terminal, etc.),
Specialized peripherals (barcode readers, etc.),
Calculators (checking, production management, etc.),
Heterogeneous devices (numerical commands, variable speed controllers, etc),
External modem.
WARNING
CRITICAL DATA LOSS
Only use communication ports for non-critical data transfers.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
35012430 12/2018 71
ModiconM340
Performance
At a Glance
The following tables describe typical exchange times in the Character Mode.
The results displayed correspond to the average operation period for the PRINT_CHAR function in
milliseconds.
The BMX P34 2000/2010/20102 processor exchange times are similar to the BMX P34 2020
processor. The BMX P34 1000 exchange times are 10% lower.
NOTE: All exchange times listed above come from measures with an accuracy margin of +/-
10 ms.
72 35012430 12/2018
ModiconM340
Section 5.2
Character Mode Communication Configuration
35012430 12/2018 73
ModiconM340
General
The following pages provide an introduction to the configuration screen for Character Mode
communication.
Step Action
1 Open the Serial Port sub-directory in the project browser (see page 50).
2 On the screen that appears, select Character mode link in the Function box.
74 35012430 12/2018
ModiconM340
Description
These zones are used to configure channel parameters. In the online mode, these zones are
accessible. In the offline mode, these zone are accessible but some parameters may not be
accessible and are grayed out.
The following table shows the different zones of the Character Mode communication configuration
screen:
Element Comment
Message end detection parameters These parameters are accessible via two zones:
(see page 76) Stop on reception,
Stop on silence.
Signal and physical line parameters These parameters are accessible via three zones:
(see page 78) Physical line,
Signals,
RTS/CTS delay.
Transmission parameters (see page 80) These parameters are accessible via four zones:
Transmission speed,
Data,
Stop bits,
Parity.
Default Values
The following table shows the default values for Character Mode communication parameters:
35012430 12/2018 75
ModiconM340
At a Glance
The message end detection parameters are accessible via two zones:
The Stop on reception Zone: stop on reception of a special character.
The Stop on silence Zone: stop on silence.
Conditions of Use
Selecting Stop on silence means that Stop on reception is deselected and vice versa.
NOTE:
To configure a channel in character mode without stop parameters, uncheck Stop check boxes for
the following configuration zones:
Stop on reception → Character 1
Stop on reception → Character 2
Stop on silence
Character included: enables you to include the end-of-message character in the reception table
of the PLC application.
It is possible to configure two end-of-reception characters. In the above window, the end of
reception of a message is detected by a line feed or carriage return character.
76 35012430 12/2018
ModiconM340
This zone enables you to detect the end of a message on reception by the absence of message
end characters over a given time.
Stop on silence is validated by checking the Stop box. The duration of the silence (expressed in
milliseconds) is set using the data entry field.
The minimal value of this duration is the time corresponding to the transmission of 1.5 characters.
Expressed in number of bits, and depending on the configuration of start and stop bits, the minimal
silence duration is as follows:
Convert the number in right column in time according to the configured speed transmission.
NOTE: The available values range from 1 ms to 10000 ms and depend on the transmission speed
selected.
35012430 12/2018 77
ModiconM340
At a Glance
The signal and physical line parameters are accessible via three zones:
The Physical line zone
The Signals zone
The RTS/CTS delay zone
In this zone, you can choose between two types of physical line for the serial port on the
BMX P34 1000/2000/2010/20102/2020 processors:
The RS232 line
The RS485 line
In this zone, you can select the signals supported by the RS232 physical line:
RX/TX
RX/TX + RTS/CTS DTE mode
If the RS485 is configured, the entire zone is grayed out and the default value is RX/TX.
NOTE: Only RX/TX and RX/TX + RTS/CTS DTE mode signals are available when configuring the
serial port in Character mode.
78 35012430 12/2018
ModiconM340
RTS/CTS delay zone is available only when both RS232 and RX/TX+RTS/CTS DTE mode check
boxes are selected.
An RTS/CTS flow control algorithm is selected: before a character string is transmitted, the system
waits for the CTS (Clear To Send) signal to be activated. This zone enables you to enter the
maximum waiting time between the two signals. When this value is timed out, the request is not
transmitted on the bus. Configurable values range from 0 s to 10 s.
NOTE: The default value is 0 ms.
NOTE: A value of 0 s indicates that the delay between the two signals has not been managed.
35012430 12/2018 79
ModiconM340
At a Glance
The transmission parameters are accessible via four zones:
The Transmission speed zone,
The Data zone,
The Stop zone,
The Parity zone.
You can use this zone to select the transmission speed of the Character Mode protocol. The
selected speed has to be consistent with the other devices. The configurable values are 300, 600,
1200, 2400, 4800, 9600, 19200, and 38400 bits per second.
In this zone, you can specify the size of the data being exchanged on the link. The available values
are:
7 bits
8 bits
You are advised to adjust the number of data bits according to the remote device being used.
80 35012430 12/2018
ModiconM340
The Stop zone allows you to enter the number of stop bits used for communication. You are
advised to adjust the number of stop bits according to the remote device being used.
The configurable values are:
1 bit
2 bits
This zone enables you to determine whether a parity bit is added or not, as well as its type. You
are advised to adjust parity according to the remote device being used. The configurable values
are:
Even
Odd
None
35012430 12/2018 81
ModiconM340
Section 5.3
Character Mode Communication Programming
Available Functions
Three specific communication functions are defined for sending and receiving data via a
communication channel in Character Mode:
PRINT_CHAR: send a character string of a maximum of 1,024 bytes.
INPUT_CHAR: read a character string of a maximum of 1,024 bytes.
INPUT_BYTE: read a byte array of a maximum of 1,024 bytes.
x 1024
...
Writing pointer
Reading pointer
82 35012430 12/2018
ModiconM340
The received data are stored in a 1024 bits cyclic buffer. Once the buffer has been fully filled, the
1025th bit received overwrites the 1st bit and so on. Each buffer bit read through the INPUT_CHAR
function is reset.
The CPU save the ECHO of the transmitted data into the same buffer as the received data.
Therefore it is mandatory to clear the buffer of the CPU after each PRINT_CHAR or before
someone send data to the channel. Else the received data from an INPUT_CHAR or INPUT_BYTE
will not be the expected one.
To clear the CPU buffer you can set to 1 the input parameter RAZ of the reading function and cancel
this reading function before the timeout. The buffer is first reset then the processor is waiting for
the reception of data.
NOTE: Using this feature is advised in order to start properly a reception by removing old data that
can remain in the buffer.
Cancelling an Exchange
There are two ways of programming that enable an exchange executed by the communication
functions to be cancelled:
Using the CANCEL function
Using the communication function cancel bit
35012430 12/2018 83
ModiconM340
Section 5.4
Debugging Character Mode communication
General
The Character Mode debug screen is accessible in online mode.
Step Action
1 Access the configuration screen for Character Mode communication. (see page 74)
2 Select the "Debug" tab on the screen that appears.
This zone indicates the number of communication interruptions counted by the processor:
On transmission: corresponds to the number of interruptions on transmission
(image of %MW4 word).
On reception: corresponds to the number of interruptions on reception (image of %MW5 word).
84 35012430 12/2018
ModiconM340
35012430 12/2018 85
ModiconM340
86 35012430 12/2018
Modicon M340
Language Objects of Communications
35012430 12/2018
Chapter 6
Language Objects of Modbus and Character Mode Communications
35012430 12/2018 87
Language Objects of Communications
Section 6.1
Language Objects and IODDTs of Modbus and Character Mode Communications
88 35012430 12/2018
Language Objects of Communications
General
The IODDTs are predefined by the manufacturer. They contain input/output language objects
belonging to the channel of an application-specific module.
Modbus and Character Mode communications have three associated IODDTs:
T_COM_STS_GEN, which applies to communication protocols except Fipio and Ethernet.
T_COM_MB_BMX, which is specific to Modbus communication.
T_COM_CHAR_BMX, which is specific to Character Mode communication.
NOTE: IODDT variables can be created in two different ways:
Using the I/O objects tab (see EcoStruxure™ Control Expert, Operating Modes).
Using the Data Editor (see EcoStruxure™ Control Expert, Operating Modes).
35012430 12/2018 89
Language Objects of Communications
At a Glance
Use of an integrated, application-specific interface or the addition of a module automatically
enhances the language objects application used to program this interface or module.
These objects correspond to the input/output images and software data of the module or integrated
application-specific interface.
Reminders
The module inputs (%I and %IW) are updated in the PLC memory at the start of the task, or when
the PLC is in RUN or STOP mode.
The outputs (%Q and %QW) are updated at the end of the task, only when the PLC is in RUN mode.
NOTE: When the task is in STOP mode, either of the following are possible, depending on the
configuration selected:
Outputs are set to fallback position (fallback mode).
Illustration
The diagram below shows the operating cycle of a PLC task (cyclical execution):
90 35012430 12/2018
Language Objects of Communications
At a Glance
Explicit exchanges are exchanges performed at the user program's request, using the following
instructions:
READ_STS (see EcoStruxure™ Control Expert, I/O Management, Block Library): read status
words
WRITE_CMD (see EcoStruxure™ Control Expert, I/O Management, Block Library): write
command words
These exchanges apply to a set of %MW objects of the same type (status, commands or parameters)
belonging to a channel.
NOTE: These objects provide information about the processor or the module, can be used to
command them (e.g.: switch command) and to define their operating modes (save and restore
adjustment parameters in application).
NOTE: The READ_STS and WRITE_CMD instructions are executed at the same time as the task
that calls them and always correctly. The result of these instructions is available immediately after
their execution.
35012430 12/2018 91
Language Objects of Communications
Managing Exchanges
During an explicit exchange, it is necessary to check its performance in order that data is only taken
into account when the exchange has been correctly executed.
To this end, two types of information are available:
Information concerning the exchange in progress (see EcoStruxure™ Control Expert, I/O
Management, Block Library).
The exchange report (see EcoStruxure™ Control Expert, I/O Management, Block Library).
NOTE: In order to avoid several simultaneous explicit exchanges for the same channel, it is
necessary to test the value of the word EXCH_STS (%MWr.m.c.0) of the IODDT associated to the
channel before to call any EF using this channel.
92 35012430 12/2018
Language Objects of Communications
At a Glance
When data is exchanged between the PLC memory and the module, the module may require
several task cycles to acknowledge this information.
All IODDTs use two words to manage exchanges:
EXCH_STS (%MWr.m.c.0) : exchange in progress.
EXCH_RPT (%MWr.m.c.1) : report.
NOTE:
Depending on the localization of the module, the management of the explicit exchanges
(%MW0.0.MOD.0.0 for example) will not be detected by the application:
for in-rack modules, explicit exchanges are done immediately on the local PLC Bus and are
finished before the end of the execution task, so the READ_STS, for example, is always finished
when the %MW0.0.mod.0.0 bit is checked by the application.
for remote bus (Fipio for example), explicit exchanges are not synchronous with the execution
task, so the detection is possible by the application.
Illustration
The illustration below shows the different significant bits for managing exchanges:
35012430 12/2018 93
Language Objects of Communications
NOTE: If the module is not present or is disconnected, exchanges using explicit objects
(READ_STS, for example) are not sent to the processor (STS_IN_PROG (%MWr.m.c.0.0) = 0), but
the words are refreshed.
94 35012430 12/2018
Language Objects of Communications
35012430 12/2018 95
Language Objects of Communications
Section 6.2
General Language Objects and IODDTs for Communication Protocols
96 35012430 12/2018
Language Objects of Communications
At a Glance
The following table presents the IODDT implicit exchange objects of type T_COM_STS_GEN
applicable to all communication protocols except Fipio.
Error bit
The table below presents the meaning of the CH_ERROR error bit (%Ir.m.c.ERR):
35012430 12/2018 97
Language Objects of Communications
At a Glance
This section presents the T_COM_STS_GEN type IODDT explicit exchange objects applicable to all
communication protocols except Fipio and ethernet. It includes the word type objects whose bits
have a specific meaning. These objects are described in detail below.
In this part, the IODDT_VAR1 variable is of type T_COM_STS_GEN.
Observations
In general, the meaning of the bits is given for bit status 1. In specific cases, each bit status is
explained.
Not all bits are used.
98 35012430 12/2018
Language Objects of Communications
35012430 12/2018 99
Language Objects of Communications
Section 6.3
Language Objects and IODDTs Associated with Modbus Communication
At a Glance
The table below shows the language objects for Modbus communications in master or slave mode.
These objects are not integrated into the IODDTs.
At a Glance
The tables below show the implicit exchange objects of the IODDTs of types T_COM_MB_BMX and
T_COM_MB_BMX_CONF_EXT that are applicable to Modbus serial communications. They differ in
terms of configuration objects availability (see page 105).
CH_ERROR bit
The following table shows the meaning of the error bit CH_ERROR (%Ir.m.c.ERR):
NOTE: %IWr.m.c.0.2 is at 1 when the voltage on CTS signal is positive. It is also applicable to
DCD and DSR.
At a Glance
This part presents the explicit exchange objects of the IODDTs of types T_COM_MB_BMX and
T_COM_MB_BMX_CONF_EXT that are applicable to Modbus serial and differ in terms of
configuration objects availability (see page 105). It includes the word type objects whose bits have
a specific meaning. These objects are described in detail below.
In this part, the IODDT_VAR1 variable is of the T_COM_STS_GEN type.
Observations
In general, the meaning of the bits is given for bit status 1. In specific cases, each bit status is
explained.
Not all bits are used.
At a Glance
The following tables present all configuration language objects for communication Modbus mode.
These objects are not integrated in the IODDTs, and may be displayed by the application program.
%KWr.m.c.1 INT R The byte 0 of this word corresponds to the transmission speed. This byte
can take several values:
Value -2 (0xFE) corresponds to 300 bits/s
Value -1 (0xFF) corresponds to 600 bits/s
Value 0 (0x00) corresponds to 1200 bits/s
Value 1 (0x01) corresponds to 2400 bits/s
Value 2 (0x02) corresponds to 4800 bits/s
Value 3 (0x03) corresponds to 9600 bits/s
Value 4 (0x04) corresponds to 19200 bits/s (default value)
Value 5 (0x05) corresponds to 38400 bits/s
Value 6 (0x06) corresponds to 57600 bits/s (applicable to
BMX NOM 0200 module only)
Value 7 (0x07) corresponds to 115200 bits/s (applicable to
BMX NOM 0200 module only)
The byte 1 of this word corresponds to the format:
Bit 8: number of bits (1 = 8 bits (RTU), 0 = 7 bits (ASCII))
bit 9 = 1: parity management (1 = with, 0 = without)
Bit 10: parity Type (1 = odd, 0 = even)
Bit 11: number of stop bits (1 = 1 bit, 0 = 2 bits)
Bit 13: physical line (1 = RS232, 0 = RS485)
Bit 14: DTR/DSR/DCD modem signals (applicable to
BMX NOM 0200 module only and for RS232 physical line only). If this
bit is set to 1, modem signals are managed.
Bit 15 : RTS/CTS hardware flow management signals. If RS232 is
selected this bit can take 2 different values: 0 for RX/TX and 1 for
RX/TX + RTS/CTS. If RS485 is selected the default value is 0 and
corresponds to RX/TX.
%KWr.m.c.2 INT R Delay between frames (in RTU mode only): value in ms from 2 to
10000 ms (depends on the transmission speed and format selected). Its
default value is 2 ms if the default box is checked. 10 s corresponds to
infinite wait.
Section 6.4
Language Objects and IODDTs associated with Character Mode Communication
At a Glance
The following tables show all configuration language objects for communication in Character
Mode. These objects are not integrated into the IODDTs.
At a Glance
The tables below show the implicit exchange objects of the IODDT of the T_COM_CHAR_BMX type
that are applicable to Character Mode communication.
Error bit
The following table shows the meaning of the error bit CH_ERROR (%Ir.m.c.ERR):
NOTE: %IWr.m.c.0.2 is at 1 when the voltage on the CTS signal is positive. It is also applicable
to DCD and DSR.
At a Glance
This part presents the explicit exchange objects of the IODDT of the T_COM_CHAR_BMX type that
are applicable to Character Mode communication. It includes the word type objects whose bits
have a specific meaning. These objects are described in detail below.
In this part, the IODDT_VAR1 variable is of the T_COM_STS_GEN type.
Observations
In general, the meaning of the bits is given for bit status 1. In specific cases, each bit status is
explained.
Not all bits are used.
At a Glance
The following tables present all configuration language objects for communication Character
mode. These objects are not integrated in the IODDTs, and may be displayed by the application
program.
Section 6.5
The IODDT Type T_GEN_MOD Applicable to All Modules
Introduction
The Modicon X80 modules have an associated IODDT of type T_GEN_MOD.
Observations
In general, the meaning of the bits is given for bit status 1. In specific cases an explanation is given
for each status of the bit.
Some bits are not used.
List of Objects
The table below presents the objects of the IODDT.
Chapter 7
Dynamic Protocol Switching
General
This part describes how to change the protocol used by a CPU serial communication using the
WRITE_CMD(IODDT_VAR1) command. This command can be used to switch between the
following three protocols:
Modbus Slave
Modbus Master
Character Mode
Uses
Three protocol changes are used:
Transfer to Modbus Master: The protocol change is a two-stage process:
Transfer from the Modbus Slave configuration to the Modbus Master configuration
Return to the initial Modbus Slave configuration
The aim of Modbus Master configuration is to send information about an event to another PLC.
When a change is made from Modbus Slave configuration to Modbus Master configuration,
transmission, signal and physical line parameters remain the same. Only the values of the
following parameters specific to Modbus Master configuration are changed:
The Delay Between Frames is set to its default value, which depends on transmission speed.
Answer delay is set to 3,000 ms
Number of retries set to 3
The aim of Character Mode configuration is to communicate with a private protocol (a modem,
for instance). When a change is made from Modbus Slave configuration to Character Mode
configuration, transmission, signal and physical line parameters remain the same. Only the
message end parameter specific to Character Mode is set to stop on silence with a timeout of
1000 ms.
Transfer to the Character Mode and Modbus Master protocols: This protocol change is a three-
stage process:
Transfer from Modbus Slave configuration to Character Mode configuration.
Part III
Quick Start : Example of Serial Link Implementation
Overview
This part presents an example of serial link implementation.
Chapter 8
Description of the Application
At a Glance
The application described in this document is a Modbus communication application via modems.
Example Illustration
The figure below illustrates the example:
Modem Supervisor
Modem Modem
Run ERR DL
com0
com1
PLC X PLC Y
The devices communicate with each other using modems. The supervisor is Modbus master
whereas the X and Y PLCs are slaves.
The goal of the example is to write the data area values of PLC X to PLC Y.
To do this, the PLC X must become Modbus Master.
Each day, the supervisor communicates with the PLCs to recover information.
If an alarm is raised on the PLC X, it switches in Modbus Master mode and sends data to PLC Y.
To simplify programming, the modems have been initialized with the correct parameters via a
programming terminal. These parameters are stored in non-volatile memory by the AT&W
commands.
Operating Mode
The operating of the application is as follow:
Step Action
1 The PLC X port is switched to Character mode.
2 The PLC X sends a dial message to the modem.
3 The PLC X port is switched to Master Modbus mode.
4 The Master PLC (X) sends data to the Slave PLC (Y).
5 The port is switched to character mode.
6 The PLC X sends a disconnection message to the modem.
7 The PLC X port is switched to Slave Modbus mode.
Chapter 9
Installing the Application Using Control Expert
Section 9.1
Presentation of the Solution Used
At a Glance
The following logic diagram shows the different steps to follow to create the application. A
chronological order must be respected in order to correctly define all of the application elements.
Description
Description of the different types:
Section 9.2
Developing the Application
At a Glance
In order to proceed to the development of the example, a main project associated with the PLC X
must be created for configuring the PLC X as well as declaring all needed variables and
programming the application. In addition, a separate project must be created for the configuration
of PLC Y.
Step Action
1 Launch the Control Expert software,
2 Click on File then New to select a BMX P34 20102 processor:
New Project x
Project Settings
Settings File: <cdefault settings>
Step Action
1 In the Project Browser double-click on Configuration then on 0:PLC Bus and on
0:BMX XBP ••• (Where 0 is the rack number),
2 In the PLC Bus window, select a slot (for example slot 1) and double-click on it,
3 Choose the BMX DDI 1602 discrete input module located in the Discrete modules list,
New Device x
Step Action
1 In the Project Browser double-click on Configuration then on 0:PLC Bus and
on 0:BMX XBP ••• (Where 0 is the rack number),
2 In the PLC Bus window, select a slot (for example slot 1) and double-click on it,
3 Choose the BMX NOM 0200 communication module located in the Communication
modules list,
New Device x
OK
Topological Address: 0.1
Cancel
Step Action
1 In the Project Browser double-click on Configuration then on 0:BMX XBP 0800 then on
0:BMX P34 20102. Then double click on Serial Port to access to the 0.0:Serial Port window.
Step Action
1 In the Project Browser double-click on Configuration then on 0:BMX XBP 0800 then on
0:BMX NOM 0200 to access to the 0.x:BMX NOM 0200 window (where x is the slot number, for
example x=1).
0.1 : BMX NOM 0200
Bus Module 2 RS485/232 port
Default 4 ms
Character 1
Number of retry Data Stop
0
ASCII 1 bits
Answer delay 1 x 10ms RTU(8bit) 2 bits
Parity
Slave
Even Odd None
Slave number 2 External
RTC/CTS delay
1 X 100ms
Step Action
9 Select RTU (8bits) for data type.
10 Close the window and confirm with OK.
Declaration of Variables
At a Glance
All of the variables used in the different sections of the program must be declared.
Undeclared variables cannot be used in the program.
NOTE: For more information, refer to chapter Data Editor (see EcoStruxure™ Control Expert,
Operating Modes).
Step Action
1 In Project Browser / Variables & FB instances, double-click on
Elementary Variables
2 In the Data Editor window, select the box in the Name column and enter a
name for your first variable.
3 Now select a Type for this variable.
4 When all your variables are declared, you can close the window.
The following screen shows the application variables created using the data editor:
Operator screens
Controlled screen
Last opened screen
Step Action
1 In the ProjectBbrowser, click on Variables & FB instances.
2 Click in the Name column and enter a name for the variable.
3
Double-click in the Type column and then click on the button.
The Variable Type Selection window opens:
4 Choose the desired variable type (for example, click on <EDT> and select INT), then click into the Array
checkbox.
Using a Modem
Description
It is necessary to know three commands to interface telephonic modems to PLCs. These
commands are the following:
initialize modem,
renumerate,
disconnect modem.
It is imperative to send an initialization message followed by a dial message to the modem before
sending it an ASCII or Modbus message.
When the connection is successful between the two modems, you may send an unlimited number
of ASCII or Modbus messages.
When all the messages have been sent, you must send the disconnection string to the modem.
Procedure to Follow
The array below shows the procedure for programming the application.
3 Reseting the Switch to Character mode using the WRITE_CMD (see page 138)
communication port. command.
For a modem transmission, send the escape character, then send
the disconnect command to send a disconnection message to the
modem (see page 137) by using the PRINT_CHAR block.
Return to the starting mode of the serial port (Slave Modbus) using
the WRITE_CMD (see page 138) command.
Programming Structure
Steps Comments
70 Send an escape sequence to the modem using the PRINT_CHAR block. Modem
Go to step 75.
75 If the result of PRINT_CHAR is conclusive then go to step 80 otherwise set Error at 75
and go to step 130.
80 Waiting for the response of the modem via the INPUT_CHAR block. Once the response
string is fully received, go to step 85.
85 If the result of INPUT_CHAR is conclusive then go to step 90 otherwise set Error to 85
and go to step 130.
90 If the modem responds as expected then go to step 95 otherwise set Error to 90 and
go to step 130.
95 Send a disconnection command to the modem using the PRINT_CHAR block.
Go to step 100.
100 If the result of PRINT_CHAR is conclusive then go to step 105 otherwise set Error to
100 and go to step 130.
105 Waiting for the response of the modem via the INPUT_CHAR block. Once the response
string is fully received, go to step 110.
110 If the result of INPUT_CHAR is conclusive then go to step 115 otherwise set Error to
110 and go to step 130.
115 If the modem responds as expected then go to step 120 otherwise set Error to 115 and
go to step 130.
Programming
Programming in ST Language.
The example is programmed in ST language. The dedicated section is under the same master task
(MAST).
CASE Function_Step OF
0: (* Initialization *)
IF (Start) THEN (* trigger flag *)
Error := 0;
Function_Step := 5; (* next step *)
END_IF;
5: (* Send command to switch serial port from Slave Modbus mode to Character mode *)
READ_STS(Serial_port); (* read serial port status *)
IF (Serial_port.EXCH_STS = 0) THEN (* no active command *)
Serial_port.CONTROL := 16#00; (* reset control word *)
(* set TO_CHAR_MODE command bit *)
SET(Serial_port.TO_CHAR_MODE);
WRITE_CMD (Serial_port); (* send command *)
Test_inc := 0; (* initialize retry counter *)
Function_Step := 10; (* next step *)
END_IF;
10: (* Test result of switch command to Character mode*)
READ_STS(Serial_port); (* read serial port status *)
IF (Serial_port.EXCH_STS = 0) THEN (* command completed *)
(* reset TO_CHAR_MODE command bit *)
RESET(Serial_port.TO_CHAR_MODE);
IF (Serial_port.EXCH_RPT = 0) THEN (* no error *)
IF (AND(Serial_port.PROTOCOL, 16#0F) = 03)
THEN (* Character mode OK *)
Function_Step := 15; (* next step *)
ELSE
Test_inc := Test_inc + 1;
IF (Test_inc > 1000) THEN
Error := 10; (* error *)
Function_Step := 130; (* next step = end *)
END_IF;
END_IF;
ELSE (* error in sending command to port *)
Error := 10; (* error *)
Function_Step := 130;
END_IF;
END_IF;
40: (* Send command to switch serial port from character mode to Modbus Master *)
READ_STS(Serial_port); (* read serial port status *)
IF (Serial_port.EXCH_STS = 0) THEN (* no active command *)
Serial_port.CONTROL := 16#00; (* reset control word *)
(* set TO_MODBUS_MASTER command bit *)
SET(Serial_port.TO_MODBUS_MASTER);
WRITE_CMD (Serial_port); (* send command *)
Test_inc := 0; (* initialize retry counter *)
Function_Step := 45; (* next step *)
END_IF;
ELSE
Error := 55; (* error *)
Function_Step := 130; (* next step = end *)
END_IF;
END_IF;
60: (* Send command to switch serial port from Modbus to character mode *)
READ_STS(Serial_port); (* read serial port status *)
IF (Serial_port.EXCH_STS = 0) THEN (* no active command *)
Serial_port.CONTROL := 16#00; (* reset control word *)
(* set TO_CHAR_MODE command bit *)
SET(Serial_port.TO_CHAR_MODE);
WRITE_CMD (Serial_port); (* send command *)
Test_inc := 0; (* initialize retry counter *)
Function_Step := 65; (* next step *)
END_IF;
ELSE
(* End on error *)
Error := 85;
Function_Step := 130;
END_IF;
END_IF;
90: (* Test Modem reply *)
IF (AnsString2 = '$NOK') THEN
Function_Step := 95; (* success : next step *)
ELSE
Error := 90; (* error *)
Function_Step := 130; (* next step = end *)
END_IF;
95: (* Hangup modem: step 2 *)
ReqString := 'ATH0$N'; (* hangup message *)
MngtPrint[3] := 3; (* exchange size in byte *)
PRINT_CHAR(ADDM(Adr_Char), ReqString, MngtPrint);
Function_Step := 100; (* next step *)
100: (* Test PRINT_CHAR function result *)
IF (NOT MngtPrint[0].0) THEN
IF (MngtPrint[1] = 0) THEN
(* Success : next step *)
Function_Step := 105;
ELSE
(* End on error *)
Error := 100;
Function_Step := 130;
END_IF;
END_IF;
105:
MngtInput[2] := 50; (* timeout *)
INPUT_CHAR(ADDM(Adr_Char), 1, nb_charac_to_receive_ok, MngtInput, AnsString3); (*Wait
modem reply*)
Function_Step := 110; (*next step*)
Chapter 10
Starting the Application
At a Glance
In this example, standard mode working requires the use of two PLCs, a discrete input module, a
BMX NOM 0200 module, and 2 SR2MOD01 modems.
In this example, the first modem is connected to the processor serial port of the first slave PLC.
The actuator state controls the Start variable state in the application.
COM0
COM1
Modem
Phone Line
In this example, the second modem is connected to the channel 0 of the BMX NOM 0200 module
of the second slave PLC.
For a better communication reliability, the cable TCS XCN 3M4F3S4 is used for DTR/DSR/DCD
modem signals handling by the application.
Step Action
1 In the PLC menu, click on Standard Mode,
2 In the Build menu, click on Rebuild All Project. Your project is generated and is ready
to be transferred to the PLC.
3 In the PLC menu, click on Connect. You are now connected to the PLC.
4 In the PLC menu, click on Transfer Project to PLC. The Transfer Project to PLC
window opens. Click on Transfer. The application is transferred to the PLC.
5 Connect the second slave PLC to a SR2MOD01 modem.
Step Action
1 In the PLC menu, click on Standard Mode,
2 In the Build menu, click on Rebuild All Project. Your project is generated and is ready
to be transferred to the PLC. When you generate the project, you will see a results window. If
there is an error in the program, Control Expert indicates its location (click on the highlighted
sequence).
3 In the PLC menu, click on Connect. You are now connected to the PLC.
4 In the PLC menu, click on Transfer Project to PLC. The Transfer Project to PLC
window opens. Click on Transfer. The application is transferred to the PLC.
Step Action
1 In the PLC, click on Run. The Run window opens. Click on OK. The application is now being
executed on the PLC.
2 Disconnect the PC which is running Control Expert software from the first slave PLC.
3 Connect the first slave PLC to a SR2MOD01 modem.
Glossary
!
%I
According to the CEI standard, %I indicates a language object of type discrete IN.
%IW
According to the CEI standard, %IW indicates a language object of type analog IN.
%KW
According to the CEI standard, %KW indicates a language object of type constant word.
%M
According to the CEI standard, %M indicates a language object of type memory bit.
%MW
According to the CEI standard, %MW indicates a language object of type memory word.
%Q
According to the CEI standard, %Q indicates a language object of type discrete OUT.
%QW
According to the CEI standard, %QW indicates a language object of type analog OUT.
A
Address
On a network, the identification of a station. In a frame, a grouping of bits that identifies the frame's
source or destination.
Altivar
AC variable speed drive.
ARRAY
An ARRAY is a table containing elements of a single type.The syntax is as follows: ARRAY
[<limits>] OF <Type>Example:ARRAY [1..2] OF BOOL is a one-dimensional table with two
elements of type BOOL.ARRAY [1..10, 1..20] OF INT is a two-dimensional table with 10x20
elements of type INT.
ASCII
ASCII is the abbreviation of American Standard Code for Information Interchange.This is an
American code (but which has become an international standard) that uses 7 bits to define every
alphanumerical character used in English, punctuation symbols, certain graphic characters and
other miscellaneous commands.
B
BOOL
BOOL is the abbreviation for the Boolean type. This is the basic data type in computing. A BOOL
variable can have either of the following two values: 0 (FALSE) or 1 (TRUE). A bit extracted from
a word is of type BOOL, for example: %MW10.4.
Broadcast
Broadcast communications send packets from one station to every network destinations.
Broadcast messages pertain to every network devices or only one device for which the address is
not known.
BYTE
When 8 bits are grouped together, they are called a BYTE. You can enter a BYTE either in binary
mode or in base 8. The BYTE type is encoded in an 8 bit format which, in hexadecimal format,
ranges from 16#00 to 16#FF.
C
Configuration
The configuration gathers the data which characterizes the machine (invariant) and which is
necessary for the module to operate. All this information is stored in the constant PLC %KW zone.
The PLC application cannot modify them.
Control Expert
Schneider Automation PLC programming software.
CPU
CPU is the abbreviation of Central Processing Unit: generic name used for Schneider Electric
processors.
CRC
CRC is the abbreviation of Cyclic Redundancy Checksum: it indicates whether no character has
been "deformed" during frame transmission.
D
DFB
DFB is the abbreviation of Derived Function Block. DFB types are function blocks that can be
defined by the user in ST (Structured Text), IL (Instruction List), LD (Ladder Diagram) or FBD
(Function Block Diagram) language. Using these DFB types in an application makes it possible to:
simplify the design and entry of the program;
make the program easier to read;
make it easier to debug;
reduce the amount of code generated.
DINT
DINT is the abbreviation of Double INTeger (encoded in 32 bits). The upper/lower limits are as
follows: -(2 to the power of 31) to (2 to the power of 31) - 1.Example:-2147483648, 2147483647,
16#FFFFFFFF.
Discrete Module
Module with discrete inputs/outputs.
E
EBOOL
EBOOL is the abbreviation of Extended BOOLean. An EBOOL type has a value (0 (FALSE) or 1
(TRUE), but also rising or falling edges and forcing functions. An EBOOL variable occupies one
byte in memory. The byte contains the following information:
one bit for the value;
one bit for the history (whenever the object changes state, the value is copied to the history bit);
one bit for forcing (equal to 0 if the object is not forced, or 1 if the bit is forced).
The default value of each bit is 0 (FALSE).
EF
EF is the abbreviation of Elementary Function. This is a block used in a program which performs
a predefined logical function. A function does not have any information on the internal state.
Several calls to the same function using the same input parameters always return the same output
values. You will find information on the graphic form of the function call in the "[functional block
(instance)]". Unlike a call to a function block, function calls include only an output which is not
named and whose name is identical to that of the function. In FBD, each call is indicated by a
unique [number] via the graphic block. This number is managed automatically and cannot be
modified. You position and configure these functions in your program in order to execute your
application. You can also develop other functions using the SDKC development kit.
F
FBD
FBD is the abbreviation of Function Block Diagram. FBD is a graphical programming language that
works like a flowchart. By adding simple logical blocks (AND, OR, etc.), each function or function
block in the program is represented in this graphical format. For each block, the inputs are on the
left and the outputs on the right. Block outputs can be linked to inputs of other blocks in order to
create complex expressions.
Fipio
Field bus used to connect sensor or actuator type devices.
FLASH memory
FLASH memory is nonvolatile memory that can be overwritten. It is stored on a special EEPROM
that can be erased and reprogrammed.
Frame
A frame is a group of bits that form a discrete block of information. Frames contain network control
information or data. The size and composition of a frame is determined by the network technology
being used.
Full duplex
A method of data transmission capable of transmitting and receiving over the same channel
simultaneously.
H
Half duplex
A method of data transmission capable of communication in either of two directions, but in only one
direction at a time.
Hub
A hub device connects a series of flexible and centralized modules to create a network.
I
INT
INT is the abbreviation of single INTeger (encoded in 16 bits). The upper/lower limits are as follows:
-(2 to the power of 15) to (2 to the power of 15) - 1. Example:-32768, 32767,
2#1111110001001001, 16#9FA4.
IODDT
IODDT is the abbreviation of Input/Output Derived Data Type. The term IODDT indicates a
structured data type representing a module or a channel of a PLC module. Each expert module
has its own IODDTs.
L
LED
LED is the abbreviation of Light emitting diode. An indicator that lights up when electricity passes
through it. It indicates the operation status of a communication module.
LRC
LRC is the abbreviation of Longitudinal redundancy check: it has been devised to address the low
probability of error detection of parity checking.
M
Master task
Main program task. It is obligatory and is used to carry out sequential processing of the PLC.
Momentum
I/O modules using several open standard communication networks.
N
Network
There are two meanings of the word "network".
In LD (Ladder Diagram): a network is a set of interconnected graphic elements. The scope of a
network is local, concerning the organizational unit (section) of the program containing the
network.
With expert communication modules: a network is a set of stations that intercommunicate. The
term "network" is also used to define a group interconnected graphic elements. This group then
makes up part of a program that may comprise a group of networks.
P
PLC
PLC is the abbreviation of Programmable logic controller. The PLC is the brain of an industrial
manufacturing process. It automates a process as opposed to relay control systems. PLCs are
computers suited to survive the harsh conditions of the industrial environment.
Protocol
Describes message formats and a set of rules used by two or more devices to communicate using
those formats.
R
RS232
Serial communication standard which defines the voltage of the following service:
a signal of +12 V indicates a logical 0,
a signal of -12 V indicates a logical 1.
There is, however, in the case of any attenuation of the signal, detection provided up to the limits
-3 V and +3 V. Between these two limits, the signal will be considered as invalid.RS232
connections are quite sensitive to interferance. The standard specifies not to exceed a distance of
15 m or a maximum of 9600 bauds (bits/s).
RS485
Serial connection standard that operates in 10 V/+5 V differential. It uses two wires for
send/receive. Their "3 states" outputs enable them to switch to listen mode when the transmission
is terminated.
RTU
RTU is the abbreviation of Remote Terminal Unit. In RTU mode, data is sent as two four-bit,
hexadecimal characters, providing for higher throughput than in ASCII mode for the same
baudrate. Modbus RTU is a binary protocol and more time delay critical than the ASCII protocol.
S
Section
Program module belonging to a task which can be written in the language chosen by the
programmer (FBD, LD, ST, IL, or SFC). A task can be composed of several sections, the order of
execution of the sections corresponding to the order in which they are created. This order is
modifiable.
SEPAM
Digital protection relay for protection, control and monitoring of power systems.
Socket
The association of a port with an IP address, serving as an identification of sender or recipient.
ST
ST is the abbreviation of Structured Text.The structured literal language is a developed language
similar to computer programming languages. It can be used to organize a series of instructions.
STRING
A STRING variable is a series of ASCII characters. The maximum length of a string is 65,534
characters.
T
TAP
TAP is the abbreviation of Transmission Access Point: the bus connection unit.
Task
A group of sections and subroutines, executed cyclically or periodically for the MAST task, or
periodically for the FAST task. A task possesses a level of priority and is linked to inputs and
outputs of the PLC. These I/O are refreshed in consequence.
V
Variable
Memory entity of type BOOL, WORD, DWORD, etc., whose contents can be modified by the
program currently running.
W
WORD
The type WORD is encoded in a 16 bit format and is used to perform processing on series of bits.
This table shows the upper/lower limits of each of the bases that can be used:
Examples of representation:
X
XBT
Graphical operator terminal.
XPS
Safety module used for processing of safety signals to monitor both the component and the wiring
of a safety system, including devices for general monitoring as well as application specific models.
Index
B M
BMXNOM0200, 17 Modbus bus, 45
BMXP341000, 17
BMXP342000, 17
BMXP342010, 17 P
BMXP3420102, 17 parameter settings, 87
BMXP342020, 17 PRINT_CHAR, 82
programming character mode, 82
programming Modbus bus, 62
C
Cabling, 37
certifications, 24 Q
changing protocols, 117 quick start, 119
channel data structure for all modules
T_GEN_MOD, 115, 115
channel data structure for character mode S
communication standards, 24
T_COM_CHAR_BMX, 110, 111
channel data structure for communication
protocols T
T_COM_STS_GEN, 97, 98 T_COM_CHAR_BMX, 110, 111
channel data structure for modbus communi- T_COM_MB_BMX, 102, 103
cation T_COM_STS_GEN, 97, 98
T_COM_MB_BMX, 102, 103 T_GEN_MOD, 115, 115
character mode, 69
configuring character mode, 73
configuring Modbus, 53 W
connection devices, 27 wiring accessories, 37
D
debugging character mode, 84
debugging Modbus, 67
I
INPUT_BYTE, 82
INPUT_CHAR, 82