Schneider Electric Quantum User Manual
ಜಾಹಿರಾತು
ಜಾಹಿರಾತು
Quantum with Unity Pro
Modbus Plus Network Modules
User Manual
UNY USE 104 10 V20E
September 2004
2
Document Set
Document Set
Presentation This package contains the following manuals: z Quantum and Premium Communication Architecture Reference Manual z z
140 EIA 921 00 Quantum AS-i-Bus Interface Module User Manual
Quantum TCPIP/IP Configuration User Manual z z
Quantum Modbus Plus Network Modules
Quantum Ethernet Modules User Manual z 140 ESI 062 10 Quantum ASCII Interface Module User Manual
3
Document Set
4
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Part I Modbus Plus Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 1 Intoducing the Modbus Plus Network . . . . . . . . . . . . . . . . . . .15
Communication in Modbus Plus Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2 Modbus Plus Communication Types . . . . . . . . . . . . . . . . . . . .23
2.1
2.2
2.3
5
6
Part II Modbus Plus Configuration with Unity Pro. . . . . . . . . . .33
Chapter 3 Configuring a Logical Network. . . . . . . . . . . . . . . . . . . . . . . . . 35
Add a new network to the Communication folder . . . . . . . . . . . . . . . . . . . . . . . . 36
Chapter 4 Configuring a Physical Network. . . . . . . . . . . . . . . . . . . . . . . . 43
Part III Application Specific Communication . . . . . . . . . . . . . . .55
Chapter 5 Introducing Application Specific Communication . . . . . . . . . 57
Overview of Function Blocks for Modbus Plus Communication. . . . . . . . . . . . . . 58
Data Exchange on Remote Modbus Plus Networks . . . . . . . . . . . . . . . . . . . . . . 63
Chapter 6 CREAD_REG: Continuous register reading . . . . . . . . . . . . . . 69
Chapter 7 CWRITE_REG: Continuous register writing . . . . . . . . . . . . . . 75
Chapter 8 MBP_MSTR: Modbus Plus Master . . . . . . . . . . . . . . . . . . . . . . 81
Peer Cop Communications Health Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Modbus Plus and SY/MAX Ethernet Error Codes. . . . . . . . . . . . . . . . . . . . . . . 114
CTE error codes for SY/MAX and TCP/IP Ethernet . . . . . . . . . . . . . . . . . . . . . 121
Chapter 9 ModbusP_ADDR: Modbus Plus Address . . . . . . . . . . . . . . . .123
Chapter 10 READ_REG: Read register. . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Chapter 11 WRITE_REG: Write register . . . . . . . . . . . . . . . . . . . . . . . . . . .137
7
8
Part IV Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Chapter 12 Modbus Plus Network Option Modules (NOM) . . . . . . . . . . . 149
12.1
140 NOM 211 00: Modbus Plus Option Module . . . . . . . . . . . . . . . . . . . . . . . . 150
12.2
140 NOM 212 00: Modbus Plus Option Module . . . . . . . . . . . . . . . . . . . . . . . . 160
12.3
140 NOM 252 00: Modbus Plus Option Module . . . . . . . . . . . . . . . . . . . . . . . . 170
Chapter 13 Hardware Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Mounting Quantum Communication Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 191
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, 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.
The addition of this symbol to a Danger or Warning safety label indicates that an electrical hazard exists, which will result in personal injury if the instructions are not followed.
This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
DANGER
DANGER indicates an imminently hazardous situation, which, if not avoided, will result in death, serious injury, or equipment damage.
WARNING
WARNING indicates a potentially hazardous situation, which, if not avoided, can result in death, serious injury, or equipment damage.
CAUTION
CAUTION indicates a potentially hazardous situation, which, if not avoided, can result in injury or equipment damage.
9
Safety Information
PLEASE NOTE Electrical equipment should be serviced only by qualified personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material. This document is not intended as an instruction manual for untrained persons.
© 2004 Schneider Electric. All Rights Reserved.
10
About the Book
At a Glance
Document Scope This document describes the Modbus Plus networking and communication of the
Quantum automation system with Unity Pro.
This document is valid for Unity Pro from version 2.0.
Validity Note The data and illustrations found in this documentation are not binding. We reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be construed as a commitment by Schneider Electric.
Related
Documents
Title of Documentation
Modbus Plus Planning and Installation Guide
Quantum and Premium Communication Architecture Reference
Manual
Quantum Experts and Communication Reference Manual
Grounding and Electromagnetic Compatibility of PLC Systems User
Manual
Communication Library
Reference Number
890USE10000
Part of this package
UNYUSE10010V20E
UNYUSE10010V20E
UNYUSE40020V20E
Note: The above mentioned documents are only available in online form at this time.
11
About the Book
Product Related
Warnings
Schneider Electric assumes no responsibility for any errors that may appear in this document. If you have any suggestions for improvements or amendments or have found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including photocopying, without express written permission of
Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this product. For reasons of safety and to ensure compliance with documented system data, only the manufacturer should perform repairs to components.
When controllers are used for applications with technical safety requirements, please follow the relevant instructions.
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 product related warning can result in injury or equipment damage.
User Comments We welcome your comments about this document. You can reach us by e-mail at
12
Modbus Plus Network
I
At a Glance
Overview
What's in this Part?
This part of the document provides an introduction to the topic of Modbus Plus networks. It mainly deals with the communication types that can be found in Modbus
Plus network application.
This part contains the following chapters:
Chapter Chapter Name
1 Intoducing the Modbus Plus Network
2 Modbus Plus Communication Types
Page
13
Modbus Plus Network
14
Intoducing the Modbus
Plus Network
1
Overview
Introduction
What's in this
Chapter?
This chapter contains general information about Modbus Plus Networks.
This chapter contains the following topics:
Topic
Introducing the Modbus Plus Network
Communication in Modbus Plus Networks
Example for a Modbus Plus network
Integration in a Modbus Plus Network
Page
15
Introduction
Introducing the Modbus Plus Network
Overview
Types of
Communication
Modbus Plus is a local area network system for industrial control applications.
Networked devices can exchange messages for the control and monitoring of processes at remote locations in an industrial plant.
The network also provides an efficient means for servicing input/output subsystems.
Modbus Plus Distributed I/O (DIO) Drop Adapters and I/O Blocks (Momentum and
TIO) can be placed at remote I/O sites to allow the application to control field devices over the network link.
For a detailed description of the Modbus Plus Network consult the Modbus Plus
Network Planning and Installation Guide .
The following table shows the 4 different types of communication available on a
Modbus Plus Network:
Parameter Setup Remarks Communication
Type
Distributed I/O During configuration
Peer Cop
Global Data
During configuration
During configuration
Application driven Parameters handled through
Function Blocks under the control of the User program
Allows connection of standard Quantum
I/O to the Modbus Plus. DIO is limited to the local Modbus Plus segment
Publisher/Subscriber service, limited to the local Modbus Plus segment
Broadcasting service, limited to the local
Modbus Plus segment
Allows routing and therefor not limited to the local Modbus Plus segment
16
Introduction
Configuration of the Modbus Plus
Network
The following table shows the 4 steps to configure a Modbus Plus Network
2
3
Step Action
1 creation of the Modbus Plus logic network(s)
4 configuration of the Modbus Plus logic network(s) adding NOM modules to the configuration (if required) association of the communication module(s) with the logic network(s).
Configuration Tool
Project browser
Hardware configuration window
Benefit This configuration allows from the second step onwards, to design your communication application (you do not have to have the hardware to start working) and use the simulator to test its operation.
17
Introduction
Communication in Modbus Plus Networks
Overview
Communication channel
Communication via Modbus Plus enables data exchange through all devices connected to the bus. Modbus Plus protocol is based on the principle of a Logical-
Token-Bus (Logical Token passing). Every station in a network is identified using an address between 1 and 64, and accesses the network once a Token has been received. Double addresses are not permitted.
Example for a Modbus Plus communication channel
Modbus Plus
2
Premium
12
Quantum
Logical Token Ring
A Modbus Plus communication channel has three main functions: z Point-to-Point exchange via message service according to Modbus protocol.
z Broadcast exchange of global data between all nodes taking part in the exchange.
z Multi-point exchange of specific data via Peer Cop.
18
Introduction
Example for a Modbus Plus network
Overview
22
The example shows a segmented Modbus Plus network with 5 busses
Modbus Plus
1. Quantum
13
2. Quantum
Repeater
61
Bus 1
BP85
Bridge Plus
Bus 2
DIO Drop
12
TIO
3. Quantum
Bus 3
DIO Drop
TIO
30
Premium
BP85
Bridge Plus
25 15
Slave
A
1
Bridge
Multiplexer
2 3 4
Modem
Modem Slave
113
Master
A
Modem Slave
69
Bus 4
62
Bus 5
19
Introduction
The following table describes Modbus Plus network busses
Bus Description
1
2 z z z z z connects the first Quantum via a NOM module in slot 4 connects the second Quantum via a CPU module in slot 2 contains a repeater for expansions contains a Bridge BP85 Plus as connection to bus segment 4 connects the first Quantum via the CPU module in slot 2 with a DIO Drop station and two TIOs
3 z
4
5 z z z z connects the first Quantum via the NOM module in slot 3 with a DIO Drop station and one TIO connects the third Quantum via a CPU module in slot 2 contains a Bridge BP85 Plus as connection to bus segment 5 contains a Bridge Multiplexer as connection to the serial/Modbus nodes connects a Premium via a communication module
Segment spanning data exchange
A Quantum controller can exchange data with all connected stations via a Modbus
Plus network. The routing information must be entered additionally for every Bridge in the data path. This is done using the function block designed for this task. More detailed information can be found in Data Exchange on Remote Modbus Plus
20
Introduction
Integration in a Modbus Plus Network
Introduction
Quantum with
Premium
In a Modbus Plus architecture, one Quantum PLC application can communicate with a Premium or Atrium PLC and visa-versa.
Quantum PLC communication with a Premium/Atrium PLC is available via a MSTR block. In this case, the Premium or Atrium serves as the server. Consequently all
Modbus Plus stations that are connected to a network architecture, up to a maximum of 5 levels, can communicate with it.
Example
1
Premium
2
Quantum
3 Modbus Plus
Bridge Plus
Modbus Plus
5
Bridge Plus
Modbus Plus
Quantum
8
4
Quantum
MSTR read
The Quantum station sends a read request to the Premium station and uses an address path for this: 8.5.1.0.0 (routing path). The MSTR function block enables the internal words of a Premium or Atrium station to be read or written. The slave register parameter of the MSTR function block gives the address of the internal words %MW directly to the PLC application. This function block also enables the read or RAZ of a Premium or Micro station statistical counter. This request is carried out by the PCMCIA card of the Premium station
Note: For Premium/Atrium PLC communication with a Quantum PLC the addressing must be offset. In order to access an address object n of a Quantum, the communication function of the Premium PLC must have the address n+1.
21
Introduction
22
Modbus Plus
Communication Types
2
Overview
Introduction
What's in this
Chapter?
This chapter describes the Modbus Plus communication types.
This chapter contains the following sections:
Section Topic
2.1
DIO Drop
2.2
2.3
Peer Cop
Application Specific Communication
Page
23
Modbus Plus Communication Types
2.1
DIO Drop
Overview
Introduction
What's in this
Section?
This section describes the DIO Drop communication type.
This section contains the following topics:
Topic
DIO Introduction
Single-cable Configuration
Dual-cable Configuration
Page
24
Modbus Plus Communication Types
DIO Introduction
Overview Quantum DIO is implemented over a Modbus Plus network. The CPU or NOMs module may be the network head via their Modbus Plus ports. Quantum DIO
Modbus Plus drop adaptors are specifically designed to link Quantum I/O modules to the head via twisted pair shielded cable (Modbus Plus). The DIO drop modules also provide the I/O with power (maximum 3A) from a 24 VDC or a 115/230 VAC source. Each DIO network supports up to 63 distributed drops using repeaters.
25
Modbus Plus Communication Types
Single-cable Configuration
Single-cable DIO
Configuration
Figure
The following figure is an example of a single-cable Quantum DIO configuration.
PS CPU I/O I/O I/O I/O I/O I/O I/O I/O
Local I/O
Tap
DIO
Drop
I/O I/O I/O
Tap
Up to 31 drops (63 with repeater)
DIO
Drop
I/O I/O I/O
Quantum Drop # m
Drop Cable Drop Cable
Quantum Drop # n
26
Modbus Plus Communication Types
Dual-cable Configuration
Dual-cable DIO
Configuration
Figure
The following figure is an example of a dual-cable Quantum DIO configuration.
PS CPU NOM I/O I/O I/O I/O I/O I/O I/O
Local I/O
* Tap
* Tap
DIO
Drop
I/O I/O I/O
* Tap
* Tap Up to 31 Nodes (63 with repeater)
Up to 31 Nodes (63 with repeater)
DIO
Drop
I/O I/O I/O
Quantum Drop # m
** Drop Cables ** Drop Cables
Quantum Drop # n
Note: Dual cables provide systems with added protection against cable breaks or damaged connectors. With two cables connected between the host and each node, no single cable break will disrupt communications.
27
Modbus Plus Communication Types
2.2
Peer Cop
Overview
Introduction
What's in this
Section?
This section describes the Peer Cop communication type.
This section contains the following topics:
Topic
Specific Inputs and Outputs
Global Data
Page
28
Modbus Plus Communication Types
Specific Inputs and Outputs
Specific inputs and outputs act as a Point-to-Point-Service, that use Multicast-
Protocol (Multi-stations). Every message contains one or more receive addresses for transferring the data. This function enables data to be forwarded to several stations without repetition.
Example for specific inputs maximum 500 Words
The data blocks are copied in their entirety from the Modbus Plus Port to the internal memory words.
In the following example, the address of the first internal word is %MW10:
Internal Words Modbus Plus Port Modbus Plus
Network
%MW10
3 words of Station 1
%MW13
32 words of Station 5
%MW45
20 words of Station 6
%MW65
12 words of Station 8
%MW77
32 words of Station 9
%MW150
3 words of Station 62
Copy
Specific Peer Cop Data
Inputs
Station 1
Station 5
Station 6
Station 62
29
Modbus Plus Communication Types
Example for specific outputs
The data blocks are copied in their entirety from the memory words reserved in the configuration, to the Modbus Plus Port. maximum 500 Words
In the following example, the address of the first internal word is %MW10:
Internal Words Modbus Plus Port Modbus Plus
Network
%MW10
3 words for Station 1
%MW13
32 words for Station 5
%MW45
20 words for Station 6
%MW65
12 words for Station 8
%MW77
32 words for Station 9
%MW150
3 words for Station 62
Copy
Specific Peer Cop Data
Outputs
Station 1
Station 5
Station 6
Station 62
30
Modbus Plus Communication Types
Global Data
Overview
Global Data table The global data is accessible to the application programs at the other nodes on the same network. Each node maintains a table of global data sent by every other node on the network. Although only one node accepts the token pass, all nodes monitor the token transmission and read its contents. All nodes receive and store the global data into the table.The table contains separate areas of storage for each node’s global data. Each node’s application program can selectively use the global data from specific nodes, while other applications can ignore the data. Each node’s application determines when and how to use the global data.
Characteristics
When a node passes the token, it can broadcast up to 32 words (16 bits each) of global information to all other nodes on the network. The information is contained in the token frame. The process of sending global data when transmitting the token is controlled independently by the application program in each node.
Global database applications include z Time synchronization z z
Rapid notification of alarm conditions
Multicasting of setpoint values and constants to all devices in a common process
This allows uniform and rapid transmission of global data without having to assemble and transmit separate messages to the individual devices. The user’s application can determine which data items are useful to nodes on a remote network, and forward them as necessary.
Note: Access to a network’s global database is available only to the nodes on that network, because the token is not passed through bridge devices to other networks
Global Input Data Nodes using Peer Cop can be configured to receive up to 32 words of Global Input data from each of up to 64 source nodes, up to a maximum total of 500 words.
Incoming data from each source node can be indexed into up to eight fields for delivery into separate data destinations in the receiving node.
Global Output
Data
Nodes using Peer Cop can be configured to send up to 32 words of Global Output data, which is globally broadcast to all active nodes on the network. Destination nodes can be configured to accept or ignore incoming data from specific source nodes..
31
Modbus Plus Communication Types
2.3
Application Specific Communication
Introduction
Overview
Data exchange
Application specific communication is based on function blocks that are integrated into the application program depending on the requirements
The following six function blocks are available: z z z z z z
READ_REG: Read register, p. 129
WRITE_REG: Write register, p. 137
CREAD_REG: Continuous register reading , p. 69
CWRITE_REG: Continuous register writing, p. 75
MBP_MSTR: Modbus Plus Master, p. 81
ModbusP_ADDR: Modbus Plus Address, p. 123
In contrast to Peer Cop and DIO, application specific communication enables data exchange between stations in remote networks.
You can find examples for the following types of data exchange in the application specific communication section: z
Data Exchange on a Local Segment, p. 59
z z
Data Exchange on Remote Modbus Plus Networks, p. 63
Global Data - Broadcast Services, p. 66
32
Modbus Plus Configuration with Unity Pro
II
At a Glance
Overview
What's in this Part?
This part of the document contains information about Modbus Plus Configuration with Unity Pro.
This part contains the following chapters:
Chapter Chapter Name
3 Configuring a Logical Network
4 Configuring a Physical Network
Page
33
Modbus Plus Configuration
34
Configuring a Logical Network
3
Overview
Introduction
What's in this
Chapter?
This chapter describes how to configure a logical network.
This chapter contains the following topics:
Topic
Add a new network to the Communication folder
Configure Network
Properties of a network
Delete an existing network folder
Link between logical and physical network
Page
35
Configuring a Logical Network
Add a new network to the Communication folder
Add a new network to the
Communication folder
After starting a new application, the Communication folder under Station tree branches the Network folder. This folder is empty. Under the Network folder, the user can insert the networks by menu. A click on the right mouse-button above
Network pops up a contextual menu. The user selects the type of network he wants to add. For easier use, a network name will be suggested with the prefix of the network type (Ethernet_1 or Modbus+_1). By choosing a new network the next available number for the network is chosen automatically like e.g. Modbus+_1 then
Modbus+_2 and so on. At any moment, the user may rename any NetLink.
The user can also attach a comment that describes each configured network. The
OK button adds the network as subfolder.
The names of network nodes are also called NetLink. These are the names of logical networks.
Station
Configuration
Derived Data Types
Derived FB Types
Variables & FB
Communication
Networks
Program Add Network
Station
Configuration
Derived Data Types
Derived FB Types
Variables & FB
Communication
Networks
ModbusPlus_1
Program
Animation Tables
Operator Screens
Documentation
1 Add Network
Network Comment
List of available Networks :
Ethernet
ModbusPlus
ModbusPlus_1
2
OK Cancel Help
36
Configuring a Logical Network
Configure Network
Configure
Network
On the network folder, by a double-clicking action or by the Open item on contextual menu, the editor of the corresponding communication screen is opened in order to set the specific network services.
The figure shows the contextual menu to start network properties and the window to set the specific network services
Station
Configuration
Derived FB Types
Variables & FB
Communication
Open
Export
Networks
Delete Del
ModbusPlus_1
Program
Add Hyperlink
Animation Tables
Zoom out
Operator Screens Properties Alt+Enter
Documentation
Mod
Bus
ModbusPlus_1
Module Address
Rack Module
Modbus Plus
Time Out
Input Fallback Mode
Maintain
Reset to 0
50 (ms)
Global
Input...
Output...
Specific
Input...
Output...
37
Configuring a Logical Network
Properties of a network
Properties of a network
The contextual menu proposes the user to see again the properties of a configured network. Here, the user can change the NetLink name and the associated comment.
The figure shows the Modbus+_1 property window
Station
Configuration
Derived Data Types
Derived FB Types
Variables & FB
Communication
Properties Network ModbusPlus_1
Network Comment
List of available Networks :
Networks
ModbusPlus
Program Export
Delete Del
Operator Screens
Change Name :
ModbusPlus_1
OK Cancel Help
Zoom out
Properties Alt+Enter
38
Configuring a Logical Network
Delete an existing network folder
Delete an existing network folder
With a right-mouse-click on the network folder, a contextual menu appears. Here the user is able to delete the network configuration. In this case, the subfolder of the network will also be removed in application browser.
Station
Configuration
Derived Data Types
Derived FB Types
Variables & FB
Communication
Delete Network...
Remove this Network ?
ModbusPlus_1
OK Cancel
Networks
ModbusPlus_1
Note: If this removed network was previously attached to a communication module, this module loses its link and it will work with its default parameters.
39
Configuring a Logical Network
Link between logical and physical network
NetLinks DuringUnity Pro application design, the NetLinks are created and inserted on subfolder Communication under Network. These are the names of logical networks.
Under configuration folder, on the communication module node included in the current station, the list of existing NetLinks is proposed to select and attach one network to one module. Only the NetLink that can be managed by this module, are displayed in the list box on module configuration screen. No NetLink can be edited and created here (no edit box), but this list contains at least the No_Link field.
40
Attaching a
NetLink to a
Module
Configuring a Logical Network
The following figure shows how to attach a created Modbus Plus NetLink to a NOM module .
Station
Variables & FB instances
Communication
Network
Ethernet_1
Ethernet_2
ModbusPlus_1
Configuration
1 : Local Quantum Bus
1 : Quantum Drop for
1 : 140 XBP 016 00
1:140 CPU 534
2:
3:
4:140 NOM 2xx
5:
6:
1.4 : MBP
MBP
OverGeneral
Communication Type
DIO Bus
Peer Cop
Please choose a link
No Link
No Link
ModbusPlus_1
When a network is attached to a module, the icon of the corresponding node is changed and the network editor displays the address of the module in the rack .
41
Configuring a Logical Network
The Icon in the Network folder indicates whether the link is attached to a module or not:
Icon when no communication module is attached to the NetLink
Icon when a communication module has been attached to the NetLink
42
Configuring a Physical Network
4
Overview
Introduction
What's in this
Chapter?
This chapter describes how to configure a physical network.
This chapter contains the following topics:
Topic
Configuring a Quantum DIO Drop
Peer Cop Configuration
Global Input Data Configuration
Global Output Data Configuration
Configuring Specific Data
Specific Input Data Configuration
Specific Output Data Configuration
Page
43
Configuring a Physical Network
Configuring a Quantum DIO Drop
Introduction A Quantum DIO Drop consists of a standard module rack installed with I/O modules and a 140 CRA 21• •0 Modbus Plus communication module.
A DIO Bus can either be connected to the Modbus Plus connection on the CPU, or to a 140 NOM 2•• 00 communication module.
Note: The Quantum DIO Drop Modules 140 CRA 2•• ••• have no health bits.
For this reason the status for a properly functioning DIO Drop is always ZERO and not ONE as it is for other modules!
Adding a DIO
Bus
The following table describes the procedure for adding a DIO Bus.
Step Action
1 Select the Modbus Plus connection that you want to configure as a DIO Bus from the Project
Browser or in the hardware configuration window.
The following configuration window is opened:
1.2 : MBP Settings
MBP
Overview General
Communication Type
DIO Bus
Peer Cop
44
Configuring a Physical Network
Step Action
2 Activate the DIO Bus check box in the configuration window and confirm your entry.
A DIO Bus is placed in the Project Browser:
Station
Configuration
1:Local Quantum Bus
1: Quantum Drop for local
1:140 XBP 016 00
3
2:DIO Bus
Open the DIO Bus and select add module rack and select New Device .
The module rack selection list is opened:
New Device
Address: [1 .. 64]
Module
Quantum Drop for DIO
Rack
140 XBP 002 00
140 XBP 003 00
140 XBP 004 00
140 XBP 006 00
140 XBP 010 00
140 XBP 016 00
12
Description
STRID_MODULE_Quantum Drop for DIO
Rack
STRID_MODULE_Q-Rack-2S
STRID_MODULE_Q-Rack-3S
STRID_MODULE_Q-Rack-4S
STRID_MODULE_Q-Rack-6S
STRID_MODULE_Q-Rack-10S
STRID_MODULE_Q-Rack-16S
OK
Cancel
Help
Drop end communicator
140 CRA 21X X0
45
Configuring a Physical Network
Step Action
4 Select the desired module rack and enter the Modbus Plus address in the address field. Confirm with OK.
A DIO Drop is placed in the Project Browser. The number set, 12 in our example, states the
Modbus Plus address of the Drop. The Modbus Plus Coupler 140 CRA 21X X0 is automatically entered in slot 1:
Station
Configuration
1:Local Quantum Bus
1: Quantum Drop for local
1:140 XBP 016 00
Modbus Plus
Address
2:DIO Bus
12: Quantum Drop for DIO
1: 140 XBP 016 00
1: 140 CRA 21x x0
2:
3:
4:
5:
5 To continue configuring the RIO Drop you can carry on as with configuring a local I/O.
Ensure that the Modbus Plus Station Address that you have entered in the software configuration matches the hardware addresses of the modules used.
46
Configuring a Physical Network
Peer Cop Configuration
Requirements Before configuring the Peer Cop communication type you must carry out the following steps:
Step Action
1 Setup a logical Modbus Plus network in the Project Browser
2 Select the Modbus Plus connection that you want to configure as the Peer Cop from the Project Browser or in the hardware configuration window.
The following configuration window is opened:
1.2 : MBP Settings
MBP
Overvie General
Communication Type
DIO Bus
Peer Cop
Please choose a link:
No Link
No Link
MODBUS+_1
3
4
Activate the Peer Cop check box in the configuration window.
Connect the communication modules (CPU, NOM) Modbus Plus connection to the logical network (here MODBUS+_1)
47
Configuring a Physical Network
Peer Cop
Configuration
Carry out the following steps to configure the Peer Cop:
Step Action
1 Open a Modbus Plus NetLink in the Project Browser by double-clicking on the symbol
Result: The Peer Cop configuration window is opened with a predefined address corresponding to the position of the module
Mod
Bus
MODBUS+_1
Module
Rack
1
Module
4
Modbus+ Quantum
Timeout
Input Fallback
Maintain
Reset to 0
20 (ms)
Global
Input...
Output...
Specifi
Input...
Output...
2
3
4
Make entries for Timeout and Input Fallback Mode (see Parameter description)
Carry out the global data configuration
Carry out the specific data configuration
48
Configuring a Physical Network
Peer Cop parameter description
The table gives a description of the Peer Cop parameter
Parameter Field / Button
Module
Address
Timeout
Description
Rack:1 Module: 2 (for example) The topological address of the module rack and the slot number with the connected communications module are shown here
Input
Fallback
Mode z z
The default value is 500 ms.
The values must be between
20 ms and 2 sec
The increment is 20 ms z
Maintain
Reset to 0
Refresh time for the inputs in milliseconds. It enables the maximum time to be set in which the remote drop inputs must be refreshed on the Modbus Port. If the data is not refreshed in the specified time an error is generated.
The input values can be maintained or reset to "0"
Specific Buttons for specific data configuration (inputs and outputs)
Global
Inputs
Outputs
Inputs
Outputs
Buttons for global data configuration (inputs and outputs)
49
Configuring a Physical Network
Global Input Data Configuration
Overview The Peer Cop configuration window contains the following buttons for global data configuration: z z
Global input data
Global output data
Global input data The diagram shows the global input data configuration window
Global input data
(1 - 64)
5
6
7
8*
3
4
1
2
9
10
11*
12
Delete fields below
1
6
7
8
4
5
2
3
Dest. Ref.
OK
1 - 32
Index
1 - 32
Length Bin/BCD
Cancel
The table shows the global input data configuration parameter
Parameter
Station window
(1-64)
Dest. Ref.
Length (max.
32)
Index
Bin/BCD
Field / Button
3
Description
Station from which data is received
%IW10 (for example) Address for saving the data received
6 (for example) This means 6 words from station 3 are sent to all stations
4 (for example)
Bin.
BCD
This means that the station receives the 4th word from station 3
Received data codes
50
Configuring a Physical Network
Global Output Data Configuration
Overview
Global output data
The Peer Cop configuration window contains the following buttons for global data configuration: z z
Global input data
Global output data
The diagram shows the global output data configuration window
Global output data
All Nodes
Source Ref.
%MW4101 6
Length
Bin.
Bin/BCD
OK Cancel
The table shows the global output data configuration parameter
Parameter
Source Ref.
%MW4101 (for example)
Length (max.
32)
Field / Button Description
Address from which data is sent to all other stations
6 (for example) This means 6 words are sent to all stations
Bin/BCD Bin.
BCD
Received data codes
51
Configuring a Physical Network
Configuring Specific Data
Overview
Configuration
The Peer Cop configuration window contains the following buttons for specific data configuration: z z
Specific Input Data Configuration, p. 53
Specific Output Data Configuration, p. 54
The specific input and output data is continuously placed as application internal words.
The user must define every local bus segment connection point as follows: z z z
Starting address in the table of internal words (%MW)
Assignment of 0 to 32 words per station
The following restrictions/rules must be observed:
The address area for input and output words must not overlap.
z The maximum size of the specific data may not exceed 1,000 words (500 words maximum for the input words and maximum 500 words for the output words).
52
Configuring a Physical Network
Specific Input Data Configuration
Specific input data
The diagram shows the specific input data configuration window
Peer Cop Input
3
4
1
2
5
6
7
8
9
10
11
Dest. Ref.
Length
OK
Bin/BCD
Cancel
The table shows the global input data configuration parameter
Parameter
Dest. Ref.
Length (max.
32)
Bin/BCD
Field / Button Description
%IW10 (for example) Address for saving the data received
6 (for example)
Bin.
BCD
This means 6 words from station 3 are sent to all stations
Received data codes
53
Configuring a Physical Network
Specific Output Data Configuration
Specific output data
The diagram shows the specific output data configuration window
Peer Cop Output
7
8
5
6
3
4
1
2
9
10
11
Source Ref.
Length
OK
Bin/BCD
Cancel
The table shows the specific output data configuration parameter
Parameter
Source Ref.
Field / Button
%MW4101 (for example)
6 (for example)
Description
Address from which data is sent to all other stations
This means 6 words are sent to all stations Length (max.
32)
Bin/BCD Bin.
BCD
Received data codes
54
Application Specific
Communication
III
At a Glance
Overview
What's in this
Part?
This part of the document contains information about Modbus Plus Application
Specific Communication.
This part contains the following chapters:
Chapter Chapter Name
5 Introducing Application Specific Communication
6
7
CREAD_REG: Continuous register reading
CWRITE_REG: Continuous register writing
10
11
8
9
MBP_MSTR: Modbus Plus Master
ModbusP_ADDR: Modbus Plus Address
READ_REG: Read register
WRITE_REG: Write register
Page
55
Application Specific Communication
56
Introducing Application Specific
Communication
5
Overview
Introduction
What's in this
Chapter?
The application specific communication function enables data exchange between
Modbus Plus stations to be carried out under the control of the application program.
Unity Pro-Soft provides a series of function blocks for this that are described in this section.
This chapter contains the following topics:
Topic
Overview of Function Blocks for Modbus Plus Communication
Data Exchange on a Local Segment
Data Exchange on Remote Modbus Plus Networks
Global Data - Broadcast Services
Page
57
Introduction
Overview of Function Blocks for Modbus Plus Communication
Introduction Unity Pro provides the following 6 function blocks for communication with Modbus
Plus: z z z z z z
READ_REG
WRITE_REG
CREAD_REG
CWRITE_REG
MBP_MSTR
ModbusP_ADDR
In contrast to Peer Cop and DIO communication, application specific communication enables connections between stations that are connected from different
Modbus Plus networks via Bridges.
Note: Application specific communication requires no specific configuration or programming on the respective slave. When writing registers to an other station, special attention must be made that the correct destination area is addressed to avoid unintentionally overwriting data.
READ_REG/
WRITE_REG
CREAD_REG/
CWRITE_REG
Note: For Quantum PLC communication with a Premium/Atrium PLC the addressing must be made with an offset of 1. In order to access an address object n of a Premium PLC, the communication function of the Quantum PLC must use the n+1 address.
The following is a brief overview of the individual function blocks. A detailed representation is found in the next chapters.
A rising edge at the REQ input reads or writes a register area to this function block once. It transfers data between the PLC and an addressed slave via Modbus Plus.
The address and routing information is prepared by the ModbusP_ADDR block.
This function block continuously reads or writes a register area. It transfers data between the PLC and an addressed slave via Modbus Plus.
The address and routing information is prepared by the ModbusP_ADDR block.
MBP_MSTR This Modbus Plus Master block is intended for universal application. It enables both data transfer between Modbus Plus stations including global data, as well as access to diagnostics and statistical data of the Modbus Plus network.
ModbusP_ ADDR This block prepares the Modbus Plus address and routing information for the write and read blocks.
58
Introduction
Data Exchange on a Local Segment
Overview
Example for a local segment
A Quantum controller can exchange data with all connected stations via a Modbus
Plus network.
Routing information is set to 0 in the local segment.
In the following configuration, a Quantum is connected with a Modbus Plus network in slot 4 via a NOM module. Data is read from a Quantum (address 2) and data is sent to a Premium (address 5).
1 2 5
Quantum
Writing data
Premium
Reading data
59
Introduction
Writing data In the following example the 10 register %MW1 to %MW10 is read from a Quantum and placed as %MW101 to %MW110.
4
0
0
5
0
0
MODBUSP_ADDR_1
MODBUSP_ADDR
SLOT_ID
ADDRFLD
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
ReadTrigger
1
10
READ_REG_2
READ_REG
REQ
SLAVEREG
NO_REG
ADDRFLD
NDR
ERROR
REG_READ
STATUS
R_OK
R_Error
101
ErrorCode
The following table describes the parameters of both blocks:
Parameter
Slot_ID
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
ADDRFLD
REQ
SLAVEREG
NO_REG
ADDRFLD
NDR
ERROR
STATUS
REG_READ
0
0
2
0
0
Content/
Variable
4
Description
WordArr5
NOM Modbus Plus communication module slot (0 for the
CPU's Modbus Plus Port)
Modbus Plus address of the destination station
Routing byte 2, 0 local segment
Routing byte 3, 0 local segment
Routing byte 4, 0 local segment
Routing byte 5, 0 local segment
Data structure with the Modbus Plus address and routing information
ReadTrigger Trigger signal to start the read process
201 Offset address of the first register in the slave to be read from.
10
WordArr5
Number of registers to read
Data structure with the Modbus Plus address and routing information
R_OK
R_Error
ErrorCode
1
Set to "1" for one cycle after reading new data
Set to "1" for one cycle if an error occurs
Error code
Starting address of the destination data field
60
Reading data
Introduction
In the following example, the 8 register %MW1 to %MW8 is read from a Premium and placed as %MW201 to %MW208.
4
5
0
0
0
0
MODBUSP_ADDR_3
MODBUSP_ADDR
SLOT_ID
ADDRFLD
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
WriteTrigger
202
8
1
WRITE_REG_4
WRITE_REG
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
W_OK
W_Error
ErrorCode
The following table describes the parameters of both blocks:
Parameter
Slot_ID
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
ADDRFLD
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
0
0
5
0
0
Content/
Variable
4
Description
WordArr5
NOM Modbus Plus communication module slot (0 for the
CPU's Modbus Plus Port)
Modbus Plus address of the destination station
Routing byte 2, 0 local segment
Routing byte 3, 0 local segment
Routing byte 4, 0 local segment
Routing byte 5, 0 local segment
Data structure with the Modbus Plus address and routing information
8
1
WriteTrigger Trigger signal to start the write process
202 Offset address of the first register in the slave to be written.
(see Information)
Number of registers to write
Start address of the source data field
WordArr5
W_OK
W_Error
ErrorCode
Data structure with the Modbus Plus address and routing information
Set to "1" for one cycle after writing data
Set to "1" for one cycle if an error occurs
Error code
61
Introduction
Note: For Quantum PLC communication with a Premium/Atrium PLC the addressing must be made with an offset of 1. In order to access an address object n of a Premium PLC, the communication function of the Quantum PLC must use the n+1 address.
62
Introduction
Data Exchange on Remote Modbus Plus Networks
Overview A Quantum controller can exchange data with all connected stations via a Modbus
Plus network.
In remote networks, the routing information must be entered additionally for every
Bridge in the data path.
Example
Segment spanning
22
Quantum
In the following configuration, a Quantum is connected with a Modbus Plus network in slot 4 via a NOM module. Data is sent to a Premium (Bus 4, address 62) and a
Modbus Slave.
Modbus Plus 13 61
Bus 1
Quantum
BP85
Bridge Plus
1
62
12 30 15 25
Quantum
Premium
BP85
Bridge Plus
Bus 3
4 7
Quantum
22
Slave
A
1
Bridge
Multiplexing
2 3 4
Modem
Modem
2
Slave
113
Master
A
Modem Slave
69
Bus 2
9
BP85
Bridge Plus
Bus 4
63
Introduction
Reading data (1) In the following example, the 8 register %MW1 to %MW8 is read from a Premium and placed as %MW201 to %MW208.
4
61
30
22
62
0
MODBUSP_ADDR_1
MODBUSP_ADDR
SLOT_ID
ADDRFLD
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
WriteTrigger
202
8
1
WRITE_REG_2
WRITE_REG
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
W_OK
W_Error
ErrorCode
The following table describes the parameters of both blocks:
Parameter
Slot_ID
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
ADDRFLD
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
Content/
Variable
4
61
30
22
62
0
Description
Modbus Plus communication module slot
Routing byte 1
Routing byte 2
Routing byte 3
Routing byte 4
Routing byte 5
WordArr5 Data structure with the Modbus Plus address and routing information
WriteTrigger Trigger signal to start the write process
202
8
1
Offset address of the first register in the slave to be written.
Number of registers to write
Start address of the source data field
WordArr5
W_OK
W_Error
ErrorCode
Data structure with the Modbus Plus address and routing information
Set to "1" for one cycle after writing data
Set to "1" for one cycle if an error occurs
Error code
64
Note: For Quantum PLC communication with a Premium/Atrium PLC the addressing must be made with an offset of 1. In order to access an address object n of a Premium PLC, the communication function of the Quantum PLC must use the n+1 address.
Introduction
Reading data (2) In the following example, the 10 registers %MW101 to %MW110 are sent to a
Modbus Slave and placed as %MW1 to %MW10.
4
61
25
4
113
0
MODBUSP_ADDR_3
MODBUSP_ADDR
SLOT_ID
ADDRFLD
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
WriteTrigger
1
10
101
WRITE_REG_4
WRITE_REG
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
W_OK
W_Error
ErrorCode
The following table describes the parameters of both blocks:
Parameters
Slot_ID
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
ADDRFLD
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
Content/
Variable
4
Description
61
25
4
113
NOM Modbus Plus communication module slot (0 for the
CPU's Modbus Plus Port)
Routing byte 1
Routing byte 2
Routing byte 3
Routing byte 4
0 Routing byte 5
WordArr5 Data structure with the Modbus Plus address and routing information
WriteTrigger Trigger signal to start the write process
1 Offset address of the first register in the slave to be written.
10
101
Number of registers to write
Start address of the source data field
WordArr5 Data structure with the Modbus Plus address and routing information
W_OK
W_Error
ErrorCode
Set to "1" for one cycle after writing data
Set to "1" for one cycle if an error occurs
Error code
65
Introduction
Global Data - Broadcast Services
Overview
Example for
Global Data
A Quantum controller can exchange global data with all connected stations via a
Modbus Plus network.
Global data is a Broadcast service that enables up to 16 registers to be sent to all connected stations with the transfer of Tokens. The sending and receiving of global data with a Quantum controller can be configured through the Peer Cop framework, and can also be activated in the application program with the help of the MSTR block.
In the following configuration, a Quantum is connected with a Modbus Plus network in slot 4 via a NOM module. Global data is exchanged with the other stations in the
Modbus Plus network.
1 2 5
Quantum
Read Global Data
Premium
Write Global Data
66
Introduction
Read global data In the following example, the 10 register %MW1 to %MW10 is read from the
Quantum with station address 2 as global data and placed in the GL_DataField.
GL_Trigger
GL_Abort
MBP_MSTR_1
MBP_MSTR
ENABLE
ABORT
ACTIVE
ERROR
SUCCESS
CONTROL
DATABUF
GL_Active
GL_Error
GL_Success
GL_ControlBlock
GL_DataField
The following table describes the parameters of the MSTR blocks:
Parameters Content/Variable
ENABLE GL_Trigger
ABORT
ACTIVE
GL_Abort
GL_Active
ERROR
SUCESS
GL_Error
GL_Success
CONTROL ARRAY [0..8] OF WORD /
GL_ControlBlock
DATABUF ARRAY [0..n] OF WORD
(n ≥ 10)/
GL_DataField
Description
Enable MSTR function
Enable active MSTR function
Operation is active
Operation is faulty
Operation completed successfully
Field for MSTR control block
Data field for the recieved data
Contents of GL_ControlBlock:
Register Contents Description
GL_ControlBlock[0] 6 Read global data
GL_ControlBlock[1] -
GL_ControlBlock[2] 10
GL_ControlBlock[3] - indicates the error status
Number of registers that should be read as global data
GL_ControlBlock[4] x0402
Display of registers available in scanned node (will be automatically updated).
Least significant byte: Address of the station whose global data is to be read
Most significant byte: Communication module slot (0 for the CPU)
67
Introduction
Write global data In the following example, the 8 registers %MW101 to %MW108 are sent from the
Quantum with station address 1 as global data to all nodes in the Modbus Plus network.
GS_Trigger
GS_Abort
MBP_MSTR_2
MBP_MSTR
ENABLE
ABORT
ACTIVE
ERROR
SUCCESS
CONTROL
DATABUF
GS_Active
GS_Error
GS_Success
GS_ControlBlock
GS_DataField
The following table describes the parameters of the MSTR block:
Parameters
ENABLE
ABORT
ACTIVE
ERROR
SUCESS
CONTROL
DATABUF
Content/Variable
GS_Trigger
GS_Abort
GS_Active
GS_Error
GS_Success
ARRAY [0..8] OF WORD /
GS_ControlBlock
ARRAY [0..n] OF WORD
(n ≥ 10)/
GS_DataField
Description
Enable MSTR function
Enable active MSTR function
Operation is active
Operation is faulty
Operation completed successfully
Field for MSTR control block
Data field of the data to be sent
Contents of the GS_ControlBlock :
Register
GS_ControlBlock[0]
GS_ControlBlock[1]
GS_ControlBlock[2]
GS_ControlBlock[3]
GS_ControlBlock[4]
Contents Description
5 Write global data
-
10 indicates the error status
Number of registers to be sent from the State RAM as global data (1...32)
- x0400
Reserved
Most significant byte: Communication module slot (0 for the CPU)
68
CREAD_REG: Continuous register reading
Overview
Introduction
What's in this
Chapter?
This chapter describes the CREAD_REG block.
This chapter contains the following topics:
Topic
Description
Derived Data Types
Function mode
Parameter description
6
Page
69
CREAD_REG
Description
Function description
This function block reads a register area continuously. It reads data from an addressed node via Modbus Plus, TCP/IP Ethernet or SY/MAX Ethernet.
EN and ENO can be configured as additional parameters.
Note: When programming a CREAD_REG function, you must be familiar with the routing procedures used by your network. Modbus Plus routing path structures are described in detail in the Modbus Plus Network Planning and Installation Guide . If
TCP/IP or SY/MAX Ethernet routing is implemented, standard Ethernet IP router products must be used. A full description of the TCP/IP routing is provided in the
Quantum with Unity ProTCP/IP Configuration User Guide .
Note: Several copies of this function block can be used in the program. However, multiple instancing of these copies is not possible.
Representation in FBD
Representation:
OffsetAddress
NumberOfRegisters
DataStructure
CREAD_REG_Instance
CREAD_REG
SLAVEREG
NO_REG
ADDRFLD
REG_READ
STATUS
RegisterToRead
ErrorCode
Representation in LD
Representation:
OffsetAddress
NumberOfRegisters
DataStructure
CREAD_REG_Instance
CREAD_REG
EN ENO
SLAVEREG
REG_READ NO_REG
ADDRFLD STATUS
RegisterToRead
ErrorCode
70
Representation in IL
Representation in ST
Parameter description
CREAD_REG
Representation:
CAL CREAD_REG_Instance (SLAVEREG:=OffsetAddress,
NO_REG:=NumberOfRegisters, ADDRFLD:=DataStructure,
REG_READ=>RegisterToRead, STATUS=>ErrorCode)
Representation:
CREAD_REG_Instance (SLAVEREG:=OffsetAddress,
NO_REG:=NumberOfRegisters, ADDRFLD:=DataStructure,
REG_READ=>RegisterToRead, STATUS=>ErrorCode) ;
Description of input parameters:
Parameter
SLAVEREG
NO_REG
ADDRFLD
Data type Description
DINT Offset address of the first %MW register in the slave to be read from.
INT
WordArr
5
Number of addresses to be read from slave.
Data structure describing the Modbus Plus address, TCI/IP address or SY/MAX IP address.
Description of output parameters:
Parameter Data type Description
REG_READ ANY Data to be read
For the file to be read a data structure must be declared as a located variable.
STATUS WORD z z z
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
SY/MAX-specific error codes, p. 116
TCP/IP Ethernet error codes, p. 118
Runtime error For a list of all block error codes and values, see .
71
CREAD_REG
Derived Data Types
Derived data type WordArr5 in
Modbus Plus
Element descriptions:
Element
WordArr5[1]
Data type
WORD
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
WORD
WORD
WORD
WORD
Description
Least significant byte:
Routing register 1 is used for address specification (routing path addresses one of five) of the destination node during network transfer.
The last byte in the routing path that is not zero is the destination node.
Most significant byte:
Slot of the network adapter module (NOM), if any (only Quantum).
Routing register 2
Routing register 3
Routing register 4
Routing register 5
Element description for
WordArr5 with
TCP/IP Ethernet
Element description for WordArr5 with TCP/IP Ethernet
Element
WordArr5[1]
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
Data type
WORD
WORD
WORD
WORD
WORD
Description
Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slot of the NOE module
Byte 4 (MSB) of the 32-bit destination IP address
Byte 3 of the 32-bit destination IP address
Byte 2 of the 32-bit destination IP address
Byte 1 (LSB) of the 32-bit destination IP address
Element description for
WordArr5 with
SY/MAX Ethernet
Element description for WordArr5 with SY/MAX Ethernet
Element Data type Description
WordArr5[1] WORD Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slot of the NOE module
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Destination drop number (or set to FF hex)
Terminator (set to FF hex)
No significance
No significance
72
CREAD_REG
Function mode
Function mode of the
CREAD_REG block
Although a large number of CREAD_REG function blocks can be programmed; only four read operations may be active at the same time. In this case it is irrelevant whether they are the result of this function block or others (e.g. MBP_MSTR , MSTR ,
READ_REG ). All function blocks use one data transaction path and require multiple cycles to complete a job.
Note: A TCP/IP communication between a Quantum PLC (NOE 211 00) and a
Momentum PLC (all TCP/IP CPUs and all TCP/IP I/O modules) is only possible, when only one read or write job is carried out in every cycle. If several jobs are sent per PLC cycle, the communication stops without generating an error message in the status register of the function block.
All routing information is contained in the WordArr5 data structure of the ADDRFLD input. The type function block assigned to this input is defined by the network used.
Please use: z Modbus Plus for function block ModbusP_ADDR z z
TCP/IP Ethernet for function block TCP_IP_ADDR
SY/MAX Ethernet for function block SYMAX_IP_ADDR
Note: The WordArr5 data structure can also be used with constants.
Note: This function block puts a heavy load on the network; therefore the network load must be carefully monitored. If the network load is too high, the program logic should be reorganized in order to work with the READ_REG function block, a variation of this function block that does not operate in a continuous mode, but under command control.
73
CREAD_REG
Parameter description
SLAVEREG
NO_REG
REG_READ
STATUS
Start of the area in the addressed slave from which the source data is read. The source area always resides within the %MW register area.
Note: For slaves for a nonUnity Pro PLC:
The source area always resides within the 4x register area. SLAVEREG expects the source reference as offset within the 4x area. The leading "4" must be omitted (e.g.
59 (contents of the variables or value of the literal) = 40059).
The parameter can be entered as an address, located variable, unlocated variable or literal.
Number of addresses to be read from the addressed slave (1 ... 100).
The parameter can be entered as an address, located variable or unlocated variable.
An ARRAY that is the same size as the requested transmission must be agreed upon
( ≥ NO_REG ) for this parameter. The name of this array is defined as a parameter. If the array is defined too small, then only the amount of data is transmitted that is present in the array.
The parameter must be defined as a located variable.
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see z z
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
SY/MAX-specific error codes, p. 116
z
TCP/IP Ethernet error codes, p. 118
The parameter can be entered as an address, located variable or unlocated variable.
74
CWRITE_REG: Continuous register writing
Overview
Introduction
What's in this
Chapter?
This chapter describes the CWRITE_REG block.
This chapter contains the following topics:
Topic
Description
Derived Data Types
Function mode
Parameter description
7
Page
75
CWRITE_REG
Description
Function description
This function block writes continuously to the register area. It transfers data from the
PLC via Modbus Plus, TCP/IP Ethernet or SY/MAX Ethernet to an addressed slave.
EN and ENO can be configured as additional parameters.
Note: You must be familiar with the routing procedures of the network when programming a CWRITE_REG function. Modbus Plus routing path structures are described in detail in the Modbus Plus Network Planning and Installation Guide . If
TCP/IP or SY/MAX Ethernet routing is implemented, standard Ethernet IP router products must be used. A full description of the TCP/IP routing is provided in the
Quantum with Unity ProTCP/IP Configuration User Guide .
Note: Several copies of this function block can be used in the program. However, multiple instancing of these copies is not possible.
Representation in FBD
Representation in LD
Representation:
OffsetAddress
NumberOfRegisters
SourceDataArea
DataStructure
Representation:
CWRITE_REG_Instance
CWRITE_REG
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD STATUS
OffsetAddress
CWRITE_REG_Instance
CWRITE_REG
EN ENO
SLAVEREG
NumberOfRegisters
SourceDataArea
DataStructure
NO_REG
REG_WRIT
ADDRFLD STATUS
ErrorCode
ErrorCode
76
Representation in IL
Representation in ST
Parameter description
CWRITE_REG
Representation:
CAL CWRITE_REG_Instance (SLAVEREG:=OffsetAddress,
NO_REG:=NumberOfRegisters, REG_WRIT:=SourceDataArea,
ADDRFLD:=DataStructure, STATUS=>ErrorCode)
Representation:
CWRITE_REG_Instance ( SLAVEREG:=OffsetAddress,
NO_REG:=NumberOfRegisters, REG_WRIT:=SourceDataArea,
ADDRFLD:=DataStructure, STATUS=>ErrorCode) ;
Description of input parameters:
Parameter
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
Data type Description
DINT
INT
Offset address of the first %MW register in the slave to be written to.
Number of addresses to be written from slave
ANY Source data
(A data structure must be declared as a located variable for the source file .)
WordArr5 Data structure transferring the Modbus Plus-address, TCI/IP address or SY/MAX-IP address.
Description of output parameters:
Parameter Data type Description
STATUS WORD z z z
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
SY/MAX-specific error codes, p. 116
TCP/IP Ethernet error codes, p. 118
Runtime error For a list of all block error codes and values, see .
77
CWRITE_REG
Derived Data Types
Element description for
WordArr5 in
Modbus Plus
Element description for WordArr5 in Modbus Plus:
Element Data type Description
WordArr5[1] WORD Least significant byte:
Routing register 1 is used for address specification (routing path addresses one of five) of the destination node during network transfer.
The last byte in the routing path that is not zero is the destination node.
Most significant byte:
Slot of the network adapter module (NOM), if any.
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Routing register 2
Routing register 3
Routing register 4
Routing register 5
Element description for
WordArr5 with
TCP/IP Ethernet
Element description for WordArr5 with TCP/IP Ethernet
Element Data type Description
WordArr5[1] WORD Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slots of the NOE module
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Byte 4 (MSB) of the 32-bit destination IP address
Byte 3 of the 32-bit destination IP address
Byte 2 of the 32-bit destination IP address
Byte 1 (LSB) of the 32-bit destination IP address
Element description for
WordArr5 with
SY/MAX Ethernet
Element description for WordArr5 with SY/MAX Ethernet
Element Data type Description
WordArr5[1] WORD Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slot of the NOE module
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Destination drop number (or set to FF hex)
Terminator (set to FF hex)
No significance
No significance
78
CWRITE_REG
Function mode
Function mode of the
CWRITE_REG block
Although a large number of CWRITE_REG function blocks can be programmed, only four write operations may be active at the same time. In this case it is irrelevant whether they are the result of this function block or others (e.g. MBP_MSTR , MSTR ,
WRITE_REG ). All function blocks use one data transaction path and require multiple cycles to complete a job.
If several CWRITE_REG function blocks are used within an application, they must at least differ in the values of their NO_REG or REG_WRIT parameters.
Note: A TCP/IP communication between a Quantum PLC (NOE 211 00) and a
Momentum PLC (all TCP/IP CPUs and all TCP/IP I/O modules) is only possible, when only one read or write job is carried out in every cycle. If several jobs are sent per PLC cycle, the communication stops without generating an error message in the status register of the function block.
All routing information is contained in the WordArr5 data structure of the ADDRFLD input. The type function block assigned to this input is defined by the network used.
Please use: z Modbus Plus for function block ModbusP_ADDR z z
TCP/IP Ethernet for function block TCP_IP_ADDR
SY/MAX Ethernet for function block SYMAX_IP_ADDR
Note: The WordArr5 data structure can also be used with constants.
Note: This function block puts a heavy load on the network; therefore the network load must be carefully monitored. If the network load is too high, the program logic should be reorganized, in order to work with the WRITE_REG function block, a variation of this function block that does not operate in a continuous mode, but under command control.
79
CWRITE_REG
Parameter description
SLAVEREG Start of the area in the addressed slave to which the source data is written. The source area always resides within the %MW address area.
Note: For slaves for a nonUnity Pro PLC:
The destination area always resides within the 4x register area. SLAVEREG expects the target address as an offset within the 4x area. The leading "4" must be omitted
(e.g. 59 (contents of the variables or value of the literal) = 40059).
The parameter can be entered as an address, located variable, unlocated variable or literal.
NO_REG
STATUS
REG_WRIT
Number of registers to be written to slave processor (1 ... 100). The parameter can be entered as an address, located variable, unlocated variable or literal.
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see z
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
z z
SY/MAX-specific error codes, p. 116
TCP/IP Ethernet error codes, p. 118
The parameter can be entered as an address, located variable or unlocated variable.
An ARRAY that is the same size as the requested transmission must be agreed upon
( ≥ NO_REG ) for this parameter. The name of this array is defined as a parameter. If the array is defined too small, then only the amount of data is transmitted that is present in the array.
The parameter must be defined as a located variable.
80
MBP_MSTR: Modbus Plus Master
8
Overview
Introduction
What's in this
Chapter?
This chapter describes the MBP_MSTR block.
This chapter contains the following topics:
Topic
Description
Function mode
Parameter description
Write data
Read data
Read local statistics
Clear local statistics
Write Global Data (Peer Cop)
Read Global Data (Peer Cop)
Get remote statistics
Clear remote statistics
Peer cop health
Optional module reset
Read CTE (Config extension table)
Write CTE (Config extension table)
Peer Cop Communications Health Status
Modbus Plus network statistics
TCP/IP Ethernet Network Statistics
Modbus Plus and SY/MAX Ethernet Error Codes
SY/MAX-specific error codes
TCP/IP Ethernet error codes
CTE error codes for SY/MAX and TCP/IP Ethernet
Page
81
MBP_MSTR
Description
Function description
It is possible to select one of 12 available network communication operations using this function block.
Although a large number of MBP_MSTR function blocks can be programmed, only four of them can be active at the same time. All function blocks use one data transaction path and require multiple cycles to complete a job.
Note: A TCP/IP communication between a Quantum PLC and a Momentum PLC is only possible when only one read or write job is carried out in every cycle. If several jobs are sent per PLC cycle, the communication stops without generating an error message in the status register of the function block.
Note: The function block can only be used on the program level, i.e. not in Derived
Function Blocks (DFBs).
Note: Several copies of this function block can be used in the program. However, multiple instancing of these copies is not possible.
EN and ENO can be configured as additional parameters.
Note: You must be familiar with the routing procedures of your network when programming an MSTR function. Modbus Plus routing path structures are described in detail in the Modbus Plus Network Planning and Installation Guide . If TCP/IP or
SY/MAX Ethernet routing is implemented, standard Ethernet IP router products must be used. A full description of the TCP/IP routing is provided in the Quantum with Unity Pro TCP/IP Configuration User Guide .
82
Representation in FBD
MBP_MSTR
Representation:
EnableMSTRFunction
CancelActivMSTROperation
MBP_MSTR_Instance
MBP_MSTR
ENABLE
ABORT
ACTIVE
ERROR
SUCCESS
CONTROL
DATABUF
OperationActiv
FaultyOperation
OperationSuccessful
ControlBlock
DataField
Representation in LD
Representation:
EnableMSTRFunction
MBP_MSTR_Instance
MBP_MSTR
EN
ENABLE
CancelActivMSTROperation
ABORT
ENO
OperationActiv
ACTIVE
FaultyOperation
ERROR
SUCCESS
OperationSuccessful
CONTROL
DATABUF
ControlBlock
DataField
Representation in IL
Representation in ST
Representation:
CAL MBP_MSTR_Instance (ENABLE:=EnableMSTRFunction,
ABORT:=CancelActivMSTROperation, ACTIVE=>OperationActiv,
ERROR=>FaultyOperation, SUCCESS=>OperationSuccessful,
CONTROL=>ControlBlock, DATABUF=>DataField)
Representation:
MBP_MSTR_Instance (ENABLE:=EnableMSTRFunction,
ABORT:=CancelActivMSTROperation, ACTIVE=>OperationActiv,
ERROR=>FaultyOperation, SUCCESS=>OperationSuccessful,
CONTROL=>ControlBlock, DATABUF=>DataField) ;
83
MBP_MSTR
Parameter description
Runtime error
Description of input parameters:
Parameter Data type Description
ENABLE
ABORT
BOOL
BOOL
Enable MSTR function
Cancel active MSTR operation
Description of output parameters:
Parameter Data type Description
ACTIVE BOOL Operation is active
ERROR BOOL Faulty operation
SUCCESS
CONTROL
DATABUF
BOOL
ANY
ANY
Operation completed successfully
Field for MSTR control block
(For the control block a data structure must be declared as a located variable.)
Data area
(For the data area a data structure must be declared as a located variable.)
In the event of an error occurring during an MSTR operation, a hexadecimal error code is displayed in the CONTROL[2] register of the control block for one cycle.
Function error codes are network-specific: z Modbus Plus and SY/MAX Ethernet error codes (See Modbus Plus and SY/MAX z
Ethernet Error Codes, p. 114 )
SY/MAX specific error codes (See
SY/MAX-specific error codes, p. 116 )
z z
TCP/IP Ethernet error codes (See
TCP/IP Ethernet error codes, p. 118 )
CTE Error Codes for SY/MAX and TCP/IP Ethernet (See CTE error codes for SY/
MAX and TCP/IP Ethernet, p. 121 )
Note: For a list of all block error codes and values, see .
84
MBP_MSTR
Function mode
Function mode of MBP_MSTR blocks
Valid function codes
7
8
5
6
3
4
1
2
9
10
11
12
Using the MBP_MSTR block, one of 12 available network communication operations can be triggered via the network. Each operation receives a code. Whether the operations are available depends on the type of network used.
Valid function codes:
Code Function
Legend:
-
X Yes
No
Write data
Read data
Get local statistics
Clear local statistics
Write global data, Peer Cop
Read global data, Peer Cop
Get remote statistics
Clear remote statistics (See Clear remote
)
Peer Cop Status (Peer Cop Health)
Reset optional module
Read CTE (Config extension)
Write CTE (Config extension) -
-
-
X
X
X
X
X
X
X
X
X
Modbus
Plus
-
-
X
X
X
X
X
X
TCP/IP
Ethernet
-
-
-
-
-
-
X
X
SY/MAX
Ethernet
X
X
-
X
X
X
-
X
85
MBP_MSTR
Parameter description
ENABLE
ABORT
ACTIVE
ERROR
SUCCESS
DATABUF
CONTROL
When ON, the operation specified in the first element of the CONTROL register is enabled.
When ON, the currently active operation is aborted.
ON, if the operation is active.
ON, if the operation was aborted without success.
ON, if the operation concluded successfully.
For operations providing data, e.g. the write operation, the data field is the data source. For operations receiving data, e.g. the read operation, the data field is the data destination.
With Ethernet CTE Read and Write operations, the data field holds the contents of the Ethernet configuration extension table. DATABUF must be defined as an ARRAY having at least 10 elements in this case.
The data field must be declared as a located variable.
This field contains the control block. The first element CONTROL[1] contains a number from 1 to 12, which provides the operation code of the Modbus operation to be performed. The content of the sequence register is determined by the operation.
The data field must be declared as a located variable.
The structure of the control block differs according to the network used: z z z
Modbus Plus
TCP/IP Ethernet
SY/MAX Ethernet
86
MBP_MSTR
Control block for
Modbus Plus
Control block for Modbus Plus:
Register Contents
CONTROL[1] indicates one of the Operations which are valid for Modbus Plus
CONTROL[2] indicates the Error status.
CONTROL[3] indicates the length (number of data transferred)
CONTROL[4] indicates operation-dependent information
CONTROL[5] Routing Register 1
Used for specification (routing path addresses one of five) of a destination node during network transfer.
Most significant byte: Source node address
This is the slot for the Modbus Plus Network Options Module (NOM).
When using the Modbus Plus Port on the CPU, this byte must be set to "0"
(independently of the CPU slot).
Least significant byte: Destination node address
This value represents a direct or a bridge address. If there is no bridge, this value contains the destination node address. If there is a bridge, this value contains the address of the bridge.
If the NOM is inserted in slot 7 on the module rack, the most significant byte of routing register 1 looks as follows (value 0x0706): most significant least significant byte byte
0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0
Most significant byte Slots 1 ... 16
Least significant byte Destination address (binary value between 1 and 64
(normal) or 65 to 255 (extended))
CONTROL[6] Routing Register 2
This value contains the destination node address (further Bridge or Modbus
Plus Modules). If addressing in the previous Routing Register has finished, the value is set to "0".
see Routing Register 2
CONTROL[8] Routing Register 4 see Routing Register 2
CONTROL[9] Routing Register 5 see Routing Register 2
87
MBP_MSTR
Control block for
TCP/IP Ethernet
Control block for TCP/IP Ethernet:
Register Contents
CONTROL[1] indicates one of the Operations which are valid for TCP/IP.
CONTROL[2] indicates the Error status (See STATUS
CONTROL[3] indicates the length (number of data transferred)
CONTROL[4] indicates operation-dependent information
CONTROL[5] Routing Register
Used for specification of a destination node during network transfer.
Most significant byte: Source node address
This is the NOE slot for the NOE module.
When using an integrated Ethernet on the CPU, this byte must be set to
"254" (0xFE) (independently of the CPU slot).
Least significant byte: Destination node address
The value in the least significant byte represents a direct or bridge address.
If there is no bridge the value in the least significant byte is set to "0". If there is a bridge, this value contains the MBP for the Ethernet mapping index (MET).
If the NOM is inserted in slot 7 on the module rack and the Ethernet mapping index (MET) is 6, the routing register looks as follows (value
0x0706):: most significant byte least significant byte
0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0
Most significant byte Slots 1 ... 16
Least significant byte MBP on Ethernet Transporter (MET) mapping index
CONTROL[6] Byte 4 (MSB) of the 32bit destination IP address
CONTROL[7] Byte 3 of the 32bit destination IP address
CONTROL[8] Byte 2 of the 32bit destination IP address
CONTROL[9] Byte 1 (LSB) of the 32bit destination IP address
88
MBP_MSTR
Control block for
SY/MAX Ethernet
Control block for SY/MAX Ethernet:
Register Contents
CONTROL[1] indicates one of the Operations which are valid for SY/MAX.
CONTROL[2] indicates the Error status.
CONTROL[3] indicates the length (number of registers transferred)
CONTROL[4] indicates operation-dependent information
CONTROL[5] Routing Register
Used for specification of a destination node during network transfer.
Most significant byte: Source node address slot for the NOE module.
Least significant byte: Destination node address
The value in the least significant byte represents a direct or bridge address.
If there is no bridge the value in the least significant byte is set to "0". If there is a bridge, this value contains the MBP for the Ethernet mapping index (MET).
If NOM is inserted in slot 7 on the module rack and the Ethernet mapping index (MET) is 6, the routing register looks as follows (value 0x0706):: most significant least significant byte byte
0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0
Most significant byte Slots 1 ... 16
Least significant byte MBP on Ethernet Transporter (MET) mapping index
CONTROL[6] Destination drop number (or set to FF hex)
CONTROL[7] Terminator (set to FF hex)
89
MBP_MSTR
Write data
Description The write operation transfers data to an addressed node. The transaction utilizes a master transaction path and may require several cycles.
An attempt to program the MBP_MSTR in such a way that it writes to its own drop address will generate an error in the CONTROL[2] register of the block. However, it is possible to perform a write operation to a non-existing slave register. The slave detects the status and logs it. This can last for several cycles.
The write operation can be performed on Modbus Plus, TCP/IP Ethernet and SY/
MAX Ethernet networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 1 = Write data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses sent to slave
CONTROL[4]
CONTROL[5]
...
CONTROL[9]
Determines the %MW starting register in the slave to which the data will be written (e.g. 1 = %MW1, 49 = %MW49)
Routing register 1 is used to specify the address (routing path address one of five) of the node during a network transfer.
The last byte in the routing path that is not zero, is the destination mode.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 1 = Write data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses sent to slave
CONTROL[4] Determines the CONTROL[ ]start address in the slave to which the data will be written.
CONTROL[6]
...
CONTROL[7]
Most significant byte: Network adapter module slot
Least significant byte: MBP on Ethernet Transporter (MET) mapping index
Each address contains one byte of the 32bit IP address
90
Use of control blocks for SY/
MAX Ethernet
( CONTROL )
MBP_MSTR
Control block for SY/MAX Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 1 = Write data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses sent to slave
CONTROL[4] Determines the %MW starting register in the slave to which the data will be written (e.g. 1 = %MW1, 49 = %MW49)
CONTROL[6]
...
CONTROL[9]
Most significant byte: ´Network adapter module slot
Least significant byte: Destination drop number
Terminator: FF hex
91
MBP_MSTR
Read data
Description The read operation transfers data from a specified node on the network. The transaction utilizes a master transaction path and may require several cycles.
An attempt to program the MBP_MSTR in such a way that it reads from its own station address will generate an error in the CONTROL[2] register of the block. But it is possible to perform a read operation on a non-existing register of the slave. The slave detects the status and logs it. This can last for several cycles.
The read operation can be performed on Modbus Plus, TCP/IP Ethernet and SY/
MAX Ethernet networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 2 = Read data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of registers to be read from the slave
CONTROL[4]
CONTROL[5]
...
CONTROL[6]
Determines the %MW starting register in the slave from which the data will be read (e.g. 1 = %MW1, 49 = %MW49).
Routing register 1 is used to specify the address (routing path address one of five) of the node during a network transfer.
The last byte in the routing path that is not zero, is the destination node.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 2 = Read data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the slave
CONTROL[4] Determines the %MW starting register in the slave from which the data will be read (e.g. 1 = %MW1, 49 = %MW49)
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
Least significant byte: MBP on Ethernet Transporter (MET) mapping index
Each address contains one byte of the 32bit IP address
92
Use of control blocks for SY/
MAX Ethernet
( CONTROL )
MBP_MSTR
Control block for SY/MAX Ethernet ( CONTROL ):
Register Meaning
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the slave
CONTROL[4] Determines the %MW starting register in the slave to which the data will be written (e.g. 1 = %MW1, 49 = %MW49).
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
Least significant byte: Destination drop number
Terminator: FF hex
93
MBP_MSTR
Read local statistics
Description
Network implementation
This operation reads the data from the local node. The operation is carried out in one cycle and does not require a master transaction path.
The write operation can be performed on Modbus Plus, TCP/IP Ethernet and SY/
MAX Ethernet networks: z List of available Modbus Plus network statistics (See Modbus Plus network z
)
List of TCP/IP Ethernet network statistics (See TCP/IP Ethernet Network
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 3 = Read local statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the local statistics (1...32)
CONTROL[4] First address from which the statistics table must be read (Reg1=0)
CONTROL[5] Routing register 1 is used to specify the address (routing path address one of five) of the node during a network transfer.
The last byte in the routing path that is not zero, is the destination mode.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL )
Register Meaning
CONTROL[1] 3 = Read local statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the local statistics (1...32)
CONTROL[4] First address from which the statistics table must be read (Reg1=0)
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
No significance
94
MBP_MSTR
Clear local statistics
Description This operation deletes the statistics concerning the local node. The operation is carried out in one cycle and does not require a master transaction path.
Note: If you edit the "Clear local statistics" operation, only words 13 to 22 in the statistics table are cleared.
Network implementation
The operation can be performed on Modbus Plus and TCP/IP Ethernet networks.
z List of available Modbus Plus network statistics (See Modbus Plus network z
List of TCP/IP Ethernet network statistics (See TCP/IP Ethernet Network
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 4 = Clear local statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Reserved
CONTROL[4] Reserved
CONTROL[5] Routing register 1 is used to specify the address (routing path address one of five) of the node during a network transfer.
The last byte in the routing path that is not zero, is the destination mode.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 4 = Clear local statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Reserved
CONTROL[4] Reserved
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
Reserved
95
MBP_MSTR
Write Global Data (Peer Cop)
Description This operation transfers data to the communication processor of the current node, so that it can be sent via the network as soon as the node receives the token. This data can be received by all nodes connected to the local network. The operation is carried out in one cycle and does not require a master transaction path.
The operation can only be performed on Modbus Plus networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 5 = Write global data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be sent from State RAM into global data memory
(comm processor) (1...32)
CONTROL[4] Reserved
CONTROL[5] If global data is sent via a NOM, you must enter the NOM module slot in the most significant byte of the register.
96
MBP_MSTR
Read Global Data (Peer Cop)
Description This operation reads data from the communications processor of any node connected to the network that sends out global data. The operation can take several cycles if the global data is not currently available with the nodes called. If global data is available, the operation is executed in one cycle. A master transaction path is not required.
The operation can only be performed on Modbus Plus networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 6 = Read global data
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be sent from global data memory (comm processor) (1...32)
CONTROL[4] Display of addresses available in scanned node (Is automatically updated)
CONTROL[5] The lowest significant byte idicates the address of the node (value from 1 to 64) whose global data is to be read.
If global data is received via a NOM, you must enter the NOM module slot in the most significant byte of the address.
97
MBP_MSTR
Get remote statistics
Description This operation reads the data referring to remote nodes on the network (see Modbus
Plus network statistics, p. 108 and
TCP/IP Ethernet Network Statistics, p. 113 ). This
operation can last for several cycles and does not require a master data transaction path.
With each query, the remote communications processor supplies a complete statistics table even if the query does not refer to the entire table. MBP_MSTR will then copy only those words into the identified $MW addresses that you queried.
The operation can be performed on Modbus Plus and TCP/IP Ethernet networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 7 = Get remote statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the statistics data field (1...54) The size of the data field may not be exceeded.
CONTROL[4] First address from which the node statistics must be read. The number of available statistics registers may not be exceeded.
CONTROL[5]
...
CONTROL[9]
Routing address 1 5 of the node.
The last byte in the routing path that is not zero is the destination node.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 7 = Get remote statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Number of addresses to be read from the statistics data field (1...54) The size of the data field may not be exceeded.
CONTROL[4] First address from which the node statistics must be read. The number of available statistics registers may not be exceeded.
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
Each address contains one byte of the 32bit IP address
98
MBP_MSTR
Clear remote statistics
Description This operation clears the statistics concerning remote nodes on the network from the data field of the local node. This operation can last for several cycles and employs one single master data transaction path.
Note: If the "Clear remote statistics" operation is edited, only the words 13 through
22 of the statistics table (see
Modbus Plus network statistics, p. 108
and TCP/IP
Ethernet Network Statistics, p. 113 ) will be deleted.
Network implementation
The write operation can be performed on Modbus Plus and TCP/IP Ethernet networks.
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 8 = Clear remote statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Reserved
CONTROL[4]
CONTROL[5]
...
CONTROL[9]
Reserved
Routing register 1 is used to specify the address (routing path address one of five) of the destination node during a network transfer.
The last byte in the routing path that is not zero, is the destination mode.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 8 = Clear remote statistics
CONTROL[2] indicates the Error status.
CONTROL[3] Reserved
CONTROL[4] Reserved
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
Each address contains one byte of the 32bit IP address
99
MBP_MSTR
Peer cop health
Description This operation reads the selected data from the peer cop communications health table and downloads the respective data into the specified %MW addresses registers of State RAM. The Peer cop communications health table is 12 words long,
MBP_MSTR indexes all words with 0 through 11.
The operation can only be performed on Modbus Plus networks.
Network implementation
Usage of control blocks for
Modbus Plus
( CONTROL )
Control block for Modbus Plus ( CONTROL ):
Register Meaning
CONTROL[1] 9 = Peer cop health
CONTROL[2] indicates the Error status.
CONTROL[3] Number of words wanted by the peer cop table (1...12)
CONTROL[4] First word to be read from the peer cop table (0...11; 0=first word in peer cop table and 11=last word in peer cop table)
If this is the second of two local nodes, set the High value byte to 1.
100
MBP_MSTR
Optional module reset
Description
Network implementation
The "Reset optional module" operation leads a Quantum NOE option module to start a reset cycle to reset its working environment.
The write operation can be performed on TCP/IP Ethernet and SY/MAX Ethernet networks.
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 10 = Optional module reset
CONTROL[2] indicates the Error status.
CONTROL[4] No significance
CONTROL[6]
...
CONTROL[9]
The number shown in the High value byte in area 1 through 16 indicates the slot where the option module is located.
No significance
Use of control blocks for SY/
MAX Ethernet
( CONTROL )
Control block for SY/MAX Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 10 = Optional module reset
CONTROL[2] indicates the Error status.
CONTROL[4] No significance
CONTROL[6]
...
CONTROL[9]
Most significant byte: Network adapter module slot
No significance
101
MBP_MSTR
Read CTE (Config extension table)
Description The "Read CTE" operation reads a given number of bytes from the Ethernet configuration extension table in the specified buffer in the PLC memory. The bytes to be read start with a byte offset at the start of the CTE. The contents of the Ethernet
CTE table is displayed on output DATABUF .
The write operation can be performed on TCP/IP Ethernet and SY/MAX Ethernet networks.
Network implementation
Use of control blocks for TCP/IP
Ethernet
( CONTROL )
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 11 = Read CTE (Config extension table)
CONTROL[2] indicates the Error status.
CONTROL[4] No significance
CONTROL[6]
...
CONTROL[9]
Least significant byte = mapping index
Either a value displayed in the byte of the register or is not used.
or
Most significant byte = network adapter module slot
The number shown in the least significant byte in the area 1 through 16 indicates the slot where the optional module is located.
Use of control blocks for SY/
MAX Ethernet
( CONTROL )
Control block for SY/MAX Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 11 = Read CTE (Config extension table)
CONTROL[2] indicates the Error status.
CONTROL[3] Number of words transferred
CONTROL[4] Byte offset in the PLC register structure, specifying from where the CTE bytes are read.
CONTROL[6]
...
CONTROL[9]
Most significant byte: Slot of the NOE module
Terminator: FF hex
102
CTE indicator implementation
( DATABUF )
MBP_MSTR
The values in the Ethernet configuration extension table (CTE) are displayed in a field on output DATABUF when a CTE read operation is implemented. The registers display the following CTE data:
CTE indicator implementation ( DATABUF ):
Parameter
Frame type
IP address
Lower netmask
Gateway
Register
DATABUF[0]
DATABUF[1]
DATABUF[2]
DATABUF[3]
DATABUF[4]
DATABUF[5]
DATABUF[6]
DATABUF[7]
DATABUF[8]
Contents
1 = 802.3
2 = Ethernet
First byte of the IP address
Second byte of the IP address
Third byte of the IP address
Fourth byte of the IP address
Most significant word
Least significant word
First byte of the gateway
Second byte of the gateway
DATABUF[9] Third byte of the gateway
DATABUF[10] Fourth byte of the gateway
103
MBP_MSTR
Write CTE (Config extension table)
Description
Network implementation
Use of control blocks for
TCP/IP Ethernet
( CONTROL )
The "Write CTE" operation writes the CTE configuration table from the specified data ( DATABUF ) to a specified Ethernet configuration extension table or to a specific slot.
The write operation can be performed on TCP/IP Ethernet and SY/MAX Ethernet networks.
Control block for TCP/IP Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 12 = Write CTE (Config extension table)
CONTROL[2] indicates the Error status.
CONTROL[4] No significance
CONTROL[6]
...
CONTROL[9]
Least significant byte = mapping index
Either a value displayed in the byte of the address or is not used.
or
Most significant byte = network adapter module slot
The number shown in the least significant byte in the area 1 through 16 indicates the slot where the optional module is located.
104
Use of control blocks for SY/
MAX Ethernet
( CONTROL )
MBP_MSTR
Control block for SY/MAX Ethernet ( CONTROL ):
Register Meaning
CONTROL[1] 12 = Write CTE (Config extension table)
CONTROL[2] indicates the Error status.
CONTROL[3] Number of words transferred
CONTROL[4] Byte offset in the PLC address structure specifying where the CTE bytes are written.
Most significant byte = NOE module slot
Least significant byte = Destination drop number
CONTROL[6] Terminator: FF hex
CONTROL[7]
...
CONTROL[9]
No significance
CTE indicator implementation
( DATABUF )
The values in the Ethernet configuration extension table (CTE) are displayed in a field on output DATABUF when a CTE write operation is implemented. The registers are used to transfer the following CTE data:
CTE indicator implementation ( DATABUF ):
Parameter Register Contents
Frame type DATABUF[0] 1 = 802.3
2 = Ethernet
IP address DATABUF[1] First byte of the IP address
DATABUF[2] Second byte of the IP address
DATABUF[3] Third byte of the IP address
DATABUF[4] Fourth byte of the IP address
Lower netmask
Gateway
DATABUF[5]
DATABUF[6]
Most significant word
Least significant word
DATABUF[7] First byte of the gateway
DATABUF[8] Second byte of the gateway
DATABUF[9] Third byte of the gateway
DATABUF[10] Fourth byte of the gateway
105
MBP_MSTR
Peer Cop Communications Health Status
Peer Cop
Communications
Health Status
The table containing the Peer Cop status information fills 12 consecutive registers, which can be indexed with the numbers 0 to 11 in an MBP_MSTR operation. Each individual bit of the table words is used to present one aspect of communications health that refers to a specific node on the Modbus Plus network.
Relation bit network node
The bits of the words 0 to 3 represent the health at the global communications input of nodes 1 to 64. The bits of words 4 ... 7 represent the health of the output of a specific node.
The bits in words 8 to 11 represent the health of the input of a specific node.
Relation bit network node Status type Word index
Global receive
0
1
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
2
48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
3
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
Send direct 4
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
5
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
6
48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
7
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
Receive direct
8
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
9
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
10
48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
11
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
106
MBP_MSTR
Health bit status The status of the Peer Cop Health bit indicates the current communications status of its assigned node. A health bit will be set when the associated node accepts input for its Peer Cop data block or when it receives a signal that another node has accepted specific output data from its Peer Cop output data block. A health bit will be deleted if the associated data block did not accept any communication within the configured Peer Cop health timeout period.
All health bits will be deleted when interface command "Put Peer Cop" is executed during PLC startup. The table values become valid when the Token has been completely bypassed, after the interface command "Put Peer Cop" has been carried out. The health bit of a specific node is always zero when the assigned Peer Cop entry is zero.
107
MBP_MSTR
Modbus Plus network statistics
Modbus Plus network statistics
The following table shows the statistics available on Modbus Plus. You can obtain this data by running the corresponding MBP_MSTR operation (Modbus function code
8).
Word
00
01
02
Note: If you edit the "Clear local statistics" or "Clear remote statistics" operation, only words 13 to 22 in the statistics table are cleared.
Modbus Plus network statistics:
Bits Description
Node type ID
Unknown node type 0
1
4
5
2
3
PLC node
Modbus bridge node
Host computer node
Bridge Plus node
Peer I/O node
0 ... 11 Software version number as hexadecimal value (to read this, isolate bits 12-15 from the word)
12 ...
14
Reserved
15 Defines error counters from word 15.
The most significant bit defines the use of error counters in word 15. The lower valued half of the most significant byte together with the least significant byte contain the software
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 version.
Software-Versionsnummer
(in Hexadezimalwerten)
Fehlerzähler von Wort 15 (siehe Wort 15)
Network address of this station
108
05
06
07
Word
03
04
08
09
10
11
12
13
14
0
32
64
96
128
6
7
8
9
10
0
1
2
3
4
5
Bits
HIGH
LOW
HIGH
LOW
HIGH
LOW
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
Description
MAC status variable:
Startup status
Offline status indicator signals
Duplicated offline status
Idle status
Token utilization status
Work response status
Token transfer status
Response request status
Status check of transfer
Token request status
Response request status
Peer status (LED code); indicates status of this device relative to the network:
Monitor connect operation
Normal connect operation
Never receives token
Single station
Duplicate station
Token transfer counter; increments each time this station receives the token
Token cycle time in ms
Bit representation data master fail during token ownership
Bit representation (bitmap) program master fail during token ownership
Bitmap activity token ownership of the data master
Bitmap activity token ownership of the program master
Bitmap activity token ownership of the data slave
Bitmap activity token ownership of the program slave
Bitmap transfer request command data slave/slave poll
Bitmap response transfer request program master/master poll
Bitmap transfer request command program slave/slave poll
Bitmap connect status of the program master
Bitmap automatic log-off of program slave
Pretransfer delay error counter
Receive buffer DMA overrun error counter
Receive counter repeat command
Error counter data block size
MBP_MSTR
109
MBP_MSTR
Word
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Bits
LOW
HIGH
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
HIGH
LOW
HIGH
LOW
HIGH
LOW
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
Description
If bit 15 of word 1 is not set, word 15 has the following significance:
Error counter receiver collision abort
Error counter receiver alignment
If bit 15 of word 1 is set, word 15 has the following significance:
Data block error on cable B
Data block error on cable B
Error counter CRC receiver
Error counter wrong packet length
Error counter wrong link address
Error counter DMA underflow transfer buffer storage
Error counter wrong internal packet length
Error counter wrong MAC function code
Communication retry counter
Error counter communication failed
Counter package receipt successful
Error counter no response receipt
Error counter unexpected response receipt
Error counter unexpected path
Error counter unexpected response
Error counter skipped transaction
Bitmap active station table, nodes 1 through 8
Bitmap active station table, nodes 9 through 16
Bitmap active station table, nodes 17 through 24
Bitmap active station table, nodes 25 through 32
Bitmap active station table, nodes 33 through 40
Bitmap active station table, nodes 41 through 48
Bitmap active station table, nodes 49 through 56
Bitmap active station table, nodes 57 through 64
Bitmap token station table, nodes 1 through 8
Bitmap token station table, nodes 9 through 16
Bitmap token station table, nodes 17 through 24
Bitmap token station table, nodes 25 through 32
Bitmap token station table, nodes 33 through 40
Bitmap token station table, nodes 41 through 48
Bitmap token station table, nodes 49 through 56
Bitmap token station table, nodes 57 through 64
110
Word
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
Bits
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
HIGH
LOW
HIGH
LOW
HIGH
LOW
Description
Bitmap table regarding existence of global data, nodes 1 through 8
Bitmap table regarding existence of global data, nodes 9 through 16
Bitmap table regarding existence of global data, nodes 17 through 24
Bitmap table regarding existence of global data, nodes 25 through 32
Bitmap table regarding existence of global data, nodes 33 through 40
Bitmap table regarding existence of global data, nodes 41 through 48
Bitmap table regarding existence of global data, nodes 49 through 56
Bitmap table regarding existence of global data, nodes 57 through 64
Bitmap receive buffer used, buffers 1 through 8
Bitmap receive buffer used, buffers 9 through 16
Bitmap receive buffer used, buffers 17 through 24
Bitmap receive buffer used, buffers 25 through 32
Bitmap receive buffer used, buffers 33 through 40
Counter of activated processed commands for station administration
Counter activation command output path 1 of the data master
Counter activation command output path 2 of the data master
Counter activation command output path 3 of the data master
Counter activation command output path 4 of the data master
Counter activation command output path 5 of the data master
Counter activation command output path 6 of the data master
Counter activation command output path 7 of the data master
Counter activation command output path 8 of the data master
Counter command processing input path 41 of the data slave
Counter command processing input path 42 of the data slave
Counter command processing input path 43 of the data slave
Counter command processing input path 44 of the data slave
Counter command processing input path 45 of the data slave
Counter command processing input path 46 of the data slave
Counter command processing input path 47 of the data slave
Counter command processing input path 48 of the data slave
Counter command activation output path 81 of the program master
Counter command activation output path 82 of the program master
Counter command activation output path 83 of the program master
Counter command activation output path 84 of the program master
Counter command activation output path 85 of the program master
Counter command activation output path 86 of the program master
MBP_MSTR
111
MBP_MSTR
Word
49
50
51
52
53
Bits
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
LOW
HIGH
Description
Counter command activation output path 87 of the program master
Counter command activation output path 88 of the program master
Counter command processing input path C1 of the program slave
Counter command processing input path C2 of the program slave
Counter command processing input path C3 of the program slave
Counter command processing input path C4 of the program slave
Counter command processing input path C5 of the program slave
Counter command processing input path C6 of the program slave
Counter command processing input path C7 of the program slave
Counter command processing input path C8 of the program slave
112
MBP_MSTR
TCP/IP Ethernet Network Statistics
TCP/IP Ethernet
Network
Statistics
A TCP/IP Ethernet module replies to the "Get local statistics" and "Set local statistics" commands using the following information:
Word Meaning
00 to 02 MAC address e.g. MAC address 00 00 54 00 12 34 is displayed as follows:
Word
00
01
02
Contents
00
00
34
00
54
12
03 Module state z 0x0001 = Running z 0x4000 = APPI LED (1=ON, 0 = OFF) z 0x8000 = LED connection
04 and 05 Number of receiver interrupts
06 and 07 Number of transfer interrupts
08 and 09 Transfer timeout error count
10 and 11 Collision detection error count
12 and 13 Omitted packets
14 and 15 Memory error count
16 and 17 Number of restarts performed by the driver
18 and 19 Receive framing error count
20 and 21 Overflow error count receiver
22 and 23 Receive CRC error counter
24 and 25 Receive buffer error counter
26 and 27 Transfer buffer error counter
28 and 29 Transfer bin underflow counter
30 and 31 Late collision counter
32 and 33 Lost carrier counter
34 and 35 Number of retries
36 and 37 IP address e.g. the IP address 198.202.137.113 (or c6 CA 89 71) is represented as follows:
Word
36
37
Contents
89
C6
71
CA
113
MBP_MSTR
Modbus Plus and SY/MAX Ethernet Error Codes
Form of the function error code
Hexadecimal error code
Function error codes for Modbus Plus and SY/MAX Ethernet transactions appear as
Mmss , where: z M is the high code z z m is the low code ss is a subcode
2003
2004
2005
2006
2007
2008
2009
200A
200E
Hexadecimal error code for Modbus Plus and SY/MAX Ethernet:
Hex.
Error Code
1001
2001
2002
30ss
4001
5001
6mss
Description
Abort by user
An operation type that is not supported has been specified in the control block
One or more control block parameters were modified while the MSTR element was active (this only applies to operations which require several cycles for completion). Control block parameters my only be modified in inactive MSTR components.
Invalid value in the length field of the control block
Invalid value in the offset field of the control block
Invalid value in the length and offset fields of the control block
Unauthorized data field on slave
Unauthorized network field on slave
Unauthorized network routing path on slave
Routing path equivalent to their own address
Attempt to get more global data words than available
The control block is not assigned, or parts of the control block are located outside of the %MW (4x) range.
Exceptional response by Modbus slave (See ss hexadecimal value in 30ss
Inconsistent response by Modbus slave
Inconsistent response by the network
Routing path error (See
ss hexadecimal value in 6mss error code, p. 115
)
The subfield m shows where the error occurred (a 0 value means local node,
2 means 2nd device in route, etc).
114
ss hexadecimal value in 30ss error code ss hexadecimal value in 30ss error code:
03
05
06
07 ss hex.
Value
01
02
Description
Slave does not support requested operation
Non-existing slave registers were requested
An unauthorized data value was requested
Slave has accepted a lengthy program command
Function cannot currently be carried out: lengthy command running
Slave has rejected lengthy program command
MBP_MSTR ss hexadecimal value in 6mss error code
Note: Subfield m in error code 6mss is an Index in the routing information that shows where an error has been detected (a 0 value indicates the local node, 2 means the second device in the route, etc.).
The ss subfield in error code 6mss is as follows:
07
08
10
20
40
80
F001
03
04
05
06 ss hexadecimal value
01
02
Description
No response reception
Access to program denied
Node out of service and unable to communicate
Unusual response received
Router-node data path busy
Slave out of order
Wrong destination address
Unauthorized node type in routing path
Slave has rejected the command
Slave has lost an activated transaction
Unexpected master output path received
Unexpected response received
Wrong destination node was specified for the MSTR operation
115
MBP_MSTR
SY/MAX-specific error codes
SY/MAX-specific error codes
When utilizing SY/MAX Ethernet, three additional types of errors may appear in the
CONTROL[1] register of the control block ().
The error codes have the following meaning: z z z
71xx Error: Errors found by the SY/MAX remote device
72xx Error: Errors found by the server
73xx Error: Errors found by the Quantum translator
SY/MAX-specific
HEX error code
7213
721D
7249
724B
7301
7303
7309
7113
711D
7149
714B
7101
7203
7209
F720
7210
7211
SY/MAX-specific HEX error code:
Hex.
Error
Code
7101
7103
7109
F710
7110
7111
Description
Invalid opcode found by the SY/MAX remote device
Invalid address found by the SY/MAX remote device
Attempt to write to a write protected register found by the SY/MAX remote device
Receiver overflow found by the SY/MAX remote device
Invalid length found by the SY/MAX remote device
Remote device not active, no connection (occurs when retry attempts and time-out have been used up), found by the SY/MAX remote device
Invalid parameter in a read operation found by the SY/MAX remote device
Invalid route found by the SY/MAX remote device
Invalid parameter in a write operation found by the SY/MAX remote device
Invalid drop number found by the SY/MAX remote device
Invalid opcode found by the SY/MAX server
Invalid address found by the SY/MAX server
Attempt to write to a write protected register found by the SY/MAX server
Receiver overflow found by the SY/MAX server
Invalid length found by the SY/MAX server
Remote device not active, no connection (occurs when retry attempts and time-out have been used up), found by the SY/MAX server
Invalid parameter in a read operation found by the SY/MAX server
Invalid route found by the SY/MAX server
Invalid parameter in a write operation found by the SY/MAX server
Invalid drop number found by the SY/MAX server
Invalid opcode in an MSTR block request from the Quantum translator
Read/Write QSE module status (200 route address out of range)
Attempt to write to a write protected register when a status write is carried out (200 route)
116
MBP_MSTR
Hex.
Error
Code
731D
Description
734B
Invalid route found by the Quantum translator.
Valid routes: z dest_drop, 0xFF z 200, dest_drop, 0xFF z 100+drop, dest_drop, 0xFF z All other routing values produce an error
One of the following errors occurred: z No CTE (configuration extension table) has been configured z No CTE table entry has been made for the QSE model slot number z No valid drop has been specified z The QSE module has not been reset after the creation of the CTE.
Note: After writing and configuring the CTE and downloading to the QSE module, the QSE module must be reset for the modifications to become effective.
z When using an MSTR instruction no valid slot or drop has been specified
117
MBP_MSTR
TCP/IP Ethernet error codes
TCP/IP Ethernet error codes
An error in an MSTR routine via TCP/IP Ethernet may produce one of the following errors in the MSTR control block:
The error code appears as Mmss , where: z M is the high code z z m is the low code ss is a subcode
HEX error codes
TCP/IP Ethernet
HEX error codes TCP/IP Ethernet:
2003
2004
2005
2006
200E
Hex. Error
Code
1001
2001
2002
3000
30ss
4001
Meaning
Abort by user
An operation type that is not supported has been specified in the control block
One or more control block parameters were modified while the MSTR element was active
(this only applies to operations which require several cycles for completion). Control block parameters my only be modified in inactive MSTR components.
Invalid value in the length field of the control block
Invalid value in the offset field of the control block
Invalid value in the length and offset fields of the control block
Unauthorized data field on slave
The control block is not assigned, or parts of the control block are located outside of the
%MW (4x) range.
Generic Modbus failure code
Exceptional response by Modbus slave (See ss hexadecimal value in 30ss error code,
Inconsistent response by Modbus slave ss hexadecimal value in 30ss error code ss hexadecimal value in 30ss error code:
03
05
06
07 ss hex.
Value
01
02
Meaning
Slave does not support requested operation
Non-existing slave registers were requested
An unauthorized data value was requested
Slave has accepted a lengthy program command
Function cannot currently be carried out: lengthy command running
Slave has rejected lengthy program command
118
MBP_MSTR
HEX error codes
TCP/IP Ethernet network
502E
F502
5030
5031
5032
5033
5034
5035
5036
5026
5027
5028
5029
502A
502B
502C
502D
An error on the TCP/IP Ethernet network itself may produce one of the following errors in the CONTROL[1] register of the control block.
HEX error codes TCP/IP Ethernet network:
Meaning
5011
5016
5017
5020
5023
5024
5025
Hex. Error
Code
5004
5005
5006
5009
500C
500D
Interrupted system invocation
I/O error
No such address
The socket descriptor is not valid
Not enough storage space
Authorization denied
Entry exists
An argument is not valid
An internal table has no more space
There is interference on the connection
This operation was blocked and the socket is non-blocking
The socket is non-blocking and the connection cannot be closed down
The socket is non-blocking and a previous connection attempt has not been concluded
Socket operation on a non-socket
The destination address is not valid
Message too long
Wrong type of protocol for the socket
Protocol not available
Protocol not supported
Socket type not supported
Operation not supported at socket
Protocol family not supported
Address family not supported
Address is already in use
Address not available
Network is out of order
Network cannot be reached
Network shut down the connection during reset
The connection was terminated by the peer
The connection was reset by the peer
119
MBP_MSTR
504B
5050
5051
5052
5053
5054
5055
5056
5057
6003
F001
F002
503D
5040
5041
5042
5046
5047
5048
5049
504A
Hex. Error
Code
5037
5038
5039
503A
503B
503C
Meaning
An internal buffer is required, but cannot be assigned
The socket is already connected
The socket is not connected
Cannot transmit after the socket has been shut off
Too many references; cannot splice
Connection timed out
The connection attempt was denied
Host is out of order
The destination host could not be reached from this node
Directory not empty
NI_INIT returned -1
The MTU is not valid
The hardware length is not valid
The route specified cannot be found
Collision when invoking Select; these conditions have already been selected by another job
The job ID is not valid
No Network Resource
Length Error
Addressing Error
Application Error
Client cannot process request
No Network Resource
Non-Operational TCP connection
Incoherent configuration
FIN or RST not expected
In reset mode
Component not fully initialized
120
MBP_MSTR
CTE error codes for SY/MAX and TCP/IP Ethernet
CTE error codes for SY/MAX and
TCP/IP Ethernet
The following error codes are displayed in the CONTROL[1] register of the control block, if there is a problem with the Ethernet configuration extension table (CTE) in your program configuration.
CTE error codes for SY/MAX and TCP/IP Ethernet:
Description Hex. Error
Code
7001
7002
7003
7004
7005
There is no Ethernet configuration extension
The CTE is not available for access
The offset is not valid
Offset + length are not valid
Bad data field in the CTE
121
MBP_MSTR
122
ModbusP_ADDR: Modbus
Plus Address
Overview
Introduction
What's in this
Chapter?
This chapter describes the ModbusP_ADDR block.
This chapter contains the following topics:
Topic
Description
Detailed Description
9
Page
123
MODBUSP_ADDR
Description
Function description
This function block allows the entry of the Modbus Plus address for function blocks
READ_REG , CREAD_REG , WRITE_REG and CWRITE_REG . The address is transferred as a data structure.
EN and ENO can be configured as additional parameters.
Note: You must be familiar with your network when programming the
ModbusP_ADDR function block. Modbus Plus routing path structures are described in detail in "Modbus Plus Network Planning and Installation Guide".
Representation in FBD
Representation:
NOMModuleSlot
BYTE_variable1
BYTE_variable2
BYTE_variable3
BYTE_variable4
BYTE_variable5
ModbusP_ADDR_Instance
ModbusP_ADDR
SLOT_ID
ADDRFLD
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
DataStructureModbusPlusAddress
124
Representation in LD
MODBUSP_ADDR
Representation:
NOMModuleSlot
ModbusP_ADDR_Instance
ModbusP_ADDR
EN ENO
SLOT_ID
ADDRFLD
BYTE_variable1
BYTE_variable2
BYTE_variable3
ROUTING1
ROUTING2
ROUTING3
BYTE_variable4
BYTE_variable5
ROUTING4
ROUTING5
DataStructureModbusPlusAddress
Representation in IL
Representation in ST
Representation:
CAL ModbusP_ADDR_Instance (SLOT_ID:=NOMModuleSlot,
ROUTING1:=BYTE_variable1, ROUTING2:=BYTE_variable2,
ROUTING3:=BYTE_variable3, ROUTING4:=BYTE_variable4,
ROUTING5:=BYTE_variable5,
ADDRFLD=>DataStructureModbusPlusAddress)
Representation:
ModbusP_ADDR_Instance (SLOT_ID:=NOMModuleSlot,
ROUTING1:=BYTE_variable1, ROUTING2:=BYTE_variable2,
ROUTING3:=BYTE_variable3, ROUTING4:=BYTE_variable4,
ROUTING5:=BYTE_variable5,
ADDRFLD=>DataStructureModbusPlusAddress) ;
125
MODBUSP_ADDR
Parameter description
Description of input parameters:
Parameter Data type Description
Slot_ID BYTE Slot ID
NOM module slot
ROUTING1
ROUTING2
ROUTING3
ROUTING4
ROUTING5
BYTE
BYTE
BYTE
BYTE
BYTE
Routing 1 is used for address specification (routing path addresses one of five) of the destination node during network transfer.
The last byte in the routing path that is not zero is the destination node.
Routing 2
Routing 3
Routing 4
Routing 5
Description of output parameters:
Parameter Data type Description
ADDRFLD WordArr5 Data structure used to transfer the Modbus Plus address
126
MODBUSP_ADDR
Detailed Description
Derived Data
Types
Element description for WordArr5 :
Element Data type Description
WordArr5[1] WORD Routing tab 1
Least significant byte: used for address specification (routing path addresses one of five) of a destination node during network transfer.
Most significant byte:
Slot of the network adapter module (NOM), if available.
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Routing tab 2
Routing tab 3
Routing tab 4
Routing tab 5
Slot_ID
Routing x
If a Modbus Plus network option module (NOM) in the rack of a Quantum controller is addressed as the destination node, the value at the Slot_ID input represents the physical NOM slot, i.e. if the NOM is plugged in at Slot 7 of the rack, the value appears as follows:
0 0 0 0 0 1 1 1
The Routing x input is used for address specification (routing path addresses one of five) of the destination node during network transfer. The last byte in the routing path that is not zero is the destination node.
0 x x x x x x x
Destination address (binary value between 1 and 64 (normal) or 65 to 249 (extended))
127
MODBUSP_ADDR
Routing tab 1 If a Modbus Plus Network Options Module (NOM) is addressed as the destination node in a Quantum control module rack, the most significant byte represents the physical slot of the NOM. If the destination node is a CPU, the most significant byte
(regardless of the CPU slot) is set to "0".
If NOM is inserted in slot 7 on the module rack, the most significant byte of routing tab 1 looks as follows:
Most significant byte Least significant byte
0 0 0 0 0 1 1 1 0 x x x x x x x
Most significant byte Slots 1 ... 16
Least significant byte Destination address (binary value between 1 and 64 (normal) or 65 to
255 (extended))
128
READ_REG: Read register
Overview
Introduction
What's in this
Chapter?
This chapter describes the READ_REG block.
This chapter contains the following topics:
Topic
Description
Derived Data Types
Function mode
Parameter description
10
Page
129
READ_REG:
Description
Function description
With a rising edge at the REQ input, this function block reads a register area from an addressed slave via Modbus Plus, TCP/IP-Ethernet or SY/MAX-Ethernet.
Note: When programming a READ_REG function, you must be familiar with the routing procedures used by your network. Modbus Plus routing path structures are described in detail in the Modbus Plus Network Planning and Installation Guide . If
TCP/IP or SY/MAX Ethernet routing is implemented, standard Ethernet IP router products must be used. A full description of the TCP/IP routing is provided in the
Quantum with Unity Pro TCP/IP Configuration User Guide .
Representation in FBD
Representation in LD
Note: Several copies of this function block can be used in the program. However, multiple instancing of these copies is not possible.
EN and ENO can be configured as additional parameters.
Representation:
StartReadOnce
OffsetAddress
NumberOfRegisters
DataStructure
READ_REG_Instance
READ_REG
REQ
SLAVEREG
NO_REG
ADDRFLD
NDR
ERROR
REG_READ
STATUS
SetAfterReadingNewData
SetInCaseOfError
RegisterToRead
ErrorCode
Representation:
StartReadOnce
OffsetAddress
READ_REG_Instance
READ_REG
EN
REQ
SLAVEREG
ENO
NDR
SetAfterReadingNewData
SetInCaseOfError
ERROR
NumberOfRegisters NO_REG REG_READ RegisterToRead
DataStructure ADDRFLD STATUS ErrorCode
130
Representation in IL
Representation in ST
Parameter description
READ_REG:
Representation:
CAL READ_REG_Instance (REQ:=StartReadOnce,
SLAVEREG:=OffsetAddress, NO_REG:=NumberOfRegisters,
ADDRFLD:=DataStructure, NDR=>SetAfterReadingNewData,
ERROR=>SetInCaseOfError, REG_READ=>RegisterToRead,
STATUS=>ErrorCode)
Representation:
READ_REG_Instance (REQ:=StartReadOnce,
SLAVEREG:=OffsetAddress, NO_REG:=NumberOfRegisters,
ADDRFLD:=DataStructure, NDR=>SetAfterReadingNewData,
ERROR=>SetInCaseOfError, REG_READ=>RegisterToRead,
STATUS=>ErrorCode) ;
Description of input parameters:
Parameter Data type Meaning
REQ BOOL, With a rising edge at the REQ input, this function block reads a register area from an addressed slave via Modbus Plus, TCP/IP-
Ethernet or SY/MAX-Ethernet.
SLAVEREG DINT
NO_REG
ADDRFLD
Offset address of the first %MW register in the slave to be read from.
INT Number of addresses to be read from slave
WordArr5 Data structure describing the Modbus Plus-address, TCP/IP address or SY/MAX-IP address.
Description of output parameters:
Parameter
NDR
ERROR
STATUS
REG_READ
Data type Meaning
BOOL Set to "1" for one cycle after reading new data
BOOL
WORD,
ANY
Set to "1" for one cycle if an error occurs
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see z
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
z
SY/MAX-specific error codes, p. 116
z
TCP/IP Ethernet error codes, p. 118
Writing data
(For the file to be read a data structure must be declared as a located variable.)
Runtime error For a list of all block error codes and values, see .
131
READ_REG:
Derived Data Types
Element description for
WordArr5 in
Modbus Plus
Element description for WordArr5 in Modbus Plus:
Element
WordArr5[1]
Data type
WORD
Description
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
WORD
WORD
WORD
WORD
Least significant byte:
Routing register 1 is used for address specification (routing path addresses one of five) of the destination node during network transfer.
The last byte in the routing path that is not zero is the destination node.
Most significant byte:
Slot of the network adapter module (NOM), if any.
Routing register 2
Routing register 3
Routing register 4
Routing register 5
Element description for
WordArr5 with
TCP/IP Ethernet
Element description for
WordArr5 with
SY/MAX Ethernet
Element description for WordArr5 with TCP/IP Ethernet
Element
WordArr5[1]
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
Data type
WORD
WORD
WORD
WORD
WORD
Description
Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slot of the NOE module
Byte 4 (MSB) of the 32-bit destination IP address
Byte 3 of the 32-bit destination IP address
Byte 2 of the 32-bit destination IP address
Byte 1 (LSB) of the 32-bit destination IP address
Element description for WordArr5 with SY/MAX Ethernet:
Element Data type Description
WordArr5[1] WORD Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Most significant byte:
Slot of the NOE module
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Destination drop number (or set to FF hex)
Terminator (set to FF hex)
No significance
No significance
132
READ_REG:
Function mode
Function mode of READ_REG blocks
Although a large number of READ_REG function blocks can be programmed, only four read operations may be active at the same time. In such a case it is insignificant whether they are the result of this function block or others (e.g. MBP_MSTR ,
CREAD_REG ). All function blocks use one data transaction path and require multiple cycles to complete a job.
Note: A TCP/IP communication between a Quantum PLC (NOE 211 00) and a
Momentum PLC (all TCP/IP CPUs and all TCP/IP I/O modules) is only possible, when only one read or write job is carried out in every cycle. If several jobs are sent per PLC cycle, the communication stops without generating an error message in the status register of the function block.
All routing information is contained in the WordArr5 data structure of the ADDRFLD input. The type function block assigned to this input is defined by the network used.
Please use: z Modbus Plus for function block ModbusP_ADDR z z
TCP/IP Ethernet for function block TCP_IP_ADDR
SY/MAX Ethernet for function block SYMAX_IP_ADDR
Note: The WordArr5 data structure can also be used with constants.
133
READ_REG:
Parameter description
REQ
SLAVEREG
A rising edge triggers the read transaction.
The parameter can be entered as a direct address, located variable, unlocated variable or literal.
Start of the area in the addressed slave from which the source data is read. The source area always resides within the %MW register area.
Note: For slaves for a nonUnity Pro PLC:
The source area always resides within the 4x register area. SLAVEREG expects the source reference as offset within the 4x area. The leading "4" must be omitted (e.g.
59 (contents of the variables or value of the literal) = 40059).
The parameter can be entered as a direct address, located variable, unlocated variable or literal.
NO_REG
NDR
ERROR
REG_READ
Number of addresses to be read from the addressed slave (1 ... 100).
The parameter can be entered as a direct address, located variable, unlocated variable or literal.
Transition to ON state for one program cycle signifies receipt of new data ready to be processed.
The parameter can be entered as a direct address, located variable or unlocated variable.
Transition to ON state for one program cycle signifies the detection of a new error.
The parameter can be entered as a direct address, located variable or unlocated variable.
An ARRAY that is the same size as the requested transmission must be agreed upon
( ≥ NO_REG ) for this parameter. The name of this array is defined as a parameter. If the array is defined too small, then only the amount of data is transmitted that is present in the array.
The parameter must be defined as a located variable.
134
STATUS
READ_REG:
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see z
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
z z
SY/MAX-specific error codes, p. 116
TCP/IP Ethernet error codes, p. 118
The parameter can be entered as an address, located variable or unlocated variable.
135
READ_REG:
136
WRITE_REG: Write register
11
Overview
Introduction
What's in this
Chapter?
This chapter describes the WRITE_REG block.
This chapter contains the following topics:
Topic
Description
Derived Data Types
Function mode
Parameter description
Page
137
WRITE_REG
Description
Function description
With a rising edge at the REQ input, this function block writes a register area from a register area from the PLC via Modbus Plus, TCP/IP Ethernet or SY/MAX-Ethernet to an addressed slave.
EN and ENO can be configured as additional parameters.
Note: When programming a WRITE_REG function, you must be familiar with the routing procedures used by your network. Modbus Plus routing path structures are described in detail in the Modbus Plus Network
Planning and Installation Guide . If TCP/IP or SY/MAX Ethernet routing is implemented, standard Ethernet
IP router products must be used. A full description of the TCP/IP routing is provided in the Quantum with
Unity ProTCP/IP Configuration User Guide .
Note: Several copies of this function block can be used in the program. However, multiple instancing of these copies is not possible.
Representation in FBD
Representation:
StartWriteOnce
OffsetAddress
NumberOfRegisters
SourceDataArea
DataStructureForTransfer
WRITE_REG_Instance
WRITE_REG
REQ
SLAVEREG
NO_REG
REG_WRIT
ADDRFLD
DONE
ERROR
STATUS
SetAfterWritingData
SetInCaseOfError
ErrorCode
138
Representation in LD
WRITE_REG
Representation:
WRITE_REG_Instance
WRITE_REG
EN ENO
StartWriteOnce
REQ DONE
OffsetAddress SLAVEREG ERROR
NumberOfRegisters
SourceDataArea
NO_REG
REG_WRIT
SetAfterWritingData
SetInCaseOfError
DataStructureForTransfer ADDRFLD STATUS ErrorCode
Representation in IL
Representation in ST
Representation:
CAL WRITE_REG_Instance (REQ:=StartWriteOnce,
SLAVEREG:=OffsetAddress, NO_REG:=NumberOfRegisters,
REG_WRIT:=SourceDataArea,
ADDRFLD:=DataStructureForTransfer,
DONE=>SetAfterWritingData, ERROR=>SetInCaseOfError,
STATUS=>ErrorCode)
Representation:
WRITE_REG_Instance (REQ:=StartWriteOnce,
SLAVEREG:=OffsetAddress, NO_REG:=NumberOfRegisters,
REG_WRIT:=SourceDataArea,
ADDRFLD:=DataStructureForTransfer,
DONE=>SetAfterWritingData, ERROR=>SetInCaseOfError,
STATUS=>ErrorCode) ;
139
WRITE_REG
Parameter description
Runtime error
Description of input parameters:
Parameter Data type Meaning
REQ BOOL With a rising edge at the REQ input, this function block writes a register area from a register area from the PLC via Modbus Plus,
TCP/IP Ethernet or SY/MAX-Ethernet to an addressed slave.
SLAVEREG DINT
NO_REG INT
Offset address of the first %MW register in the slave to be written to.
Number of addresses to be written from slave
REG_WRIT ANY Source data field
(A data structure must be declared as a located variable for the source file .)
ADDRFLD WordArr5 Data structure transferring the Modbus Plus-address, TCP/IP address or SY/MAX-IP address.
Description of output parameters:
Parameter Data type Meaning
DONE BOOL Set to "1" for one cycle after writing data.
ERROR
STATUS
BOOL
WORD
Set to "1" for one cycle if an error occurs.
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
z z
Error code, see
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
SY/MAX-specific error codes, p. 116
z
TCP/IP Ethernet error codes, p. 118
For a list of all block error codes and values, see .
140
WRITE_REG
Derived Data Types
Element description for
WordArr5 in
Modbus Plus
Element description for WordArr5 in Modbus Plus:
Element
WordArr5[1]
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
Data type
WORD
WORD
WORD
WORD
WORD
Description
Least significant byte:
Routing register 1 is used for address specification
(routing path addresses one of five) of the destination node during network transfer.
The last byte in the routing path that is not zero is the destination node.
Most significant byte:
Slot of the network adapter module (NOM), if any.
Routing register 2
Routing register 3
Routing register 4
Routing register 5
Element description for
WordArr5 with
TCP/IP Ethernet
Element description for WordArr5 with TCP/IP Ethernet
Element Data type Description
WordArr5[1] WORD Most significant byte:
Slot of the NOE module
Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
WordArr5[2] WORD
WordArr5[3] WORD
WordArr5[4] WORD
WordArr5[5] WORD
Byte 4 (MSB) of the 32-bit destination IP address
Byte 3 of the 32-bit destination IP address
Byte 2 of the 32-bit destination IP address
Byte 1 (LSB) of the 32-bit destination IP address
141
WRITE_REG
Element description for
WordArr5 with
SY/MAX Ethernet
Element description for WordArr5 with SY/MAX Ethernet:
Element
WordArr5[1]
WordArr5[2]
WordArr5[3]
WordArr5[4]
WordArr5[5]
Data type
WORD
WORD
WORD
WORD
WORD
Description
Most significant byte:
Slot of the NOE module
Least significant byte:
MBP on Ethernet Transporter (MET) mapping index
Destination drop number (or set to FF hex)
Terminator (set to FF hex)
No significance
No significance
142
WRITE_REG
Function mode
Function mode of the
WRITE_REG block
Although a large number of WRITE_REG function blocks can be programmed, only four write operations may be active at the same time. In such a case it is insignificant whether they are the result of this function block or others (e.g. MBP_MSTR ,
CWRITE_REG ). All function blocks use one data transaction path and require multiple cycles to complete a job.
If several WRITE_REG function blocks are used within an application, they must at least differ in the values of their NO_REG or REG_WRIT parameters.
Note: A TCP/IP communication between a Quantum PLC (NOE 211 00) and a
Momentum PLC (all TCP/IP CPUs and all TCP/IP I/O modules) is only possible, when only one read or write job is carried out in every cycle. If several jobs are sent per PLC cycle, the communication stops without generating an error message in the status register of the function block.
The status signals DONE and ERROR report the function block state to the user program.
All routing information is contained in the WordArr5 data structure of the ADDRFLD input. The type function block assigned to this input is defined by the network used.
Please use: z Modbus Plus for function block ModbusP_ADDR (See ModbusP_ADDR: z z
TCP/IP Ethernet for function block TCP_IP_ADDR
SY/MAX Ethernet for function block SYMAX_IP_ADDR
Note: The WordArr5 data structure can also be used with constants.
143
WRITE_REG
Parameter description
REQ
SLAVEREG
A rising edge triggers the write transaction.
The parameter can be entered as an address, located variable, unlocated variable or literal.
Start of the area in the addressed slave to which the source data is written. The source area always resides within the %MW address area.
Note: For slaves for a nonUnity Pro PLC:
The destination area always resides within the 4x register area. SLAVEREG expects the target address as an offset within the 4x area. The leading "4" must be omitted
(e.g. 59 (contents of the variables or value of the literal) = 40059).
The parameter can be entered as an address, located variable, unlocated variable or literal.
NO_REG
REG_WRIT
DONE
ERROR
Number of addresses to be written to slave processor (1 ... 100).
The parameter can be entered as an address, located variable, unlocated variable or literal.
An ARRAY that is the same size as the planned transmission must be agreed upon
( ≥ NO_REG ) for this parameter. The name of this array is defined as a parameter. If the array is defined too small, then only the amount of data is transmitted that is present in the array.
The parameter must be defined as a located variable.
Transition to ON state for one program scan signifies that the data has been transferred.
The parameter can be entered as an address, located variable or unlocated variable.
Transition to ON state for one program cycle signifies the detection of a new error.
The parameter can be entered as an address, located variable or unlocated variable.
144
STATUS
WRITE_REG
If an error occurs while the function is being executed, an error code remains at this output for one cycle.
Error code, see z
Modbus Plus and SY/MAX Ethernet Error Codes, p. 114
z z
SY/MAX-specific error codes, p. 116
TCP/IP Ethernet error codes, p. 118
The parameter can be entered as an address, located variable or unlocated variable.
145
WRITE_REG
146
Hardware
IV
At a Glance
Overview
What's in this
Part?
This part of the document contains information about Modbus Plus Networks
This part contains the following chapters:
Chapter Chapter Name
12 Modbus Plus Network Option Modules (NOM)
13 Hardware Installation
Page
147
Hardware
148
Modbus Plus Network Option
Modules (NOM)
12
Overview
Introduction
What's in this
Chapter?
This chapter provides information on the following Quantum network option modules:
NOM
140 NOM
211 00
140 NOM
212 00
140 NOM
252 00
Communication Channels
1 Modbus (RS-232) serial port
1 Modbus Plus network (RS-485) port
1 Modbus (RS-232) serial port
2 Modbus Plus network (RS-485) port
1 Modbus (RS-232) serial port
2 Modbus Plus on Fiber (consisting of optical receiver and transmitter)
This chapter contains the following sections:
Section Topic
12.1
140 NOM 211 00: Modbus Plus Option Module
12.2
12.3
140 NOM 212 00: Modbus Plus Option Module
140 NOM 252 00: Modbus Plus Option Module
Page
149
NOM
12.1
Overview
Introduction
What's in this
Section?
140 NOM 211 00: Modbus Plus Option Module
This section describes the 140 NOM 211 00 Modbus Plus option module.
This section contains the following topics:
Topic
Presentation
Indicators
Error Codes
Specifications
Page
150
NOM
Presentation
Function
Illustration
The 140 NOM 211 00 is a single channel Network Option Modul (NOM), connected via a twisted pair Modbus Plus cable network
The following figure shows the parts of the Modbus Plus 140 NOM 211 00 modules.
140
NOM 211 00 controller
5
1
6
2
3
4
ASCI
RTU mem
Network
Node
X
1 LED Area
2 Comm Parameter Slide Switch
3 Modbus Connector
4 Modbus Plus Connector
5 Model Number, Module Description, Color Code
6 Removable door
7 Customer Identification Label, (Fold label and place it inside door)
Modbus
Comm 1
Modbus
Comm 2
ASCI
RTU mem
7
151
NOM
Front Panel
Switches
Two, three-position slide switches are located on the front of the unit. The switch on the left is not used. The three-position slide switch on the right is used to select the comm parameter settings for the Modbus (RS-232) port provided with the Modbus
Plus option module. Three options are available, as shown below.
The following figure shows the front panel switches.
ASCII
RTU mem
Note: The NOM hardware defaults to bridge mode when the front panel switch is set to RTU or ASCII mode. When networking controllers, a panel device connected to the NOM Modbus port can communicate with the controller to which it is conected, as well as log into any nodes on the Modbus Plus network.
Rear Panel
Switches
Two rotary switches are located on the rear panel of the modules. They are used together to set the Modbus Plus node and Modbus port address for the unit.
Note: The highest address that may be set with these switches is 64.
Rotary SW1 (top switch) sets the upper digit (tens), and rotary SW2 (bottom switch) sets the lower digit (ones) of the Modbus Plus node address. The illustration below shows the setting for an example address of 11.
SW1 and SW2
Switches Figure
The following figure shows the SW1 and SW2 switches.
SW1 (Top)
8
9
0
1
2
6
5
4
8
9
0
1
2
6
5
4
SW2 (Bottom)
152
NOM
Note: If "0," or an address greater than 64 is selected, the Modbus + LED will be
"on" steady, to indicate the selection of an invalid address.
SW1 and SW2
Address Settings
The following table shows the address settings for the SW1 and SW2 switches.
Node Address
1 ... 9
10 ... 19
20 ... 29
30 ... 39
40 ... 49
50 ... 59
60 ... 64
5
6
3
4
1
2
SW1 SW2
0 1 ... 9
0 ... 9
0 ... 9
0 ... 9
0 ... 9
0 ... 9
1 ... 4
Note: If "0," or an address greater than 64 is selected, the Modbus + LED will be
"on" steady, to indicate the selection of an invalid address.
ASCII Comm Port
Parameters
The following table shows the fixed setting of the ASCII comm port parameters.
Baud
Parity
Data Bits
Stop Bits
2,400
Even
7
1
Device Address Rear panel rotary switch setting
Setting the slide switch to the middle position assigns remote terminal unit (RTU) functionality to the port; the following comm parameters are set and cannot be changed:
RTU Comm Port
Parameters
The following table shows the RTU comm port parameters.
Baud
Parity
Data Bits 8
Stop Bits 1
Device
Address
9,600
Even
Rear panel rotary switch setting
153
NOM
Setting the slide switch to the bottom position gives you the ability to assign comm parameters to the port in software; the following parameters are valid.
Valid Comm Port
Parameters
The following table shows the valid comm port parameters.
Baud 19,200
9,600
7,200
4,800
3,600
2,400
2,000
1,800
1,200
600
300
150
134.5
110
75
50
Data Bits
Stop Bits
7 / 8
1 / 2
Parity Enable/Disable Odd/Even
Device Address Rear panel rotary switch setting
Modbus
Connector
Pinouts
The NOM modules are equipped with a nine-pin RS-232C connector that supports
Modicon’s proprietary Modbus communication protocol. The following is the Modbus port pinout connections for 9-pin and 25-pin connections.
The following figures show the Modbus port pinout connections for 9-pin (left) and
25-pin (right).
IBM-AT
9-Pin Female
CD 1
RX
TX
DTR
GROUND 5
DSR
4
6
2
3
RTS
CTS
7
8
Quantum
9-Pin Male
1 SHIELD
2
3
RX
TX
4
5
6
DTR
GROUND
DSR
7
8
9
RTS
CTS
NC
TX
RX
RTS
CTS
DSR
IBM-XT
25-Pin Female
SHIELD 1
4
5
6
2
3
GROUND 7
NC
DTR
8
20
4
5
6
2
3
7
8
9
Quantum
9-Pin Male
1 SHIELD
RX
TX
DTR
GROUND
DSR
RTS
CTS
NC
154
NOM
The following is the abbreviation key for the above figure.
TX: Transmitted Data DTR: Data Terminal Ready
RX: Received Data CTS: Clear to Send
RTS: Request to Send N/C: No Connection
DSR: Data Set Ready CD: Carrier Detect
Modbus Ports
Pinout
Connections for
Portable
Computers
The following figure shows the Modbus port pinout connections for 9-pin portable computers.
IBM-AT
9-Pin Female
Quantum
9-Pin Male
CD
RX
TX
SHIELD
RX
TX
DTR
GRND
DSR
RTS
CTS
DTR
GRND
DSR
RTS
CTS
NC NC
155
NOM
Indicators
Illustration The following figure shows the Modbus Plus NOM LED indicators.
Ready
Run
Modbus
Modbus +
Description The following table shows the Modbus Plus NOM LED Descriptions.
LEDs
Ready
Color
Green
Indication when On
The module has passed powerup diagnostics.
Run Green Indicates that the unit is in kernel mode–should always be OFF during normal operations.
Modbus Green Indicates communication is active on the single RS-232 serial port.
Modbus+ Green Indicates communication is active on the Modbus Plus port.
156
NOM
Error Codes
Error Codes
Table
The blinking run LED error codes for the NOM module shows the number of times the Run LED on the NOM module blinks for each type of error and the crash codes for each (all codes are in hex).
The following table shows the blinking run LED error codes for the NOM module.
Code Error
2
3
Number of
Blinks
Steady
4
617H
618H
619H
61AH
621H
622H
623H
624H
52H
53H
56H
59H
5AH
5BH
616H
625H
626H
627H
628H
629H
62AH
62BH
62CH
014H
815
49H
4BH
4CH
4DH
4EH normal power down event
RAM sequence error illegal data command received by bypass code diagnostics test pattern invalid in the icb block diagnostics test pattern invalid in the page 0 icb address not the same as found in hcb bad code selected for mstrout_sel proc config table exec_id is different than the sys table exec_id got a pupinit hook for neither S985 nor S975 addr did not get bus ack form 984 interface within 400 ms unexpected modbus port state in send command to 680 proc system table missing bad DPM critical byte write bad or unexpected interrupt loopback error on modbus port 1 parity error set port greater than 21 controller ram size is less than 8k modbus cmd-buffer overflow modbus cmd-length is zero modbus abort command error bad modbus state trn-int bad modbus state rcv-int bad comm state trn_asc transmit underflow error bad comm state trn_tru bad comm state rcv_asc bad comm state rcv_rtu bad transmit comm state bad receive comm state
157
NOM
5
6
7
683H
684H
685H
686H
687H
688H
637H
638H
639H
63AH
681H
682H
62DH
62EH
631H
632H
633H
634H
635H
636H
6A2H
6A3H
6A4H
6A5H
513H
412H
311H
689H
68AH
68BH
691H
692H
6A1H bad modbus state tmr0_evt bad uart interrupt
UPI timeout error bad UPI response opcode
UPI bus diagnostic error mbp bus interference error bad mbp response opcode timeout waiting for mbp mbp out of synchronization mbp invalid path peer did not respond with complement of the opcode peer unable to come out of transitions at powerup bad master state bad slave state unknown routing failure to send bad port number in set () proc bad port number in reset () proc bad port number in getport () proc bad port number in bitpos () proc bad port number in enable_transmit_interrupt () proc bad port number in enable_receive_interrupt () proc bad port number in disable_transmit_interrupt () proc bad port number in privilege flag is not reset in the session timeout proc bad port number in chkmst_hdw () proc unknown controller type in reset busy flag unknown function code in generate_poll_cmd () proc unknown function code in generate_logout_msg () proc slave link timeout on port other than port #9 illegal bypass command received by bypass code
RAM address test error
RAM data test error
PROM checksum error
158
NOM
Specifications
General
Specifications
General Specifications
Power Dissipation
Bus Current required
4 W
750 mA (max.)
Communication
Ports
Communication Ports
1 Modbus Plus network
(RS-485) port (9-pin connector)
1 Modbus (RS-232) serial port (9-pin connector)
A bridge mode capability in the module permits a panel device connected to this port to access nodes on the Modbus Plus network or to access the local PLC directly without having to go out onto the network.
Diagnostics Diagnostics
Power Up RAM
RAM Address
Executive Checksum
Processor
Runtime RAM
RAM Address
Executive Checksum
Processor
159
NOM
12.2
Overview
Introduction
What's in this
Section?
140 NOM 212 00: Modbus Plus Option Module
This section describes the 140 NOM 212 00 Modbus Plus option module.
This section contains the following topics:
Topic
Presentation
Indicators
Error Codes
Specifications
Page
160
NOM
Presentation
Function
Illustration
The 140 NOM 212 00 is a dual channel Network Option Modul (NOM), connected via a twisted pair Modbus Plus cable network
The following figure shows the parts of the Modbus Plus 140 NOM 212 00 modules.
140
NOM 212 00 controller
6
1
7
2
3
4
5
ASCI
RTU mem
X
1 LED Area
2 Comm Parameter Slide Switch
3 Modbus Connector
4 Modbus Plus Connector (Chan A)
5 Modbus Plus Connector (Chan B)
6 Model Number, Module Description, Color Code
7 Removable door
8 Customer Identification Label, (Fold label and place it inside door)
Modbus
Comm 1
Modbus
Comm 2
Modbus
Plus
Network
Node
ASCI
RTU mem
8
161
NOM
Front Panel
Switches
Two, three-position slide switches are located on the front of the unit. The switch on the left is not used. The three-position slide switch on the right is used to select the comm parameter settings for the Modbus (RS-232) port provided with the Modbus
Plus option module. Three options are available, as shown below.
The following figure shows the front panel switches.
Switch not used
ASCII
RTU mem
Rear Panel
Switches
Note: The NOM hardware defaults to bridge mode when the front panel switch is set to RTU or ASCII mode. When networking controllers, a panel device connected to the NOM Modbus port can communicate with the controller to which it is conected, as well as log into any nodes on the Modbus Plus network.
Two rotary switches are located on the rear panel of the modules. They are used together to set the Modbus Plus node and Modbus port address for the unit.
Note: The highest address that may be set with these switches is 64.
Rotary SW1 (top switch) sets the upper digit (tens), and rotary SW2 (bottom switch) sets the lower digit (ones) of the Modbus Plus node address. The illustration below shows the setting for an example address of 11.
162
NOM
SW1 and SW2
Switches Figure
The following figure shows the SW1 and SW2 switches.
SW1 (Top)
8
9
0
1
2
6 5
4
8
9
0
1
2
6 5
4
SW2 (Bottom)
Note: If "0," or an address greater than 64 is selected, the Modbus + LED will be
"on" steady, to indicate the selection of an invalid address.
SW1 and SW2
Address Settings
The following table shows the address settings for the SW1 and SW2 switches.
Node Address
1 ... 9
10 ... 19
20 ... 29
30 ... 39
40 ... 49
50 ... 59
60 ... 64
5
6
3
4
1
2
SW1 SW2
0 1 ... 9
0 ... 9
0 ... 9
0 ... 9
0 ... 9
0 ... 9
1 ... 4
Note: If "0," or an address greater than 64 is selected, the Modbus + LED will be
"on" steady, to indicate the selection of an invalid address.
163
NOM
ASCII Comm Port
Parameters
The following table shows the fixed setting of the ASCII comm port parameters.
Baud
Parity
Data Bits
Stop Bits
Device
Address
7
1
2,400
Even
Rear panel rotary switch setting
Setting the slide switch to the middle position assigns remote terminal unit (RTU) functionality to the port; the following comm parameters are set and cannot be changed:
RTU Comm Port
Parameters
The following table shows the RTU comm port parameters.
Baud
Parity
Data Bits
Stop Bits
Device
Address
8
1
9,600
Even
Rear panel rotary switch setting
Setting the slide switch to the bottom position gives you the ability to assign comm parameters to the port in software; the following parameters are valid.
Valid Comm Port
Parameters
The following table shows the valid comm port parameters.
Baud
Data Bits
Stop Bits
Parity
Device
Address
19,200
9,600
7,200
4,800
3,600
2,400
2,000
1,800
1,200
600
300
150
134.5
110
75
50
7 / 8
1 / 2
Enable/Disable Odd/Even
Rear panel rotary switch setting
164
Modbus
Connector
Pinouts
NOM
The NOM modules are equipped with a nine-pin RS-232C connector that supports
Modicon’s proprietary Modbus communication protocol. The following is the Modbus port pinout connections for 9-pin and 25-pin connections.
The following figures show the Modbus port pinout connections for 9-pin (left) and
25-pin (right).
IBM-AT
9-Pin Female
CD 1
RX
TX
2
3
DTR 4
GROUND 5
DSR 6
RTS
CTS
7
8
Quantum
9-Pin Male
1 SHIELD
2
3
RX
TX
4
5
6
DTR
GROUND
DSR
7 RTS
8
9
CTS
NC
IBM-XT
25-Pin Female
SHIELD 1
TX
RX
2
3
RTS
CTS
DSR
GROUND 7
NC
DTR
8
20
4
5
6
4
5
2
3
6
7
8
9
Quantum
9-Pin Male
1 SHIELD
RX
TX
DTR
GROUND
DSR
RTS
CTS
NC
Modbus Ports
Pinout
Connections for
Portable
Computers
The following figure shows the Modbus port pinout connections for 9-pin portable computers.
IBM-AT
9-Pin Female
Quantum
9-Pin Male
CD
RX
TX
SHIELD
RX
TX
DTR
GRND
DSR
RTS
CTS
DTR
GRND
DSR
RTS
CTS
NC NC
165
NOM
Indicators
Illustration The following figure shows the Modbus Plus NOM LED indicators.
Ready
Run
Modbus
Modbus + Error A
Error B
Description The following table shows the Modbus Plus NOM LED Descriptions.
LEDs Color Indication when On
Ready
Run
Green The module has passed powerup diagnostics.
Green Indicates that the unit is in kernel mode–should always be OFF during normal operations.
Modbus Green Indicates communication is active on the single RS-232 serial port.
Modbus+ Green Indicates communication is active on the Modbus Plus port.
Error A
Error B
Red
Red
There is an error condition on Cable A
There is an error condition on Cable B
166
NOM
Error Codes
Error Codes
Table
The blinking run LED error codes for the NOM module shows the number of times the Run LED on the NOM module blinks for each type of error and the crash codes for each (all codes are in hex).
The following table shows the blinking run LED error codes for the NOM module.
2
3
Number of Blinks
Steady
4
61AH
621H
622H
623H
624H
625H
626H
627H
628H
629H
62AH
62BH
62CH
59H
5AH
5BH
616H
617H
618H
619H
4CH
4DH
4EH
52H
53H
56H
Code
014H
815
49H
4BH
Error normal power down event
RAM sequence error illegal data command received by bypass code diagnostics test pattern invalid in the icb block diagnostics test pattern invalid in the page 0 icb address not the same as found in hcb bad code selected for mstrout_sel proc config table exec_id is different than the sys table exec_id got a pupinit hook for neither S985 nor S975 addr did not get bus ack form 984 interface within 400 ms unexpected modbus port state in send command to 680 proc system table missing bad DPM critical byte write bad or unexpected interrupt loopback error on modbus port 1 parity error set port greater than 21 controller ram size is less than 8k modbus cmd-buffer overflow modbus cmd-length is zero modbus abort command error bad modbus state trn-int bad modbus state rcv-int bad comm state trn_asc transmit underflow error bad comm state trn_tru bad comm state rcv_asc bad comm state rcv_rtu bad transmit comm state bad receive comm state
167
NOM
5
6
7
683H
684H
685H
686H
687H
688H
637H
638H
639H
63AH
681H
682H
62DH
62EH
631H
632H
633H
634H
635H
636H
6A2H
6A3H
6A4H
6A5H
513H
412H
311H
689H
68AH
68BH
691H
692H
6A1H bad modbus state tmr0_evt bad uart interrupt
UPI timeout error bad UPI response opcode
UPI bus diagnostic error mbp bus interference error bad mbp response opcode timeout waiting for mbp mbp out of synchronization mbp invalid path peer did not respond with complement of the opcode peer unable to come out of transitions at powerup bad master state bad slave state unknown routing failure to send bad port number in set () proc bad port number in reset () proc bad port number in getport () proc bad port number in bitpos () proc bad port number in enable_transmit_interrupt () proc bad port number in enable_receive_interrupt () proc bad port number in disable_transmit_interrupt () proc bad port number in privilege flag is not reset in the session timeout proc bad port number in chkmst_hdw () proc unknown controller type in reset busy flag unknown function code in generate_poll_cmd () proc unknown function code in generate_logout_msg () proc slave link timeout on port other than port #9 illegal bypass command received by bypass code
RAM address test error
RAM data test error
PROM checksum error
168
NOM
Specifications
General
Specifications
General Specifications
Power Dissipation
Bus Current required
4 W (typical)
780 mA
Communication
Ports
Communication Ports
2 Modbus Plus network
(RS-485) port (9-pin connector)
1 Modbus (RS-232) serial port (9-pin connector)
For dual connectivity on a single Modbus Plus network. These ports handle identical versions of all inbound and outbound transactions and keep track of the data paths used for these transactions
A bridge mode capability in the module permits a panel device connected to this port to access nodes on the Modbus Plus network or to access the local PLC directly without having to go out onto the network.
Diagnostics Diagnostics
Power Up RAM
RAM Address
Executive Checksum
Processor
Runtime RAM
RAM Address
Executive Checksum
Processor
169
NOM
12.3
Overview
Introduction
What's in this
Section?
140 NOM 252 00: Modbus Plus Option Module
This section describes the 140 NOM 252 00 Modbus Plus option module.
This section contains the following topics:
Topic
Presentation
Indicators
Fiber Optic Cable Connections
Specifications
Page
170
NOM
Presentation
Overview
Illustration
The Modbus Plus on Fiber module provides connectivity to Modbus Plus nodes by fiber cable.
There are many benefits that result from the use of fiber optics. Some of these benefits include: z z
Longer distances between nodes (up to 3 km), thereby, increasing the total length of the network.
Fiber optic medium is not susceptible to the effects of electromagnetic interference, RF interference, and lightning.
z z
Intrinsically safe links that are required in many hazardous industrial environments.
Total electrical isolation between terminal points on the link
The following figure shows the parts of the Modbus Plus 140 NOM 252 00 module.
140
6
1
7
2
3
4
5
1 LED Area
2 Modbus Connector
3 Comm Parameter Slide Switch
4 Port 2 TX and RX Connectors
5 Port 1 TX and RX Connectors
TX
Port 1
RX
X
TX
Port 2
RX
Modbus
ASCII
RTU mem
Modbus
Plus
8
TX
Port 2
RX
ASCII
RTU mem
RX
Port 1
TX
171
NOM
6 Model Number, Module Description, Color Code
7 Removable door
8 Customer Identification Label, (Fold label and place it inside door)
Front Panel
Switch
A three-position slide switch is located on the front of the unit. This switch is used to select the comm parameter settings for the Modbus (RS-232) port. Three options are available, as shown below.
The following figure shows the front panel switch.
ASCII
RTU mem
Setting the slide switch to the top position assigns ASCII functionality to the port; the following comm parameters are set and cannot be changed.
ASCII Comm Port
Parameters
The following table shows the fixed setting of the ASCII comm port parameters.
Baud
Parity
Data Bits
Stop Bits
Device Address
7
1
2,400
Even
Rear panel rotary switch setting
Setting the slide switch to the middle position assigns remote terminal unit (RTU) functionality to the port; the following comm parameters are set and cannot be changed:
RTU Comm Port
Parameters
The following table shows the RTU comm port parameters.
Baud
Parity
Data Bits
Stop Bits
Device Address
8
1
9,600
Even
Rear panel rotary switch setting
Setting the slide switch to the bottom position gives you the ability to assign comm parameters to the port in software; the following parameters are valid.
172
NOM
Valid Comm Port
Parameters
The following table shows the valid comm port parameters.
Baud 19,200
9,600
7,200
4,800
3,600
2,400
2,000
1,800
1,200
600
300
150
134.5
110
75
50
Data Bits
Stop Bits
7 / 8
1 / 2
Parity Enable/Disable Odd/Even
Device Address Rear panel rotary switch setting
Rear Panel
Switches
Two rotary switches are located on the rear panel of the modules. They are used together to set the Modbus Plus node and Modbus port address for the unit.
Note: The highest address that may be set with these switches is 64.
Rotary SW1 (top switch) sets the upper digit (tens), and rotary SW2 (bottom switch) sets the lower digit (ones) of the Modbus Plus node address. The illustration below shows the setting for an example address of 11.
SW1 and SW2
Switches Figure
The following figure shows the SW1 (top) and SW2 (bottom) switches.
SW1 (Top)
8
9
0 1
2
6
5
4
8
9
0 1
2
6
5
4
SW2 (Bottom)
173
NOM
SW1 and SW2
Address Settings
The following figure shows the node address settings for the SW1 and SW2 switches.
Node Address SW1 SW2
1 ... 9 0 1 ... 9
10 ... 19
20 ... 29
1
2
0 ... 9
0 ... 9
30 ... 39
40 ... 49
50 ... 59
60 ... 64
3
4
5
6
0 ... 9
0 ... 9
0 ... 9
1 ... 4
Modbus
Connector
Modbus pin 1
Figure
Note: If "0" or an address greater than 64 is selected, the Modbus + LED will be
"on" steady, to indicate the selection of an invalid address.
The NOM 252 00 module is equipped with an RS-232 port (see below) located on the front of the module. This port uses an eight-position RJ45 (phone jack-type) connector.
The following figure shows the NOM 252 00 Pin 1 connector.
Pin 1
Note: A D-shell adapter is available from Modicon for NOM 252 00-to-computer connections: a (110 XCA 20 300) 9-pin adapter for PC-AT type computers (see the illustration pinout table below).
174
Pinouts Figures
NOM
The following figures show the 9-pin adapter front view (left) and side view (right).
Pin 1
Pin 9
110XCA20300
Connector
Pinouts Figure
Front View
Side View
The following figure shows the 9-pin RJ45 connector schematic.
Connectors Pinouts
RJ45
Connector
1
TXD 3
RXD 4
DSR 2
GND 5
CTS 7
RTS 6
Chassis 8
Ground
9-pin D-shell
1 DCD
2 RXD
3 TXD
4 DTR
5 GDN
6 DRS
7 RTS
8 CTS
9 RI
Case of the
Connector
BJ45 Cable
Types
This following shows an example of the 110 XCA 282 0X cable. A table is also provided which includes part numbers and cable lengths.
175
NOM
RJ45 Connector
Figure
The following figure shows the RJ45 connector (Modicon Part # 110 XCA 282 OX).
RJ45
Connector
RJ45
Connector
Modicon Part # 110 XCA 282 0X
BJ45 Cable Part
Numbers Table
Cable Part Numbers Cable Lengths
110 XCA 282 01 3 ft. (0.91 m)
110 XCA 282 02
110 XCA 282 03
10 ft. (3 m)
20 ft. (6 m)
176
NOM
Indicators
Illustration The following figure shows the Modbus Plus on Fiber LED indicators.
Ready
Run
Modbus
Modbus +
Fport 1
Fport 2
FRNGoff
Description The following table shows the Modbus Plus on fiber LED descriptions.
LEDs
Ready
Run
Modbus
Modbus+
Fport1
Fport2
FRNGoff
Color Indication when On
Green The module has passed powerup diagnostics.
Green Indicates that the unit is in kernel mode – should always be OFF during normal operations. Note: The table for the NOM 21X 00 shows the number of times the RUN LED on the Modbus Plus on Fiber Module blinks for each type of error and the crash codes for each (all codes are in hex).
Green Indicates communication is active on the single RS-232 serial port.
Green Indicates communication is active on the Modbus Plus port.
Green Indicates an optical signal has been received on fiber optic Port 1.
Green Indicates an optical signal has been received on fiber optic Port 2.
Red Indicates the first break in a self healing ring.
177
NOM
Fiber Optic Cable Connections
Fiber Optic Cable
Connections
The NOM 252 00 module is connected in the Quantum system by a fiber optic cable
(see below). The cable has two strands. Each module transmits a uni-directional signal. For this reason, each strand must be connected to the transmit port on one module and the receive port on the other.
One strand of the fiber optic cable is marked at 10-inch (25 cm) intervals with the manufacturer’s name and the cable specifications. This is the only way to distinguish the two strands.
Fiber Optic Cable
Connections
Figure
The following figure shows the fiber optic cable connections.
Module A Module B
From previous
NOM receive
Transmit
Fiber
Port2
Receive
From previous
NOM transmit
Receive
Fiber port1
Transmit
Transmit
Fiber
Port2
Receive
Receive
Fiber port1
Transmit
To next
NOM receive
To next
NOM transmit
178
NOM
Connecting the
Fiber Optic Cable
The following steps show how to connect the fiber optic cable.
Step Action
1 Remove the protective plastic coverings from the cable ports and the tips of the cable.
Snap one of the fiber cable clasps (shipped with the module) over the cable so that the wider end of the tool is closest to the cable end.
Protective coverings Cable Fiber cable clasp
2 Turn the connection ring so that one of the arrows on the side of the ring lines up with the ridge inside.
Cable connection ring
Cable tip
Ridge
Arrow
3 a. Slide the tool up to the connection ring. b. Gripping the cable with the plastic cable clasp, slide the cable end onto the lower cable port. The arrow and the ridge on the connection ring should line up with the slot on the left of the cable port.
c. Use the clasp to push the cable over the tab on top of the port. d. Turn the cable to the right, so that the tab locks securely e. Remove the clasp. f. Repeat this process with the remaining strand of cable.
Cable port
Tab
Cable connection ring
Fiber cable clasp
3 m cable (Part # 990 XCA 565 09 09)
179
NOM
Fiber Optic
Configurations
Point-to-Point
Configuration
Point-to-Point
Configuration
Example Figure
Here are four typical configurations that show the wide range of the network architecture: z Point-to-point connection z z
Bus configuration
Tree configuration z Self-healing ring configuration
This type of configuration (see below) allows communication over the distance of up to 3 km through harsh industrial environments.
The following figure shows the point-to-point configuration.
P/S
Node # 1
CPU I/O NOM NOM
Node # 2
CPU I/O P/S
Fiber optic cable
Bus
Configuration
This type of configuration is used when it is required to connect a number of fiber nodes and can be used to increase the distance of a standard Modbus Plus network by changing to a fiber medium. This kind of network allows the connection of up to
32 Quantum NOM 252 nodes over the distance of 5 km.
The following illustrations show the NOM 252 00 module in a mixed fiber optic/ twisted pairs bus configuration network and a straight fiber optic bus configuration network.
CAUTION
Equipment Failure
The loss of a single node in this configuration disables the rest of the network.
Failure to follow this precaution can result in injury or equipment damage.
180
Bus
Configuration
Example 1
NOM
The following figure shows the mixed fiber optic/copper network.
Node # 1
P/S CPU NOM I/O I/O
Node # 2
P/S CPU NOM I/O I/O
490NRP254 Fiber optic repeater
Legend
MB+ cable
Fiber optic cable
MB+ tap with terminator
MB+ tap
(Terminator not required)
Node # 3
P/S CPU NOM I/O I/O
Node # 4
P/S CPU NOM I/O I/O
To node # n
Node #
P/S CPU NOM I/O I/O
Bus
Configuration
Example 2
The following figure shows the straight fiber optic network.
Fiber optic cable
Node # 1
P/S CPU NOM I/O I/O
Node # 2
P/S CPU NOM I/O I/O
To node # n
Node # 3
P/S CPU NOM I/O I/O
To node # n
Fiber optic cable
Note: The distance between nodes on fiber is limited by the maximum allowable power loss from end-to-end (3 km over 62.5 mm fiber). Power loss includes the fiber optic cable attenuation, connector losses at the Fiber Optic Receiver and
Transmitter ports, and the system margin of 3 dB.
In this configuration, the end NOM 252 00 in this configuration will have the
FRNGoff LED active. It also displays the Cable B Framing error in the MBPSTAT
(in ladder logic).
181
NOM
Tree
Configuration
Tree
Configuration
Example
Using tree configurations allows for greater flexibility in the layout of Modbus Plus and NOM 252 00 networks. The following illustrations are samples tree configurations. Additional repeaters may be connected in order to extend communication between electrical links.
The following figure shows the tree configuration.
Node # 1
P/S CPU NOM I/O
Legend
MB+ cable
Fiber optic cable
MB+ tap with terminator
MB+ tap
490NRP254 Fiber optic repeaters
Node # 2
P/S CPU NOM I/O
Node # 3
P/S CPU NOM I/O
Node # 6
P/S CPU NOM I/O
Node # 7
P/S CPU NOM I/O
P/S CPU
Node # 4
NOM I/O
Node # 5
P/S CPU NOM I/O
Node # 8
P/S CPU NOM I/O
Node # 9
P/S CPU NOM I/O
182
NOM
Self-healing Ring
Configuration
This configuration can be achieved by connecting the unused fiber optic ports of the first and last NOM 252 00 directly or through the fiber optic repeater, if a mixed fiber optic/twisted pairs network is used. This type of connection has all the advantages of the previously described configurations, along with built-in redundancy. A broken connection between any two Quantum modules in the ring will automatically reconfigure the network to the bus configuration, and maintain communication.
Self-healing Ring
Configuration
Example
The following figure shows a self-healing ring configuration example.
Node # 1
P/S CPU NOM I/O I/O
Node # 2
P/S CPU NOM I/O I/O
Legend
MB+ cable
Fiber optic
cable
MB+ tap with terminator
MB+ tap
490NRP254 Fiber optic repeater
Node # 3
P/S CPU NOM I/O I/O
Node # 4
P/S CPU NOM I/O I/O
Node # 5
P/S CPU NOM I/O I/O
183
NOM
Hot Standby
Systems Figure
The following figure shows the self-healing ring configuration for hot standby systems.
PC with SA85 card
490NR25400 Fiber optic repeater for Modbus Plus
Legend
MB+ cable
Fiber optic cable
RIO cable
MB+ tap with terminator
MB+ tap
Remote I/O
Node # 1
Primary system
P/S CPU CRP NOM CHS P/S
Standby system
P/S CPU CRP NOM CHS P/S
Node # 2
P/S CPU NOM I/O I/O
Coaxial RIO link
To other
RIO drops
P/S CPU I/O I/O I/O
490NR95400 Fiber optic repeaters (for RIO)
Typical Hot Standby system with remote I/O
Remote I/O drop
184
NOM
Network Status
Recommended
Materials for
Fiber Optic Links
Modicon does not manufacture fiber optic products such as cables, connectors, or special tools. However, we have experience with third party suppliers of materials, and are able to provide guidelines on product compatibility.
Connectors
The information about the condition of the network is presented in the form of
Network Status. This information indicates the loss of connection (the first break in the self-healing ring) and is similar to the way the existing 140 NOM 212 00 reports the loss of the redundant cable.
The break in the fiber cable will be detected by the module not receiving the signal from the cable break side. The incident will be reported by MBPSTAT as a Cable B
Framing error. This condition also activates the FRNGoff LED on the module front.
The following table shows the connector types
Connector type
ST bayonet (epoxy)
ST bayonet (hot melt)
ST bayonet (epoxy)
ST bayonet (epoxy)
Light crimp ST-style
Mechanical line splice (one size fits all)
Part number
3M 6105
3M 6100
Operating temperature
-40 ... +80 °C
-40 ... +60 °C
AMP 501380-5 series -30 ... +70 °C
AMP 503415-1 series -20 ... +75 °C
AMP 503453-1 series -20 ... + 60 °C
3M 2529 Fiberlok1 II -40 ... +80 °C
Note: All connectors must have a short boot for strain relief.
Termination Kits The following table shows the termination kits.
Kit type
Bayonet ST (eoxy)
Light crimp XTC
Mechanical line splice
3M hot melt
Part number Description
AMP 503746-1 For all epoxy type ST style
AMP 50330-2 For all light crimp
3M 2530 Fiber splice prep kit, complete with cleaving tool
3M 05-00185
3M 05-00187
110 V termination kit
220 V termination kit
185
NOM
Other Tools
Table
Cables
Connections
The following table shows other tools that may be needed for fiber optic links.
Product
3M (Photodyne) optical source driver
3M (Photodyne) optical light source
3M (Photodyne) power meter
3M optical light source,
660 nm, visible
3M FC/ST patch cord
3M bare fiber adapter,
ST-compatible
Part number
9XT
1700-0850-T
17XTA-2041
Description/use
Hand-held optical source driver (requires a light source)
850 nm Light Source, ST Connectors for 9XT
Hand-held fiber optic power meter
7XE-0660-J Use with 9XT to troubleshoot raw fiber, requires FC/ST patch cord
BANAV-FS-0001 Connects FC connector on 7XE to ST
8194 Allows the use of above source and meter to test raw fiber (two required)
It is recommended that you use 62.5/125 mm cable (such as AMP 503016-1,
AMP 502986-1, or equivalent) with a maximum attenuation of 3.5 dB/km in most of the configurations.
Note: Modicon recommends using the 990 XCA 656 09 cable.
Note: All cables must have a maximum cable diameter of not more than 3 mm at the terminal side.
The following information discusses connecting the NOM 252 00 on fiber cable, adding a new mode to the network, and repairing the break in the cable.
Note: When a new network is assembled, it is recommended that you connect all cables before powering up the system. Connect fiber optic cables as described previously in this section.
186
Adding a New
Node to the
Network
Repairing the
Break in the
Cable
NOM
If a new node is added to an existing network in order to extend the network (at the end of any configuration), then a new node may be connected first by fiber cable and then hot-swapped to the backplane to avoid errors to the existing network.
If a new node is added to the middle of the network, disconnect the fiber optic cables from one side of the existing NOM 252 module, and connect to port 1 or 2 of the new node. Additional fiber optic cable then needs to be connected to the second port of the new NOM 252 and to the next NOM 252 in the network. Finally, hot-swap the new NOM 252 to the backplane.
Because the NOM 252 00 will stop transmitting in the direction from which it receives no signal, replaceing a broken fiber optic cable and reconnectioning do not suffice to re-establish communication over that segment. Hot-swapping only one NOM 252 at the repaired connections is required to complete the connection.
Note: Breakage of any fiber connectors or fiber optic cables is the equivalent to breaking the trunk cable in a copper-based Modbus Plus network.
For the self-healing ring configuration, repairing the first break in the fiber optic network has to be scheduled when one of the units on either side of the repaired break can be hot-swapped, without creating further problems by disconnecting the node.
Note: Self-healing configurations are not considered as redundant networks.
Redundant networks yield a high system availability.
Calculations Use the following formula to calculate the number of NOM 252 00 modules in a fiber network:
Step Action
1 The total allowable pulse width distortions and jitter are limited to 20% of the bit period and is 200 nsec for the full fiber optic network.
2 The jitter contributed by the NOM 252 is 5 nsec max.
3 Jitter contributed by fiber optic repeaters (if used) is 40 nsec.
4 Use the following formula to determine the number (N) of chained repeaters:
N =
– nsec
5nsec
– 40nsec where "L" is the total cable length (km), and "X" is the jitter (added by the fiber optic cable) in nsec/km:
X = 3 ns/km for 50/125 micron meters
5 ns/km for 62.5/125 micron meters
7.5 ns/km for 100/140 micron meters
187
NOM
Specifications
General
Specifications
General Specifications
Power Dissipation 4 W (typical)
Bus Current required 780 mA
External Power Not required
Communication
Ports
Communication Ports
Optical Ports 2 (consisting of an optical receiver and transmitter)
Modbus Port 1 RJ45 (phone jack-type) connector
Diagnostics
Optical
Transmission
Diagnostics
Power Up RAM
RAM Address
Executive Checksum
Processor
Runtime RAM
RAM Address
Executive Checksum
Optical Transmission
Interface
PulseWidth Disstortion and
Jitter
Wavelength
Power Loss Budget
(includes 3 dB of system margins)
Maximum distance for point-to- point connection
ST-Type connector
5 ns or better
820 nm
50/125 micron fiber -6.5 dB
62.5/125 micron fiber -11 dB
100/140 micron fiber -16.5 dB
2 km over 50 micron fiber
3 km over 62.5 micron fiber
3 km over 100 micron fiber
10 km over 62.5 micron fiber Maximum System Length in Self Healing Ring
Configuration
188
Optical
Transmitter
Specifications
NOM
Optical Transmitter Specifications
Optical Power (Measured with 1 m test fiber)
Rise/Fall Time
Silence (OFF leakage)
-12.8 ... -19.8 dBm average power in 50/125 micron fiber cable
-9.0 ... -16 dBm average power in 62.5/125 micron fiber cable
-3.5 ... -10.5 dBm average power in 100/140 micron fiber cable
20 ns or better
-43 dBm
Optical Receiver
Specifications
Optical Receiver Specifications
Receiver Sensitivity
Dynamik range
Detected Silence
-30 dBm average power
-20 dB
-36 dBm
189
NOM
190
Hardware Installation
13
Mounting Quantum Communication Modules
Overview Quantum communication modules (NOMs, HE-CPUs) can be inserted into any slot of any backplane. Although Power supply modules should be installed in the first or last slots, to have a cooling effect. The modules can be removed under power
(hot swapped) without damaging modules or the backplane.
Refer to the following figures and procedure when mounting modules.
CAUTION
Possible danger to personnel or equipment.
An I/O module can only be hot swapped with the field side terminal strip removed.
It is possible, that a hot swapped controller module stops with an error code.
Failure to follow this precaution can result in injury or equipment damage.
Note: To ensure EMC level , the mounting area of the CPU has to provide metallic contact. Therefore remove any labels in the affected area and clean the surface using solvent.
191
Hardware Installation
Mounting
Bracket and
Backplane
The following steps describe the mounting of bracket and backplane
Step Action
1 If required for the application, select and install a 20 mm or 125 mm mounting bracket to the rack using standard hardware.
Front view:
1
2
192
2
1 Mounting bracket
2 Backplane
Select and install the appropriate backplane to the mounting bracket using standard hardware and remove the plastic backplane connector dust covers.
Mounting a
Module
Hardware Installation
The following steps describe the mounting of a module
Step Illustration
1 Side view:
2
1
2
Action
Mount the module at an angle on to the two hooks located near the top of the backplane.
Swing the module down to make an electrical connection with the backplane I/O bus connector.
1 Module Hooks
2 I/O Bus Connector
3 Side view: Tighten the screw at the bottom of the module to fasten it to the backplane.
Note: The maximum tightening torque for this screw is 2-4 in-lbs
(0.23 - 0.45 Nm).
1
1 Mounting screw
193
Hardware Installation
194
Index
Numerics
A
Application Specific Communication, 32
C
Configuration
Configuring a Logical Network, 35
Configuring a Physical Network, 43
Continuous register reading
Continuous register writing
D
DIO
Single-cable Configuration, 26
A C
E
Expanded
Extended
G
H
I
Input Data
Intoducing the Modbus Plus Network, 15
195
Index
M
Modbus Plus Address
Modbus Plus Communication Types, 23
Modbus Plus Master
N
O
Output Data
P
R
Read Register
S
W
Write Register
196
ಡೌನ್ಲೋಡ್ ಮಾಡಿ
ಜಾಹಿರಾತು