Chapter 7 MMS Communication
Chapter 7 MMS Communication
TABLE OF CONTENTS
i
Course T302, Trouble shooting & Maintenance
ii
Course T302, Trouble shooting & Maintenance
7.1.1 Description
This chapter describes how to troubleshoot the MMS communication between
controllers.
7.1.2 Objectives
On completion of this chapter you will be able to:
Describe the use/configuration of MMS communication between controllers.
Describe the different troubleshooting tools available for communication
problems.
7.1.3 References
Control Builder M on-line help
EngineerIT Control Builder M - Application Programming, Strategy and Design
ControlIT AC 800M/C – Communication, Protocols and Design
EngineerIT Control Builder M – Getting Started, Introduction and Installation
1
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication
Access variables are declared in the controller that acts as a server. The Access
variable is in itself a reference to a variable in an application. This application acts as
the server application for the Access variable.
The client application has to be configured with at least one Connect function block
and one Read or Write function block addressing the Access variable.
2
Course T302, Trouble shooting & Maintenance
7.2.3.1 Principle
The Application that should initiate the communication has to be configured. Use one
Connect Function Block and one or several Read or Write Function Blocks.
The figure shows how a local variable in one Application is shared as an MMS Access
variable and picked up by another Application as an input to an MMSRead function
block. Note that the two Applications may be in the same project or in different
projects. The procedure is the same in either case. As mentioned before, it does not
matter whether the two Applications execute in the same controller or in different
controllers.
7.2.3.2 Connect
Use the MMSConnect function block to initiate a communication channel and
establish a connection to a remote system with a unique node address in a network.
Other function blocks such as MMSRead and MMSWrite use this connection. The
parameters for these connection blocks are different depending on the type of block,
but typically the Partner parameter identifies the address of the system where the
variable is shared.
Note! If you change the value of the Partner parameter online, you will get a
negative status output (-5326, Partner address was changed online). However, the
error message does not appear until the En_C parameter is brought down and up
again. Normally, to change the address of the remote system, the application
must be re-compiled.
3
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication
The table only shows function blocks for MMS, but the corresponding function blocks
are available for all supported protocols.
For each Read block, the name of the Access variable has to be specified along with
the name of a local variable where the value of the read variable should be put. If
several values, e.g. a range of memory cells, are to be read, the values are put in a
structured variable. The number and data type of the components should match the
number of read variables. Note! The value of the string variable corresponding to
the Access Variable name (VarName) cannot be changed online. Recompilation
and a cold start is needed.
Some function blocks have expandable parameters, such as MMSRead. This means
that the number of input/output parameters is variable and must be specified when you
declare the function block in the function block tab. The editor automatically inserts
[1] when you specify a function block with expandable parameters. Change this
number within the brackets to the required number of parameters. This is shown in the
figure on the next page.
Note: Changing the value within the brackets means that several Access variables can
be read using only one MMSRead function block. This does not mean that it is
necessary to expand the number of parameters just because several signals should be
read from the other system. An Access variable can be structured and the result of the
reading operation can be put in a structured local variable. This means that many
signals can be read using just one Access variable and one MMSRead[1] block.
4
Course T302, Trouble shooting & Maintenance
5
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication
7.2.4.1 Introduction
There are several resources you might want to use when troubleshooting MMS
communication. This chapter gives a brief overview of these tools.
6
Course T302, Trouble shooting & Maintenance
7
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication
The online help gives you more information about status codes below you will see
some more status codes from the MMSx function blocks.
8
Course T302, Trouble shooting & Maintenance
Show MMS Variables: Shows all the MMS variables in the system.
Show MMS Connections: Shows connection information about the remote systems,
such as IP address, server/client function, identity of the connected system (destination
system), usage, and number and maximum of transactions sent since connection was
established.
9
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication
10
Course T302, Trouble shooting & Maintenance
11