0% found this document useful (0 votes)
17 views13 pages

Chapter 7 MMS Communication

Chapter 7 of Course T302 focuses on troubleshooting MMS communication between controllers, detailing the configuration and use of Access variables, MMS variable rules, and function blocks for communication. It also provides tools for troubleshooting, including status parameters and remote system information. The chapter concludes with an exercise to reinforce the concepts learned.

Uploaded by

rubhernandez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views13 pages

Chapter 7 MMS Communication

Chapter 7 of Course T302 focuses on troubleshooting MMS communication between controllers, detailing the configuration and use of Access variables, MMS variable rules, and function blocks for communication. It also provides tools for troubleshooting, including status parameters and remote system information. The chapter concludes with an exercise to reinforce the concepts learned.

Uploaded by

rubhernandez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 13

Course T302, Trouble shooting & Maintenance

Chapter 7 MMS Communication

TABLE OF CONTENTS

Chapter 7 Communication between controllers.................................................................................................................7-i


Chapter 7 Communication between controllers................................................................................................................7-1
7.1 General Information................................................................................................................................................7-1
7.1.1 Description.......................................................................................................................................................7-1
7.1.2 Objectives.........................................................................................................................................................7-1
7.1.3 References........................................................................................................................................................7-1
7.2 MMS communication between controllers.............................................................................................................7-1
7.2.1 Access variables...............................................................................................................................................7-1
7.2.2 MMS variable rules..........................................................................................................................................7-2
7.2.3 Configuration of FB and Control Modules......................................................................................................7-3
7.2.4 Tools for troubleshooting.................................................................................................................................7-6
7.3 Exercise 6.1 – Communication between controllers.............................................................................................7-10

i
Course T302, Trouble shooting & Maintenance

ii
Course T302, Trouble shooting & Maintenance

Chapter 7 MMS Communication

7.1 General Information

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

7.2 MMS communication between controllers

7.2.1 Access variables


For communication between two Applications, Access variables are used. An Access
variable is a variable that is shared on the network. By sharing a local (or global)
variable as an Access variable, it can be picked up by any system on the network, as
long as the two systems in question share a common protocol, such as MMS, COMLI
etc.
Remember that in Control Builder Professional, one Application does not necessarily
correspond to one control system. It is possible to execute two Applications within the
same controller. Even in this case though, we need to use Access variables if we want
to exchange data between the two Applications.

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.

7.2.2 MMS variable rules


MMS variables can only be accessed by name.
An MMS access variable name can be up to 32 characters long and contain letters,
digits and the characters dollar ($) and underscore( _ ).
Note! The name is case sensitive, i.e Tank4 is not the same variable as tank4.
The access variable name cannot begin with a digit or the dollar ($) character.
Allowed data type for a single variable or a structured variable: all data types.
Variables in a structured variable can consist of different data types.
If you want to limit the access to an MMS variable you can assign the attribute
ReadOnly to it. If you leave the Attribute field empty, it will be possible to both read
and write the Access Variable.

2
Course T302, Trouble shooting & Maintenance

7.2.3 Configuration of FB and Control Modules

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.

Figure 7. 1 Access variable

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

7.2.3.3 Read/Write Access Variables


To read or write a shared variable, use for example the following function blocks:
Function block type Usage
MMSRead Reads an MMS Access variable on demand
MMSReadCyc Reads an MMS Access variable cyclically
MMSWrite Writes an MMS variable to an Access variable on demand

Table 7. 1 Function Blocks for reading/writing an MMS Acces Variable

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

Figure 7. 2 MMS Function Blocks

5
Course T302, Trouble shooting & Maintenance
Chapter 7 MMS Communication

7.2.4 Tools for troubleshooting

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.

7.2.4.2 Status parameter


The Status parameter from both MMSConnect and MMSRead (or any other MMS-
block) can be used to get a status indication from the communication between the
controllers.
Use the on-line editor to read the status-code and then look up the meaning of this
code in the on-line help (Index > Status codes).
Communication codes starts at -400.
CommunicationLib codes starts at -5300.
If the Status output of MMSConnect produces a negative value, the connection
between the two controllers is not working properly. Note that the partner address
cannot be changed online as explained in the previous paragraph.

Status code Explanation


0 (pending) Remote system can not be found
1 Connection OK
-412 Connection aborted, probably because the
remote address was not responding. Check
the address.
-5326 Partner address was changed online. Go
offline to change the address. Make a new
download.
Table 7. 2 Typical values of Status Parameters for MMS connect

If the Status output of MMSRead/MMSWrite gives a negative value, while the


connection is OK, there is an error in the configuration of the Access Variable. The
table shows some common values for the Status parameter.

6
Course T302, Trouble shooting & Maintenance

Status code Explanation


0 Operation is pending
1 Last operation was successfull
-432, -461 Access variable cannot be found in the
remote controller. Check the spelling etc.
-5324 No connection, i.e. the Valid parameter of
MMSConnect is False. Check the Status of
the MMSConnect.
Table 7. 3 Typical values for Status parameter of MMSRead/MMSWrite

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.

Figure 7. 3 Communication status codes

8
Course T302, Trouble shooting & Maintenance

7.2.4.3 Remote system information


A connected remote control system can be inspected and maintained from Control
Builder M. You access the remote system by making a right click on the controller and
you select remote system in the context menu. A new window appear where you cam
diagnose the communication

Figure 7. 4 Remote system

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

Figure 7. 5 MMS Connections

7.2.4.4 Hardware LED indicators


All hardware units used for communication have LEDs that display the traffic on the
corresponding communication channel. Use them to get information if traffic is
intense or not present.

7.3 Exercise 7.1 – Communication between controllers


Please do exercise 7.1.

10
Course T302, Trouble shooting & Maintenance

11

You might also like