You are on page 1of 67

Martinrea International, Inc

Ahead Behind Installation Instructions


Table of Contents

Data Flow Overview Page 4

Control Logix Code Installation Ahead /Behind Page 5

Control Logix Code Installation HCB (Phase 2) Page 10

SLC Code installation ABC Page 14

MySql installation Page 15

MySQL Schema installation

MySQL Production Data table addition

MySQL Delay Data table addition

MySQL Downtime Data table addition

RPI Client Image installation Page 17

Operator Cycle Indicator Construction Page 29

Ignition Device Configuration (PLC Connection) Page 42

Ignition Database Configuration (MySQL Connection) Page 45

Ignition Historian Configuration (Phase 2)

Ignition Project Configuration Page 48

Creating New Station Tags

Creating Operator Standard Work Screen

Creating Area Board Screen

Shift Configuration (Phase 2)

Asset Addition Page 62

Part Addition Page 63

Startup Screen Navigation Page 64

RPI Client Image Configuration Page 65

Page 2
File Name Appendix Page 66

Enertech Quote Page 67

Page 3
Data Flow Overview
Configuration and Historical Data is stored in the MySql Database.

Real time data is pulled from the PLC directly into the Ignition Tag Server. Data is then transferred to the
Ignition Clients.

MySql DataBase
Ignition Client

(Operator Cycle Indicator)

Ignition Gateway

Ignition Client

(Area Board)
PLC

Page 4
Control Logix Code Installation ABC
1. Import most recent Ahead_Behind UDTs into RSLogix 5000 project file in the Below Order.

UDT Names

ABC_Inputs

ABC_Outputs

ABC_Structure

2. Import Ahead_Behind AOI Called “ABC” into RSLogix 5000 project file

Addon Instruction Name

ABC

3. Create Controller Scoped tag with following naming Convention of the ABC_Data_Structure
Datatype

ABC_”ASSET”_”STATION”_U

ASSET = Asset Name

Station = Station Name

EXAMPLE UDT NAM E “ABC_255_Station1_U”

Page 5
4. Create Routine in Main Program (follow current PLC labeling structure) and Call this routine
from the MainRoutine

5. In New Routine Program Inputs into UDT created earlier“ABC_lxrear_Station1” A minimum of


5 Inputs are required for the system to function, they are;

Clear to Enter = When Operator Clear to enter light is on. This is the main driving input for the operator
cycle time indicator. The Cycle Indicator will count down while this Bit is on.

Cycle Complete = When operator Station has completed cycle. This Bit will set the current operator
Cycle to Zero and move Value into previous cycle (When there is more than one station used by a single
operator this Must be Tied to Operator influence such as Palm out or All parts Loaded and Light
Curtain Clear)

isDown = When machine is unable to produce parts Automatically for reasons outside operator control
(eg. Gate Open, Robot Fault)

OP_Stat_Reset = When break is on or after operator change has taken place. When this input is high the
Ahead/Behind counting system is disabled. And the operator Over cycle Quantity and Accumulated Over
cycles is reset to 0 on in the Ahead/Behind Screen

Part_Num = integer with co-responding part number string in database, is used to select proper target
for part number. This number is linked to the ABC_config data table column PLC_Part_Num.

Page 6
6. Create ABC Add-on Instruction below Inputs

7. Create AOI Tag with following Naming Convention

ABC_”ASSET”_”STATION”

Where…

ASSET = Asset Name

Station = Station Name

EXAMPLE AOI NAME “ABC_255_Station1”

Page 7
8. Fill in Add-on Instruction with User Defined Tag Created earlier. Use AOI example below for
reference.

Page 8
The AOI will collect Data for the Programmed Station and send to Ignition for Operaton of the Below
screens.

Operator Cycle Indicator

Area Board

Operator Ahead/Behind Screen (Phase 2)

Page 9
Control Logix Code Installation HCB (hourly Count
Boards Phase 2)
Import UDT

