HMS Industrial NetworksMailing address: Box 4126, 300 04 Halmstad, SwedenVisiting address: Stationsgatan 37, Halmstad, Sweden
Connecting Devices
TM
E-mail: info@hms-networks.com
Web: www.anybus.com
User Manual
Anybus® Communicator™
for PROFINET
Doc. Id. HMSI-27-309
Rev. 3.11
Page 2
Important User Information
This document contains a general introduction as well as a description of the technical features provided by the Anybus Communicator, including the PC-based configuration software.
The reader of this document is expected to be familiar with PLC and software design, as well as communicationsystems in general. The reader is also expected to befamiliar with the Microsoft® Windows® operating system.
Liability
Every care has been taken in the preparation of this manual. Please inform HMS Industrial Networks AB of any inaccuracies or omissions. The data and illustrations found in this document are not binding. We, HMS Industrial Networks AB, 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 considered as a commit-ment by HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for any errors that may appear in this document.
There are many applications of this product. Those responsible forthe use of this device must ensure that all the necessary steps have been taken to verify that the applications meet all performance and safety requirements in-cluding any applicable laws, regulations, codes, and standards.
HMS Industrial Networks AB will under no circumstances assume liability or responsibility for any problems that may arise as a result from the use of undocumented features, timing, or functional side effects found outside the documented scopeofthis product. Theeffects caused by any direct or indirect use of such aspects of the product are undefined, and may include e.g. compatibility issues and stability issues.
The examples and illustrations in this document are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular implementation, HMS Industrial Networks AB cannot assume responsibility for actual use based on these examples and illustrations.
Intellectual Property Rights
HMS Industrial Networks AB has intellectual propertyrights relating to technology embodied in the product de-scribed in this document. These intellectual property rights may include patents and pending patent applicationsin the US and other countries.
Trademark Acknowledgements
Anybus® is a registered trademark of HMS Industrial Networks AB. Microsoft® and Windows® are registeredtrademarks of Microsoft, Inc. All other trademarks are the property of their respective holders.
Warning:This is a class A product. in a domestic environment this product may cause radio interference in
ESD Note:This product contains ESD (Electrostatic Discharge) sensitive parts that may be damaged if ESD
which case the user may be required to take adequate measures.
control procedures are not followed. Static control precautions are required when handling the product. Failure to observe this may cause damage to the product.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 8
P. About This Document
For more information, documentation etc., please visit theHMS websitewww.anybus.com.
P.1 Related Documents
Document nameAuthor
Anybus Communicator - PRT Installation SheetHMSDF1 Protocol and Command Set - Reference Manual, 1770-6.5.16, October 1996Allen-Bradley
P.2 Document History
Summary ofRecentChanges (3.01... 3.10)
ChangePage(s)
Screenshots and descriptions of ABC Tool updated for Anybus Configuration ManagerMultipleChanged “ABC” to “Communicator RS232/422/485”MultipleAmended description of “Update time” parameter31,32Added description for Consume/Response to “Object Delimiter” parameter39Changed “Maximum Data Length” limit 39Removed obsolete “Start Bits” parameter48Removed obsolete “ABCC ExtLink Wizard” entry64Replaced “Sales and Support” info with link to website8Added parameters to checksum object description40Added info about Modbus registers23Minor text edits, typo correctionsMultiple
Preface
Summary ofRecentChanges (3.10... 3.11)
RevisionChangePage(s)
3.11Added compliance info79
Revision List
RevisionDateAuthorChapterDescription
1.002005-06-07PePAll1st release
2.002006-03-27PePAll2nd major release
2.012006-12-22PeP-Misc. minor corrections & updates
2.022008-10-14HeS-Misc. minor corrections & updates
2.032009-04-24KeLAllMisc. minor corrections and updates
3.002011-01-19KaDAllMisc. minor corrections, new template and DF1 functionality
3.012011-09-30KaDAllMisc corrections and updates, new Anybus ConfigurationManager name
3.10February 2015ThNAllMisc. corrections and updates, new Doc ID
3.11March 2015ThNBAdded compliance info
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 9
P.3 Conventions & Terminology
The following conventions are used throughout this document:
•Numbered lists provide sequential steps
•Bulleted lists provide information, not procedural steps
•The term“user” refers to the person or persons responsible for installing the Anybus Commu-nicator in a network.
•The term “ABC” refers to the AnybusCommunicator.
•Hexadecimal values are written in theformat 0xNNNN, where NNNN isthe hexadecimalvalue.
•Decimal values arerepresentedas NNNN where NNNNis the decimal value
•As in all communication systems, the terms “input” and “output” can be ambiguous, because their meaning depend on whichend of the link is being referenced. The convention in this doc-umentisthat “input” and “output” are always being referenced to the master/scanner end of the link.
P.3.1 Glossary
TermMeaning
ABC
PRTPROFINET-IOACMAnybus Configuration ManagerBroadcasterAprotocol specific node in the subnetwork scan- that hold transactions destined to all nodes.CommandA protocol specific transaction. ConfigurationList of configured nodes with transactions on the subnetwork.FieldbusThe network to which the communicator is connected.Fieldbus Control SystemFieldbusmasterFrameHigher level series of bytes forming a complete telegram on the subnetworkMonitorAtool for debugging the ABC and the network connections.NodeA device in the configuration that defines the communication with a node on the subnetworkScan listList of configured slaves with transactions on the subnetwork.
Subnetwork
Transaction
IO Controller
IO Supervisor
IO DeviceField device assigned to anIO Controller. In this case the ABC.Module (or I/O module)Hardware or logical component of a PROFINET network device.Higher Level NetworkIn this case, PROFINETNetworkFieldbus
®
Anybus
Communicator™
The network that logically is located on a subsidiary level with respect to the fieldbus and towhich the ABC acts as a gateway.
A generic building block that is used in the subnetwork scan-list and defines the data that issent and received on the subnetwork.
PROFINET device which acts as a clientfor several IO devices, usually a PLC.(Comparable to a PROFIBUS-DP class 1 master).
PROFINET programming device with commissioning and diagnosticfunctions (Comparable to a PROFIBUS-DP class 2 master).
About ThisDocument 9
P.4 Support
For general contact information and support, pleaserefer to the contact and support pages at
www.anybus.com
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 10
1. About the Anybus Communicator for
PC configurationand monitoring
Serial communication devices
Multi-drop up to 31 nodes
Multi-Node Serial Sub NetworkSingle-Node Serial Sub Network
PC configurationand monitoring
PROFINET IO Controller(e.g a PLC)
PROFINET IO Controller(e.g a PLC)
Serial communicationdevice
INVERTER
HMI
(Ethernet)
(Ethernet)
PC/web/SCADA
C/eb/SC
PC/web/SCADA
C/eb/SC
PROFINET
1.1 General
The Anybus Communicatormodule for PROFINETactsasa gateway between virtually any serial ap-plication protocol and a PROFINET IO-based network. Integration of industrial devices is enabled without loss of functionality, control andreliability, both when retro-fitting to existing equipment as wellas when setting up new installations.
Chapter 1
Subnetwork
The Anybus Communicator can address up to 31 nodes, and supports the following physical standards:
•RS-232
•RS-422
•RS-485
Ethernet Interface
Ethernet connectivity is provided through the patented Anybustechnology; a proven industrial commu-nication solution used all over the world by leading manufacturers of industrial automation products.
•PROFINET IO
•Modbus-TCP server (read only)
•Security framework with per user access rights andIP access control
•Server Side Include (SSI) functionality
•Web server and Email client capability
•Easy file management via FTP
•10/100 Mbit/s, twisted pair
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 11
About the Anybus Communicator for PROFINET11
F
A
B
C
D
E
1.2 External View
For wiring and pin assignments, see “Connector Pin Assignments” on page 98.
A:PROFINET Connector (Ethernet)
This connector is used to connect the module to the net-work.
See also...
-“PROFINET Connector (Ethernet)” on page 98
B:Status LEDs
See also...
-“Status LEDs” on page 12
C:PC-connector
This connector is used toconnect the module to a PC for configuration and monitoring purposes.
See also...
-“PC Connector” on page 99
D:Subnetwork Connector
This connector is used to connect the module to the serial subnetwork.
See also...
-“Subnetwork Interface” on page 100
E:Power Connector
This connector is used to apply power to the module.
See also...
-“Power Connector” on page 98
-“Technical Specification” on page 128
F:DIN-rail Connector
The DIN-railmechanism connects the module to PE (Protective Earth).
See also...
- “Hardware Installation” on page 13
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 12
1.3 Status LEDs
1
3
5
2
4
6
#StateStatus
1 - Comm. StatusOffOff line
GreenOn line,Run
Green, flashingOn line, STOP
2 -Module StatusOffNo power or not initialized
GreenInitialized, no errorGreen, 1 flashDiagnostic data availableGreen, 2 flashesBlink. Used by engineering tools for identification.Red, 1 flashConfiguration Error
Red, 3 flashesNo Station Name or no IP address assignedRed, 4 flashesInternal error
3 - Link/ActivityOffNo link or power off
GreenLink establishedGreen, flashingReceiving/transmitting data
4 - (not used)
5 - Subnet Status
6 - Device StatusOffPower off
a.ThisLED turnsgreen when all transactions havebeen activeat least once. This includes
any transactions using “change of state” or “change of state on trigger”. If a timeout occurs on a transaction, this LED will turn red.
b.The gateway is in bootloader mode, and firmware must be restored in order for it to work
properly. Start upthe Anybus Configuration Manager and connect to theAnybus Commu-nicator. Choose Tools/Options/Module. Click “Factory Restore” to restore firmware. See “Tools” on page 61.
--
a
OffPower offGreen, flashingRunning correctly, but one or more transaction
GreenRunningRedTransaction error/timeout or subnet stopped
Alternating Red/GreenInvalid or missing configurationGreenInitializingGreen, flashingRunningRed
Red, flashingIf the Device Status LED is flashing in a sequence
About the Anybus Communicator for PROFINET12
-No connection with IO Controller
-Connection with IO Controller established
-IO Controller is in RUN state
-Connection with IO Controller established
-IO Controller in STOP state
-Too many modules/submodules
-I/O size or Configuration mismatch
error(s) have occurred
Bootloader mode
b
starting with one or more red flashes, please notethe sequence pattern andcontact theHMS support department
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 13
About the Anybus Communicator for PROFINET13
1
2
1
2
1.4 Hardware Installation
Perform the following steps when physicallyinstalling the Anybus Communicator module:
1.Snap the module on to the DIN-rail.
TheDIN-railmechanism works as follows:
To snap themoduleon,first press itdownwards (1) to compress the spring in the DIN-railmechanism, then push it against the DIN-rail as to make it snap on (2)
To snap the module off, push it downwards (1) and pull it out from the DIN-rail (2), as to makeit snap off from the DIN-rail
2.Connect the module to the PROFINET (Ethernet) network
3.Connect the module to the serial subnetwork
4.Connect the module to the PC via the configuration cable
5.Connect the power cable and apply power
6.Start the Anybus Configuration Manager program on the PC
(The AnybusConfiguration Manager software attempts to detect the serial port automatically. If not successful, select the correct port manually in the “Port”-menu)
7.Configure the Anybus Communicatorusing the Anybus Configuration Manager and download the configuration
8.Set up the PROFINETcommunication in accordance with the module configuration
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 14
1.5 Software Installation
1.5.1 Anybus Configuration Manager
System requirements
•Pentium 133 MHzor higher
•650 MB of free space on the hard drive
•32 MBRAM
•Screen resolution 800 x 600 (16 bit color) or higher
•Microsoft Windows® 2000 / XP / Vista / 7 (32- or 64-bit)
•Internet Explorer 4.01 SP1 or newer (or any equivalent browser)
Installation
•Anybus Communicator resource CD
-Insert the CD and follow the on-screen instructions.
-If the installation does not start automatically: right-click on theCD driveicon and select “Explore” to show the contents of the CD. Locate theinstallation executable and double-click on it to start theinstallation, then follow the on-screen instructions.
About the Anybus Communicator for PROFINET14
•From HMS website
-Download the latest version of Anybus Configuration Manager from www.anybus.com.
-Unzip the archive on your computer and double-click on the installation executable.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 15
2. Basic Operation
2.1 General
The Anybus Communicator gateway is designedto exchange data between a serial sub-network and a higher level network. Unlike most other gateway devices of similar kind, it does not have a fixed protocol for the sub-network, and can be configured to handle almost any form of serial communication.
Thegateway can issue serial telegrams cyclically, on change of state, or based on trigger events issued bythe control system of the higher level network (i.e. the fieldbus master or PLC). It can also monitor certain aspects of the sub-network communication and notify the higher level network when data has changed.
An essential part of the Anybus Communicator package is Anybus Configuration Manager (ACM), a Windows®-based application used to supply the gateway with a description of the sub-network proto-col. No programming skills are required; instead, a visual protocol description-system isused to specify the different parts of the serial communication.
Chapter 2
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 16
2.2 Data Exchange Model
General Data
ABC Internal Memory
Input Data
(512 bytes)
Subnetwork
Output Data
(512 bytes)
Higher Level Network
Input Data Output Data General Data
Subnetwork:Fieldbus:E-mail Client:SSI:
Subnetwork:Fieldbus:E-mail Client:SSI:
Subnetwork:Fieldbus:E-mail Client:SSI:
Read/Write Read Only Read Only Read Only
Read Only Read/Write Read Only Read/Write
Read/Write
-
-
-
0x000 0x200
0x1FF 0x3FF
0x400
0x???
Internally, the data exchanged on the subnetwork, and the data exchanged on the higher level network, resideinthe same memory.
This means that in order toexchange datawith thesub-network, the higher level network simply reads and writesdata to memory locations specified using the An-ybus Configuration Manager. The very same memory locations can then be exchanged on the subnetwork.
The internal memory buffer is divided into three areasbased on their function:
•Input Data (512 bytes)
Thisarea can be readby the higher level net-work, the web server and the e-mailclient.
(Howthis data is represented on the higher level network will be described later in this chapter).
•Output Data (512 bytes)
Thisarea can be readfrom/written to by the higher level network, the web server and the e-mail client.
(Howthis data is represented on the higher level network will be described later in this chapter).
Basic Operation 16
•General Data (Up to 1024 bytes)
This area cannot be accessed from the higher level network, but can be used for transfers be-tween individual nodes on the subnetwork, or asa general “scratch pad”for data. The actual size of this area depends on the amount of data that is exchanged on the subnetwork. The Anybus Communicator canhandle up to 1024 bytes of general data.
2.2.1 Memory Map
When building the subnetwork configuration using the Anybus Configuration Manager, the different ar-eas described above are mapped to the memory locations (addresses) specified below.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 17
Basic Operation 17
The Temperature Regulator has two registers, holding the Setpoint Temperature and the Actual Temperature respectively.
The PLC exchange data between the internal PLC memory and the slaves (in this case the ABC) on the PROFINET network.
The ABC copies the Output Register of the Temperature Regulator to the Input- Data area.
The ABC copies the Temperature-
Setpoint from the Output Data area to
the Input Register in the Temperature-
Regulator.
The PLC Memory associated with
the ABC is exchanged;
Data from the Input Data area is copied to
PLC Input Memory, and PLC Output
Memory is copied to the Output Data
area.
Input Data
ABC
Serial Device - Temperature Regulator
PLC (PROFINET IO Controller)
Output Data General Data
0x000 0x200
0x1FF 0x3FF
0x400
0x???
Output Register Input Register
Temperature Setpoint
Temperature Setpoint
Actual Temperature
Actual Temperature
PLC Memory (Inputs) PLC Memory (Outputs)
Temperature Setpoint
Actual Temperature
(not used in this example)
PROFINETSubnetwork
2.2.2 Data Exchange Example
In the following example, a temperature regulator on the subnetworkexchanges information with a PLC on the higher level network, via the internal memorybuffers in themodule.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 18
Basic Operation 18
2.3 Subnetwork Protocol
2.3.1 Protocol Modes
The Anybus Communicator features three distinct modes of operation regarding the subnetwork com-munication, called “Master Mode”, “Generic Data Mode” and “DF1 Master Mode”.Notethat the pro-tocol modeonly specifies the basic communication model, not theactual subnetwork protocol.
•Master Mode
In this mode, the module acts as a master on the subnetwork, and the serial communication takesplace in a query-response fashion. The nodes on the network are not permitted to issue messagesunless they have been addressed by the module first.
See also “Master Mode” on page 19.
•Generic Data Mode
In this mode, there is no master-slaverelationship between the subnetwork nodes and the mod-ule; any node on the subnetwork, including the Anybus Communicator, may spontaneously pro-duce or consume messages.
See also “Generic Data Mode” on page 20.
•DF1 Master Mode
In this mode, the module acts as a master on the subnetwork, using the DF1 protocol. The serial communication takes place in a query-response fashion.
See also “DF1 Protocol Mode” on page 76.
2.3.2 Protocol Building Blocks
The following building blocks are used in Anybus Configuration Manager todescribe the subnetwork communication. Howtheseblocks apply to the threeprotocol modes will be described later in this doc-ument.
•Node
A node represents a single device on the subnetwork. Each node can be associated with a num-ber of transactions, see below.
•Transaction
A “transaction” represents a completeserial telegram, and consistsof a number of frame objects (below).Each transaction isassociatedwith a set of parameters controlling how and when to use it on the subnetwork.
•Commands
A “command” is simply a predefined transaction stored in a list in the Anybus Configuration Manager. This simplifies common operations by allowing transactionsto be stored and reused.
•Frame Object
“Frame objects” are low level entities used to compose a transaction (see above). A frame object can represent a fixedvalue (a constant), a range of values (limit objects), a block of data or a cal-culated checksum.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 19
Basic Operation 19
Subnetwork Devices
Gateway
Control System
2.3.3 Master Mode
In this mode, the communication is based on a query-response scheme; when the Anybus Communica-tor issues a query on the subnetwork, the addressed node is expectedto issue a response to thatquery. Nodes are not permitted to issue responses spontaneously, i.e. without first receiving a query.
There is one exception to this rule; the broadcaster. Most protocols offer some way of broadcasting mes-sages to all nodes on the network,without expecting them to respond to the broadcasted message. Thisis also reflected in the Anybus Communicator, which features a dedicated broadcaster node.
In Master Mode,AnybusConfiguration Manager comes preloaded with mostcommonly used Modbus RTU commands, which can conveniently be reached by right-clicking on a node in the Anybus Config-uration Manager and selecting “Insert NewCommand”. Note however that this does not in any way prevent other protocols based on the same query-response message-scheme to be implemented.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 20
Basic Operation 20
Subnetwork Devices
Control System
Gateway
2.3.4 Generic Data Mode
In this mode, there is no master-slave relationship between the nodes on the subnetwork and the Any-bus Communicator. Any node, including the module, may spontaneously produce or consume a mes-sage. Nodes do not have to respond to messages, nor dothey have to wait for a query in order tosend one.
In the figure above, the Anybus Communicator “consumes” data that is “produced” by a node on the subnetwork. This “consumed” data canthen be accessed from the higher level network. This also works the other way around; the data received from the higher level network is used to “produce” a messageon the subnetwork to be “consumed” by a node.
2.3.5 DF1 Master Mode
Please refer to “DF1Protocol Mode” on page 76.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 21
Basic Operation 21
2.4 PROFINET IO
2.4.1 General
The PROFINET IO interface provides PROFINET IO Soft Real-Time Communication. PROFINET is the open Industrial Ethernet standard for Automation from PROFIBUS International.
Supported Features
•Soft Real-Time (RT) communication
•Cyclic data exchange(10 ms cycletime)
•Acyclic Dataexchange (Record Data Requests)
•Up to 64 slots / 1 subslot
•Up to 512 bytes of I/O in each direction
•TCP/IP Configuration via DCP (Discovery and Configuration Protocol)
2.4.2 I/O Configuration
PROFINET makes a distinction between fastcyclical data,a.k.a. “IO data”, and acyclical data, called“Record Data”. By default, all data in the input and outputdataareas are exchanged as IO data. It ishowever possible to specify how much data to exchangeas IO data, and how much data to exchangeusing acyclic Record Dataread/write requests.
On PROFINET, the IO data is built up by I/O modules. In the case of theABC, theactualI/O moduleconfiguration is adopted from the I/O controller/supervisor, provided that the total I/O sizes specified by the IO controller does not exceed the sizes specified in theAnybus Configuration Manager.
For information about how the IO and Record Data relates to the input and output data areas, see “Da-ta Representation (IO Data & Record Data)” on page 22.
2.4.3 GSDML File
On PROFINET, all devices are associated with a GSDML file. The GSDML file is theequivalent of the PROFIBUS GSD file, and is basedon the EXtensibleMarkup Language(XML).
This file holds information about the device(in this case the Anybus Communicator), its features, and possible I/O configurations. The latest version ofthe GSDML file for the Anybus Communicator can be downloaded from the HMS website, “www.anybus.com
”.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 22
Basic Operation 22
Input DataOutput Data
16 Input0x000 ... 0x00F
0x0A0
16 Input/Output0x010 ... 0x01F
0x09F
0x0DF
0x1FF
0x020
16 Input/Output0x200 ... 0x20F
128 Input
128 Output
(unused)
32 Input0x0E0 ... 0x0FF
64 Input/Output
64 Output
64 Input/Output
Record Data Index 1000h
Record Data Index 10FFh
Record Data Index 2000h
Record Data Index 206Fh
IO Size In(256 bytes)
IO Size Out(400 bytes)
0x30F
0x3FF
0x290
0x38F
0x310
0x210
0x24F
0x100
0x250
0x28F
0x390
2.4.4 Data Representation (IO Data & Record Data)
Asmentioned previously, the actual I/O configuration is determined by the IO Controller. The modules are mapped to the input and output data areas in the order of their slot number.
Example:
In this example, theI/O Sizes forthe ABC has been set to the following values:
Note the “unused” part of the output data area.The reason for this is that only 272 bytes (128+64+64+16) are actually used in the I/O module configuration, althoughIO Size Out is set to 400 bytes.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 23
Basic Operation 23
2.5 Modbus-TCP (Read-Only)
2.5.1 General
The Modbus-TCP protocol is an implementation of the standard Modbus protocol running on top of TCP/IP. The same function codes and addressing model are used. The built in Modbus-TCP serverpro-vides read-only access to the input and output dataareas via a subset of the functions defined in the Modbus-TCP specification.
All Modbus-TCP messages are received/transmittedon TCP port no. 502. For detailed information re-garding the Modbus-TCP protocol, consult the Open Modbus Specification.
2.5.2 Data Representation (Modbus-TCP Register Map)
The following function codes are implemented:
Modbus FunctionFunction CodeAssociated withNo. of I/O:s or data points per command
Read Input Registers4Input Data area
(0x000....0x1FF)
Read Multiple Registers3OutputData area
(0x200...0x3FF)
1 - 125 registers
1 - 125 registers
The Input & Output Data areasare mapped to Modbus registers as follows:.
0x00000x000...0x001Input Data area(Status Register)0x00010x002...0x003-0x00020x004...0x005-0x00030x006...0x007-
......-
0x00FF0x1FE...0x1FF-0x00000x200...0x201Output Data area(Control Register)0x00010x202...0x203-0x00020x204...0x205-0x00030x206...0x207-
......-
0x00FF0x3FE...0x3FF-
Note:If enabled, the control andstatus registers occupies input register 0x0000 and output register0x0000.
2.5.3 Supported Exception codes
CodeNameDescription
0x01Illegal functionThe function code in the query is not supported0x02Illegal data addressThe data address received in the query is outside the initialized memory area0x03Illegal data valueThe data in the request is illegal
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 24
3. File System
3.1 General
General
TheAnybus Communicator featuresa built-in filesystem, which is used to store information such as web files, network communication settings, e-mailmessages etc.
Storage Areas
The file system consists of the different storage areas:
•Non-volatile area (approx. 2 Mb)
This section is intended for static files such as web files,configuration files etc.
•Volatile area (approx. 1 Mb)
This area is intended for temporary storage; data placed here will be lost in case of power loss or
reset.
Chapter 3
Important Note:
The non-volatile storage is located in FLASH memory. Each FLASH segment can only be erased ap-proximately 100000 times due to the nature of this type of memory.
The following operations will erase one or more FLASH segments:
•Deleting, moving or renaming a file or directory
•Writing or appending data to an existing file
•Formatting the file system
Conventions
•\ (backslash) is used as a path separator
•Filepaths originate from the system root, and assuch must begin with \
•File pathsmust not end with \
•Names may contain spaces but must not begin or end with one
•Names must not contain one of the followingcharacters: \ / : * ? “ < > |
•Names cannot be longer than 48 characters (plus null termination)
•File paths cannot be longer than 256 characters (filename included)
•The maximum number of simultaneously open files is 40
•The maximum number of simultaneously open directories is 40
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 25
3.2 File System Overview
user
pswd
email
pswd
email
sys_pswd.cfg
ad_pswd.cfg
ethcfg.cfg
pniocfg.cfg
email_1.cfg
email_10.cfg
...
...
email_1.cfg
email_10.cfg
RAM
http.cfg
ssi_str.cfg
(admin root)
(user root)
(volatile, optional)
(protected)
(protected)
ip_accs.cfg
File System25
3.3 System Files
The file system containsaset of filesused for systemconfiguration. These files, known as “system files”, are regular ASCII files which can be altered using a standardtext editor. Notethat some of these files may also be altered by the Anybus Communicator itself, e.g. when using SSI(see “ServerSide Include (SSI)” on page 35).
The format ofthe system files are based on the concept of “keys”, where each “key” can be assigned a value,see example below.
Example:
Theexact format of each system file is described later in this document.
The contents of the above files can be redirected:
[Key1]value of key1
[Key2]value of key2
Example:
In this example, the contents will be loaded fromthe file“here.cfg”.
[File path]\i\put\it\over\here.cfg
Note: Any directory in the file system can be protected from web access by placing the file web_accs.cfgin the directory, see “Authorization” on page 33.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 26
4. Basic Network Configuration
4.1 General Information
The Anybus Communicator offers two modes of operation regarding the network settings (see below). Which mode to use is determined by the “TCP/IPSettings” parameter in Anybus Configuration Man-ager, see “Fieldbus Settings” on page 54.
•TCP/IP Settings: Enabled
When operating in this mode, the contents of the system file“ethcfg.cfg” will be ignoredcom-pletely, causing the following behavior:
-DNS services will not be available
-Domain and Host name cannot be set
-E-mail serviceswill not be available
-Settings received from the network (i.e. via HICPor DCP) will be lost in the event of a power loss or reset.
•TCP/IP Settings: Disabled
When operating in thismode, the Anybus Communicator module will use the settings stored in the systemfile “ethcfg.cfg”. If this file is missing, the module will attempt to retrieve its settings via DHCP or HICP for 30 seconds. If no configuration has been received within this period, the module will halt and indicate an error on its status LEDs.
Chapter 4
DCP (Discovery and Basic Configuration)
The Anybus Communicator fully supports the DCP protocol, which allows an IO Controller/Supervi-sor to change theTCP/IP settingsduringruntime.
DHCP/BootP
The Anybus Communicatorcan retrieve theTCP/IP settings from a DHCP or BootP server. If no DHCP server is found, the module will fall back on its current settings (i.e. thesettings currently storedin “\ethcfg.cfg”).
If no current settings are available (i.e. “ethcfg.cfg” is missing, or contains invalid settings), the module will halt and indicate an error on the onboard status LEDs. The network configuration may however still be accessed viaHICP, see “Anybus IPconfig (HICP)” on page 29.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 27
Basic Network Configuration27
File Format:
[IP address]
xxx.xxx.xxx.xxx
[Subnet mask]
xxx.xxx.xxx.xxx
[Gateway address}
xxx.xxx.xxx.xxx
[DHCP/BOOTP]
ON or OFF
[SMTP address]
xxx.xxx.xxx.xxx
[SMTP username]
username
[SMTP password]
password
[DNS1 address]
xxx.xxx.xxx.xxx
[DNS2 address]
xxx.xxx.xxx.xxx
[Domain name]
domain
[Host name]
anybus
[HICP password]password
•IP address
•Subnet mask
•Gateway address
•DHCP/BootP
ON - EnabledOFF - Disabled
•SMTP server/login settings
Username and Password is only necessary if required by the server.
•Primary and Secondary DNS
Needed to beableto resolve host names
•Default domain name for not fully qualified host names
•Host name
•HICP password
4.2 Ethernet Configuration File (“ethcfg.cfg”)
4.2.1 General
To be able to participate on the network, the Anybus Communicator needs avalid TCP/IP configura-tion.These settings are storedin thesystem file“\ethcfg.cfg”.
The settings in this filemay also be affected by...
See also...
•DCP (See “DCP (Discoveryand Basic Configuration)” on page 26).
•HICP (See “Anybus IPconfig (HICP)” on page 29)
•SSI (See “Server Side Include (SSI)” on page 35)
•DHCP/BootP (See “DHCP/BootP” on page 26)
•Mailbox Commands (See “Mailbox Editor” on page 97)
•“FTP Server” on page 30
• “Fieldbus Settings” on page 54
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 28
Basic Network Configuration28
Example:
[Station Name]Nice Device
[Station Type]ABS-PRT
[Vendor ID]0x010C
[Device ID]0x0001
•Station Name
Station name as ASCII string, maximum 64 characters.
•Station Type
Station type as ASCII string, maximum 64 characters.
•Vendor ID
16 bithexadecimalvalue, with the prefix 0x. Assignedby the PNO.
•Device ID
16 bithexadecimalvalue, with the prefix 0x. Assignedby vendor.
File Format:
[Web]xxx.xxx.xxx.xxx
[FTP]xxx.xxx.xxx.xxx
[Modbus-TCP]xxx.xxx.xxx.xxx
[All]xxx.xxx.xxx.xxx
•Nodes listed here may access the web server
•Nodes listed here may access the FTP server
•Nodes listed here may access the modulevia Modbus-TCP
•Fallback setting,used by the module when one or several of the keys above are omitted
4.3 PROFINET Settings
The file “\pnio.cfg” holds various PROFINET-related settings. The fileis read once during startup, i.e. the Anybus Communicator must be restarted in order for any changes to have effect (unlessits contents has been changed byan IO Controller/Supervisor via the DCP protocol. In such case, the settings will have effect immediately).
4.4 IP Access Control
It is possible to specify which IP addresses that are permitted to connect to the Anybus Communicator. This information is storedinthe system file “\ip_accs.cfg”.
Note: * (asterisk) may be used as a wildcard to select IP series.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 29
Basic Network Configuration29
4.5 Anybus IPconfig (HICP)
The Anybus Communicator supports the HICP protocol used by the Anybus IPconfig utility fromHMS, which can be downloaded free of charge from the HMS website. This utility may be used to con-figure the network settings of any Anybus product connected to the network. Note that if successful, thiswill replace the settings currently stored in the configuration file(“ethcfg.cfg”).
Upon starting the program, the network is scanned for Anybus products. The net-work can be rescanned at any time by clicking “Scan”. In the list of detected de-vices, the Anybus Communicator will ap-pear as “ABC-PRT”.To alter its network settings, double-click on its entry in thelist.
A window will appear, containing the IP configuration and password settings. Validate the new settings by clicking “Set”, or click “Cancel” to abort.
Optionally, the configuration may be protected from unauthorized access by a password. To enter a password, click on the “Change password” checkbox, and enter the password under “New password”.When protected, any changes in the configuration requires that the user supplies a valid password.
Whendone, click “Set”. The new IP configuration will now be storedin the configuration file (“eth-cfg.cfg”).
Note thatif “TCP/IP Settings” has been enabled in the Anybus Configuration Manager, any settingsreceivedvia HICP will be lost in the event of a power loss or reset.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 30
5. FTP Server
5.1 General
The built-in FTP server provides a way to access the filesystem using a standard FTP client.
The following port numbers are used for FTP communication:
•TCP port 20 (FTP data port)
•TCP port 21 (FTP command port)
Security Levels
The FTPserver featurestwo security levels; admin and normal.
•Normal-level users
The root directorywill be “\user”.
•Admin-level users
The root directorywill be “\”, i.e. theuser has unrestrictedaccess to the file system.
Chapter 5
User Accounts
Theuser accounts are stored in two files, which are protected from web access:
•“\user\pswd\sys_pswd.cfg”
This file holds the useraccounts for normal-level users.
•“\pswd\ad_pswd.cfg”
This file holds the useraccounts for admin-level users.
Note: If no valid user accounts have been defined, the Anybus Communicator will grant admin-level access to all users. In such case, the FTP accepts any username/password combination, and the rootdirectory will be “\”.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 31
5.2 FTP Connection Example (Windows Explorer)
The built-in FTP client in Windows Explorer can easily be used to access the file system as follows:
1.Open the Windows Explorer by right-clickingon the “Start” button and selecting “Explore”.
2.In the address field, type ftp://<user>:<password>@<address>
-Substitute <address> with the IP address of the Anybus Communicator
-Substitute <user> with the username
-Substitute <password> with the password
3.Press enter. The Explorer will now attempt to connect to the module using the specified settings. If successful, the built-in file system is displayed in the Explorer window.
FTP Server 31
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 32
6. Web Server
6.1 General
TheAnybus Communicator features a flexibleweb server with SSI capabilities. The built-in web pages can be customized to fit a particular application and allow access to I/O data and configuration settings.
The web server communicates through port 80.
See also...
• “Server SideInclude (SSI)” on page 35
• “IP Access Control” on page 28
Protected Files
For security reasons, the following files are protected from web access:
•Files located in “\user\pswdcfg\pswd”
•Files located in “\pswd”
•Files located in a directory which contains a file named “web_accs.cfg”
Chapter 6
Default Web Pages
The Anybus Communicator containsa set of virtual files which can beused when building a web page for configuration of network parameters. These virtual files can be overwritten (not erased) by placing files with the same name in the root of disc 0.
This makes it possible to, for example, replace the HMS logo by uploading a new logo named “\lo-go.jpg”. It is also possible to make links from a web page to thevirtual configuration page. In such casethe link shall point to “\config.htm”.
These virtual files are:
\index.htm- Points to the contents of config.htm\config.htm- Configuration frame page\configform.htm- Configuration form page\configform2.htm- Configuration form page\store.htm- Configuration store page\logo.jpg- HMS logo\configuration.gif- Configuration picture\boarder.bg.gif- picture\boarder_m_bg.gif- picture\index.htm- Points to the contents of config.htm\eth_stat.html- Configuration frame page\cip_stat.html- Configuration form page\ip_config.shtm- Configuration form page\smtp_config.shtm- Configuration store page\style.css- HMS logo\arrow_red.gif- Configuration picture
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
•Optionally, a login message can be specified by including the key [AuthName]. This message will be displayed by the web browser upon accessing the protected directory.
Directories can be protected from web access by placinga file called “web_accs.cfg”in thedirectoryto protect. This file shall contain a list of users that are allowedto access the directory and its subdirectories.
The list of approved users can optionally be redirected to one or several other files.
Example:
In this example, the list of approvedusers willbe loadedfrom the files “here.cfg” and “too.cfg”.
Note that when using this feature,make sure to put the user/password files in a directory thatis pro-tectedfrom web access, see “Protected Files”on page 32.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 34
6.3 Content Types
By default, the following content typesare recognizedbytheir file extension:
It is possible to configure/reconfigure the reported content types, and which files that shall be scanned for SSI. This is donein the system file“\http.cfg”.
Note:Up to 50 content types and50SSI file types may be specified in this file.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 35
7. Server Side Include (SSI)
The Ethernet Mac ID of the ABC is: 00:30:11:78:9A:BC
7.1 General
Server Side Include (from now on referred to as SSI) functionality enables dynamic content to be usedon web pages and in e-mail messages.
SSI are special commandsembedded in the source document. When the Anybus Communicator en-counters sucha command, it will execute it, and replaceit with the result (when applicable).
Syntax
XXX... below represents a command opcode and parameters associated with thecommand.
This function returns the currently used SMTP server address.
Syntax:
<?--#exec cmd_argument="DisplayEmailServer"-->
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 38
DisplaySMTPUser
This function returns the usernameused for SMTPauthentication.
Syntax:
<?--#exec cmd_argument="DisplaySMTPUser"-->
DisplaySMTPPswd
This function returns the password used for SMTP authentication.
Syntax:
<?--#exec cmd_argument="DisplaySMTPPswd"-->
DisplayStationName
This function returns the PROFINET Station Name.
Syntax:
<?--#exec cmd_argument="DisplayStationName"-->
Server Side Include (SSI) 38
DisplayStationType
This function returns the PROFINET Station Type.
Syntax:
<?--#exec cmd_argument="DisplayStationType"-->
DisplayVendorID
This function returns the PROFINET Vendor ID.
Syntax:
<?--#exec cmd_argument="DisplayVendorId"-->
DisplayDeviceID
This function returns the PROFINET DeviceID.
Syntax:
<?--#exec cmd_argument="DisplayDeviceId"-->
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 39
Server Side Include (SSI) 39
StoreEtnIPConfig
Note:This function cannot be used in e-mail messages.
This function stores a passed IP configuration in the configuration file “ethcfgIP.cfg”.
Syntax:
<?--#exec cmd_argument="storeEtnIPConfig"-->
Includethisline in a HTML pageand pass a form with new IP settings to it.
Acceptedfields in form:
SetIpSetSubnetSetGatewaySetEmailServerSetDhcpState - value "on" or "off"SetDNS1SetDNS2SetHostNameSetDomainNameSetSMTPUserSetSMTPPswd
Default output:
Invalid IP address!Invalid Subnet mask!Invalid Gateway address!Invalid IP address or Subnet mask!Invalid Email Server IP address!Invalid DHCP state!Invalid DNS1!Invalid DNS2!Configuration stored correctly.Failed to store configuration.
GetText
Note:This function cannot be used in e-mail messages.
This function retrieves a text string from an object and storesit in the Output Data area.
Syntax:
<?--#exec cmd_argument="GetText( ’ObjName’, OutWriteString ( offset ), n )"-->
ObjName- Name of object.offset- Specifies the destination offset fromthe beginning of the Output Data area.n- Specifies maximum number of characters to read (Optional)
Default output:
Success- Write succeededFailure- Write failed
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 40
Server Side Include (SSI) 40
printf
This function includes a formatted string, which may contain data from the input and output data areas,on a web page. The formatting of the string is similar to the C-language function printf().
Syntax:
<?--#exec cmd_argument="printf(’String to write’, Arg1, Arg2, ..., ArgN)"-->
Like the C-language function printf() the “String to write” for this SSI function contains two types of objects: Ordinary characters, which are copied to the output stream, and conversion specifications, each of which causes conversion and printing of the next successive argument to printf. Each conversion specification begins with the character % and ends with a conversion character.Between the % and theconversion character there may be,inorder:
•Flags (in any order), which modify the specification:
-whichspecifies left adjustment of the converted argument in its field.+which specifies that the numberwill alwaysbeprinted with a sign(space)if thefirst character is not a sign, a space will be prefixed.0for numeric conversions, specifies padding to the field with leading zeroes.#whichspecifies an alternate output form. For o, thefirst digit will be zero. For x or
X, 0x or 0X will be prefixed to a non-zero result. For e, E,f, g and G,the output willalwayshavea decimal point; for g andG, trailing zeros will not be removed.
•A number specifying a minimum fieldwidth. The converted argument will be printed in a field at least this wide, and wider if necessary. If the converted argument has fewer characters than the field width it will be padded on the left (or right, if left adjustment has been requested) to make up the field width. The padding character is normally space,but can be 0 if the zero padding flag is present.
•A period, which separates the field width from the precision.
•A number, the precision, that specifies themaximum number of characters to be printed from a string, or the number of digits to be printed after the decimal point for e, E, or F conversions, or the number of significant digits for g or G conversion, or the minimum number of digits to beprinted for an integer (leading 0s will be added to make up the necessary width)
•A length modifier h, l (letter ell), or L. “h” Indicates that the corresponding argument is to be printed as a short or unsigned short; “l” indicates that the argument is along or unsigned long.
The conversion characters and their meanings are shown below. Ifthe character after the % is not a con-version character,the behavior is undefined.
CharacterArgument type, converted to
d, ibyte, short; decimal notation (For signed representation. Use signed argument)obyte, short; octal notation (without a leading zero).x, Xbyte, short; hexadecimal notation (without a leading 0x or 0X), using abcdef for 0x or ABCDEF for
0X.ubyte, short; decimal notation.cbyte, short;single character,after conversion to unsigned char.schar*; characters fromthe string areprinted until a "\0" isreached or until thenumber of characters
indicated by the precision have been printedffloat; decimal notation of the form [-]mmm.ddd, where the number of d’s is specified by the preci-
sion. The default precision is 6; a precision of 0 suppresses the decimal point.e, Efloat; decimal notation of the form [-]m.dddddd e+-xx or[-]m.ddddddE+-xx, where the number of d’s
specified by the precision. Thedefault precision is 6; a precision of 0 suppresses the decimalpoint.g, Gfloat; %e or %E is used if the exponent is less than -4 or greater than or equal to the precision; oth-
erwise %f is used. Trailing zeros and trailing decimal point are not printed.%no argument is converted; print a %
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 41
The arguments that can be passed to the SSI function printfare:
ArgumentDescription
InReadSByte(offset)Read a signed byte from positionoffset in the Input Data areaInReadUByte(offset)Read an unsigned byte from positionoffset in the Input DataInput Data areaInReadSWord(offset)Read a signed word from positionoffset in the Input Data areaInReadUWord(offset)Read an unsigned word from positionoffset in the Input Data areaInReadSLong(offset)Read a signed longword from position offset in the Input Data areaInReadULong(offset)Read an unsigned longword from position offset in the Input Data areaInReadString(offset)Read a string (char*) from positionoffsetin the Input Data areaInReadFloat(offset)Read a floating point (float) value from position offset in the Input Data areaOutReadSByte(offset)Read a signed byte from positionoffset in the Output Data areaOutReadUByte(offset)Read an unsigned byte from positionoffset in the Output Data areaOutReadSWord(offset)Read a signed word (short) from positionoffset in the Output Data areaOutReadUWord(offset)Readan unsigned word (short) from positionoffset in the Output Data areaOutReadSLong(offset)Read a signed longword (long) from position offset in the Output Data areaOutReadULong(offset)Read an unsigned longword (long) from position offset in the Output Data areaOutReadString(offset)Read a null-terminated string from position offset in the Output Data areaOutReadFloat(offset)Read a floating point (float) value from position offset in the Output Data areaCipReadSByte(class,
inst, attr)CipReadUByte(class,
inst, attr)CipReadSWord(class,
, attr)
instCipReadUWord(class,
inst, attr)CipReadSLong(class,
inst, attr)CipReadULong(class,
inst, attr)CipReadFloat(class,
inst, attr)
CipReadShort-String(class, inst, attr)
CipReadString(class, inst, attr)
CipReadUByteAr-ray(class, inst, attr)
CipReadUWordAr-ray(class, inst, attr)
CipReadULongAr-ray(class, inst, attr)
Read a signed byte from a CIP-object
Read an unsigned byte from a CIP-object
Read a signed word from a CIP-object
Read an unsigned word from a CIP-object
Read a signed longword from a CIP-object
Read an unsigned longword from a CIP-object
Read a floating point value from a CIP-object
Read a short string from a CIP-object
Read a null-terminated string from a CIP-object
Read an unsigned byte-array from a CIP-object
Read an unsigned word-array from a CIP-object
Read an unsigned longword-array from a CIP-object
Server Side Include (SSI) 41
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 42
Server Side Include (SSI) 42
scanf
Note:This function cannot be used in e-mail messages.
This function reads a string passed from an object in a HTML form, interprets thestring accordingtothe specification in format, and stores the result in the Output Dataarea according to the passed argu-ments. The formatting of the string is equal to the standardC function call scanf()
ObjName-The name of the object with the passed data stringformat- Specifies how the passed string shall be formattedArg1 - ArgN- Specifies where to write the dataErrVal1 -ErrValN- Optional; specifies the value/string to write in case of an error.
CharacterInput, Argument Type
dDecimal number; byte, shortiNumber,byte, short. The number may be in octal (leading 0(zero)) or hexadecimal (leading 0x
or 0X)oOctal number (with orwithout leading zero); byte, shortuUnsigned decimal number; unsigned byte, unsigned shortxHexadecimal number (with or without leading 0x or 0X); byte, shortcCharacters; char*. The next input characters (default 1) are placed at the indicated spot. The
normal skip over white space is suppressed; to read the next non-white space character, use
%1s.sCharacter string (not quoted); char*, pointing to an array of characters large enough for the
string and a terminating "\0" that will be added.e, f, gFloating-point number with optional sign, optional decimal point and optional exponent; float*%Literal %; no assignment is made.
The conversion characters d, i, o, u and x may be preceded by l (letter ell) to indicate that a pointerto “long” appears in the argument list rather than a “byte” or a “short”
The arguments that can be passed to theSSI function scanf are:
ArgumentDescription
OutWriteByte(offset)Write a byte to position offset in the Output Data areaOutWriteWord(offset)Write a word to position offset in the Output Data areaOutWriteLong(offset)Write a long to position offset in the Output Data areaOutWriteString(offset)Write a string to position offset in the Output Data areaOutWriteFloat(offset)Write a floating point value to position offset in the Output Data areaCipWriteByte(class, inst, attr)Write a byte value to a CIP-objectCipWriteWord(class, inst, attr)Write a word value to a CIP-objectCipWriteLong(class, inst, attr)Write a longword to a CIP-objectCipWriteFloat(class, inst, attr)Write a floating point value to a CIP-object
Default output:
Write succeededWrite failed
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 43
Server Side Include (SSI) 43
IncludeFile
This function includes the contents of a file on a web page.
Success- <File content>Failure- Failed to open <filename>
SaveToFile
Note:This function cannot be used in e-mail messages.
This function saves the contents of a passed form to a file. The passed name/value pair will be written to the file “File name” separated by the “Separator” string. The [Append|Overwrite] parameter deter-mines if the specified file shall beoverwritten, or if the data in the file shall be appended.
Success- Form saved to fileFailure- Failed to save form
SaveDataToFile
Note:This function cannot be used in e-mail messages.
This function saves the data of a passed form to a file. The “Object name” parameter is optional, if spec-ified, only the data from that object will be stored. If not, thedata from allobjects in the form willbestored.
The[Append|Overwrite] parameter determines if the specified fileshall be overwritten, or if the datain thefileshall be appended.
Success- Form saved to fileFailure- Failed to save form
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 44
Server Side Include (SSI) 44
DisplayScannerMode
This function returns the current scanner mode (run or idle state).
Syntax:
<?--#exec cmd_argument="DisplayScannerMode( ’Output when Run’, ’Output when Idle’ )"-->
SetScannerMode
Note:This function cannot be used in email messages.
This function is used to set the EtherNet/IP Scanner to Run or Idle. A variable called “scanner_state”shall be sent to the page with the value “run” or “idle” (other values willbe ignored).
Syntax:
<?--#exec cmd_argument="setScannerMode"-->
Default output:
Failure- Change scanner mode not possible
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 45
Server Side Include (SSI) 45
7.3 Changing SSI output
There are two methodsof changing the output strings from SSI functions:
1.Changing SSI output defaults by creating a file called “\ssi_str.cfg” containing the output strings for all SSI functions in the system
2.Temporarily changing theSSI output bycalling the SSI function “SsiOutput()”.
7.3.1 SSI Output String File
If the file “\ssi_str.cfg” is found in the file system and the file is consistent with the specification below, the SSI functions will usetheoutput strings specified in this fileinstead of the default strings.
The files shall havethe following format:
[StoreEtnConfig]Success: "String to use on success"Invalid IP: "String to use when the IP address is invalid"Invalid Subnet: "String to use when the Subnet mask is invalid"Invalid Gateway: "String to use when the Gateway address is invalid"Invalid Email server: "String to use when the SMTP address is invalid"Invalid IP or Subnet: "String to use when the IP address and Subnet mask does not match"Invalid DNS1: "String to use when the primary DNS cannot be found"Invalid DNS2: "String to use when the secondary DNS cannot be found"Save Error: "String to use when storage fails"Invalid DHCP state: "String to use when the DHCP state is invalid"
[scanf]Success: "String to use on success"Failure: "String to use on failure"
[IncludeFile]Failure: "String to use when failure"
[SaveToFile]Success: "String to use on success"Failure: "String to use on failure"
[SaveDataToFile]Success: "String to use on success"Failure: "String to use on failure"
[GetText]Success: "String to use on success"Failure: "String to use on failure"
1
1
1
The contents of this file can be redirectedbyplacing the line “[File path]” on the first row, and a file path on the second.
Example:
[File path]\user\ssi_strings.cfg
In this example, the settings described above will be loaded from the file “user\ssi_strings.cfg”.
1.“%s” includes the filename in the string
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 46
Server Side Include (SSI) 46
7.3.2 Temporary SSI Output Change
The SSI output for the next called SSI function can be changed with the SSI function “SsiOutput()” The next called SSI function will use the output according to this call. Thereafterthe SSI functions will usethe default outputs or the outputs defined in the file “\ssi_str.cfg”. The maximum size of a stringis 128 bytes.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 47
8. E-mail Client
8.1 General
The built-in e-mail client can send predefined e-mail messages based on trigger-events in Input- and Output Data areas. The client supportsSSI, howevernote that some SSI functions cannot be used in e-mail messages (specifiedseparately for each SSI function).
See also...
• “Server SideInclude (SSI)” on page 35
Server Settings
The Anybus Communicator needs a valid SMTP serverconfiguration in order to be able to sende-mail messages. These settings are stored in thesystem file “\ethcfg.cfg”.
See also...
• “Ethernet Configuration File (“ethcfg.cfg”)” on page 27
Chapter 8
Event-Triggered Messages
As mentioned previously, thee-mail client can send predefined messages based on events in the Input- andOutput Data areas. In operation, this works as follows:
1.The trigger sourceis fetched from a specified location
2.A logical AND is performed between the trigger sourceand a mask value
3.The result is compared to a reference value
4.If theresult is true, the e-mail issent to the specified recipient(s).
Which events that shall cause a particular message to be sent, is specified separately for each message.For more information, see “E-mail Definitions” on page 48.
Note that the Input- and Output Data areas are scanned twice per second, i.e. to ensure that an event isdetected by the module, it must be present longer than 0.5 seconds.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 48
8.2 E-mail Definitions
The e-mail definitions are stored in the following two directories:
•“\user\email”
This directory holdsup to 10 messages which canbe altered by normal-level FTP-users.
•“\email”
This directory holdsup to 10 messages which can be altered by admin-level FTP-users.
E-mail definition files must be named “email_1.cfg”, “email_2.cfg” ... “email_10.cfg”in orderto be properly recognized by the module.
File Format:
[Register]
Area, Offset, Type
[Register Match]
Value, Mask, Operand
[To]
recipient
E-mail Client48
[From]
sender
[Subject]
subject line
[Headers]
Optional extra headers
[Message]
message body
KeyValueScanned for SSI
AreaSource area. Possible values: “IN” (Input Data area) or “OUT” (Output Data area)NoOffsetSource offset, written in decimal or hexadecimal.TypeSource data type. Possible values are “byte”, “word”, and “long”ValueUsed as a reference value for comparison.MaskMask value, applied on the trigger source prior to comparison (logical AND).OperandPossible values are “<“, “=” or “>”ToE-mail recipientYesFromSender email addressSubjectE-mail subject. One line only.HeadersOptional; may be used to provide additional headers.MessageThe actual message.
Note:Hexadecimal values must be written withthe prefix “0x” in order to be recognized by the module.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 49
3. Navigating ACM
A
B
C
D
This menu entry holds additionalsub-entries / parameters
This menu entry is expanded
Sub-entries
3.1 Main Window
The main window inACM can be divided into 4 sections as follows:
Chapter 3
•A: Drop-down Menus & Tool Bar
The second drop-down menu from the left will change de-pending on the current context. The Tool Bar provides quick access to the most frequently used functions.
•B: Navigation Section
This section isthe main tool for selecting and altering dif-ferent levels of the sub-network configuration.
Entries preceded by a “+” holds further configuration pa-rameters or “sub menus”. Togain access to these parame-ters,the entrymust be expanded by clicking “+”.
There are three main levels in the navigation window, namely Fieldbus, Communicator RS232/422/485, and Subnetwork.
Right-clicking on entries in this section brings out addi-tional selections related tothat particular entry.
•C: Parameter Section
This section holds a list of parameters or options related to the currentlyselected entryin the Navigation Section.
The parameter value may be specified either using a selec-tion box or manually, depending on the parameter itself.Valuescan be specifiedin decimal form(e.g. “42”), or in hexadecimal format(e.g. “0x2A”).
•D: Information Section
This section holds information related to the currently se-lected parameter.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 50
3.1.1 Drop-down Menus
File
•New
Create a new configuration.
See also “Configuration Wizards” on page 64.
•Open...
Open a previously createdconfiguration.
•Save
Save the current configuration.
•Save As...
Save the current configuration under a new name.
•Print...
Send details about the currentconfiguration to a printer.
Navigating ACM 20
•Properties...
Set the name and (optional) passwords for the configuration.
ItemDescription
Select a Name for theConfiguration
Enable PasswordEnables password protectionDownloadPassword(6)Set passwords for downloading Upload Password(6)
Enter a descriptive name for the new configuration
and uploading the configuration(max. 6 characters)
CAUTION: Always keep a copy of the password in a safe place. A lost password cannot be re-trieved!
•Exit
Close ACM.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 51
Tools
•Port
Select the COM-port used for the configuration of the gateway.
•Upload configuration from Communicator RS232/422/485
Upload the configuration from the gateway to ACM.
•Download configuration to Communicator RS232/422/485
Downloadthe current configuration to the gateway.
•Start Logging
Start the Data Logger (see “Data Logger” on page 58).
Notethat when the Data Logger is active, this menu entry is changed to “Stop Logging”.
Navigating ACM 21
•Options
This will open the following window:
ItemDescription
Warning on DeleteA confirmation dialog is displayed each time something is deleted.Warning on Unsaved
ConfigurationShow Wizard when
“New” menu is selectedSelect languageSelects which language to use. The new setting will be active the next time the pro-
A confirmation dialog is displayed when closing ACM with unsaved data.
The Wizard is displayed each time a new configuration is created.
gram is launched.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 52
Navigating ACM 22
Selecting the “Module” tab will reveal additional properties:
ItemDescription
Sizeof logbufferBy default, the Data Logger can log up to 512 entries in each direction. If necessary, it
is possible to specify a different numberof entries (valid settings range from 1...512). Click “Apply” to validate the new settings. See also “Data Logger” on page 58.
Firmware DownloadDownload firmware to the embedded fieldbus interface.
Warning: Use with caution.
Factory RestoreRestores the gateway firmware to the
original state (does not affect the embedded fieldbus interface).
Block ConfigurationWhen selected, the downloaded configuration will not be executed by the gateway.
Warning: Use with caution.
Create Error log Creates an error log file
View
•Toolbar
Enables/disables the toolbar iconsat the top of the main win-dow.
•Status Bar
Enables/disables the status bar at the bottom of the main win-dow.
Help
•Contents/Search For Help On...
Opens a built-in browser window with a link to the Anybussupport website.
•About...
Displays general information about the gateway and the current version of ACM.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 53
3.1.2 Toolbar Icons
NewOpenSave
UploadDownload
Up one Level
CopyCutPasteDeleteInsert
Connect
Disconnect
Start Log.Stop Log.
Sub-Network
Monitor
Add Command
Add Mailbox
NodeBroadcaster
Node Monitor
Add
Transactions
Add
Transaction
The toolbar features icons for the most commonly used functions.
•New, Open & Save
See “File” on page 20.
•Upload from ABC & Download to ABC
See “Tools”onpage 21.
•Up oneLevel
Clicking on thisicon will move the selection in the navigation section.
•Cut, Copy, Paste, Delete, Insert
These icons areused for common editing func-tions in the navigation section.
•Connect
Clicking on thisicon will cause
ACMto attempt to connect to the gateway.
Navigating ACM 23
•Disconnect
Clicking on thisicon will cause
ACM to disconnect from the gateway.
•Start Logging & Stop Logging
See “Tools” on page 21& “Data Logger” on page 58.
•Sub-network Monitor
Clicking on this icon will launch the sub-network Monitor(see “Sub-network Monitor” on page 53).
•Add Command
This icon is used to add commands to the currently selectednode.
•Add Mailbox
(Advanced functionality, see “Mailbox Editor” on page 67)
•AddNode & Add Broadcaster
These icons areused to addnodes to the configuration.
•Node Monitor
Clicking on this icon will launch the Node Monitor (see “Node Monitor” on page 54)
•Add Transaction(s)
These icons areused to addtransactions to the currentlyselected node.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 54
10. Basic Settings
10.1 Fieldbus Settings
(Select “Fieldbus” in the Navigation Section to gain access to the parameters described in this section).
General
During start-up the fieldbus interface of the AnybusCommunicator is initialized to fit the configuration created in theAnybus Configuration Manager. Optionally, some initialization parameters can be set manually to provide better control over how thedatashall be treated by the module.
Fieldbus Type
The Anybus Configuration Manager supports a wide range of net-working systems. Make sure thatthis parameter is set to “Profinet IO”.
Chapter 10
TCP/IP Settings
To be able to participate on the network the following settings must be configured:
•Communicator IP-address
(see “Basic Network Configuration” on page26)
•Default Gateway
(see “Basic Network Configuration” on page26)
•Subnet Mask
(see “Basic Network Configuration” on page26)
•TCP/IP Settings
Enabled- Use thesettings above.Disabled- Use the settings stored in“ethcfg.cfg”
IO Sizes
These parameters specify how data from the internal memory buffer shall be exchanged on PROF-INET. This can either be handled automaticallybythe module, or specifiedmanually.
•Automatic
All data will be representedas I/O Data.(see also “Data Representation (IO Data & Record Data)” on page 22)
Fieldbus Type
IO Sizes
•User defined
Additional parameter properties appear; “IO Size In” and “IO Size Out”. The specified amount, starting at address 0x0000 of the respective memory buffers, will be reserved for and represented as I/O Data.The remainder willbe reserved for ParameterData.
(see also “Data Representation (IO Data & Record Data)” on page 22)
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 55
4.2 Communicator Parameters
Interface
Only serial communication is currently supported.
Control/Status Word
See “Control and Status Registers” on page 62.
ValueDescription
EnabledEnable the Control and Status Registers. The “Data Valid”-bit in the Control Register must
be set to start the sub-network communication.
Enabled but nostartup lockThis setting is similar to “Enabled”, except that the control system is not required to set the
“Data Valid”-bit to start the sub-network communication.
DisabledThis setting completely disables the Control and Status Registers.
25
Module Reset
This parameter specifies how the gateway will behavein the event of a fatal error.
ValueDescription
EnabledThe gateway will be restarted, and no error will be indicated to the user.DisabledThe gateway will halt and indicate an error.
Protocol Mode
This parameter specifies which protocol mode to use for thesub-network. See “Protocol Modes”on page 17.
ValueDescription
Generic DataModeThis mode is primarily intended for Produce & Consume-based protocols, where there are
no Master-Slave relationship between the gateway and the nodes on the sub-network.
Master ModeThis mode is intended for “Query & Response”-based protocols, where a single Master
exchanges data with a number of Slaves.
DF1This mode is intended for the DF1 protocol. The Anybus Communicator can only be con-
figured as a Master with half-duplex communication.Note: This is the only mode available if you intend to configure an ABC module for DF1.
Statistics
The Transmit- and Receive Counters indicate how many transactions that have successfully been ex-changed on the sub-network. This feature is primarily intended for debugging purposes.
•Receive CounterLocation
Specifies the location of theReceiveCounter in the internal memory buffer.
•Transmit Counter Location
Specifies the location of theTransmit Counter in the internal memorybuffer.
•Statistics
Enables/disables theReceiveand Transmit Counters.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 56
4.3 Sub-network Parameters
Communication
These parameters specify the actual communication settings used for the sub-network.
ParameterDescriptionMaster Mode and Generic Mode
Bitrate (bits/s)Selects the bit rate1200
240048009600192003570038400
57600Data bitsSelects the number of data bits7, 8ParitySelects the parity modeNone, Odd, EvenPhysical standardSelects the physical interface typeRS232, RS422, RS485Stop bitsNumber of stop bits.1, 2
26
Start-and End Character
Note:Theseparameters are onlyavailable in Generic Data Mode.
Start and end characters are used to indicate the beginning and end of a serial message. For example, a message may be initiated with <ESC> and terminatedwith <LF>. In this case,the Start character wouldbe 0x1B (ASCII code for <ESC>) and theEnd character 0x0A (ASCII code for <LF>)
ParameterDescriptionValid settings
End character valueEnd character for the message, ASCII0x00–0xFFUse End characterDetermines if the End character shall be used or notEnable / DisableStart character valueStart character for the message, ASCII0x00–0xFFUse Start characterDetermines if the Start character shall be used or notEnable / Disable
Timing (MessageDelimiter)
Theparameters in this categorydiffers slightly between the different protocol modes.
•Master Mode
The Message Delimiter specifies the time that separates two messages in steps of 10 ms. If set to 0 (zero), thegateway will use thestandard Modbus delimiter of 3.5 characters (the actual numberof ms will be calculated automaticallybased on thecurrently usedcommunication settings).
•Generic Data Mode
The Message Delimiter specifies thetime thatseparates two messages in steps of 10 µs.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 57
5. Nodes
5.1 General
In ACM, a node represents a single device on the network. Although the gateway does not feature a scanlist in the traditional sense, allnodesand their transactions will be processed in the order they werede-fined in ACM.
Themaximum number of nodes thatcan be created in ACM is 31.
5.2 Adding & Managing Nodes
Chapter 5
FunctionDescription
PastePaste a node from the clipboardSubnetwork MonitorLaunch the subnet monitor (see “Sub-network Monitor” on page 53)Add NodeAdd a node to the configuration
Add BroadcasterLoad NodeAdd a previously saved nodeSubnetwork Status...View diagnostic information about the sub-network
a.This function is only available in Master Mode.
a
Add a broadcaster node to the configuration
5.3 Node Parameters
5.3.1 Master Mode and Generic Data Mode
To gain access tothe parameters described in this section, select a node in the Navigation Section.
ParameterDescription
Slave AddressThe value entered here may be used to set the node address in certain commands.
For more information, see “The Command Editor” on page 43.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 58
6. Transactions
6.1 General
As mentioned previously, transactions are representations of the actual serial telegramsexchanged on the serial sub-network. Although the gateway does not feature a scan list in the traditional sense, all nodes and their transactions will be processed in the order they weredefinedin ACM.
Transactions are handled slightly differently in thethree protocolmodes:
•Master Mode
For regular nodes, transactions always come inpairs; a query and a response. The query is issued by the gateway, while responses are issued by the slaves on the sub-network. The Broadcaster can only send transactions.
•Generic Data Mode
Transactions can be added as desired for both directions. Transactions sent to the sub-network are called “Transaction Produce”, and transactions issued by other nodes are called “Transaction Consume”.
Chapter 6
•DF1 Master Mode
Please refer to “DF1 Protocol Mode” on page 46.
Theoretically, the gateway supports up to 150 transactions. The actual number may however be less de-pending on the memory requirements of the defined transactions.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 59
6.2 Adding & Managing Transactions
FunctionDescription
CopyCopy a node to the clipboard
a
DeleteNode MonitorLaunch the node monitor (see “Node Monitor” on page 54)
Add Transaction(s)
b
Add Transaction Consume
Add transaction ProduceAdd CommandAdd predefined transactions to the nodeInsert New NodeInsert a new node above the currently selected oneSave NodeSave the selected nodeInsert from FileInsert a previously saved node above the currently selected nodeRenameToincrease readability, each node can be given a unique name using this function
a.Only available if more than one node existsb.Only available in Master Modec.Only available in Generic Data Mode
Delete a node
On regular nodes, this adds a Query and a Response. The two transactions will begrouped in order to increase readability.
On the Broadcaster,a single transaction will be added.
c
Add a “Consume”-transaction
c
Add a “Produce”-transaction
Transactions 29
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 60
6.3 Transaction Parameters (Master Mode)
6.3.1 Parameters (Query & Broadcast)
ParameterDescription
Minimum time between broad-casts (10 ms)
Offline options for fieldbusThis parameter specifies the action to take for this transaction if the higher level net-
Offline options for sub-networkThis parameter specifies the action to take for this transaction if the sub-network goes
Reconnect time (10 ms)This parameter specifies how long the gateway shall wait before attempting to recon-
Retries
Timeout time (10 ms)
Trigger byte addressThis parameter specifies the location of the trigger byte in internal memory (only rele-
This parameter specifies how long the gateway shall wait after transmitting a broad-cast transaction before processing the next entry in the scanlist. The value should beset highenough to allow the slavedevicestime tofinish the handling ofthe broadcast.
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.Note: This setting is only relevant for the Broadcaster node.
work goes offline. This affects the data that is sent to the sub-network.
•Clear - The data destined for the slave-devicesis cleared (set tozero)
•Freeze - The data destined for the slave-device is frozen
•NoScanning -The updating of the sub-networkis stopped
offline. This affects the data that is reported to the control system.
•Clear- Data is cleared (0) on the higher level network if the sub-network goes offline
•Freeze - Data is frozen on the higher level network if the sub-network goes offline
nect a disconnected node. A node will be disconnected in case the maximum number of retries (below) has been reached.
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.Note: This setting is not relevant for the Broadcaster node.This parameterspecifies how many times a timeout may occur in sequence before the
node is disconnected.This parameter specifies how long the gateway will wait for a response from a node. If
this time is exceeded, the gateway will retransmit the Query until the maximum num-ber of retries (see above) has beenreached.
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.
vant when “Update mode” is set to “Change of state on trigger”).Valid settings range from 0x200 to 0x3FF and 0x400 to 0xFFF
Transactions 30
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 61
Transactions 31
ParameterDescription
Update modeThis parameter is used to specify when the transaction shall be sent to the slave:
•Cyclically
The transaction is issued cyclically at the interval specified in the “Update time” parameter.
•On data change
Thedata areais polled for changes at thetime intervaldefined by Update time. A transaction is issued when a change in data is detected.
•Single shot
The Query is issued once at start up.
•Change of state on trigger
The Query is issued when the trigger byte value has changed. This feature ena-bles the control system to notify the gateway when to issue a particular Query. Touse this feature correctly, the control system must first update the data area asso-ciated with the Query/transaction, then increase the trigger byte by one. The loca-tion of the trigger byte is specified by the “Trigger byte address” parameter. The trigger byte is checked at the interval specified in the “Update time” parameter.
Update time (10 ms)This parameter specifies how often the transaction will be issued in steps of 10 ms
(relevantonly when “Updatemode” is setto “Cyclically”,“Ondata change” or “Changeof state on trigger”).
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.
6.3.2 Parameters (Response)
ParameterDescription
Trigger byteThis parameter is used to enable/disable the trigger functionality for the response. If
enabled, the gateway will increase the trigger byte by one when the gateway receives new data from the sub-network. This can be used to notify the control system of the updated data.
The location of the trigger byte is specified by the “Trigger byte address” parameterbelow.
Trigger byte addressThis parameter specifies the location of the trigger byte in the internal memory buffer.
Valid settings range from 0x000 to 0x1FF and 0x400 to 0xFFF
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 62
6.4 Transaction Parameters (Generic Data Mode)
6.4.1 Produce Transactions
ParameterDescription
Offline options for fieldbusThis parameter specifies the action to take for this transaction if the higher level network
goes offline. This affects the data that is sent to the sub-network.
•Clear
Data is cleared (0) on the sub-network if the higher level network goes offline
•Freeze
Data is frozen on the sub-network if the higher level network goes offline
•NoScanning
Stop subnet scanning for this transaction if the higher level network goes offline
Update modeThe update mode for the transaction:
Transactions 32
•Cyclically
The transaction is sent cyclically at the interval specified in “Update Time”.
•On data change
The data area is polled for changes at the time interval defined by Update time. A transaction is issued when a change in data is detected.
•Single shot
The transaction is sent once at startup.
•Change of state on trigger
The transaction is sent when the trigger byte has changed. This feature enables the control system to notify the gateway when to issue a particular transaction. To use thisfeature correctly, the control system must first update the data area associated with the transaction, then increase the trigger byte by one. The location of the trigger byteis specified by the “Trigger byte address” parameter. The trigger byte is checked at the interval specified in the “Update time” parameter.
Update time (10 ms)This parameter specifies how often the transaction will be issued in steps of 10ms
(relevant only when “Update mode” is set to “Cyclically”, “On data change” or “Change ofstate on trigger”).
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 63
ParameterDescription
Trigger byte addressThis parameter specifies location of the trigger byte in the internal memory buffer.
If “Update mode” is set to “Change of state on trigger”, the memory location specified by this parameter is monitored by the gateway. Whenever the trigger byte is updated, the gateway will produce the transaction on the sub-network.
This way, thecontrol system caninstruct the gateway to produce a specific transaction on the sub-network by updating the corresponding trigger byte.
The trigger byte should be incremented by one for each activation. Please note that the trigger byte address must be unique to each transaction. It can not be shared by two or more transactions.
Note: This parameterhas no effect unless the “Update mode” parameter is setto“Change of state on trigger”.
Valid settings range from 0x200 to 0x3FF and 0x400 to 0xFFF
6.4.2 Consume Transactions
Transactions 33
ParameterDescription
Offline options for sub-networkThis parameter specifies the action to take for this transaction if the sub-network goes
offline. This affects the data that is sent to the higher level network.
•Clear
Data is cleared (0) on the higher level network if the sub-network goes offline
•Freeze
Data is frozen on the higher level network if the sub-network goes offline
Offline timeout time (10 ms)This parameter specifies the maximum allowed time between two incoming messages
in steps of 10ms. If this time is exceeded, the sub-network is considered to be offline. A value of 0 disables this feature, i.e. the sub-network can never go offline.
The entered value is multiplied by 10. An entered value of 5 will result in 50 ms.
Trigger byte•Enable
Enables the trigger byte. The location of the trigger byte must be specified in “Trig-ger byteaddress”.
The trigger byte value will be increased each time a valid transaction has been con-sumedby the gateway.
The trigger byte will also be increased if the offline option is set to “Clear” and theoffline timeout time value is reached.
This feature enables the control system to be notified each time new data has beenconsumed on the sub-network.
•Disable
Disables the trigger byte functionality.
Trigger byte addressThis parameter specifies the location of the trigger byte in the internal memory buffer.
Valid settings range from 0x000 to 0x1FF and 0x400 to 0xFFF.Please note that the trigger byte address must be uniqueto each transaction. It cannot
be shared by two or more transactions.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 64
6.5 Transaction Editor
FrameObjects
•Apply Changes
This will save anychanges andexit to themain window.
•Exit
Exit without saving.
The Transaction Editor can be used to edit the individual frame objects of a transaction. The same set-tings are also available in the parameter section of the main window, however the Transaction Editor presentsthe frame objects in a more visual manner.
Transactions 34
To edit the valueof a parameter,click on it and enter a new value using the keyboard.Wheneditingtransactions which are based on predefined commands, certain partsof the transactionmay not be ed-itable.
TheFile menu featuresthe following entries:
Example:
The transaction created in this example are built up as follows:
The first byte holds the STX (0x02) followed by two bytes specifying the length of the data field (in this case 8). The next 8 bytes are data and since this is a “query”-transaction, the data is to be fetched from the Output Area which starts at address location 0x202. No swappingwill be per-formed on the data. This is followed by a two-byte checksum.The checksum calculation starts with the second byte in the transaction.
The transaction ends with a byte constant, the ETX(0x03).
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 65
7. Frame Objects
Transaction
ConstantConstant
Variable Length DataChecksumConstant
7.1 General
Each transaction consists of Frame Objects which makes up the serial telegram frame. Each Frame Ob-jectspecifies how thegatewayshall interpret or generate a particular part of the telegram.
There are 5 types of frameobjects,which are describedin detail later in this chapter:
•Constant Objects
•Limit Objects
•Data Objects
•Variable Data Objects
•Checksum Objects
Example:
The following Transaction consists of several frame objects; three constants, a data object, and a checksum object.
Chapter 7
7.2 Adding and Editing Frame Objects
To add a frame object to a Transaction, right-click on the Transaction in the Navigation Section and select one of the entries in the menu that appears.
The entry called “Transaction Editor” will launch theTransaction Editor, which is used to edit transactions and frame objects in a more visual manner. For more information, see “Transaction Editor” on page 34.
To edit parameters associated withaparticular frame object, select the frame object in the Navigation Sec-tion. The settings for that frame object will be dis-played in the Parameter Section.
It is also possible to edit the frame objects in a trans-action in a more visual manner using the Transaction Editor, see “Transaction Editor” on page 34.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 66
7.3 Constant Objects (Byte, Word, Dword)
Constant Objects have a fixed valueand come in threesizes:
•Byte
8 bits
•Word
16 bits
•Dword
32 bits
Constants are handled differently depending on the direction of the transaction:
•Produce/Query Transactions
The gateway willsendthe value as it is without processing it.
•Consume/Response Transactions
The gateway will check if the receivedbyte/word/dword matches the specified value. If not, themessage will be discarded.
Frame Objects 36
To set the value of the object, select it in theNavigation Section and enter the desired valuein the Pa-rameter section.
ParameterDescription
ValueConstant value
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 67
7.4 Limit Objects (Byte, Word, Dword)
Limit Objects havea fixedrange and come in three sizes:
•Byte
8 bits
•Word
16 bits
•Dword
32 bits
Limit Objects are handled differently depending on the direction of the transaction:
•Produce/Query Transactions
This object shall not beused for suchtransactions (valuewill be undefined).
•Consume/Response Transactions
The gateway will check if the received byte/word/dword fits inside the specified boundaries. If not, the message will be discarded.
Frame Objects 37
There are 3 types of interval objects:
•Byte
8 bit interval
•Word
16 bit interval
•Dword
32 bit interval
To set the range of the object, select it in the Navigation Section and enter the desired range in the Pa-rameter section asfollows:
ParameterDescription
Maximum ValueThis is the largest allowed value for the range.
Range:0x00 to 0xFFh(byte)0x0000 to 0xFFFFh(word)0x00000000 to 0xFFFFFFFFh(dword)Note:The value must be larger than the Minimum Value.
Minimum ValueThis is the smallest allowed value for the range.
Range:0x00 to 0xFEh(byte)0x0000 to 0xFFFEh(word)0x00000000 to 0xFFFFFFFEh(dword)Note:The value must be less than the Maximum Value.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 68
7.5 Data Object
4 bytes of data
(Variable Data Object)
Length Character
0x04Data
Data of arbitrary length
(Variable Data Object)
End Character
0x00Data
Data Objects are used to represent raw data as follows:
•Produce/Query Transactions
The specified data block is forwarded fromthe higher level network to the sub-network.
•Consume/Response Transactions
The specified data block is forwarded fromthe sub-network to the higher level network.
To specify the properties of the object, select it in the Navigation Section and enter the desired settingsin theParameter section as follows:
ParameterDescription
Byte Swapping•No Swapping
No swapping is performed on the data
•Swap 2 bytes
A, B, C, D becomes B, A, D, C
•Swap 4 bytes
A, B, C, D becomes D, C, B, A
Data LengthThe length of the data block, in bytes. In case of a Response or Consume transaction, incom-
ing messages where the data size differs from the value specified here will be discarded. Max-imum data length allowed for one frame is 300 bytes.
Data LocationThe location of the data block in the internal memory buffer.
Frame Objects 38
7.6 Variable Data Object
Note:Only one Variable Data Objectis permitted for each transaction.
This object is similar to the Data Object, except that it has no predefined length. Instead, an End or Length-character specifies thesize of the data block as follows:
•Produce/Query Transactions
The specified data block will be forwarded from the higher level network to the sub-network. The control system must supply anEnd or Length character in order for the gateway to know the size of the data block.
The End- or Length-character itself may either be forwarded tothe sub-network or discarded.
•Consume/Response Transactions
The specified data block is forwarded fromthe sub-network to the higher level network. The End- or Length-character will be generated by thegateway automatically (if applicable).
The End- or Length-character itself may eitherbe forwarded to the higher level network or dis-carded.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 69
Frame Objects 39
To specify the properties of the object, select it in the Navigation Section enter the desired settings intheParameter section as follows:
ParameterDescription
Byte Swapping•No Swapping
No swapping will be performed on the data
•Swap 2 bytes
A, B, C, D becomes B, A, D, C
•Swap 4 bytes
A, B, C, D becomes D, C, B, A
Fill unused bytes
•Enabled
•Disabled
Filler byteFiller byte value.Only used if “Fill unused bytes” has been enabled.Data LocationThe offset in the internal memory buffer where the data shall be read from / written toObject Delimiter
•Length Character
(Produce/Query)
•Length Character Visible
•End Character
•End CharacterVisible
a
Fill unused data with the value specified in “Filler byte”.
Don’t fill
Length character visible in internal memory buffer but not sentout on the sub-network
Length character visible in internal memory buffer and sent out on the sub-network
End character visible in internal memory bufferbut notsent out on the sub-network
End character visible in the internal memory buffer and sentout on the sub-network
•No Character
No end- or length-character generated in the internal memory buffer
Object Delimiter (Consume/Response)
•Length Character
Length character visible in internal memory buffer but notreceived from the sub-network
•Length Character Visible
Length character visible in internal memory buffer and received from the sub-network
•End Character
End character visible in internal memory bufferbut notreceivedfrom the sub-network
•End CharacterVisible
End character visible in the internal memory buffer andreceived from the sub-network
•No Character
No end or length characters included in the received string or generated in the internalmemory buffer
End Character Value
End Character value
b
Maximum Data LengthThe maximum allowed length (in bytes) of the variable data object. If the actual length of the
data exceeds this value, the message will be discarded. The value must not exceed 256 bytes,which is the maximum data length allowed for one frame.
a.Only relevant for Consume/Response transactionsb.Only used if “Object Delimiter” is set to “End Character” or “End Character Visible”
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 70
7.7 Checksum Object
Most serial protocols features some way of verifying that the data has not been corrupted during trans-fer. TheChecksum Object calculates and includes a checksum in a transaction.
ParameterDescription
Error Check Start byte
Error Check TypeThis parameter specifies which type of algorithm to use:
Error check type combined with
Representation•Binary
a.In Generic Data Mode the Start character (if used) will not be included in the checksum calculation.
Specifies the byte offset in the transaction to start checksum calculations on.
•CRC (2 bytes)
CRC-16 with 0xA001 polynome (Modbus RTU standard)
•LRC (1byte)
All bytes are added togetheras unsigned 8-bit values. The two’s complement of the result will be used as a checksum. (Modbus ASCII standard with Error Check Start Byte = 0x01 and Representation = ASCII)
•XOR (1 byte)
All bytes are logically XOR:ed together. The resulting byte will be used as a checksum.
•ADD (1 byte)
All bytes are added togetheras unsigned 16-bit values. The lowest 8 bits in the result will be used as a checksum.
The binary value can be converted to its one’s or two’s complement. This conversion is carried out before ASCII formatting (see next parameter).
•None
The checksum binary value is transmitted without conversion.
•One’s complement
The checksum value will be converted to its one’s complement (inverse code).Example: 00001100 will be transmitted as 11110011
•Two’s complement
The checksum value will be converted to its two’s complement (complement code).Example: 00001100 will be transmitted as 11110100
The checksum is transmitted in binary format.
•ASCII
All characters in the checksum are converted to ASCII values.
Frame Objects 40
a
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 71
8. Commands
This information is only valid for the Master and Generic Data modes. For DF1 master mode, pleaserefer to “Services” on page 49.
8.1 General
As mentioned previously, commands are actually predefined transactionsthat can bestored and reused. Just like regular transactions, commands consist of frame objects and are representations of the actual serial telegrams exchanged on the serial sub-network.
Adding a commandto a node actually results in (a) transaction(s) being added according to the directionsspecified in the command. The frame objects in such a transaction may retrieve their values not only from parameters in theparameter section, butalso from other sources such as the “SlaveAddress”-pa-rameter (see“NodeParameters”on page 27). In such case,the parametersinthe parameter section will be greyed out and cannot be edited directly.
In MasterMode, ACM comes preloaded withcommands for most common Modbus RTU functions. Additional commands can easily be added using the Command Editor (see “The Command Editor” on page 43). For DF1 Master Mode, see “Services” on page 49. In Generic Data Mode, no predefined com-mands exist, but custom ones may be implemented as desired.
Chapter 8
8.2 Adding & Managing Commands
To add a command to a node, right-click on the node in the Navigation Section and select “Add Com-mand”.
A list of commands will appear:
Select the desired command inthe list, andselect “Add Com-mand” inthe “Command”-menu. Thespecified command will be added to the node.
Just like other transactions, the frame objects of added command may be edited in theNavigation/Parameter Section or using the Transaction Editor. Note however that certain frame objects may be locked for editing.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 72
8.2.1 Drop-down Menu
Add Command
Edit Command
Delete Command
File
This menu features thefollowing entries:
•Select
Addthe currentlyselected Command to the node.
•Exit
Exit without adding a command to the node.
Command
This menu is usedto manage the commands in the list:
•Add Command
Add a custom command to the list, and open the newcommand in the Command Editor.
See also “The Command Editor” on page 43.
•Edit Command
Edit the currentlyselected command using the CommandEditor.
See also “The Command Editor” on page 43.
Commands 42
•Delete Command
Delete the currently selected command from the list. Note that some commandsare fixed andcannot be deleted.
8.2.2 Toolbar Icons
The toolbar features icons for the Add, Edit and Delete Command functions.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 73
8.3 The Command Editor
A
BDE
C
8.3.1 General
The Command Editor is used to define new commands and edit existing ones. This makes it possible to build a library of commands, which can be stored and reused ata later stage.
Note that the Command Editor is somewhat protocol-dependent in the sense that certain frame objects may not be deleted or altered.
The examples inthissection useMaster Mode.The proceduresinvolvedaresimilar in Generic Data Mode, but without the limitations imposed by the Modbus RTU protocol.
8.3.2 Basic Navigation
Open the Command Editor by selecting “Edit Command” or “Add Command” from the “Command”-menu.
Commands 43
A: Drop-down Menu
See “Drop-down Menu” on page 44.
B:Name of Command
Actual name of the command,in text form.
C:Command Transactions
This section holdsthe actual transactions associated with the command. This can either be a que-ry-response pair, or a single transaction, depending on the protocol mode etc.
D:Command ID
This can be used as desired when building the command, e.g. to specify the function code.
E:Other Settings
SettingDescription
Allow BroadcastingSpecifies if it is allowed to broadcast the command (only relevant in Master Mode)ProduceThe command is producing data (Generic Data Mode only)ConsumeThe command is consuming data (Generic Data Mode only)
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 74
8.3.3 Drop-down Menu
File
This menu features thefollowing entries:
•Apply Changes
Save changes and exit to the main window.
•Exit
Exit without saving.
Column
The functions in this menu alters the structure of the command.
•Append Column
Add another column to the command.
•Insert Column
Insert a column at the selected position.
Commands 44
•Delete Column
Deletethe column at the selected position.
8.3.4 Editing a Command
As mentioned previously, the transaction section in the Command Editorrepresents the actual transac-tions associatedwith the command. Each columnrepresents a frame object within the transaction.
Each column features four rows with the following parameters:
•Query/Response/Produce/Consume
The upperright cell indicates the direction of the transaction.
•DisplayName
Each column can be named so that the different parts of the command appears ina more userfriendlymanner when editing its settings in the Transaction Editor or in theParameter Section of the Main Window.
•ObjectType
This row specifies the type of frame object that shall be used for the column.
•Value
This row specifies where theframe object shall retrieve its value/settings.
ValueDescription
DependThis setting is only relevant for Responses in MasterMode.
The value will be retrieved from the corresponding part of the “Query”-transaction.IdValue will be retrieved from the “Command ID”-setting (see “Basic Navigation” on page 43).UserSettings associated with the object can be edited by the user.[SlaveAddress]Value will be retrieved from the “SlaveAddress”-parameter (see “Node Parameters” on page 27).(othersettings)Other settings are no longer supported.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 75
Commands 45
8.3.5 Example: Specifying a Modbus-RTU Command in Master Mode
In the following example, a Modbus-RTU command iscreated inMaster Mode. In Modbus-RTU, a transaction always feature the following parts:
•Slave Address (1 byte)
•Function Code (1 bytes)
•A data field
•CRC (CRC-16)
Furthermore, each command alwaysconsists of a query and a response.
This value is linked to the “SlaveAddress”parameter in the parameter window.
The value of this byteconstant will be set using the “CommandID”-field.
The size and locationof the data associatedwith this object is determined by the user.
This object will retrieveits settings from thecorresponding objectin the Query.
By default, the Modbus-RTU-specific frame objects are already in place, and a data object is inserted between the function code and the CRC. These objects cannot be moved or deleted, however it is pos-sible to add additional objects between the function code and theCRC as desired.
Name the new command by entering its name in the “Command Name” field, and enter a suitable func-tion code in the “Command ID”-field. If the command is allowed to bebroadcasted, check the “Allow Broadcasting” checkbox.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 76
9. DF1 Protocol Mode
Subnetwork Devices
Gateway
Control System
This mode makes theAnybus Communicator act asa DF1 protocol master on the sub-network.
9.1 General
In DF1 master mode, communication is based on “services”. A “service” representsa set of commands and operations on the sub-network, that is predefined in theAnybus Communicator. Each service is associatedwith a set of parameters controlling how and whento use it on the sub-network.
The communication is based on a query-response scheme, where the gateway issues a query onthe sub-network.The addressed node on the sub-network is expected to issue a response to that query. Nodes are not permitted to issue responses spontaneously, i. e. without first receiving a query.
Chapter 9
In DF1 Master Mode, ACM comes preloaded with a number of services, that can be selected by the user. The actual DF1 commands, that perform the services during runtime, are predefined in the Anybus Communicator. The configuration of the services is performed by right-clicking on a node in the ACM and selecting “Add Command”.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 77
9.2 Communicator Parameters
Interface
Currently, only serial communication is supported.
Control/Status Word
(See “Control and Status Registers” on page 62).
ValueDescription
EnabledEnable the Control and Status Registers. The “Data Valid”-bit in the Control Register must
be set to start the sub-network communication.
Enabled but nostartup lockThis setting is similar to “Enabled”, except that the control system is not required to set the
“Data Valid”-bit to start the sub-network communication.
DisabledThis setting completely disables the Control and Status Registers.
DF1 Protocol Mode47
Module Reset
This parameter specifies how the gateway will behavein the event of a fatal error.
ValueDescription
EnabledThe gateway will be restarted, and no error will be indicated to the user.DisabledThe gateway will halt and indicate an error.
Protocol Mode
This parameter specifies which protocol mode to use for the sub-network.
ValueDescription
DF1This mode is intended for the DF1 protocol. The Anybus Communicator can only be con-
figured as a Master with half-duplex communication.Note: This is the only mode available if you intend to configure an ABC module for DF1.
See also “Protocol Modes” on page 17.
Statistics
The Transmit- and Receive Counters indicate how many transactions that have successfully been ex-changed on the sub-network. This feature is primarily intended for debugging purposes.
•Receive CounterLocation
Specifies the location of theReceiveCounter in the internal memory buffer.
•Transmit Counter Location
Specifies the location of theTransmit Counter in the internal memorybuffer.
•Statistics
Enables/disables theReceiveand Transmit Counters.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 78
9.3 Sub-network Parameters
Communication
These parameters specify the actual communication settings used for the sub-network.
ParameterDescriptionValid Settings
Bitrate (bits/s)Selects the bit rate2400
4800960019200
38400 (Default)Data bitsSelects the number of data bits8ParitySelects the parity modeNone, Odd, EvenPhysical standardSelects the physical interface typeRS232, RS422, RS485Stop bitsNumber of stop bits.1
DF1 Protocol Mode48
DF1 Settings
ParameterDescriptionDefault
Master Node AddressNode address of the master, valid values: 0–2541Poll time, active slaves (10 ms)Determines how often the slave shall be polled in steps of 10 ms
Poll time, inactive slaves (10 ms)Determines how often the slave shall be polled in steps of 10 ms
a.The default value is given as 10 in the parameter window. Each change of 10 ms either increases or decreases
this value by 1, i.e. 9 represents a poll time of 90 ms and 11represents a poll time of 110 ms.
b.The default value is given as 100 in the parameter window. Each change of 10 ms either increases or decreases
this value by 1, i.e. 99 represents a poll time of 990 ms and 101 represents a poll time of 1010 ms.
100 ms
1000 ms
a
b
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 79
DF1 Protocol Mode49
9.4 Node Parameters
To gain access tothe parameters described in this section, select a node in the navigation section. For more information about nodes, see “Nodes” on page 27.
ParameterDescriptionValid Settings
ChecksumSelects the type of checksum on the network.BCC
CRC (default)Slave AddressThe value entered here sets the node address.0-254TypeThe PLC type of the slavePLC-5
SLC500
MicroLogix
9.5 Services
Services are commands that can bestored and reused. The user configureseach slave with services that can be issuedfrom themaster. A total of 50services are allowed.
The Anybus Communicator supports a selection of DF1 commands. When the gateway is going to ex-ecute a service, it automatically chooses the appropriate DF1 command(s) that are used to perform the service on the selected DF1 node type.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 80
9.5.1 Available Services
Right click on the node, and choose Add Command. A pop-up window will show the four different servic-es that are available:
•Integrity check
•Read diagnostics
•Read data
•Write data
A maximum of 50 services in total (for all nodes) can be selected.
The predefinedservicescan be configured to suitthe application. Select a service to show the parameters.
General Configuration Parameters
These parameters are common to all services, but the settings are individualto each instanceof a service.
General:
DF1 Protocol Mode50
ParameterDescriptionValid settings
Offline options for fieldbus
Offline options for sub-network
Update modeThe update mode for this serviceCyclically
The action to take for this service if the fieldbus goes offline. Thisoption affects the data thatis sentout to the sub-network.
The action to take for this service if the sub-network goes offline. This optionaffects the data thatisreported to the fieldbus master.
ClearFreezeNoscanning
ClearFreeze
On data changeSingle shotChange of stateon trigger
Timing:
ParameterDescriptionDefault
RetriesThe number of times to resend this service before the node is disconnected3Timeout time (10 ms)
Update time (10 ms)
a.The default value is given as 100 in the parameter window. Each change of 10 ms either increases or decreases
this value by 1, i.e. 99 represents a poll time of 990 ms and 101 represents a poll time of 1010 ms.
The time to wait before resending this service (in steps of 10 ms)
The minimum time between two services of this kind (in steps of 10 ms)
a
a
1000 ms
1000 ms
Trigger:
ParameterDescriptionDefault
Request Trigger byteaddress
Response Trigger byteEnables/disables the trigger byteDisabledResponse Trigger byte
address
The memory location of the trigger byte this service uses for updates on trigger byte changes
The memory location of the trigger byte this service uses for updates on trigger byte changesValid settings range from 0x200 to 0x3FF and 0x400 to 0xFFF
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
0x05FF
0x05FF
Page 81
DF1 Protocol Mode51
9.6 Integrity Check
This service checks that a node is up and running correctly. A telegram is sent to the node. The node mirrors and returns the telegram. No configuration is needed, apart from the general parameters, com-mon to all services.
9.7 Read Diagnostics
This servicereads diagnostic information from the module.
Command parameters
The command parameterSize decides the amount of data that can be read. Thesize is given in bytes which means that it always has to be an even number as only whole elements can be read from the slave. One bit/integer element is 2 bytes and one float element is 4 bytes. The range of the size differs, de-pending on node type:
PLC-5SLC500MicroLogix
Size range (in bytes)1–261–281–26
Data options:
ParameterDescriptionValid settings
Byte swapDetermines if the data shall be swappedNo byte swap
Swap wordsSwap double words
Data lengthThe number of bytes, read from the DF1 network, to write to the area determined
by the Offset parameter
OffsetThe offset in the internal memory buffer in the module, where the data shall be
read.
Size
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 82
9.8 Read Data
This service is used to read data from the nodes in the sub-network.
Command Parameters
DF1 Protocol Mode52
ParameterDescriptionValid settings
Element NumberThe element number of the data file to be accessed within the slave.PLC-5: 0–999
SLC500: 0–255MicroLogix: 0–255
File numberThe file number of the data file to be accessed.PLC-5: 3, 7, 8, 10–999
File typeThe file type of the data to be accessed.Integer
BitFloat
SizeThe number of bytes to read from the slave. One bit/integer element is
2 bytes and one float element is 4 bytes. The parameter must have aneven value as only whole elements can be read from the slave.
PLC-5: 2–240SLC500: 2–236MicroLogix: 2–242
Data Options
ParameterDescriptionValid settings
Byte swapDetermines if the data shall be swapped.No byte swap
Swap wordsSwap double words
Data lengthThenumber of bytes, read fromthe DF1 network, to write to the area determined
by the Offset parameter
OffsetThe offset in the internal memory buffer in the module, where the data shall be
read. See “Memory Map” on page 15.Note: If the control and status registers are enabled (default), first available data location will be: Input area 0x002, Output area 0x202.
Size
-
9.9 Write Data
This serviceis used to writedata to the nodes in the sub-network. The parameters to be configured are the sameas forthe service Read Data. The only differenceis that data is read from the internal memorybuffer in the Anybus Communicator and written to the sub-network bus, instead of being written to the internal memory buffer.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 83
10. Sub-network Monitor
A
B
C
StartStop
10.1 General
The sub-network Monitor is intended to simplify configuration and troubleshooting of the sub-network. Its main function is to display the data allocatedfor sub-network communication and detect if any area has been allocated twice (i.eif a collision has occurred).
All configured nodes, and their transactions, are listed in the middle of the screen (B). Selecting and de-selecting single transactions makes it possibleto view any combination of allocated data.
Note:The sub-network monitor has a negative influence on the overall performance of the gateway. Therefore the monitor functionality should be used with care.
10.2 Operation
Chapter 10
A:Start Network & Stop Network Icons
These icons controls the sub-network activity. To stop all activity, click on the red light. To start the sub-network again, click on the green light.
B:Nodes / Transactions
Toview data blocks associatedwith a transaction, select the transaction in thelist. The corre-sponding data will then appear in the Monitor Section (C).
C:Monitor Section
This section visualizes how data is allocatedin the Input, Output and General Data areas.
ColorMeaning
WhiteNot allocatedYellowData allocated by a Response or Consume transactionBlueData allocated by a Query or Produce transactionRedCollision; area has been allocated more than onceGreyReserved (illustrates memory consumption, area can be allocated if necessary)GreenData allocated by Trigger byte, Transmit/Receive Counter, or Control/Status Registers
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 84
11. Node Monitor
Subnetwork
Command Section (Query)
Response Section
Command Section (Produce)
(Not used)
Subnetwork
11.1 General
The Node Monitor can provide valuable information when setting up the communication with the sub-network, by allowing individual commands to be issued manually, and monitoring the response (if ap-plicable). It also provides an overview of the memory used by a particular node.
Note: The node monitor has a negative influence on the overall performance of the gateway, i.e. it should be used only when necessary.
The Node Monitor behaves somewhat differently in the three protocol modes:
•Master Mode and DF1 Master Mode
The selected Command (Query Transaction) or Service issent to the sub-network. The response to the Query can be monitored in the Response Section.
Chapter 11
•Generic Data Mode
The selected command (Transaction Produce) is sent to the sub-network. It isnot possible to monitor any responses etc. generated by other nodes.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 85
11.2 Navigating the Node Monitor
A
B
C
D
A: Drop-down Menu & Toolbar Icons
See “Drop-down Menu” on page 56 and “Toolbar Icons” on page 57.
Node Monitor55
B:Command Section
This section holds the currently selectedcommand. The individual frame objects in the com-mand can be edited in a similar way asin the Transaction and CommandEditors.
C:Response Section (Master Mode and DF1 Master Mode only)
This section holds the response to the selected Command.
D:Monitor Section
This section displays the data associated with thenode. Areas in dark grey are reserved for the Status & Control Registers, and areas displayed inlight grey represent the data that is used by the node.
The data displayed in this section will be refreshed based on the refresh-icons in the toolbar. For more information, see “Toolbar Icons” on page 57.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 86
Node Monitor56
11.2.1 Drop-down Menu
File
There is only one entry in this menu:
•Exit
This will close the Node Monitor. Note however that if the node has been disabled using “Stop Node” (see below), it will not resume data exchange until enabled again using “Start node”.
Node
This menu controls the data exchange for the node. This feature can help isolate problems associated with a particular node.
•Start Node
Enablethe transactions associatedwith the node.
•Stop Node
Disable the transactions associatedwith the node.
Command
This menu is usedto specifyand issuea command manually.
•Select Command
Select a command to be sent to the sub-network.
•Send Command
Send the specified command to the sub-network.
Columns
This menu specifies thenumber of columns in the Monitor Section.
•Free
The number of columns depends on the width of the window.
•8 Multiple
The number of columns will be fixed to 8.
View
This menu specifies thedata representation in the Monitor Section.
•Hex
Display thedata in hexadecimal format.
•Decimal
Display thedata in decimal format.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 87
11.2.2 Toolbar Icons
StartStop
SelectSend
StopResume
Refresh
The toolbar features icons for the most commonly used functions.
•Start Node & StopNode
These icons corresponds to the functions in the “Node” menu.
See also “Node” on page 56.
•Select Command & Send Command
These icons corresponds to the functions in the “Command” menu.
See also “Command” on page 56.
•Resume Refresh & Stop Refresh
The data displayed inthe Monitor Section will normally berefreshed au-tomatically (cyclically).
Click on “Stop” to stop automaticdata refresh. Data will now only be refreshed if you click “Refresh” (see below).
Press “Resume” to resume automatic refreshing of data.
Node Monitor57
•Refresh
Refreshes the data displayed in the Monitor Section.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 88
12. Data Logger
12.1 General
This feature allows the sub-network traffic to beloggedinto a buffer for examination. This may provide valuableinformation when debugging the lowest levels of thesub-network communication.
Note that the logger function is part of the gateway itself and is separate fromACM. This means that logging can be performed even if the gateway is physically disconnected from the PC running ACM.
12.2 Operation
Start & Stop Logging
•Start logging
Select “Start Logging” in the “Tools”-menu. ACM will then prompt for the desiredmode of op-eration, see below.
Chapter 12
•Stop logging
Select “Stop Logging” in the “Tools”-menu.Thiswill open the log-window, see below.
Modes ofOperation
Select thedesired mode of operation andclick “OK” to start logging data.
•Log until full
Data will belogged until the log-bufferis full.
•Log continuously
Data will be loggedcontinuously until logging is stopped by clicking “Stop Logging”. The log-buffer will contain the most recent data.
Log Window
The logged data is displayed in hexadecimal, decimal and AS-CII format for both directions. The timebetween the log-en-tries is displayed in a separate column.
The data may optionally be saved in ASCII text format by clicking “CreateText file”.
Click “Close” to exit.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 89
12.3 Configuration
By default, the log-buffer can hold 512 bytes of data in each direction. To specify a different size for thebuffer, select“Options” in the “Tools”-menu.
A window with various settings will appear. Select the“Mod-ule” tab, and enter the desired number of buffer entries un-der “Size of logbuffer” (validsettings range from 1–512).
Click “Apply” to validatethe new settings.
Click “OK” to exit.
Data Logger 59
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 90
19. Configuration Wizards
19.1 General
When creating a new subnetwork configuration, the AnybusConfiguration Manager provides a choice between starting out with a blankconfiguration, or using a predefined template, a.k.a a wizard.
The wizard automatically creates a subnetwork configuration based on information supplied by the user, i.e the user simply has to “fill in the blanks”. Note however that thiswill only work when the subnetwork fits the wizard profile; in all other cases the “Blank Configuration” option must be used.
19.2 Selecting a Wizard Profile
The following window appears each time the Anybus Configuration Manager is started, or upon select-ing the “New” entry in the“File”-menu (unless it has been disabled in the “Options”-menu, see “Tools” on page 51).
Chapter 19
Currently, the following wizards are available:
•Wizard - Modbus RTU Master
This option is suitable for Modbus RTU-based net-works.
See also “Wizard - Modbus RTU Master” on page91.
•Blank Configuration
This option creates an empty configuration.
Highlight the desired wizard and click “OK” to continue.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 91
Configuration Wizards91
19.3 Wizard - Modbus RTU Master
This wizard can beused to createa Modbus-RTU-based networkconfiguration based on certain infor-mation about the subnetwork.The onlinehelp system explains each configuration step in detail.
•Important Notes:
Many OEM devices do not fully comply with the Modbus standard. For example, they may im-plement a variation of this standardorbe limited to the use ofspecific Modbus commands other than the ones used by this wizard. In all cases, the user should consult the documentation of the devices that shall be used on the subnetwork for information about their serial communication requirements, and if necessary contact the manufacturer of the device toobtain further informa-tion about the serial communication protocol.
In the event that the wizard doesn’t handle a particular Modbus command required by a device, it is possible to specify this command manually as a transaction in the Anybus Configuration Manager.
Using this wizard involves the following steps:
Step 1: Communicator Type
Select “ProfinetIO”.
Click “Next” to continue.
Tip:It is possible to return to a previous menu at any time without losing any set-tings by clicking “Previous”.
Step 1a: I/O Sizes
Specify the sizes of the input and output data areas. For more information, see “IO Sizes”on page 54.
Click “Next” to continue.
Step 2:Physical Settings
Select the physical properties of the sub-network.
Click “Next” to continue.
Steps 3 - 6
Consult the online help system for fur-ther information.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 92
14. Control and Status Registers
Start
Read Status Register
Set CR_HS_CONFIRM
to SR_HS_SEND
CR_HS_CONFIRM=
SR_HS_SEND?
Yes
Done
Start
Read Status RegisterWrite to Control Register
Write to Control Register
Toggle CR_HS_SEND
SR_HS_CONFIRM=
CR_HS_SEND?
No
NoYes
Done
14.1 General
The Control andStatus Registers are disabled by default, but can beenabled using ACM (see “Control/Status Word” on page 25). These registers form aninterface for exchanging status information between the sub-network and the fieldbus control system.
The main purpose of these registersis to...
•Report sub-network related problems to the fieldbus control system
•Ensure that only valid data isexchanged in both directions
•Enable the fieldbus control systemto start/stop data exchange with selectednodes on the sub-network
If enabled, these registers occupythe first two bytes in the input and output data areas (0x000–0x001 and 0x200–0x201 respectively), which means they can be accessed from the fieldbus just like any other datain these areas.
Note:Internally, these registers are stored in Motorola-format (i.e. MSB first). If the higher level net-work uses a different byte order, the upper and lower bytes will appear swapped.
Chapter 14
14.1.1 Handshaking Procedure
A special handshaking procedure, which is illustrated in the two flowcharts below, must be followed when accessing these registers to ensurethat both parts receive proper information.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 93
Control and Status Registers63
A
B
C
Offline
(no data exchange)
Online
(not yet exchanging data)
Start
Online
(exchanging data)
14.1.2 Data Consistency
The“Data Valid”-bits in theControl and Status Registers are used to ensure data consistency during start-up and fieldbus offline/online transitions.
If the “Control/Status Word”-parameter in ACM is set to “Enabled”, the gateway will wait for the field-bus control system to set the “Data Valid”-bit in the Control Register before itstarts exchanging data on the sub-network.
If the same parameter is set to “Disabled” or “Enabled but no startup lock”,communication will start as soon as the fieldbus goes online.
State Machine
The fieldbus network participation can be described using a state machine as described below.
A:Offline (No data exchange)
1.Clear the “Data Valid”-bit in the Con-trol Register.
2.Writeinitial data to the Output Areaaccording to the sub-network configu-ration.
3.Wait untilthe fieldbus control systemand the gateway are online on the field-bus network, and shift to state B.
B:Online (Not yet exchanging data)
4.Wait untilthe “Data Valid”-bit in the Status Register iscleared by the gate-way.
5.Set the “Data Valid”-bit in the Control Register.
6.When the “Data Valid”-bit in the Sta-tus Register is setby the gateway,shiftto state C.
7.If the gateway goes offline on the fieldbus, shift tostate A.
C:Online (Exchanging data)
Exchanging valid data in both directions.If the gateway goes offline on the fieldbus, shift to state A.
Note:The gateway cannot spontaneously clear the “Data Valid”-bit in the Status Register.
Latency
The “Data Valid”-bit in the Status Registermay in some cases be delayed. This latency can be caused by a missing node or a bad connection to a node with a long timeout value assigned to it.
Therefore, the fieldbus control system should not wait for this bit to be set before communicating with the sub-network devices; it should be considered as an aid for the fieldbus control system to know when all data has beenupdated.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 94
Control and Status Registers64
14.2 Status Register Contents (Gateway to Control System)
14.2.1 General Information
The Status Register is (if enabled) located at 0x000–0x001and constitutes a bit-field as follows:
bit(s)NameDescription
15Send
(SR_HS_SEND)
14Confirm
(SR_HS_CONFIRM)
13Data Valid
(Master Mode and DF1Master Mode Only)
12... 8Status CodeThis field holds the last status report from the gateway.
These bits control the handshaking towards the fieldbus control system.
See also...
- “Handshaking Procedure” on page 62
- “Control Register Contents (Control System to Gateway)” on page 66
This bit is set when all transactions have been executed successfully at least once.Once set, it will not change.
1:Data Valid0:Data not Valid
Note: This bit is not used in Generic Data Mode.
7... 0Data
See also...
- “Status Codes in Master Mode and DF1 Master Mode” on page 64
- “Status Code in Generic Data Mode” on page 65
Note:Internally, this is treated as a Motorola-format word (i.e. MSB first). If the higher level network uses a different byte order, the upper and lower bytes will appear swapped.
14.2.2 Status Codes in Master Mode and DF1 Master Mode
(This table is valid only in Master Mode and DF1 Master Mode).
CodeConditionTypeDataDescription
0x00Retransmission
Counter Updated
0x01Single Node MissingErrorSlave addressA single node is missing.0x02Multiple Nodes MissingErrorNumber of nodesMultiple nodes are missing.0x03Buffer OverrunWarningSlave addressA node returned more data than expected.0x04Other ErrorErrorSlave addressUndefined error0x1FNo ErrorWarning-No errors
Note:Conditions of type “Error” will eventually be followed by a “No Error” condition when the cause has been resolved. Conditions of type “Warning” are however considered informational and may not necessarily be followed by a “No Error” condition later on.
WarningCounterThe number of retransmissions on the sub-
network has increased. If this problem per-sists, this may eventually trigger a Single- or Multiple Node(s) Missing condition.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 95
Control and Status Registers65
14.2.3 Status Code in Generic Data Mode
(This table is valid only in Generic Data Mode).
CodeConditionTypeDataDescription
0x00Invalid Transaction
Counter Updated
0x01Frame ErrorWarning-End character is enabled, but a message delimiter timeout
0x02Offline Timeout
Counter Updated
0x03Buffer OverrunWarning-Anode returned more data than expected - or - the gateway
ErrorCounterThe number of invalid transactions (i.e. received transac-
tions which does not match any of the consume-transac-tions defined in the sub-network configuration) has increased.
occurs prior to receiving it.
ErrorCounterThe of number of timed out consume-transactions has
increased.
See also...
- “Consume Transactions” on page 33 (Offline timeout
time)
was unable to finish processing a message prior to receiv-ing a new one.
Note:Conditions of type “Error” will eventually be followed by a “No Error” condition when the cause no longeris detected. Conditions of type “Warning” are however considered informational and may not necessarily be followed by a “No Error” condition later on.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 96
Control and Status Registers66
14.3 Control Register Contents (Control System to Gateway)
14.3.1 General Information
The Control Register is (if enabled) located at 0x200–0x201 and constitutes a bit-field as follows:
bit(s)NameDescription
15Confirm
(CR_HS_CONFIRM)
14Send
(CR_HS_SEND)
13Data ValidThis bit controls data consistency (see “Data Consistency” on page 63).
12Execute CommandIf set, the specified command will be executed by the gateway (see below).
11... 8Control CodeThis field holds commands which can be executed by the gateway (see below).
These bits control the handshaking towards the gateway.
See also...
- “Handshaking Procedure” on page 62
- “Status Register Contents (Gateway to Control System)” on page 64
1:Output Area valid; exchange data on the sub-network0:Output Area not valid; do not exchange data on the sub-network
Note: This bit is only relevant if the Control/Status Registers are set as “Enabled”
7... 0Data
See also...
- “Control Codes in Master Mode and DF1 Master Mode” on page 66
- “Control Codes in Generic Data Mode” on page 66
Note:Internally, this is treated as a Motorola-format word (i.e. MSB first). If the higher level network uses a different byte order, the upper and lower bytes will appear to be swapped.
14.3.2 Control Codes in Master Mode and DF1 Master Mode
(This table is valid only in Master Mode and DF1 Master Mode).
CodeInstructionDataDescription
0x00Disable NodeActual node addressDisables the specified node.0x01Enable NodeActual node addressEnables a previously disabled node.0x02Enable NodesActual number of nodes to enableEnables the specified number of nodes, start-
ing from the first node in the configuration. Remaining nodes will be disabled.
14.3.3 Control Codes in Generic Data Mode
(No Control Codes are currently supported in this mode).
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 97
15. Advanced Fieldbus Configuration
A
B
15.1 General
The fieldbus interface of the gateway consists of an embedded Anybus-S communication interface. Nor-mally, the Anybus-S configuration settings are set up automatically by the gateway. However, advanced users can configure the Anybus-S card for specific features. This chapter assumes that the reader isfa-miliarwith the Anybus-S andit’sapplication interface. For more information about the Anybus-S plat-form, consult the Anybus-S Parallel Design Guide.
Thestandard initialization parameters are determined by the sub-network configuration. Information about the amount of input and output data used for sub-network communication is used by ACM to create the configuration message that sets the sizes of the input and output data areas in the Dual PortRAM of the embedded Anybus-S interface. It is possible to add fieldbus specificmailbox messages to customize the initialization. This isdone in the Mailbox Editor, see below.
(A mailbox message is a HMS specific commandstructureused for low-levelcommunication with an Anybus-S interface. Consult theAnybus-S Parallel Design Guide and the fieldbus appendix for the de-sired fieldbus forfurtherinformation.)
Chapter 15
15.2 Mailbox Editor
To add a mailbox message to the configuration, right-click on “EndInit” and select “Insert New Mailbox”.
A mailbox message consists of a Header sec-tion and a data section where the Headercon-sists of 16 words (32 bytes) and the data section consists of up to 128 words (256 bytes). All fields are editable except the Mes-sage information field that is fixed to 0x4002, which means that only fieldbus specific mail-box messages can be entered here.
The mailbox message is presented as two col-umns; one contains header information (A), the other one contains the message data (B).
To add message data, simply changethe Data size parameterin theheader column (A), andthe corresponding number of bytes will ap-pearin the message data column (B).
For more information about fieldbus specific mailbox messages, consult the separate Anybus-S Fieldbus Appendix for the fieldbus you are using. For general information about the Anybus-S platform, consult the Anybus-S Design Guide.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
1.The RJ11 (4P4C modular) is sometimes referred to as an RJ9.
Doc: HMSI-27-309, Rev. 3.11Anybus Communicator PROFINET User Manual
Page 100
Connector Pin Assignments 100
96
15(female)
A.4 Subnetwork Interface
A.4.1 General Information
The subnetwork interface provides for RS232, RS422 and RS485 communication. Depending on the configuration specified in the Anybus Configuration Manager, different signals are activated inthe sub-network connector.
A.4.2 Bias Resistors (RS485 Only)
When idle, RS485 enters an indeterminate state, which may cause the serial receivers to pick up noise from the seriallines and interpret this as data. To prevent this, theserial lines shouldbeforced into a known state using pull-up and pull-down resistors, commonly known as bias resistors.
The bias resistors form a voltage divider, forcing the voltage between the differential pair to be higher than thethreshold for theserial receivers, typically>200 mV.
Note that bias resistors shall only be installed on one node; installing bias resistors on several nodes may compromisethe signal quality on the network and cause transmission problems.
A.4.3 Termination (RS485 & RS422 Only)
To avoid reflections on the serial lines, it is important to properly terminate the subnetwork by placing termination resistors between the serial receivers near theend nodes.
The resistor value should ideally match the characteristic impedance of the cable, typically 100–120 Ω.
A.4.4 Connector Pinout (DB9F)
PinDescriptionRS232RS422RS485RS485
1+5 V Output(100 mA max)2RS232 Rx3RS232 Tx4(reserved)