ProSoft Technology MVI71-MCM User Manual

MVI71-MCM
PLC Platform
Modbus Communication Module
User Manual
December 28, 2007
Please Read This Notice
This manual is provided to assist the user. Every attempt has been made to ensure that the information provided is accurate and a true reflection of the product's installation requirements. In order to ensure a complete understanding of the operation of the product, the user should read all applicable Rockwell Automation documentation on the operation of the Rockwell Automation hardware.
Under no conditions will ProSoft Technology be responsible or liable for indirect or consequential damages resulting from the use or application of the product.
Reproduction of the contents of this manual, in whole or in part, without written permission from ProSoft Technology is prohibited.
Information in this manual is subject to change without notice and does not represent a commitment on the part of ProSoft Technology Improvements and/or changes in this manual or the product may be made at any time. These changes will be made periodically to correct technical inaccuracies or typographical errors.
Warning: This module is not hot-swappable! Always remove power from the rack before inserting or removing this module, or damage may result to the module, the processor, or other connected devices.
Power, Input, and Output (I/O) wiring must be in accordance with Class 1, Division 2 wiring methods, Article 501-4 (b) of the National Electrical Code, NFPA 70 for installation in the U.S., or as specified in Section 18-1J2 of the Canadian Electrical Code for installations in Canada, and in accordance with the authority having jurisdiction.
A Warning - Explosion Hazard - Substitution of components may impair
suitability for Class 1, Division 2.
B Warning - Explosion Hazard - When in hazardous locations, turn off power
before replacing or wiring modules.
C Warning - Explosion Hazard - Do not disconnect equipment unless power
has been switched off or the area is known to be non-hazardous.
Your Feedback Please
We always want you to feel that you made the right decision to use our products. If you have suggestions, comments, compliments or complaints about the product, documentation or support, please write or call us.
ProSoft Technology
1675 Chester Avenue, Fourth Floor Bakersfield, CA 93301 +1 (661) 716-5100 +1 (661) 716-5101 (Fax) http://www.prosoft-technology.com
Copyright © ProSoft Technology, Inc. 2000 - 2007. All Rights Reserved.
MVI71-MCM User Manual December 28, 2007 PSFT.MCM.MVI71.UM.07.12.28
ProSoft Technology ®, ProLinx ®, inRAx ®, ProTalk® and RadioLinx ® are Registered Trademarks of ProSoft Technology, Inc.
Contents MVI71-MCM ♦ PLC Platform Modbus Communication Module
Contents
PLEASE READ THIS NOTICE.............................................................................................................................. 2
Your Feedback Please ...................................................................................................................................... 3
GUIDE TO THE MVI71-MCM USER MANUAL..................................................................................................... 7
1 START HERE ............................................................................................................................................... 9
1.1 System Requirements.............................................................................................................................. 9
1.2 Package Contents ..................................................................................................................................10
1.3 Setting Jumpers......................................................................................................................................11
1.4 Install the Module in the Rack.................................................................................................................12
1.5 Connect your PC to the Processor .........................................................................................................13
1.6 Download the Sample Program to the Processor ...................................................................................14
1.6.1 Configuring RSLinx .......................................................................................................................15
1.7 Connect your PC to the Module..............................................................................................................17
2 INSTALLING AND CONFIGURING THE MODULE....................................................................................19
2.1 Quick Start..............................................................................................................................................19
2.2 Configuring the Module...........................................................................................................................22
2.2.1 Power Up ......................................................................................................................................22
2.2.2 Configuration Data Transfer ..........................................................................................................23
2.2.3 Changing Parameters During Operation .......................................................................................24
2.2.4 Module Data Files .........................................................................................................................24
2.2.5 User Data ......................................................................................................................................29
2.2.6 Slave Polling Control and Status...................................................................................................29
2.2.7 Using Side-Connect (Requires Side-Connect Adapter).................................................................29
3 LADDER LOGIC..........................................................................................................................................33
4 DIAGNOSTICS AND TROUBLESHOOTING..............................................................................................35
4.1 Reading Status Data From the Module...................................................................................................35
4.1.1 The Configuration/Debug Menu ....................................................................................................35
4.1.2 Required Hardware .......................................................................................................................36
4.1.3 Required Software.........................................................................................................................36
4.1.4 Using the Configuration/Debug Port..............................................................................................37
4.1.5 Main Menu ....................................................................................................................................38
4.1.6 Data Analyzer................................................................................................................................41
4.1.7 Data Analyzer Tips........................................................................................................................43
4.1.8 Database View Menu ....................................................................................................................46
4.1.9 Master Command Error List Menu ................................................................................................48
4.1.10 Master Command List Menu .........................................................................................................49
4.2 LED Status Indicators .............................................................................................................................50
4.2.1 Clearing a Fault Condition.............................................................................................................51
4.2.2 Troubleshooting.............................................................................................................................51
5 REFERENCE...............................................................................................................................................53
5.1 Product Specifications ............................................................................................................................53
5.1.1 Features and Benefits ...................................................................................................................53
5.1.2 General Specifications ..................................................................................................................54
5.1.3 Hardware Specifications................................................................................................................54
5.1.4 Functional Specifications...............................................................................................................55
5.2 Functional Overview ...............................................................................................................................55
5.2.1 General Concepts .........................................................................................................................55
5.2.2 Main Logic Loop............................................................................................................................56
5.2.3 PLC Processor Not in Run ............................................................................................................56
5.2.4 Backplane Data Transfer...............................................................................................................57
5.2.5 Modbus Addressing.......................................................................................................................59
5.2.6 Using the Read and Write Data Areas ..........................................................................................59
5.2.7 Normal Data Transfer....................................................................................................................63
ProSoft Technology, Inc. Page 5 of 111 December 28, 2007
MVI71-MCM PLC Platform Contents Modbus Communication Module
5.2.8 Slave Status Blocks ......................................................................................................................67
5.2.9 Command Control Blocks .............................................................................................................69
5.2.10 Pass-Through Control Blocks........................................................................................................74
5.2.11 Remote Command Control............................................................................................................75
5.2.12 Data Flow Between MVI71-MCM Module and PLC Processor .....................................................76
5.3 Cable Connections .................................................................................................................................79
5.3.1 RS-232 Configuration/Debug Port.................................................................................................79
5.3.2 RS-232..........................................................................................................................................81
5.3.3 RS-422..........................................................................................................................................83
5.3.4 RS-485..........................................................................................................................................84
5.3.5 DB9 to RJ45 Adaptor (Cable 14)...................................................................................................84
5.4 MVI71-MCM Database Definition ...........................................................................................................85
5.5 MVI71-MCM Status Data Definition........................................................................................................85
5.6 MVI71-MCM Configuration Data Definition.............................................................................................87
5.6.1 Backplane Setup ...........................................................................................................................87
5.6.2 Port 1 Setup ..................................................................................................................................88
5.6.3 Port 2 Setup ..................................................................................................................................90
5.6.4 Port 1 Commands .........................................................................................................................93
5.6.5 Port 2 Commands .........................................................................................................................93
5.6.6 Command Control.........................................................................................................................94
5.7 MVI71-MCM Command Error Codes......................................................................................................94
5.7.1 Standard Modbus Protocol Errors .................................................................................................94
5.7.2 Module Communication Error Codes ............................................................................................94
5.7.3 Command List Entry Errors...........................................................................................................94
5.8 Configuration Error Codes ......................................................................................................................95
5.8.1 BTR...............................................................................................................................................95
5.9 Frequently Asked Questions...................................................................................................................96
5.9.1 What is the MVI71-MCM? .............................................................................................................96
5.9.2 Why does the module have to break down the data in blocks of 64 words?.................................96
5.9.3 How do I read and write data between the internal MVI71-MCM database and the PLC?............96
5.9.4 What is the procedure to change the module's configuration?......................................................97
5.9.5 How do I set a Port Modbus Master command? ...........................................................................97
5.9.6 The Modbus Master Command is not working, what should I do?................................................97
5.9.7 What is the Pass-Through feature?...............................................................................................97
5.9.8 How can I check a Slave's status connected to an MVI71-MCM Master port? .............................97
5.9.9 Should I use the sample ladder logic? ..........................................................................................98
5.9.10 Is it possible to control the Master Modbus Commands from ladder logic? ..................................98
5.9.11 How is the MVI71-MCM database divided into Discrete Output, Discrete Input, Input Registers,
and Holding Registers?................................................................................................................................98
6 SUPPORT, SERVICE & WARRANTY.........................................................................................................99
6.1 How to Contact Us: Sales and Support ................................................................................................100
6.2 Return Material Authorization (RMA) Policies and Conditions..............................................................101
6.2.1 All Product Returns .....................................................................................................................101
6.3 Procedures for Return of Units Under Warranty ...................................................................................101
6.4 Procedures for Return of Units Out of Warranty ...................................................................................102
6.4.1 Un-repairable Units .....................................................................................................................102
6.4.2 Purchasing Warranty Extension..................................................................................................103
6.5 LIMITED WARRANTY..........................................................................................................................103
6.5.1 What Is Covered By This Warranty.............................................................................................103
6.5.2 What Is Not Covered By This Warranty ......................................................................................104
6.5.3 DISCLAIMER REGARDING HIGH RISK ACTIVITIES................................................................105
6.5.4 DISCLAIMER OF ALL OTHER WARRANTIES...........................................................................105
6.5.5 LIMITATION OF REMEDIES**....................................................................................................105
6.5.6 Time Limit for Bringing Suit .........................................................................................................105
6.5.7 No Other Warranties ...................................................................................................................106
6.5.8 Intellectual Property ....................................................................................................................106
6.5.9 Additional Restrictions Relating To Software And Other Intellectual Property ............................106
6.5.10 Allocation of risks ........................................................................................................................107
6.5.11 Controlling Law and Severability .................................................................................................107
INDEX.................................................................................................................................................................109
Page 6 of 111 ProSoft Technology, Inc.
December 28, 2007
Start Here MVI71-MCM PLC Platform Modbus Communication Module
Guide to the MVI71-MCM User Manual
Function Section to Read Details
Introduction (Must Do)
Verify Communication, Diagnostic and Troubleshooting
Reference Product Specifications Functional Overview Glossary
Support, Service, and Warranty
Index
Start Here (page 9)
Verifying Communication (page 35)
Diagnostics and Troubleshooting (page 35)
Reference
53) Functional
Overview (page 55) Product
Specifications (page 53)
Support, Service and Warranty (page 99)
(page
This Section introduces the customer to the module. Included are: package contents, system requirements, hardware installation, and basic configuration.
This section describes how to verify communications with the network. Diagnostic and Troubleshooting procedures.
These sections contain general references associated with this product, Specifications, and the Functional Overview.
This section contains Support, Service and Warranty information.
Index of chapters.
ProSoft Technology, Inc. Page 7 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module
Page 8 of 111 ProSoft Technology, Inc.
December 28, 2007

Start Here MVI71-MCM PLC Platform Modbus Communication Module

1 Start Here
In This Chapter
¾ System Requirements.............................................................. 9
¾ Package Contents.................................................................. 10
¾ Setting Jumpers ..................................................................... 11
¾ Install the Module in the Rack ................................................ 12
¾ Connect your PC to the Processor......................................... 13
¾ Download the Sample Program to the Processor ..................14
¾ Connect your PC to the Module ............................................. 17
Installing the MVI71-MCM module requires a reasonable working knowledge of the Rockwell Automation hardware, the MVI71-MCM Module and the application in which they will be used.
Caution: It is important that those responsible for implementation can complete
the application without exposing personnel, or equipment, to unsafe or inappropriate working conditions. Safety, quality and experience are key factors in a successful installation.
1.1 System Requirements
The MVI71-MCM module requires the following minimum hardware and software components:
Rockwell Automation PLC processor, with compatible power supply and one
free slot in the rack, for the MVI71-MCM module. The module requires 800mA of available power.
The PLC Processor must provide for at least 64 words of BTR/BTW area,
otherwise the module may not function correctly.
Rockwell Automation RSLogix 5 programming software. Rockwell Automation RSLinx communication software Pentium® 100 MHz minimum. Pentium III 700 MHz (or better) recommended Supported operating systems:
o Microsoft Windows XP o Microsoft Windows 2000 o Microsoft Windows NT v4.0 with Service Pack 3 or greater o Microsoft Windows ME o Microsoft Windows 98
ProSoft Technology, Inc. Page 9 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module
64 Mbytes of RAM minimum, 256 Mbytes of RAM recommended 100 Mbytes of free hard disk space (or more based on application
requirements)
256-color VGA graphics adapter, 800 x 600 minimum resolution (True Color
1024 × 768 recommended)
CD-ROM drive 3.5 inch floppy disk drive HyperTerminal or other terminal emulator program capable of file transfers
using Ymodem protocol.
1.2 Package Contents
The following components are included with your MVI71-MCM module, and are all required for installation and configuration.
Important: Before beginning the installation, please verify that all of the following items are present.
Qty. Part Name Part Number Part Description
1
1 Cable
3 Cable
2 Adapter 1454-9F
1
MVI71-MCM Module
ProSoft Solutions CD
MVI71-MCM Modbus Communication Module
RS232 Null Modem
Cable #14, RJ45 to DB9 Male Adapter
For RS232 Connection to the CFG Port
For DB9 Connection to Module's Port
Two Adapters, DB9 Female to Screw Terminal. For RS422 or RS485 Connections to Port 1 and 2 of the Module
Contains sample programs, utilities and documentation for the MVI71-MCM module.
If any of these components are missing, please contact ProSoft Technology Support for replacement parts.
Page 10 of 111 ProSoft Technology, Inc.
December 28, 2007
Start Here MVI71-MCM PLC Platform Modbus Communication Module
1.3 Setting Jumpers
The following illustration shows the jumper configurations for the various RS interfaces. If you are using an interface other than RS-232 (default), you must change the jumpers as shown:
The Setup Jumper acts as "write protection" for the module's flash memory. In "write protected" mode, the Setup pins are not connected, and the module's firmware cannot be overwritten. Do not jumper the Setup pins together unless you are directed to do so by ProSoft Technical Support.
ProSoft Technology, Inc. Page 11 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module

1.4 Install the Module in the Rack

If you have not already installed and configured your PLC processor and power supply, please do so before installing the MVI71-MCM module. Refer to your Rockwell Automation product documentation for installation instructions.
Warning: You must follow all safety instructions when installing this or any other electronic devices. Failure to follow safety procedures could result in damage to hardware or data, or even serious injury or death to personnel. Refer to the documentation for each device you plan to connect to verify that suitable safety procedures are in place before installing or servicing the device.
After you have checked the placement of the jumpers, insert MVI71-MCM into the PLC™ chassis. Use the same technique recommended by Rockwell Automation to remove and install PLC modules.
Warning: This module is not hot-swappable! Always remove power from the rack before inserting or removing this module, or damage may result to the module, the processor, or other connected devices.
1 Turn power OFF. 2 Align the module with the top and bottom guides, and slide it into the rack
until the module is firmly against the backplane connector.
3 With a firm but steady push, snap the module into place.
Page 12 of 111 ProSoft Technology, Inc.
December 28, 2007
Start Here MVI71-MCM PLC Platform Modbus Communication Module
4 Check that the holding clips on the top and bottom of the module are securely
in the locking holes of the rack.
5 Make a note of the slot location. You will need to identify the slot in which the
module is installed in order for the sample program to work correctly. Slot numbers are identified on the green circuit board (backplane) of the PLC rack.
6 Turn power ON.
Note: If you insert the module improperly, the system may stop working, or may
behave unpredictably.

1.5 Connect your PC to the Processor

7 Connect the right-angle connector end of the cable to your controller at the
communications port.
8 Connect the straight connector end of the cable to the serial port on your
computer.
ProSoft Technology, Inc. Page 13 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module

1.6 Download the Sample Program to the Processor

¾ To download the sample program from RSLogix 5 to the PLC
processor:
Note: The key switch on the front of the PLC processor must be in the REM position.
1 If you are not already online to the processor, open the Communications
menu, and then choose Download. RSLogix will establish communication with the processor.
2 Click the Download button to transfer the sample program to the processor. 3 When prompted, choose Computer to PLC
4 RSLogix will compile the program and transfer it to the processor. This
process may take a few minutes.
Page 14 of 111 ProSoft Technology, Inc.
December 28, 2007
Start Here MVI71-MCM PLC Platform Modbus Communication Module
5 When the download is complete, RSLogix will open another confirmation
dialog box. Click OK to switch the processor from Program mode to Run mode.
Note: If you receive an error message during these steps, refer to your RSLogix documentation to interpret and correct the error.
1.6.1 Configuring RSLinx
¾ If RSLogix is unable to establish communication with the processor,
follow these steps:
1 Open RSLinx. 2 Open the Communications menu, and choose Configure Drivers.
This action opens the Configure Drivers dialog box.
ProSoft Technology, Inc. Page 15 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module
Note: If the list of configured drivers is blank, you must first choose and configure a driver from the Available Driver Types list. The recommended driver type to choose for serial communication with the processor is "RS-232 DF1 Devices".
3 Click to select the driver, and then click Configure. This action opens the
Configure Allen-Bradley DF1 Communications Device dialog box.
4 Click the Auto-Configure button. RSLinx will attempt to configure your serial
port to work with the selected driver.
5 When you see the message "Auto Configuration Successful", click the OK
button to dismiss the dialog box.
Note: If the auto-configuration procedure fails, verify that the cables are connected correctly between the processor and the serial port on your computer, and then try again. If you are still unable to auto-configure the port, refer to your RSLinx documentation for further troubleshooting steps.
Page 16 of 111 ProSoft Technology, Inc.
December 28, 2007
Start Here MVI71-MCM PLC Platform Modbus Communication Module

1.7 Connect your PC to the Module

With the module securely mounted, connect your PC to the Configuration/Debug port using an RJ45-DB-9 Serial Adapter Cable and a Null Modem Cable.
1 Attach both cables as shown. 2 Insert the RJ45 cable connector into the Configuration/Debug port of the
module.
3 Attach the other end to the serial port on your PC or laptop.
ProSoft Technology, Inc. Page 17 of 111 December 28, 2007
MVI71-MCM PLC Platform Start Here Modbus Communication Module
Page 18 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module

2 Installing and Configuring the Module

In This Chapter
¾ Quick Start .............................................................................19
¾ Configuring the Module .......................................................... 22
This chapter describes how to install and configure the module to work with your application. The configuration process consists of the following steps.
1 Use RSLogix 5 to identify the module to the processor and add the module to
a project.
Note: The RSLogix 5 software must be in "offline" mode to add the module to a project.
2 Modify the example ladder logic to meet the needs of your application, and
copy the ladder logic to the processor. Example ladder logic files are provided on the CD-ROM.
Note: If you are installing this module in an existing application, you can copy the necessary elements from the example ladder logic into your application.
The rest of this chapter describes these steps in more detail. The first step in installing and configuring the module is to define whether the
block transfer or side-connect interface will be used. If the block transfer interface is used, remove the Compact Flash Disk from the module if present and insert the module into the rack with the power turned off.
2.1 Quick Start
This section lists the steps required to start module operation. The goal of this section is to provide the user with the necessary actions steps to install and configure the module, however, it is essential that the user read all of this manual in order to fully understand how the module operates.
1 Choose the slot where the module will be located in the PLC rack. 2 Open the sample ladder file using RSLogix 5. 3 Make sure the BTR and BTW instructions match the MVI71-MCM location. 4 The sample ladder Block Transfer instructions are configured as: 5 Rack=0 , Group=0,Module=0 6 Verify that the data files used in the sample ladder will not interfere with the
data files you are using in your application. If necessary, edit the sample ladder in order to use a different data file number for the same task.
ProSoft Technology, Inc. Page 19 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
7 The sample ladder uses the following data files:
B3: Auxiliary Bits N9: Status Data N10:Configuration Data N11: Port 1 Modbus Commands (if Port 1 is configured as a Modbus Master) N12: Port 2 Modbus Commands (if Port 2 is configured as a Modbus Master) N13: Pass-Thru B14: Pass-Thru Bit (used to bit write commands when using pass-thru) N15: Block Transfer Read Data N16: Block Transfer Write Data N50: Event Commands
8 Edit the Configuration Data to match your application. The configuration data
contains the port configuration and block transfer parameters. In the sample ladder the Configuration Data is located at data file N10 and it is structured according to the table listed below. Use this table to help you configure the module:
Address Description Value
N10:0 Write Data Start N10:1 Write Data Count N10:2 Read Data Start N10:3 Read Data Count N10:4 Backplane Fail Count N10:5 Error Start Address N10:6 Port 1 Enable N10:7 Port 1 Type N10:8 Port 1 Float Flag N10:9 Port 1 Float Start N10:10 Port 1 Float Offset N10:11 Port 1 Protocol N10:12 Port 1 Baud Rate N10:13 Port 1 Parity N10:14 Port 1 Data Bits N10:15 Port 1 Stop Bits N10:16 Port 1 RTS ON N10:17 Port 1 RTS OFF N10:18 Port 1 Minimum Response N10:19 Port 1 Use CTS N10:20 Port 1 Slave ID N10:21 Port 1 Bit Input Offset N10:22 Port 1 Word Input Offset N10:23 Port 1 Bit Output Offset N10:24 Port 1 Holding Register Offset N10:25 Port 1 Command Count N10:26 Port 1 Minimum Command Delay
Page 20 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module
Address Description Value
N10:27 Port 1 Command Error List Address N10:28 Port 1 Command Response Timeout N10:29 Port 1 Retry Count N10:30 Port 1 Error Delay Count N10:31 Port 2 Enable N10:32 Port 2 Type N10:33 Port 2 Float Flag N10:34 Port 2 Float Start N10:35 Port 2 Float Offset N10:36 Port 2 Protocol N10:37 Port 2 Baud Rate N10:38 Port 2 Parity N10:39 Port 2 Data Bits N10:40 Port 2 Stop Bits N10:41 Port 2 RTS ON N10:42 Port 2 RTS OFF N10:43 Port 2 Minimum Response N10:44 Port 2 Use CTS N10:45 Port 2 Slave ID N10:46 Port 2 Bit Input Offset N10:47 Port 2 Word Input Offset N10:48 Port 2 Bit Output Offset N10:49 Port 2 Holding Register Offset N10:50 Port 2 Command Count N10:51 Port 2 Minimum Command Delay N10:52 Port 2 Command Error List Address N10:53 Port 2 Command Response Timeout N10:54 Port 2 Retry Count N10:55 Port 2 Error Delay Count
9 If a port is configured as a Modbus Master, you will create Modbus
Commands for that port. For example, if Port 1 is configured as Master N11:0 file would be used as:
Start End Description
N11:0 N11:9 Command 1 N11:10 N11:19 Command 2 N11:20 N11:29 Command 3 N11:30 N11:39 Command 4 N11:40 N11:49 Command 5 … … …
Each Modbus Command has the following structure:
Offset Description
0 Enable 1 Internal Address 2 Poll Interval 3 Command Count
ProSoft Technology, Inc. Page 21 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
Offset Description
4 Swap Code 5 Slave Address 6 Modbus Function 7 Destination Address 8 Spare 9 Spare
10 Copy the new ladder file to your existing ladder application. 11 Modify the communication set up jumper in the back of the MVI71-MCM,
selecting the communication type for each port (485, 422 or 232).
12 Insert the module in the rack and connect the port(s) to the Modbus network.
Make sure the connection correctly follows the wiring diagrams shown in this manual.
13 Turn on the rack power and download the new ladder file to the PLC.

2.2 Configuring the Module

In order for the MVI71-MCM module to function, a minimum amount of configuration data must be transferred to the module. The following table provides an overview of the different types of configuration data that the module requires, depending on the operating modes to be supported.
Module Register Address
5000 to 5009 Data Transfer General Module
5010 to 5039 and 5040 to 5069
5200 to 6199 and 6400 to 7399
Functional Modes Affected
Master and Slave
Master Master
Name Description
Configuration
Port Configuration
Command List
This section of the configuration data contains the module configuration data that defines the data transfer between the module and the PLC processor.
These sections define the characteristics of each of the Modbus serial communication ports on the module. These parameters must be set correctly for proper module operation.
If the module's Master Mode functionality is to be supported on a port, the Master Command List must be set up.
Refer to Installing and Configuring the Module for a description of the configuration of the module. The MVI71-MCM module must be configured at least once when the card is first powered, and any time thereafter when the parameters must be changed.
2.2.1 Power Up
On power up, the module enters into a logical loop waiting to receive configuration data from the processor. Upon receipt, the module will begin execution of the command list if it is present.
Page 22 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module
2.2.2 Configuration Data Transfer
When the module performs a restart operation, it will request configuration information from the PLC processor. This data is transferred to the module in specially formatted write blocks (output image). The module will poll for each block by setting the required write block number in a read block (input image). Refer to the Configuring the Module section for a description of the data objects used with the blocks and the ladder logic required. The module will request all command blocks, according to the number of commands configured by the user for each Master port. The following illustration shows this procedure:
The format of the blocks for configuration is given in the following topics.
Module Configuration
This block sends general configuration information from the processor to the module. The data is transferred in a block with an identification code of 9000. The structure of the block is displayed in the following table:
Write Block
Offset Description Length
0 9000 1 1 to 6 Backplane Setup 6 7 to 31 Port 1 Configuration 25 32 to 56 Port 2 Configuration 25 57 to 63 Spare 7
The read block used to request the configuration has the following structure (Refer to MVI71-MCM Configuration Data Definition
(page 87) for a listing of
configuration data):
ProSoft Technology, Inc. Page 23 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
Read Block
Offset Description Length
0 -2 1 1 9000 1 2 Module Configuration Errors 1 3 Port 1 Configuration Errors 1 4 Port 2 Configuration Errors 1 5 to 63 Spare 59
If there are any errors in the configuration, the bit associated with the error will be set in one of the three configuration error words. The error must be corrected before the module starts operating.
Refer to Configuration Error Codes (page 95) for a listing of error words associated with invalid configuration blocks.
2.2.3 Changing Parameters During Operation
A copy of the module's configuration data is mapped in the module's database as displayed in the table above. These values are initialized when the module first receives its configuration from the PLC processor. Any node on the network can change this data. A master port on the module may poll a slave for the data or a slave port could receive the data from a remote master unit. The module will not use this data until it is commanded. Ladder logic can be written to issue a Write Configuration command block (9997) to the module. A remote device can set a value of 9997 at address 6800 in the module to download the configuration to the processor. Alternatively, the configuration/debug port on the module can be used to issue the command directly to the module. All three of these methods will force the module to download the configuration to the PLC processor. Ladder logic must exist in the processor to accept the blocks sent by the module. If everything is configured correctly, the module can receive its configuration from a remote device.
2.2.4 Module Data Files
All data related to the MVI71-MCM is stored in user-defined data files. The user is responsible for setting up the data areas to match the specific application for the module. Each data area is discussed in the following topics.
Configuration Data
Configuration of the module is performed by filling in a user-defined data table. In the example ladder logic (block transfer), file N10 stores the general module configuration information. N11 stores the command list for Port 1. N12 stores the command list for Port 2. Each register in the files has an associated symbol and description to aid in filling in the data. The Reference chapter contains a list of items that must be configured for the module and their associated location in the file. When the side-connect interface is used, the file used for configuration must match that set in the SC_DATA.TXT file using the setdnpsc.exe program.
Page 24 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module
Data Transfer Parameter
The first five parameters of the configuration relate to the data transfer between the module and the processor as follows:
Write start register - Offset in the module's database where write data is
placed
Write register count - Number of registers to transfer from processor to
module
Read start register - Offset in the module's database where read data is
sourced
Read register count - Number of registers to transfer from the module to the
processor
Backplane fail - Number of successive transfer failures that cause
communication shutdown
Error Status Pointer - Offset in the module's database where the error
status is stored.
These parameters apply to both the side-connect and block transfer interfaces. For the block transfer interface, the number of blocks to transfer between the module and the processor is determined by the count values set in these parameters. Each block can transfer a maximum of 60 words. For example, if the Write Register Count parameter is set to 240, four write blocks will be transferred (1 to 4) between the processor and the module. When the side-connect interface is used, each block can transfer up to 1000 words of data. The user data files must be set to match the values entered in this parameter set. For example, if the Read Register Count parameter is set to 2100, three user data files must be defined. The first two must contain 1000 elements and the last one must contain at least 100 elements.
The Backplane Fail parameter determines if the module should continue communicating on the Modbus network when the backplane transfer operation fails. A value of zero indicates that the module should continue communicating when the backplane is not operational. If the value is greater than 0, the backplane will be retried the entered number of times before a failure will be reported and communication will cease on the ports. When backplane communication is restored, the module will resume communication on the network. For example, if you enter a value of 10 for the parameter, the module will stop all Modbus communications if 10 successive backplane errors are recognized. When a successful transfer is recognized, the module resumes communications.
The Error Status Pointer parameter defines the location in the module's database where the error/status data will be stored. If the value is set to -1, the data will not be stored in the user data area. A value between 0 and 4939 will cause the module's program to store the data at the specified location.
ProSoft Technology, Inc. Page 25 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
Modbus Port Parameters
These parameters define the operation of each of the Modbus ports on the module. Refer to MVI71-MCM Configuration Data Definition
(page 87) for a definition of each parameter. These parameters are contained in the configuration at offsets 6 to 55. Care must be taken when filling in this data area for successful operation of the module in a user application.
Modbus Master Commands
These records define the commands in the master command list. Each command has the following structure:
Offset Parameter
0 Enable 1 Internal Address 2 Poll Interval 3 Count 4 Swap 5 Slave Address 6 Function 7 Destination Address 8 Spare 9 Spare
Enable - This parameter defines if the command will be executed or disregarded. The following values are valid:
0=Disables the command 1=The command is considered for execution at each scan of the command list
and will be controlled by the PollInt parameter 2=The command will only execute if the data associated with the command has
changed since the command was last issued. This option is only available for write commands.
Internal Address - This parameter specifies the starting internal register address to be associated with the command. Valid entries for this parameter are 0 to
9999. For example, if using a read holding register function (function 3), the Internal
Address parameter will have the address in the MVI71-MCM database in which the value read from a Modbus slave is located. If using a write function (function
16), the Internal Address will have the source address in the MVI71-MCM database which contains the value to be written to a Modbus slave device.
Page 26 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module
Important: The Internal Address must be used according to the Modbus function. When using holding registers (Functions 3,6,16), or input registers (Function 4), the Internal Address indicates the word (16 bits) address in the MVI71-MCM internal database. For example, if using Internal Address = 500, this indicates that word 500 is the Start Internal Address. When using bits (functions 1,2,5,15), the Internal Address parameter indicates the bit address in the MVI71-MCM internal database. For example, if using Internal Address = 32 and function 15, this indicates that the source address starts at bit 0 at word 2
PollInt - This parameter defines the minimum number of seconds to wait between the execution of continuous commands (Enable=1). This poll interval command can be used to lighten the communications load on a busy network. Valid entries for this parameter are 0 through 65535.
Count - This parameter defines the number of registers to be considered by the command. Valid entries for this parameter are 1 to 100 for functions 3, 4, and 16 and 800 for functions 1, 2, and 15. The Count parameter must be interpreted according to the Modbus function used. Functions 1, 2, and 15: Count = Number of Coils (1 bit). Functions 3, 4, and 16: Count = Number of Words (16 bits).
Swap - This parameter specifies if the data used in the command must be altered when reading data from a node on the network (Function 3). Values that can be assigned are as follows:
0=No data swapping 1=Swap word values 2=Swap word and byte values 3=Swap byte values
This option is used when interfacing the module with ASCII and floating-point data on other devices.
Slave Address - This parameter assigns the Modbus slave node address for the module to reach with the command on the network. This parameter can use values from 0 to 255. Most Modbus networks limit the upper value to 247.
Func - This parameter specifies the function to be performed by the command. Valid entries are 1, 2, 3, 4, 5, 6, 15, and 16.
Destination Address: This parameter stores the destination address in the slave associated with the command.
For example, if using a Read holding register function (function 3), the Destination Address parameter will contain the address to be read in the Modbus slave connected to a MVI71-MCM master port. If using a Write function (function
16), the Destination Address will contain the slave address to which to command will be written.
Important: The Destination Address must be used according to the Modbus function in the command. When using holding registers (functions 3,6,16), or input registers (function 4), the Destination Address is expressed as the word (16 bits) address in the slave. For example, Destination Address = 500 indicates that word 500 is the start Destination Address. When using bits (functions 1,2,5,15,) the Destination Address parameter is expressed as bit address in the MVI71-MCM Destination database. For example, Destination Address = 32, with function 15, indicates that the source address starts at the bit 0 at word 2.
ProSoft Technology, Inc. Page 27 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
When the side-connect interface is used, the command must be contiguous in the file, each one occupying a 10-word area. The file numbers used are also fixed. Port 1 commands 0 to 99 will reside in the file after the configuration file. Port 2 commands 0 to 99 will reside in the next file.
The following provides some command examples:
Enable
1 100 0 10 0 1 16 55
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command continuously writes 10 words starting at address 100 to 109 in the MVI71-MCM internal database to addresses 55 to 64 at slave address 1.
Enable
2 0 0 1 0 5 6 1000
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command conditionally writes 1 word from address 0 in the MVI71-MCM internal database to address 1000 in slave 5. This means that the command is issued only when the value at address 0 changes.
Enable
1 0 15 1 0 5 6 1000
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command continuously writes 1 word from address 0 in the MVI71-MCM internal database to address 1000 in slave 5 every 15 seconds.
Enable
1 320 0 20 0 5 15 1600
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command continuously writes 20 bits from bit address 320 to 339 (word 20, bit 0) in the MVI71-MCM internal database to bit address 1600-1619 (word 100, bit 0) in slave 5.
Enable
1 320 15 1 0 5 5 1600
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command continuously writes 1 bit from bit address 320 (word 20, bit 0) in the MVI71-MCM internal database to bit address 1600 (word 100, bit 0) in slave 5 every 15 seconds.
Enable
1 850 0 10 3 5 3 700
Internal Address
Poll Count Swap
Slave Address
Function
Destination Address
This command continuously reads 10 holding registers from addresses 700 to 709 in slave 5 to addresses 850 to 859 in MVI71-MCM internal database after swapping the bytes in each word.
Page 28 of 111 ProSoft Technology, Inc.
December 28, 2007
Installing and Configuring the Module MVI71-MCM PLC Platform Modbus Communication Module
Status Data
This data area views the status of the module. Refer to MVI71-MCM Status Data Definition (page 85) for a complete listing of the data stored in this object. When the side-connect interface is used, this data is automatically updated in the configuration file (for example, N10:) starting at offset 200 approximately every second and does not include the first two registers. For the block transfer interface, the module generates blocks with a BTR block identification code of -1. Ladder logic must transfer this information into a user data file.
2.2.5 User Data
Data in the module's internal database in the register range of 0 to 4999 is available to the processor. The parameters set in the configuration determine the set of data that is transferred from the module to the processor (read data) and that transferred from the processor to the module (write data). If the block transfer interface is used, ladder logic is required to handle the transfer of data between the processor and the module. BTR messages are required to handle data read from the module, and BTW messages are required to handle data written to the module. When the side-connect interface is used, the data is directly transferred between the module and the user data files without the ladder logic requirement.
2.2.6 Slave Polling Control and Status
The status data can be used to determine which slaves are currently active on the port, are in communication error, or have their polling suspended and disabled. Special blocks (block transfer interface) or control command (side­connect interface) are required to interface with this data. Using block (command) 3000 or 3100, slaves can be disabled for polling. They can be enabled using block (command) 3001 or 3101. Blocks 3002 to 3006 or 3102 to 3106 request the current status of each slave in the module.
2.2.7 Using Side-Connect (Requires Side-Connect Adapter)
If the side-connect interface is used, make sure the file SC_DATA.TXT on the Compact Flash Disk contains the correct configuration file number. You can run the setdnpsc.exe program to set the configuration file number to be used with your application.
Install the module in the rack and turn on the power. Connect the terminal server to the module's debug/configuration port and exit the program by pressing the Esc key followed by the "Y" key. This causes the program to exit and remain at the operating system prompt. Run the setdnpsc.exe program with a command line argument of the file number to use for the configuration file. For example, to select N10: as the configuration file, enter the following:
SETDNPSC 10
Note: The SETDNPSC.EXE utility will only set the N file number between 10 and 933.
ProSoft Technology, Inc. Page 29 of 111 December 28, 2007
MVI71-MCM PLC Platform Installing and Configuring the Module Modbus Communication Module
The program will build the SC_DATA.TXT on the Compact Flash Disk (C: drive in the root directory).
The next step in module setup is to define the data files to be used with the application. If the block transfer interface is used, define the data files to hold the configuration, status, and user data. Enter the module's configuration in the user data files. Enter the ladder logic to handle the blocks transferred between the module and the PLC. Download the program to the PLC and test the program with the module.
If the side-connect interface is used, no ladder logic is required for data transfer. The user data files to interface with the module must reside in contiguous order in the processor. The first file to be used by the interface is the configuration file. This is the file number set in the SC_DATA.TXT file using the SETDNPSC.EXE program. The following table lists the files used by the side-connect interface:
File Number Example Size Description
Cfg File N10 300 Configuration/Control/Status File Cfg File+1 N11 to 1000 Port 1 commands 0 to 99 Cfg File+2 N12 to 1000 Port 2 commands 0 to 99 Cfg File+5 N15 to 1000 Data transferred from the module to the processor. Other files for read data. Cfg File+5+n N16 to 1000 Data transferred from the processor to the module. Cfg File +5+n+m Other files for write data. n is the number of read data files minus one. Each file contains up to 1000 words.
m is the number of write data files minus one. Each file contains up to 1000 words.
Even if both files are not required for a port's commands, they are still reserved and should only be used for that purpose. The read and write data contained in the last set of files possess the data transferred between the module and the processor. The number of files required for each is dependent on the number of registers configured for each operation. Two examples follow:
Example of 240 words of read and write data (cfg file=10)
Data Files Description
N15:0 to 239 Read Data N16:0 to 239 Write Data
Example of 2700 read and 3500 write data registers (cfg file=10)
Data Files Description
N15:0 to 999 Read data words 0 to 999 N16:0 to 999 Read data words 1000 to 1999 N17:0 to 299 Read data words 2000 to 2299 N18:0 to 999 Write data words 2300 to 3299 N19:0 to 999 Write data words 3300 to 4299 N20:0 to 999 Write data words 4300 to 4999
Page 30 of 111 ProSoft Technology, Inc.
December 28, 2007
Loading...
+ 81 hidden pages