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 our products, documentation, or support, please write or call us.
ProSoft Technology ®, ProLinx ®, inRAx ®, ProTalk ®, and RadioLinx ® are Registered Trademarks of ProSoft
Technology, Inc. All other brand or product names are or may be trademarks of, and are used to identify products
and services of, their respective owners.
In an effort to conserve paper, ProSoft Technology no longer includes printed manuals with our product shipments.
User Manuals, Datasheets, Sample Ladder Files, and Configuration Files are provided on the enclosed CD-ROM,
and are available at no charge from our web site: www.prosoft-technology.com.
Content Disclaimer
This documentation is not intended as a substitute for and is not to be used for determining suitability or reliability of
these products for specific user applications. It is the duty of any such user or integrator to perform the appropriate
and complete risk analysis, evaluation and testing of the products with respect to the relevant specific application or
use thereof. Neither ProSoft Technology nor any of its affiliates or subsidiaries shall be responsible or liable for
misuse of the information contained herein. Information in this document including illustrations, specifications and
dimensions may contain technical inaccuracies or typographical errors. ProSoft Technology makes no warranty or
representation as to its accuracy and assumes no liability for and reserves the right to correct such inaccuracies or
errors at any time without notice. If you have any suggestions for improvements or amendments or have found errors
in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including
photocopying, without express written permission of ProSoft Technology. All pertinent state, regional, and local safety
regulations must be observed when installing and using this product. For reasons of safety and to help ensure
compliance with documented system data, only the manufacturer should perform repairs to components. When
devices are used for applications with technical safety requirements, the relevant instructions must be followed.
Failure to use ProSoft Technology software or approved software with our hardware products may result in injury,
harm, or improper operating results. Failure to observe this information can result in injury or equipment damage.
Printed documentation is available for purchase. Contact ProSoft Technology for pricing and availability.
North America: +1.661.716.5100
Asia Pacific: +603.7724.2080
Europe, Middle East, Africa: +33 (0) 5.3436.87.20
Latin America: +1.281.298.9109
Important Installation Instructions
Power, Input, and Output (I/O) wiring must be in accordance with Class I, 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. The following
warnings must be heeded:
A WARNING - EXPLOSION HAZARD - SUBSTITUTION OF COMPONENTS MAY IMPAIR SUITABILITY FOR
CLASS I, DIV. 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.
D THIS DEVICE SHALL BE POWERED BY CLASS 2 OUTPUTS ONLY.
MVI (Multi Vendor Interface) Modules
WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT EQUIPMENT UNLESS POWER HAS BEEN
SWITCHED OFF OR THE AREA IS KNOWN TO BE NON-HAZARDOUS.
AVERTISSEMENT - RISQUE D'EXPLOSION - AVANT DE DÉCONNECTER L'ÉQUIPEMENT, COUPER LE
COURANT OU S'ASSURER QUE L'EMPLACEMENT EST DÉSIGNÉ NON DANGEREUX.
Warnings
North America Warnings
A Warning - Explosion Hazard - Substitution of components may impair suitability for Class I, Division 2.
B Warning - Explosion Hazard - When in Hazardous Locations, turn off power before replacing or rewiring
modules.
Warning - Explosion Hazard - Do not disconnect equipment unless power has been switched off or the area is
known to be nonhazardous.
C Suitable for use in Class I, division 2 Groups A, B, C and D Hazardous Locations or Non-Hazardous Locations.
ATEX Warnings and Conditions of Safe Usage:
Power, Input, and Output (I/O) wiring must be in accordance with the authority having jurisdiction
A Warning - Explosion Hazard - When in hazardous locations, turn off power before replacing or wiring modules.
B Warning - Explosion Hazard - Do not disconnect equipment unless power has been switched off or the area is
known to be non-hazardous.
C These products are intended to be mounted in an IP54 enclosure. The devices shall provide external means to
prevent the rated voltage being exceeded by transient disturbances of more than 40%. This device must be used
only with ATEX certified backplanes.
D DO NOT OPEN WHEN ENERGIZED.
Electrical Ratings
Backplane Current Load: 800 mA @ 5 V DC; 3mA @ 24V DC
Operating Temperature: 0 to 60°C (32 to 140°F)
Storage Temperature: -40 to 85°C (-40 to 185°F)
Shock: 30g Operational; 50g non-operational; Vibration: 5 g from 10 to 150 Hz
Relative Humidity 5% to 95% (non-condensing)
All phase conductor sizes must be at least 1.3 mm(squared) and all earth ground conductors must be at least
4mm(squared).
CE
EMC-EN61326-1:2006; EN6100-6-4:2007
CSA/cUL
C22.2 No. 213-1987
CSA CB Certified
IEC61010
ATEX
EN60079-0 Category 3, Zone 2
EN60079-15
243333
ME06
ANSI / ISA
ISA 12.12.01 Class I Division 2, GPs A, B, C, D
CSA/cUL
C22.2 No. 213-1987
CSA CB Certified
IEC61010
ATEX
EN60079-0 Category 3, Zone 2
EN60079-15
243333
Markings - MVI56, MVI69, PTQ
Markings - MVI46, MVI71
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.
Battery Life Advisory
The MVI46, MVI56, MVI56E, MVI69, and MVI71 modules use a rechargeable Lithium Vanadium Pentoxide battery to
backup the real-time clock and CMOS. The battery should last for the life of the module. The module must be
powered for approximately twenty hours before the battery becomes fully charged. After it is fully charged, the battery
provides backup power for the CMOS setup and the real-time clock for approximately 21 days. When the battery is
fully discharged, the module will revert to the default BIOS and clock settings.
Page 12 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Introduction
In This Chapter
Operating System .................................................................................. 13
'C' Programmable Application Development Module Developer's Guide
1 Introduction
This document provides information needed for development of application
programs for the MVI ADM Serial Communication Module. The MVI suite of
modules is designed to allow devices with a serial port to be accessed by a PLC.
The modules and their corresponding platforms are as follows:
The modules are programmable to accommodate devices with unique serial
protocols.
Included in this document is information about the available software API libraries
and tools, module configuration and programming information, and example code
for both the module and the PLC. This document assumes the reader is familiar
with software development in the 16-bit DOS environment using the 'C'
programming language. This document also assumes that the reader is familiar
with Rockwell Automation programmable controllers and the PLC platform.
1.1 Operating System
The MVI module includes General Software Embedded DOS 6-XL. This
operating system provides DOS compatibility along with real-time multi-tasking
functionality. The operating system is stored in Flash ROM and is loaded by the
BIOS when the module boots.
DOS compatibility allows user applications to be developed using standard DOS
tools, such as Digital Mars C++ and Borland compilers. User programs may be
executed automatically by loading them from either the CONFIG.SYS file or an
AUTOEXEC.BAT file.
Note: DOS programs that try to access the video or keyboard hardware directly will not function
correctly on the MVI module. Only programs that use the standard DOS and BIOS functions to
perform console I/O are compatible.
Refer to the General Software Embedded DOS 6-XL Developer’s Guide
(page 331) on the MVI-ADM CD-ROM for more information.
ProSoft Technology, Inc. Page 13 of 342
February 20, 2013
ProSoft Technology, Inc. Page 17 of 342
February 20, 2013
Preparing the MVI-ADM Module MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
2.3 Jumper Locations and Settings
Each module has three jumpers:
Setup
Port 1
Port 2 (Not available on MVI94)
2.3.1 Setup Jumper
The Setup jumper, located at the bottom of the module, should have the two pins
jumpered when programming the module. After programming is complete, the
jumper should be removed.
2.3.2 Port 1 and Port 2 Jumpers
These jumpers, located at the bottom of the module, configure the port settings
to RS-232, RS-422, or RS-485. By default, the jumpers for both ports are set to
RS-232. These jumpers must be set properly before using the module.
Page 18 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Preparing the MVI-ADM Module
'C' Programmable Application Development Module Developer's Guide
2.4 Cable Connections
The application ports on the MVI-ADM module support RS-232, RS-422, and RS485 interfaces. Please inspect the module to ensure that the jumpers are set
correctly to correspond with the type of interface you are using.
Note: When using RS-232 with radio modem applications, some radios or modems require
hardware handshaking (control and monitoring of modem signal lines). Enable this in the
configuration of the module by setting the UseCTS parameter to 1.
2.4.1 RS-232 Configuration/Debug Port
This port is physically an RJ45 connection. An RJ45 to DB-9 adapter cable is
included with the module. This port permits a PC based terminal emulation
program to view configuration and status data in the module and to control the
module. The cable for communications on this port is shown in the following
diagram:
2.4.2 RS-232 Application Port(s)
When the RS-232 interface is selected, the use of hardware handshaking
(control and monitoring of modem signal lines) is user definable. If no hardware
handshaking will be used, here are the cable pinouts to connect to the port.
ProSoft Technology, Inc. Page 19 of 342
February 20, 2013
Preparing the MVI-ADM Module MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
This type of connection is used when the device connected to the module
requires hardware handshaking (control and monitoring of modem signal lines).
Page 20 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Preparing the MVI-ADM Module
'C' Programmable Application Development Module Developer's Guide
RS-232: Null Modem Connection (No Hardware Handshaking)
This type of connection can be used to connect the module to a computer or field
device communication port.
Note: For most null modem connections where hardware handshaking is not required, the Use
CTS Line parameter should be set to Nand no jumper will be required between Pins 7 (RTS) and 8
(CTS) on the connector. If the port is configured with the Use CTS Line set to Y, then a jumper is
required between the RTS and the CTS lines on the port connection.
ProSoft Technology, Inc. Page 21 of 342
February 20, 2013
Preparing the MVI-ADM Module MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
2.4.3 RS-422
The RS-422 interface requires a single four or five wire cable. The Common
connection is optional, depending on the RS-422 network devices used. The
cable required for this interface is shown below:
2.4.4 RS-485 Application Port(s)
The RS-485 interface requires a single two or three wire cable. The Common
connection is optional, depending on the RS-485 network devices used. The
cable required for this interface is shown below:
Note: Terminating resistors are generally not required on the RS-485 network, unless you are
experiencing communication problems that can be attributed to signal echoes or reflections. In
these cases, installing a 120-ohm terminating resistor between pins 1 and 8 on the module
connector end of the RS-485 line may improve communication quality.
RS-485 and RS-422 Tip
If communication in the RS-422 or RS-485 mode does not work at first, despite
all attempts, try switching termination polarities. Some manufacturers interpret +
and -, or A and B, polarities differently.
Page 22 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Preparing the MVI-ADM Module
'C' Programmable Application Development Module Developer's Guide
2.4.5 DB9 to RJ45 Adaptor (Cable 14)
ProSoft Technology, Inc. Page 23 of 342
February 20, 2013
Preparing the MVI-ADM Module MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
Page 24 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Understanding the MVI-ADM API
In This Chapter
API Libraries .......................................................................................... 26
Development Tools ............................................................................... 28
Theory of Operation .............................................................................. 29
ADM API Architecture............................................................................ 59
ADM API Files ....................................................................................... 60
Backplane API Files .............................................................................. 64
Serial API Files ...................................................................................... 66
Side-Connect API Files ......................................................................... 67
'C' Programmable Application Development Module Developer's Guide
3 Understanding the MVI-ADM API
The MVI ADM API Suite allows software developers to access the PLC
backplane and serial ports without needing detailed knowledge of the module’s
hardware design. The MVI ADM API Suite consists of three distinct components:
the Serial Port API, the MVI Backplane/CIP API and the ADM API.
The MVI Backplane API provides access to the processor
The Serial Port API provides access to the serial ports
The ADM API provides functions designed to ease development.
In addition to the MVI Backplane API, MVI71 also provides the MVI Side-
Connect API as an alternative interface.
Applications for the MVI ADM module may be developed using industry-standard
DOS programming tools and the appropriate API components.
This section provides general information pertaining to application development
for the MVI ADM module.
ProSoft Technology, Inc. Page 25 of 342
February 20, 2013
Understanding the MVI-ADM API MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
3.1 API Libraries
Each API provides a library of function calls. The library supports any
programming language that is compatible with the Pascal calling convention.
Each API library is a static object code library that must be linked with the
application to create the executable program. It is distributed as a 16-bit large
model OMF library, compatible with Digital Mars C++ or Borland development
tools.
Note: The following compiler versions are intended to be compatible with the MVI module API:
Digital Mars C++ 8.49
Borland C++ V5.02
More compilers will be added to the list as the API is tested for compatibility with them.
3.1.1 Calling Convention
The API library functions are specified using the 'C' programming language
syntax. To allow applications to be developed in other industry-standard
programming languages, the standard Pascal calling convention is used for all
application interface functions.
3.1.2 Header File
A header file is provided along with each library. This header file contains API
function declarations, data structure definitions, and miscellaneous constant
definitions. The header file is in standard 'C' format.
3.1.3 Sample Code
A sample application is provided to illustrate the usage of the API functions. Full
source for the sample application is provided. The sample application may be
compiled using Digital Mars C++ or Borland C++.
Important: The sample code and libraries in the 1756-MVI-Samples folder are not compatible with,
and are not supported for, the Digital Mars compiler.
Page 26 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Understanding the MVI-ADM API
'C' Programmable Application Development Module Developer's Guide
3.1.4 Multi-threading Considerations
The DOS 6-XL operating system supports the development of multi-threaded
applications.
Note: The multi-threading library kernel.lib in the DOS folder on the distribution CD-ROM is
compiler-specific to Borland C++ 5.02. It is not compatible with Digital Mars C++ 8.49. ProSoft
Technology, Inc. does not support multi-threading with Digital Mars C++ 8.49.
Note: The ADM DOS 6-XL operating system has a system tick of 5 milliseconds. Therefore, thread
scheduling and timer servicing occur at 5ms intervals. Refer to the DOS 6-XL Developer’s Guide
on the distribution CD-ROM for more information.
Multi-threading is also supported by the API.
DOS and cipapi libraries have been tested and are thread-safe for use in
multi-threaded applications.
MVIbp and MVIsp libraries are safe to use in multi-threaded applications with
the following precautions: If you call the same MVIbp or MVIsp function from
multiple threads, you will need to protect it, to prevent task switches during
the function's execution. The same is true for different MVIbp or MVIsp
functions that share the same resources (for example, two different functions
that access the same read or write buffer).
WARNING:ADM and ADMNET libraries are not thread-safe. ProSoft Technology, Inc. does not
support the use of ADM and ADMNET libraries in multi-threaded applications.
ProSoft Technology, Inc. Page 27 of 342
February 20, 2013
Understanding the MVI-ADM API MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
3.2 Development Tools
An application that is developed for the MVI ADM module must be executed from
the module’s Flash ROM disk. Tools are provided with the API to build the disk
image and download it to the module’s Config/Debug port.
Page 28 of 342 ProSoft Technology, Inc.
February 20, 2013
MVI-ADM ♦ 'C' Programmable Understanding the MVI-ADM API
'C' Programmable Application Development Module Developer's Guide
3.3 Theory of Operation
3.3.1 ADM API
The ADM API is one component of the MVI ADM API Suite. The ADM API
provides a simple module level interface that is portable between members of the
MVI Family. This is useful when developing an application that implements a
serial protocol for a particular device, such as a scale or bar code reader. After
an application has been developed, it can be be used on any of the MVI family
modules.
ProSoft Technology, Inc. Page 29 of 342
February 20, 2013
Understanding the MVI-ADM API MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
3.4 ADM Functional Blocks
3.4.1 Database
The database functions of the ADM API allow the creation of a database in
memory to store data to be accessed via the backplane interface and the
application ports. The database consists of word registers that can be accessed
as bits, bytes, words, longs, floats or doubles. Functions are provided for reading
and writing the data in the various data types. The database serves as a holding
area for exchanging data with the processor on the backplane, and with a foreign
device attached to the application port. Data transferred into the module from the
processor can be requested via the serial port. Conversely, data written into the
module database by the foreign device can be transferred to the processor over
the backplane.
3.4.2 Backplane Communications
MVI46 Backplane Data Transfer
The MVI46-ADM module communicates directly over the backplane. All data for
the module is contained in the module's M1 file. Data is moved between the
module and the SLC processor across the backplane using the module's M-files.
The SLC scan rate and the communication load on the module determine the
update frequency of the M-files. The COP instruction can be used to move data
between user data files and the module's M1 file.
The following illustration shows the data transfer method used to move data
between the SLC processor, the MVI46-ADM module and the foreign network.
All data transferred between the module and the processor over the backplane is
through the M0 and M1 files. Ladder logic must be written in the SLC processor
to interface the M-file data with data defined in the user-defined data files in the
SLC.
Page 30 of 342 ProSoft Technology, Inc.
February 20, 2013
Loading...
+ 312 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.