ProSoft Technology MVI56E-LDM User Manual

MVI56E-LDM
ControlLogix Platform
"C" Programmable Linux Application Development
Module
March 12, 2014
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 our products, documentation, or support, please write or call us.
ProSoft Technology 5201 Truxtun Ave., 3rd Floor Bakersfield, CA 93309 +1 (661) 716-5100 +1 (661) 716-5101 (Fax) www.prosoft-technology.com support@prosoft-technology.com
© 2014 ProSoft Technology, Inc. All rights reserved.
MVI56E-LDM Developer's Manual
March 12, 2014
ProSoft Technology ®, is a registered Copyright 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 DVD and are available at no charge from our web site: http://www.prosoft-technology.com
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:
WARNING - EXPLOSION HAZARD - SUBSTITUTION OF COMPONENTS MAY IMPAIR SUITABILITY FOR CLASS I, DIV. 2; WARNING - EXPLOSION HAZARD - WHEN IN HAZARDOUS LOCATIONS, TURN OFF POWER BEFORE REPLACING OR WIRING MODULES WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT EQUIPMENT UNLESS POWER HAS BEEN SWITCHED OFF OR THE AREA IS KNOWN TO BE NON-HAZARDOUS. 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 - MVI56E-LDM
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.
CPU, Memory, and OS Specifications
CPU: 400MHz ARM9 G20
Operating System: Linux (kernel 2.6.33.7)
  Linux Distribution: Debian GNU/Linux System Memory: 64MB SDRAM Flash Memory: 64MB ROM Compact Flash: 64MB card provided (16GB max supported)