HCB_INPUTS

HCB_OUTPUTS

HCB_STRUCTURE

Import AOI

HCB

Create AOI and Tag with following Naming Convention

HCB_”ASSET”_”STATION”

ASSET = Asset Name

Station = Station Name

EXAMPLE AOI NAME “HCB_c520_Station1”

Create UDT tag with following naming Convention

HCB_”ASSET”_”STATION”_U

ASSET = Asset Name

Station = Station Name

EXAMPLE UDT NAME “HCB_c520_Station1_U”

Page
10
Fill In AOI inputs/Outputs with co responding UDT Inputs/Outputs

Page
11
Program UDT Input Functions

IsDown = When station is faulted and not able to produce parts. Eg, Cell gate is open or Robot major
fault halting robot operation

HCB AOI Input Function Description (instruction can Handle producing up to 4 parts con-currently)

***Identical Cycle Complete logic for each concurrent part

Cycle Complete1 = When operator Station has completed cycle for part

Part_Number1 = integer with co-responding string in database. This number is linked to the
ABC_config data table column PLC_Part_Num

PPC1 = Quantity of Parts produced per Cycle complete trigger. This number is linked to the ABC_config
data table column PPC

Page
12
Example code for part numbers that could run concurrently.

Page
13
SLC Code Installation Ahead Behind

Attached is the PLC program for a SLC processor, you will need one set of this code for each station.