General Specifications
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) LED Indicators: ERR - Application driven, APP - Application driven, OK - Application driven 4-Character, Scrolling, Alpha-numeric LED Display: Application driven - possible uses
are: Module Version, IP, Application Port Setting, Status/Error Information
All phase conductor sizes must be at least 1.3 mm(squared) and all earth ground
conductors must be at least 4mm(squared).
Ethernet Ports
2 Ethernet Ports 10/100 Mbps RJ45 Connector, Link and Activity Indicators Auto-sensing crossover cable detection
Serial Ports
Full hardware handshaking control provides radio, modem, and multi-drop support. RJ45 (DB-9M with supplied adapter cable) Configurable RS-232 hardware handshaking 500V Optical isolation from backplane RS-232, RS-422, RS-485 jumper-select, each port Rx (Receive) and Tx (Transmit) LEDs, each port
Atex
CE
CSA, CSA CB Safety
cULus
GOST-R
Lloyds
Agency Approvals and Certifications
ControlLogix Platform "C" Programmable Contents Linux Application Development Module Developer's Manual
Contents
Your Feedback Please ........................................................................................................................ 2
Important Installation Instructions ....................................................................................................... 2
MVI (Multi Vendor Interface) Modules ................................................................................................ 2
Warnings - MVI56E-LDM .................................................................................................................... 2
1 LDM Introduction 4
2 Preparing the MVI56E-LDM Module 6
2.1 System Requirements ............................................................................................... 6
2.2 Package Contents - LDM .......................................................................................... 7
2.3 Recommended Compact Flash (CF) Cards .............................................................. 7
2.4 Jumper Locations and Settings ................................................................................. 7
2.4.1 Setup Jumper - MVI56E ............................................................................................ 8
2.4.2 Port 1 and Port 2 Jumpers MVI56E .......................................................................... 8
2.5 Setting Up a Connection with the Module ................................................................. 8
2.5.1 Installing the Module in the Rack .............................................................................. 9
2.5.2 Making Configuration Port Connections .................................................................. 10
2.6 Enabling and Disabling the Console Port................................................................ 15
2.7 Establishing Module Communication ...................................................................... 18
2.8 Module Rescue ....................................................................................................... 21
3 Development Environment 23
3.1 Setup ....................................................................................................................... 23
3.2 Using Eclipse ........................................................................................................... 27
3.2.1 Building a Project .................................................................................................... 27
4 Understanding the MVI56-LDM API 33
4.1 API Library - MVI56E ............................................................................................... 33
4.1.1 Header File .............................................................................................................. 33
4.1.2 Sample Code ........................................................................................................... 33
4.1.3 Specifying the Communications Path ..................................................................... 34
4.1.4 ControlLogix Tag Naming Conventions .................................................................. 34
4.2 MVI56E-LDM Development Tools ........................................................................... 35
4.3 CIP API Functions ................................................................................................... 36
4.4 Backplane Device Driver ......................................................................................... 36
4.5 Sample Code ........................................................................................................... 38
4.6 Establishing a Console Connection ........................................................................ 39
4.7 Physically Connect to the Module ........................................................................... 40
4.8 Configuring Serial Communication .......................................................................... 41
4.9 Setting Up the ControlLogix 5000 ........................................................................... 43
4.10 Sample Tutorials ..................................................................................................... 45
4.11 Ethernet Sample ...................................................................................................... 46
4.12 Serial Sample .......................................................................................................... 49
4.13 Led_Sample ............................................................................................................ 50
4.14 Backplane_Sample ................................................................................................. 51
ProSoft Technology, Inc. Page 5 of 264 March 12, 2014
Contents ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
4.15 Tag_Sample............................................................................................................ 53
4.16 Sample Applications ............................................................................................... 55
4.17 Ethernet Communications Sample ......................................................................... 56
4.18 Serial Application Sample ....................................................................................... 61
5 CIP API Functions 70
5.1 CIP API Initialization Functions ............................................................................... 73
OCXcip_Open ............................................................................................................................. 73
OCXcip_OpenNB ........................................................................................................................ 74
OCXcip_Close ............................................................................................................................. 77
5.2 Object Registration ................................................................................................. 79
OCXcip_RegisterAssemblyObj ................................................................................................... 79
OCXcip_UnregisterAssemblyObj ................................................................................................ 82
5.3 Special Callback Registration ................................................................................. 84
OCXcip_RegisterFatalFaultRtn ................................................................................................... 84
OCXcip_RegisterResetReqRtn ................................................................................................... 86
5.4 CIP Callback Functions .......................................................................................... 88
connect_proc ............................................................................................................................... 88
service_proc ................................................................................................................................ 93
fatalfault_proc .............................................................................................................................. 97
5.5 Connected Data Transfer ....................................................................................... 99
OCXcip_WriteConnected ............................................................................................................ 99
OCXcip_ReadConnected .......................................................................................................... 101
OCXcip_ImmediateOutput ........................................................................................................ 103
OCXcip_WaitForRxData ........................................................................................................... 105
OCXcip_WriteConnectedComplete ........................................................................................... 107
5.6 Tag Access Functions .......................................................................................... 110
OCXcip_AccessTagData ........................................................................................................... 110
OCXcip_AccessTagDataAbortable ........................................................................................... 113
OCXcip_CreateTagDbHandle ................................................................................................... 114
OCXcip_DeleteTagDbHandle ................................................................................................... 115
OCXcip_SetTagDbOptions ....................................................................................................... 116
OCXcip_BuildTagDb ................................................................................................................. 119
OCXcip_TestTagDbVer ............................................................................................................. 121
OCXcip_GetSymbolInfo ............................................................................................................ 123
OCXcip_GetStructInfo ............................................................................................................... 126
OCXcip_GetStructMbrInfo ......................................................................................................... 129
OCXcip_GetTagDbTagInfo ....................................................................................................... 132
OCXcip_AccessTagDataDb ...................................................................................................... 135
5.7 Messaging ............................................................................................................. 138
OCXcip_GetDeviceIdObject ...................................................................................................... 139
OCXcip_GetDeviceICPObject ................................................................................................... 142
OCXcip_GetDeviceIdStatus ...................................................................................................... 145
OCXcip_GetExDeviceObject..................................................................................................... 149
OCXcip_GetWCTime ................................................................................................................ 152
OCXcip_SetWCTime ................................................................................................................. 156
OCXcip_GetWCTimeUTC ......................................................................................................... 159
OCXcip_SetWCTimeUTC ......................................................................................................... 163
5.8 Miscellaneous Functions ...................................................................................... 166
OCXcip_GetIdObject ................................................................................................................. 167
OCXcip_SetIdObject ................................................................................................................. 169
OCXcip_GetActiveNodeTable ................................................................................................... 171
Page 6 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Contents Linux Application Development Module Developer's Manual
OCXcip_MsgResponse.............................................................................................................. 173
OCXcip_GetVersionInfo............................................................................................................. 176
OCXcip_GetUserLED ................................................................................................................ 178
OCXcip_SetUserLED................................................................................................................. 180
OCXcip_GetModuleStatus ......................................................................................................... 182
OCXcip_SetModuleStatus ......................................................................................................... 184
OCXcip_GetLED3 ...................................................................................................................... 186
OCXcip_SetLED3 ...................................................................................................................... 188
OCXcip_ErrorString ................................................................................................................... 190
OCXcip_SetDisplay ................................................................................................................... 192
OCXcip_GetDisplay ................................................................................................................... 194
OCXcip_GetSwitchPosition ....................................................................................................... 196
OCXcip_GetSerialConfig ........................................................................................................... 198
OCXcip_Sleep ........................................................................................................................... 201
OCXcip_CalculateCRC .............................................................................................................. 203
OCXcip_SetModuleStatusWord ................................................................................................ 205
OCXcip_GetModuleStatusWord ................................................................................................ 207
6 Cable Connections 209
6.1 RS-232 Configuration/Debug Port ........................................................................ 209
6.2 RS-232 Application Port(s) ................................................................................... 210
6.2.1 RS-232: Modem Connection (Hardware Handshaking Required) ........................ 210
6.2.2 RS-232: Null Modem Connection (Hardware Handshaking) ................................ 211
6.2.3 RS-232: Null Modem Connection (No Hardware Handshaking) ........................... 211
6.3 RS-422 .................................................................................................................. 212
6.4 RS-485 Application Port(s) .................................................................................... 212
6.4.1 RS-485 and RS-422 Tip ........................................................................................ 213
6.5 DB9 to RJ45 Adaptor (Cable 14) .......................................................................... 213
7 Support, Service & Warranty 214
7.1 Contacting Technical Support ............................................................................... 214
7.2 Return Material Authorization (RMA) Policies and Conditions.............................. 215
7.2.1 Returning Any Product .......................................................................................... 215
7.2.2 Returning Units Under Warranty ........................................................................... 216
7.2.3 Returning Units Out of Warranty ........................................................................... 216
7.3 LIMITED WARRANTY ........................................................................................... 217
7.3.1 What Is Covered By This Warranty ....................................................................... 218
7.3.2 What Is Not Covered By This Warranty ................................................................ 219
7.3.3 Disclaimer Regarding High Risk Activities ............................................................ 220
7.3.4 Intellectual Property Indemnity .............................................................................. 221
7.3.5 Disclaimer of all Other Warranties ........................................................................ 222
7.3.6 Limitation of Remedies ** ...................................................................................... 222
7.3.7 Time Limit for Bringing Suit ................................................................................... 223
7.3.8 No Other Warranties ............................................................................................. 223
7.3.9 Allocation of Risks ................................................................................................. 223
7.3.10 Controlling Law and Severability ........................................................................... 223
7.4 Open Source Licensing ......................................................................................... 224
7.5 GNU Public License .............................................................................................. 225
7.6 Eclipse Public License ........................................................................................... 239
7.7 Python Public License ........................................................................................... 245
7.8 GCC Public License .............................................................................................. 251
ProSoft Technology, Inc. Page 7 of 264 March 12, 2014
Contents ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
8 Glossary of Terms 254
Index 257
Page 8 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable LDM Introduction
API
Application Programming Interface
Backplane
Refers to the electrical interface or bus to which modules connect when inserted into the rack. The MVI56E-LDM module communicates with the control processor(s) through the ControlLogix backplane.
CIP
Control and Information Protocol. This is the messaging protocol used for communications over the ControlLogix backplane.
Connection
A logical binding between two objects. A connection allows more efficient use of bandwidth because the messaging path is not included after the connection is established.
Consumer
A destination for data.
Library
Refers to the library file that contains the API functions. The library must be linked with the developer's application code to create the final executable program.
Originator
A client that establishes a connection path to a target.
Producer
A source of data.
Target
The end-node to which a connection is established by an originator.
Linux Application Development Module Developer's Manual
1 LDM Introduction
The MVI56E-LDM module is a ControlLogix backplane compatible module that allows Rockwell Automation ControlLogix processors to interface with any Ethernet or Serial device. With the supplied development tools and sample applications, you are the developer who controls exactly what this module can and cannot do.
ProSoft Technology's Linux Development modules make it possible for users to easily develop and deploy C/C++ applications that interface with Bar Code Scanners, Legacy ASCII protocols, Terminal Port Emulation, Printer Drivers (Alarm/Status printer), or any other device requiring custom/proprietary Ethernet and Serial communications.
This document provides information needed for development of application programs for the MVI56E-LDM Applications Module for ControlLogix.
This document assumes the reader is familiar with software development in the Linux environment using C/C++ programming languages. This document also assumes that the reader is familiar with Rockwell Automation programmable controllers and the ControlLogix platform.
The reader should be familiar with the following terms:
ProSoft Technology, Inc. Page 4 of 264 March 12, 2014
ControlLogix Platform "C" Programmable LDM Introduction Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 5 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable
In This Chapter
System Requirements ............................................................................. 6
Package Contents - LDM ......................................................................... 7
Recommended Compact Flash (CF) Cards ............................................. 7
Jumper Locations and Settings ............................................................... 7
Setting Up a Connection with the Module ................................................ 8
Establishing Module Communication ..................................................... 18
Module Rescue ...................................................................................... 21
Developer's Manual Linux Application Development Module
2 Preparing the MVI56E-LDM Module
2.1 System Requirements
The MVI56E-LDM module requires the following hardware and software components:
Rockwell Automation ControlLogix processor (firmware version 10 or greater)
with compatible power supply and one free slot in the rack for the module. The module requires 5 VDC power
Rockwell Automation RSLogix 5000 programmer software
o Version 15 or lower must use Sample Ladder available from www.prosoft-
technology.com
Rockwell Automation RSLinx communication software version 2.51 or greater Pentium II 450 MHz minimum. Pentium III 733 MHz or greater recommended Supported operating systems:
o Microsoft Windows 7 Professional (32 or 64-bit) o Microsoft Windows Vista o Microsoft Windows XP Professional with Service Pack 1 or 2 o Microsoft Windows 2000 Professional with Service Pack 1, 2, or 3 o Microsoft Windows Server 2003
128 MB RAM (minimum), 256 MB of RAM recommended 100 MB of free hard disk space (or more based on application requirements) 256-color VGA graphics adapter, 800 x 600 minimum resolution (True Color
1024 x 768 recommended)
DVD drive
Note: The Hardware and Operating System requirements in this list are the minimum recommended to install and run software provided by ProSoft Technology. Other third party applications may have different requirements. Refer to the documentation for any third party applications.
Page 6 of 264 ProSoft Technology, Inc. March 12, 2014
Port 1
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
Port 2
2.2 Package Contents - LDM
Your MVI56E-LDM package includes:
MVI56E-LDM Module ProSoft Technology Solutions DVD (includes all documentation, sample
code, and sample ladder logic).
(1) Null Modem Cable (Cable 15) (2) Config/Debug Port to DB-9 adapter (Cable 14) (2) 1454-9F Connectors for RS422/RS485 (1) Ethernet Cable (Cable 25)
Note: The Virtual Machine, toolchain, and other development files are not shipped with the product. You may purchase the ProSoft Technology LDMdevKit Part # LDMdevKit from your Rockwell Automation distributor.
If any of these components are missing, please contact ProSoft Technology Support.
2.3 Recommended Compact Flash (CF) Cards
What Compact Flash card does ProSoft recommend using?
Some ProSoft products contain a "Personality Module", or Compact Flash card. ProSoft recommends using an industrial grade Compact Flash card for best
performance and durability. The following cards have been tested with ProSoft’s
modules, and are the only cards recommended for use. These cards can be ordered through ProSoft, or can be purchased by the customer.
Approved ST-Micro cards:
32M = SMC032AFC6E 64M = SMC064AFF6E - 128M = SMC128AFF6E
Approved Silicon Systems cards:
256M = SSD-C25MI-3012 512M = SSD-C51MI-3012 2G = SSD-C02GI-3012 4G = SSD-C04GI-3012
ProSoft provides the 64M = SMC064AFF6E Compact Flash Card. The endurance spec for this card is 2 million write/erase cycles.
WARNING: Do not shutdown or power cycle the module in any way during a NAND write to the CF.
2.4 Jumper Locations and Settings
Each module has three jumpers: Setup
ProSoft Technology, Inc. Page 7 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
Port 1 Port 2
2.4.1 Setup Jumper - MVI56E
The Setup Jumper acts a write protection for the module's firmware. In "write­protected" mode, the setup pins are not connected which prevents the module's firmware from being overwritten.
The module is shipped with the Setup Jumper OFF. If you need to update the firmware or run a module rescue (recovery), apply the setup shunt over both pins.
2.4.2 Port 1 and Port 2 Jumpers MVI56E
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.
2.5 Setting Up a Connection with the Module
If you have not already done so, please install and configure your ControlLogix processor and power supply. Refer to the 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 this device.
After verifying proper jumper placement, insert the module into the ControlLogix chassis. Use the same technique recommended by Rockwell Automation to remove and install ControLogix modules.
Page 8 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
2.5.1 Installing the Module in the Rack
You can install or remove ControlLogix system components while chassis power is applied and the system is operating. However, please note the following warning.
Warning: When you insert or remove the module while backplane power is on, an electrical arc can cause personal injury or property damage by sending an erroneous signal to your system's actuators. This can cause unintended machine motion or loss of process control. Electrical arcs may also cause an explosion they occur in a hazardous environment. Verify that power is removed, or that the area is non-hazardous before proceeding. Repeated electrical arching causes excessive wear to contacts on both the module and its mating connector. Worn contacts may create electrical resistance that can affect module operation.
Align the module with the top and bottom guides, and then slide it into the rack until the module is firmly seated against the backplane connector.
With a firm, steady push, snap the module into place. Ensure that the holding clips on the top and bottom of the module are securely in the locking holes of the rack.
Make a note of the slot location. Slot numbers are identified on the green circuit board (backplane) of the ControlLogix rack.
Turn power On.
ProSoft Technology, Inc. Page 9 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
2.5.2 Making Configuration Port Connections
You can communicate with the module via RS232 through the Console or through one of the Ethernet ports using Telnet.
RS-232 Console
You access the Console through Serial Port 1. As a default, the RS-232 Console port is "enabled". You can "disable" or "enable" this port. Refer to Enabling and Disabling the Console Port in the next section.
1 Connect the RJ45 end of an RJ45 - DB9m cable (Cable 14) to the Serial Port
1 of the module.
2 Connect one end of the Null Modem Cable (Cable 15) to the DB9m end
Cable 14.
3 Connect the other end of Cable 15 (null modem cable) to your a serial port on
your PC or laptop.
Page 10 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
Ethernet Port
The module contains a Telnet client which is accessed through Ethernet Port 1 (E1) as shown.
Connect an Ethernet RJ45 cable to the E1 port of the module and the other end to the network switch.
ProSoft Technology, Inc. Page 11 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
You can also "enable" or "disable" the Telnet port. Open a Putty session as shown below. The following screenshot shows the Telnet Port "enabled"
To disable the Telnet port...
Page 12 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
cd\etc\init.d\S99-telnetd.
ProSoft Technology, Inc. Page 13 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
Comment out the telnetd file.
To enable the port, simply un-comment the same line.
Page 14 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
2.6 Enabling and Disabling the Console Port
Establish a connection to the module. In the following example, PUTTY is being used.
1. Open PUTTY.
Set the Speed to 115200 Set the appropriate COM port Ensure that the Connection Type is set to Serial.
2. Click Open. The Putty session opens.
3. Enter your login and password. RA56-daTM login: root, Password: password.
ProSoft Technology, Inc. Page 15 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
The following appears:
4. cd to /etc.
Page 16 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
5. Type ls. The following appears:
There are two files used to enable or disable the console port:
inittab.con - configures the console  inittab.nocon - configures no console
To enable the console.....
1. Open the inittab.con file.
ProSoft Technology, Inc. Page 17 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
The file content is shown:
2. Copy inittab.con file to the inittab file.
3. Save the file and reboot the module.
To disable the console...
1. Copy inittab.nocon file to the inittab file.
2. Save the file and reboot the module.
2.7 Establishing Module Communication
Ensure that the module is firmly seated in the rack and that the cables described in the previous section are secure. Ensure that power is applied.
Note: If you require information on cables and port pinouts, please refer to the section entitled Cable Connections (page 209) at the end of the manual.
RS-232 Console
If you are connected to Serial Port 1 (P1), establish communications with the module using the following procedure.
Note: The following procedure uses PUTTY to establish communications. You can use whatever program you desire.
1. Open Putty
Page 18 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
Set the Speed to 115200 Set the appropriate COM port Ensure that the Connection Type is set to Serial.
2. Click Open. The Putty session opens.
3. Enter your login and password:
RA56-daTM login: root Password: password
Ethernet (Telnet)
You can communicate with the module through Ethernet Port 1 (E1) using Telnet.
The Ethernet Port (E1) is programmed with eth0 set to IP 192.168.0.250 and a Subnet Mask of 255.255.255.0. In order for your PC or laptop to talk to the module, your PC or Laptop must be on the same subnet as the module. This means that you must temporarily change the IP address and subnet mask on your PC or laptop to match that of the module. You can then change the module's IP address to match your needs.
1. Change the IP Address of your PC or Laptop so it matches the subnet of the module.
ProSoft Technology, Inc. Page 19 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
2. Ensure that an Ethernet cable is connected to Ethernet Port 1 (E1) of the module.
3. Use a program such as Putty to Telnet into the module.
Select Telnet as the Connection type. Enter the IP address (192.168.0.250) Port 23 should appear as the Port number.
4. Click the Open button to establish a connection.
5. Login into the module.
There are two methods used to change the module's IP address. One is temporary for use in cases where you want to change the address long enough to make a quick change. The other is more permanent in that the module is already programmed and is ready for full deployment.
Temporary IP Address Change At the Linux prompt, type:
ifconfig eth0 x.x.x.x -- This changes the IP address of the Ethernet E1 port ifconfig eth1 x.x.x.x -- This changes the IP address of the Ethernet E2 port.
Permanent IP Address Change At the Linux prompt, type:
cd ../etc/network -- changes the directory to network vi interfaces -- opens the interfaces file for ethernet assignment in a vi editor
iface eth0 inet static address 192.168.0.250 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 # gateway 192.168.0.1
Page 20 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Preparing the MVI56E-LDM Module Linux Application Development Module Developer's Manual
auto eth1 iface eth1 inet static address 192.168.1.250 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 # gateway 192.168.1.1
Using the vi editor, edit the file to change the address. Save the file. For help on using the vi editor to write and save the file, refer to
http://www.lagmonster.org/docs/vi.html http://www.lagmonster.org/docs/vi.html. Change the IP address of your PC back to the original subnet.
Telnet to the new IP Address of the module.
2.8 Module Rescue
In the event that it becomes necessary to revert the MVI56E-LDM module back to its initial out-of-the-box state, there are a number of methods you can use depending on the condition of the module.
The Rescue process re-installs all of the Operation System commands and configurations to their original defaults. The files deleted during the rescue process are the startup scripts in the /etc/init.d path since extra scripts in this path are automatically executed by the operating system on startup and may cause problems. All other files may be overwritten to the initial state of the device. Extra files are not deleted.
If the web pages and services for the module have been altered, it may not be possible to use the web-based rescue.
Prep and Establish Communications
Place the onboard setup jumper to the installed state. Ethernet Communication If the IP address is known, change the network mask and IP of a connected PC
to something compatible. For example, if the MVI56E-LDM is configured with the default IP address
(192.168.1.250) and network mask (255.255.255.0), the the PC should have the same IP4 network mask and an IP address in the 192.168.1.xxx subnet.
Note that IP addresses must be unique on the network. If in doubt, create a physical network consisting of only the MVI56E-LDM and the PC.
Serial Communication If the IP address if the MVI56E-LDM module is unknown, communication may be
established through the serial configuration port (i.e., Port 1 (upper port)). Use Telnet or a similar terminal program to communicate with the module. Default baud is 115,200, 8 data bits,1 stop bit, No Parity, xon/xoff flow control.
Use the following username and password: Username: root
ProSoft Technology, Inc. Page 21 of 264 March 12, 2014
Preparing the MVI56E-LDM Module ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
Password: password From the shell prompt, run ifconfig to determine the Ethernet IP address and
network mask of device "eth0". Then follow the previous steps to establish communication via Ethernet.
Web-based Rescue
The web page for the MVI56E-LDM module contains a command to recover the module on the left-side of the page.
Open the web page for the module by entering the IP address of the module in the address bar. (your PC/workstation should have an IP address and the same sub-network).
On the left-side of the page, under Functions, click on Rescue Module. Follow the instructions to set the module back to its default state.
Note: Most loaded components are left intact by this operation so it may be necessary to make enough room on the module for the rescue to work. In addition, the Setup Jumper must be in place for the rescue to function properly.
Manual Rescue
If the default web pages are unavailable, a manual rescue may be required. Perform the following steps to manually return the module to its default state:
1. Establish a terminal session to the module using either the Serial or Ethernet port.
2. Ensure that the following file exists:
/backup/systemrestore.tgz
3. Run the following command to remove any startup scripts that may be interfering with the bootup process:
rm -f /etc/init.d/*
4. Restore the configuration and executables using the following command:
tar -xzf /backup/systemrestore.tgz -C /
5. If successful, reboot the system.
Page 22 of 264 ProSoft Technology, Inc. March 12, 2014
ControlLogix Platform "C" Programmable Development Environment
In This Chapter
Setup ..................................................................................................... 23
Using Eclipse ......................................................................................... 27
Linux Application Development Module Developer's Manual
3 Development Environment
The MVI56E-LDM development tools run under Linux. In order to run these tools on a Windows-based machine, you must run a Virtual Machine that hosts the Linux Operating System.
VMware provides a virtual machine player used to host the Linux Operating System. You can get it at:
https://my.vmware.com/web/vmware/downloads.
3.1 Setup
The file Debian6VM.zip is located on the ProSoft Product DVD shipped with the module.
1. Copy this file to the VM Player image ico directory (VMware > VMware
2. Uncompress Debian6VM.zip into this directory.
Player > ico).
ProSoft Technology, Inc. Page 23 of 264 March 12, 2014
Development Environment ControlLogix Platform "C" Programmable Developer's Manual Linux Application Development Module
3. Start the VM Player by double-clicking on its icon.
4. Select "Open a Virtual Machine".
Page 24 of 264 ProSoft Technology, Inc. March 12, 2014
Loading...
+ 234 hidden pages