Please Reference the Control Logix Code Installation ABC instructions for programming the required
inputs below( Operator Clear to Enter, Operator Cycle Complete, Operator Station Down and Operator
Break Enabled.

Create a Separate Integer datatable with 32 elements for each Distinct operator Cycle timer and replace
the template N7 integer file with the one created. Create a Separate Timer Datatable with 16 elements
each Distinct operator Cycle timer and replace the template T4 with the one created.

Page
14
MySql installation
Install the latest version of the MySql Server onto your Virtual Machine using the Following Link.

https://dev.mysql.com/downloads/installer/

Select the Web Installer and Download

Once Downloaded Install the correct 32 or 64 Bit Version of MySQL as well as the MySQL WorkBench

Page
15
Set Config Type as Sever Machine to Allocate a medium amount of memory to the SQL process

Create a ROOT User password.(Write this down) Also add a user called “IGNCONN” as a
DBADMIN and create a password for that user

Page
16
Raspberry Pi Client Image Installation
1. Default RPI Image can be found here…

ftp://hydroform:blind@ftp.martinrea.com/Default.zip

2. Download to Local hard Drive

3. Extract Image using unzip program like win rar or 7zip

Page
17
4. Write image to SD card using “Win32DiskImager” Minimum SD card size is 16GB Class 10

“Win32DiskImager” Can be found @ https://sourceforge.net/projects/win32diskimager/

Change Filetype to “*.*” and navigate to the extracted Image

Page
18
5. Select device with SD card and Press Write.

Process takes about 20 minutes.

5. Insert SD card into Raspberry Pi. SD Card Slot is located on the underside of the Pi near the display
port.

6. Power on Raspberry Pi ***if using external power supply ensure at least a 1.2 amp supply @ 5 volts

Page
19
7. After first Boot Client should auto start and search for Ignition Gateway.

8. Close Client Box by pressing “X” in lower right hand corner

Page
20
9. Connect Raspberry Pi to network using hardwired cable. IP address should be served by the DHCP and

can be obtained by clicking VNC Icon in the top right corner of the screen

10. Test Remote connection to Pi

Download and install Real VNC Viewer

https://www.realvnc.com/download/viewer/

Enter IP address of Pi into Real VNC program.

Login using Default Credentials.

Username: pi

Password: letmein123

Page
21
11. Open File Explorer by clicking folder Icon in Titlebar

12. Navigate to “/home/pi/Public” folder

13. Right Click on “Launcher.sh” and Open File in text Editor

14. Change the gateway address to that of your ignition gateway

15. Save file and reboot.

16. The next time the Pi starts it should find the gateway and load the default Ignition Screen.

Page
22
MySQL Schema Installation
MySQL Schema Installation

The MYSQL Schemas can be installed using MySql Workbench and the Schema Setup file.

1. Open MYSQL Workbench


2. File.. Open Model

3. Select the “Schema Template” file from the Setup folder.


4. Select Database then Forward Engineer.

Page
23
5. Type in the ip address of the Ignition VM. Username will be IGNCONN and use the password
previously setup for that username.

6. Leave all boxes but “Include model Attached scripts” Unchecked

Page
24
7. Select Export Table Objects and Export Routine Objects

8.Click Net and Enter Credentials for the IGNCONN user

Page
25
8. Click Database… Connect to Database and connect to the Ignition Gateway IP

9. Verify the ignition_config and ignition_data Schemas are now in the Schema navigator.

Page
26
MySql Production Data Table Addition
The required data tables can be installed using the MySql Workbench.

1. Open the Mysql Workbench

2. Connect to the Ignition Database

Two Schemas should be shown in the Schema Navigator

Find the Production Data Table, it will have the following naming structure. production_Asset

Right Click the production table >Copy to Clipboard>Create statement.

Page
27
Paste the Create statement into the Query Editor and change the name of the table to match
the Asset that you are creating the production table for.

Execute the statement to create the production data table.

Follow the same procedure to create the Downtime and Delay data tables per Asset . Copying
the corresponding tables Downtime_Asset or Delay_Asset.

Operator Cycle time Indicator Assembly Instructions


Page
28
Below are the assembly instructions for the Operator Cycle time Indicator. A completely assembled
version of the cycle indicator is available to purchase from a Canadian distributor Enertech. Quote is
available in the document appendix.

Finished Product

Bill Of Materials

Page
29
Canadian Version

Operator Standard Work Indicator


Bill of Materials
In Cell Display Bill of Materials
Item # Vendor Description Part Number Qty Price
1 Newark Raspberry PI 3 77Y6520 1 $39.95
2 Newark 7" Raspberry PI LCD with touch 49Y1712 1 $64.95
3 Newark Voltage Regulator 40M6588 1 $13.95
4 Hammond Enclosure with 8 Pre Drilled Holes 1550WGBK 1 $25.90
6 Parker Plastics 1/8" Plexiglass cover with 6 Counter sunk holes Custom 1 $8.75
7 Newark Panel mount rj45 Connector 20T7279 1 $11.26
8 Newark Dust cap Cover 20T7280 1 $3.25
9 Newark 0.3 Meter Ethernet cable 21M5870 1 $2.76
10 HTM M12 Bulckhead 4 Pin Panel Mount Connector R-MS4FZ/0.5/ 1/2" -14NPT 1 $6.25
11 Tiger Direct 32gb Micro SD card (Class 10) KS1-300638246 1 $19.99
12 Charles Jones M3 x 0.5 x 1M Threaded Rod SPA 867-004 1 $2.43
13 Charles Jones M3 Hex Nut PMHNC-3 12 $0.05
14 Charles Jones 3MM Flat washer MET PMFW-3 12 $0.04
15 Tiger Direct Mounting Hardware (Speaker Mount pack of 2) YYS2-4406408 1 $23.99
16 Balluff Power cable BCC M415-M414-3A-304-VX44T2-020 1 $25.00
Total Per Unit $248.52

American Version

Bill of Materials(USA Version)


In Cell Display Bill of Materials
Item # Vendor Description Part Number Qty Price
1 Newark Raspberry PI 3 77Y6520 1 $35.00
2 Newark 7" Raspberry PI LCD with touch 49Y1712 1 $60.00
3 Future Electronics Voltage Regulator 40M6588 1 $13.95
4 Mouser Electronics Enclosure with 8 Pre Drilled Holes 1550WGBK 1 $23.63
6 Home Depot 1/8" Plexiglass cover Custom 1 $4.68
7 Newark Panel mount rj45 Connector 20T7279 1 $9.64
8 Newark Dust cap Cover 20T7280 1 $2.04
9 Newark 0.3 Meter Ethernet cable 21M5870 1 $2.76
10 Automation Direct M12 Bulckhead 4 Pin Panel Mount Connector 7231-13501-9710050 1 $7.50
11 Amazon 32gb Micro SD card (Class 10) KS1-300638246 1 $13.95
12 Amazon M3 x 0.5 x 1M Threaded Rod SPA 867-004 1 $12.64
13 Home Depot M3 Hex Nut PMHNC-3 15 $2.25
14 Home Depot 3MM Flat washer MET PMFW-3 15 $1.35
15 Amazon Mounting Hardware (Speaker Mount pack of 2) YYS2-4406408 1 $9.99
16 CMA/Flodyne/HydradynePower cable BCC M415-M414-3A-304-VX44T2-020 1 $15.84
Total Per Unit $215.22
Components

Page
30
4 6
9
11
12
13
14
15
3

10
00
7

Page
31
1. Start with inserting the ribbon cable into the 7” LCD Display.

2. Attach the red and black wire for the screen as shown,
After wires are attached add a dab of glue to prevent wires coming loose
from vibration.

Page
32
3. Mount the Raspberry Pi to the LCD screen using the four screws provided
with the LCD Monitor

4. Insert the 32gb MicroSD with the flashed default Ahead_Behind Image.

Page
33
5. Cut four 3mm threaded rod lengths at 2” and assemble with hex nuts as
shown.

6. Attach the threaded rod to the LCD screen as shown.

Page
34
7. Attach green wire to ground pin#34. Attach Red wire to 5v pin#2. Attach
Black wire to Ground Pin#6. Attach Yellow wire to 5v Pin#4. Add glue to
secure wires from vibration.

Page
35
8. Attach Voltage regulator to cover of RJ45 port using Glue.

9. Insert 0.3m ethernet cable into RJ45 port of Raspberry Pi . Attach Yellow
wire from Pin#4 of the Pi to the Output pin of the Voltage Regulator.
Attach Green wire from Pin #34 of Pi to the Middle(Ground) Pin of the
Voltage Regulator.

Page
36
10. Pre-drill holes from drawing into Hammond Enclosure

Page
37
11. Attach Universal mount holder to back of Hammond Enclosure.

12. Attach M12 Panel Mount Connector and RJ45 Connector to enclosure

Page
38
13. Solder Brown wire from M12 Panel mount connector to input pin of
Voltage regulator.

14. Attach Blue wire from M12 Panel connector to ground location on LCD
screen or Raspberry Pi.

Page
39
15. Attach Ethernet cable from the Pi to the RJ45 panel connector on the
enclosure.

16. Mount screen so there is only slight stick out from the enclosure. The goal
is to mount the LCD screen flush with the plexi glass cover.

17. Cut and pre-drill holes into the Plexiglass as shown in the below drawing.

Page
40
18. Attach gasket from enclosure package contents onto outer edge of cover.
Paint blackout strip onto plexi glass on the inside for aesthetic appeal after
cover is added.

Page
41
19. Attach cover to assembled enclosure using screws included with enclosure
package. Try to mount cover so it is flush with LCD screen to prevent glare.

20. Power Indicator using 24 VDC M12 connection with standard pinout to test
operation.

Page
42
Ignition Device Setup
Here is a description on how to connect a Allen Bradley Control Logix PLC to the Ignition Gateway/

1. Navigate to Ignition gateway in a web browser.

2. Go to the configuration tab, Devices menu under the OPC-UA SERVER section.

3. Click Create new device

4. Choose Device Type, For Control Logix processor choose (Allen-Bradley Logix Driver)

Page
43
5. Enter the Name of the “Asset” for Device name.

6. Enter the IP address of the Ethernet card/processor in the hostname section.

7. Click create new Device

8. Verify device is connected in status Menu

Page
44
Ignition Database Setup
Below are details outlining the connection of a MySql Database in Ignition

1. Navigate to Ignition gateway in a web browser.

2. Go to the configuration tab, DATABASES menu Connections section.

3. We Need to Setup connections to the Database schemas in MYSQL. There are 4 connections
to the MYSQL Database to setup(Ignition_Config, Ignition_Data, Ignition_Historian,
Ignition_Realtime_History_1Hour)

4. To Create a new database connection Click

Page
45
5. Select MySQL ConnectorJ as the Database Driver and Click Next

6. Setup Connection Parameters.

Page
46
Parameters
1. Name: “Ignition_Config”
2. Connect URL:” jdbc:mysql://localhost:3306/ignition_config” Highlighted portion must
match database schema name.
3. Username: IGNCONN as setup in Database setup using during MySql Install
4. Password: Same password used when setting up user during MySql Install

7. Setup the Remaining 3 database connections using the setup structure for the
Igntion_Config Database.

Page
47
Ignition Project Configuration
Open web browser and Type in the following where ”ipaddress” is equal to the ip address of your
ignition gateway. http://ipaddress:8088/main/web

Click Launch Designer in the upper right hand corner of the window.

Open with Java Web start launcher(if Java Web start launcher is not available you will need to install the
JRE 1.8 or higher)

Page
48
Login to the gateway using the default username and password.

Username: admin

Password: password

Page
49
Create New Project Called “Ahead_Behind” Use Ignition_Config as the default Database.

Click File.. Import.. to import the template project into the designer.

Select “Project_Import.proj” file from the file list found on Central.

Page
50
Select All Items and Import

The Template files and screen samples should now be added to your Ignition project now showing up in
the Project Browser Panel.

Page
51
Next the tag datatypes and sample tags need to be imported into the project.

In the Tag Browser Panel, Click import Tags from XML and CSV Icon

Page
52
Select the Tag files individually starting with “Data_Types.xml” and Import them

The tags needed to configure the first station of your Ahead/Behind Ignition project are now available in
the Tag Browser.

Page
53
Creating New Station Tags
Once the Template tags are loaded it is easy to create tags for an additional station in Ignition.

In the “Tag Browser” panel Right Click an Existing tag and copy and paste it into the same ABC
folder

Follow the Same Naming Convention of ABC_”Asset”_”Station” it is importation to follow this


naming structure to ensure proper communication to the tag located in the PLC.

Now we need to configure the tag details Right Click the new tag and Edit tag(s)

Page
54
In the Edit Menu there are three Datatype Parameters.

Asset, Device, Station

Asset is the Name of the Cell that that we are collecting data from. The Name of the Asset here needs
to match the name of the Asset you created when Naming the UDT in the PLC.

Page
55
Device is the Name of the link to the PLC made in the OPC-UA connection
The Device name Must Match the device name used when setting up the PLC Connection to Ignition
earlier in this document.

Station is the Name of the station that that we are collecting data from. The Name of the station here
needs to match the name of the station you created when Naming the UDT in the PLC.

If the configuration is correct data will be automatically pulled from the PLC and MySQL database and be
available in the tag created.

Page
56
Creating Operator Standard Work Screen
Below outlines the steps to creating an operator standard work screen in Ignition. This assumes
that the PLC UDT and Add-on Instruction have already been made and the corresponding
station tag in ignition has been made.

Right Click the Sample Standard Work indicator screen located in the Project Browser, Windows
Section, 720_480 Folder, In_Cell Folder.

Page
57
Rename the window to the appropriate name

Double click the newly named window in the window browser to open it.

Click on the IN_Cell_IND Template located in the Root Container of that window and change
the Template properties so the Asset and Station Match the Created Tag in Ignition.

Page
58
Creating Area Board Screen

Right Click on the Sample Area Board Screen and Duplicate.

Rename the new Area Board Screen to a name that reflects where the Area Board is located.

Page
59
Click on the State property of the Multi-State Indicator for the station you wish to edit.

Navigate to the BB_State property of the desired Station and Click ok.

Page
60
Open the Style Customizer for the Multi State Indicator.

Modify the Text property for each of the 4 states of the Indicator to match the station assigned.

Page
61
Asset Addition
Asset config screen is located the 1366_768 folder Asset_Config screen. It can be accessed
from the ignition Designer or ran from the Ignition Client. Currently this screen can be accessed
from the navigation tab if a computer accesses the Ignition project and is not on the hostname
list.

Type an Asset name into the Asset name textbox, and click the “Add” Button, Select an Asset
that has been added to the list to add a station. Asset and station names MUST have the same
name of the tags created in Ignition.

Page
62
Part Number Configuration
Part number config screen is located the 1366_768 folder PN_Config screen. It can be accessed
from the ignition Designer or ran from the Ignition Client. Currently this screen can be accessed
from the navigation tab if a computer accesses the Ignition project and is not on the hostname
list. After an Asset has been added and a Station Added to that Asset, a part number along with
production specifications can be configured.

Select Asset and Station then type part number into textbox and Click “Add” Button. The Part
Number will now show up on the Part number list for that Asset and station combination.

Now you can specify the “Operator Target” which will be the number that the operator cycle
indicator starts at. Total Cycle target is the time it takes for the machine and

operator to complete a complete cycle. The Parts per hour target is the production target per
hour that matches your shift target (typically this number is 85% best possible production rate)

Parts Per cycle is the amount of parts completed from a full machine cycle.

PLC Part Number is the Number that represents this part that is fed into the Add on Instruction
in the PLC.

Page
63
Startup Screen Navigation
The Startup screen in Ignition is decided by running a script in the Ignition gateway when a
client tries to connect.

The script can be accessed in the Ignition Designer under client event scripts. What the script
does is lookup the hostname of the Client connecting and if the client hostname shows up in
the “startup_screen” data table in MySql. The first screen the client starts is the one specified in
the data table.

Page
64
Client Image Configuration
If the Client has been setup correctly has a hostname of “Default” and can communicate to the
Ignition Gateway then the Initial startup screen should be the default startup screen as shown
below.

This screen references the Assets and the stations that were setup earlier in the Ignition
configuration to set the initial startup screen of the Ignition Client. Select the Asset, Station and
screen function, then write changes and reboot device. Pressing the button will change the
hostname of the Client to match the startup_screen data table.

Page
65
File Name Appendix

Code Templates
FileName Description
ABC.L5X Control Logix AOI Ahead_Behind
ABC_Data_Structure.L5X Ahead Behind Control Logix UDT Structure
ABC_INPUTS.L5X Ahead Behind Control Logix UDT Inputs
ABC_OUTPUTS.L5X Ahead Behind Control Logix UDT Outputs
HCB.L5X Control Logix AOI Hourly Count
HCB_Data_Structure.L5X Hourly Count Control Logix UDT Structure (Phase2)
HCB_INPUTS.L5X Hourly Count Control Logix UDT Inputs (Phase2)
HCB_OUTPUTS.L5X Hourly Count Control Logix UDT Outputs (Phase2)
Ahead_Behind.RSS SLC PLC Code Ahead_Behind
SLC PLC Code Hourly Count Boards(Phase2)
Schema Template.mwb MySql Schemas To be Imported Using MySQL Workbench
fill_hoursm Scheduled Routines
Project_Import.proj Ignition Templates for Ahead Behind
RPI Client Image Default Client Image
Data_Types.xml Data Template Tags to Import into Ignition
ABC_Config.xml Config Tags to Import into Ignition
ABC_Sample.xml Sample Tags to Import into Ignition

Page
66
Enertech Quotation

Page
67

You might also like