You are on page 1of 41

Wonderware Conference. Schneider Electric confidential.

TSS-04
Wonderware MES:
Successful
Implementation &
Ongoing Support
Presented by:
Dan Scott
Agenda

● Configuring MES for success!


● Troubleshooting
● What’s New/Upcoming in Wonderware MES

Wonderware Conference. Schneider Electric confidential.


Making a Wonderware MES
Project a Success

Wonderware Conference. Schneider Electric confidential.


What is Wonderware MES Middleware
and Where Should It Be Running?
● Observed as Wonderware MES Middleware Host in Windows Services
● Processes all MES database transaction requests from clients/objects
● Middleware is multi-threaded and can utilize multiple CPUs, but
increased transaction volume can cause delays

Wonderware Conference. Schneider Electric confidential.


EVERYONE Should Be Running Multiple
MES Middleware Servers
● Load distribution:
● Increase transaction bandwidth and performance
● Isolate high demand transactions such as background tasks, archiving
● Reduced chance of transaction timeouts
● Maintain uptime
● Spread out single points of failure
● Maintenance on one server won’t impact the entire plant
● Typically it does not cost the customer anything extra

Only demo applications should be running a single Middleware server!


Wonderware Conference. Schneider Electric confidential.
MES Middleware Server Licensing

● License required per Middleware Server


● MES Licensing changes require MES Middleware Host service restart
● Extra Middleware Server licenses are already included in your
purchase, listed as “Load Balancing” on the price sheet
● 5 equipment = 2 Middleware licenses included
● 10+ equipment = 6 Middleware licenses included

Wonderware Conference. Schneider Electric confidential.


Where to Run MES Middleware Server

● All AOS platforms hosting MES objects and/or MES API


● Middleware is not deployed, it must be installed manually
● 200-300 max total OCO/UCO/SRO/API objects per platform*
● 30-50 max total OCO/UCO/SRO/API objects per engine*
● Database server: dedicated Middleware for MES Service
● Background tasks, Archive/Purge, Supply Chain Connector, etc.
● MES client workstations: MES Operator, InTouch, etc.
● 50-100 clients per Middleware server*
● Terminal servers should have a dedicated local Middleware server

*Suggestions dependent on transaction volume and other factors


Wonderware Conference. Schneider Electric confidential.
Where to Run MES Middleware Server

● DB Maintenance Server (dedicated for Archive data)


● Archive/Purge/Restore actions are very transaction intensive
● Factory Connector
● Depending on transaction frequency, could be a dedicated server, otherwise
can be combined with server hosting MES Service

Wonderware Conference. Schneider Electric confidential.


Application Engine Load Management

● MES Object and MES API running in Application Objects


● All transactions are done via API
● Transacting with MES database takes time
● Considerations:
●Engine scan rate and load
●Script execution frequency
●Sync vs. Async scripting

Wonderware Conference. Schneider Electric confidential.


Managing MES UCO Raw Reasons

Changing Raw Reasons in rapid succession can result in lost events


● Currently UCO can handle current change, plus one queued event
● If events frequently occur less than 30s apart, consider logging a general
state and use Historian to record rapid transaction details.
● Development is currently working on revamping the UCO

Wonderware Conference. Schneider Electric confidential.


Managing MES UCO Raw Reasons

As with all MES transactions, many cascading updates need to occur,


which takes some time. For example, when a Raw Reason changes, the
following occurs at a minimum:
● Update duration on previous utilization event and close it out
● Create new utilization event
● Update current utilization reason
● Update previous Job/Utilization link durations
● Create new Job/Utilization link record
● Update OEE durations

Wonderware Conference. Schneider Electric confidential.


Supply Chain Connector
● Questions to consider when deciding whether to use files or
tables:

• How much data will I be importing?


• How often will the data be imported?
• How much of the importing data will be new and how much will be
updating existing records?

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● Jobs
● Job – Job and related Status.
●Contains total production count, allowing item_prod
details to be purged

● Job_exec – Active job information


●One placeholder record per allow Job Exec per entity
●Never delete records

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● Jobs cont.
● Job summary but no running jobs?
●job_exec.cur_wo_id, cur_oper_id, cur_seq_no

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● Jobs cont.
● Running job but no Job Summary is job.state_cd
1- NEW, 2- READY, 3-RUNNING, 4 – COMPLETE,
5 – SUSPENDED, 6 – ON HOLD, 7 – CANCELED

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● Production
● Item_prod – Production details
●Maintain Distinct Good Production
Pros - Maintaining distinct production will give
representation of the production reported also
enabling tracking to a specific time when something
was produced.
Cons - Records in the item_prod table grow very rapidly and
can cause performance issue if not maintained correctly

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● Utilization
● Util_exec – stores the current state data for each entity
● Util_log – Captures utilization data and a chronological
sequence of events for each machine. This
includes machine states, reasons, duration, number of
occurrences, and the actual times that the machine changed state
or reason etc
● Job_util_log_link - Captures the job(s) run during a particular “period” of
utilization (i.e. during a particular util_log record). Also captured is the
position on which the job was running, the main item the job produced, and
the portion of the utilization period during which it ran.

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables
● OEE
● Oee_exec – Contains current OEE Characteristics such as
●Current OEE (updated by MES Service)
●OEE-related targets
●Current quality and performance %
● Tpm_stat - Holds raw OEE data statistics by job/hour/shift
●Duration summary per category
●Good and reject quantities

Wonderware Conference. Schneider Electric confidential.


Common Transactions and Key Tables

Wonderware Conference. Schneider Electric confidential.


Database Maintenance
● Database maintenance
● Truncate transaction logs and shrink files and database (TN 664)
● Check fragmentation. Reorganize or rebuild indexes
● Archive and/or Purge
● Large tables:
item_prod (Production details)
util_log (Utilization states)
tpm_stat (OEE stats)
● Tech Note 746 - Using MES Archive, Purge and Restore Functions

Wonderware Conference. Schneider Electric confidential.


Troubleshooting
Wonderware MES

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

● Middleware Trace
● Enable XML Trace of all middleware/SP
calls with parameters
● Middleware restart required
● File is c:\MWTrace.xml

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

Example Middleware Trace contents:


<trace_object object_name="JOB_EXEC.ENDJOB" call_start_time="9/2/2015
9:32:03 AM" call_complete_time="9/2/2015 9:32:04 AM">
<stored_procedure_call>EXEC SP_U_JOB_EXEC_ENDBATCHJOBS
/*@ent_id Int32*/ 2, /*@wo_id String*/ '1', /*@oper_id String*/ 'Op1',
/*@seq_no Int32*/ 0, /*@job_pos Int32*/ 0, /*@status_notes String*/ null,
/*@user_id String*/ 'admin', /*@check_privs Int32*/ null, /*@check_certs
Int32*/ 1, /*@client_type Int32*/ 37, /*@no_propogation Int32*/ 0,
/*@check_auto_job_start Int32*/ null, /*@event_time_local DateTime*/ null,
/*@time_zone_bias_value Int32*/ -240</stored_procedure_call>
</trace_object>

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

● SQL Trace
● MES Stored Procedures are well organized
●sp_BG_ - background tasks
●sp_D_ - delete
●sp_I_ - insert
●sp_U_ - update
●sp_S_ - select
●sp_SA_ - select all

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

● Run SQL Server Profiler


● Events Selection tab
● Disable Audit events
● Enable SP and TSQL
● Click Show All Columns
● Click Column Filters

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

● Set filters on:


● DatabaseName: MES database
● TextData: SP(s) to be tracked
●% as wildcard

Wonderware Conference. Schneider Electric confidential.


Troubleshooting Transactions

● Run SQL captured from trace in SQL Management Studio


● Wrap with BEGIN TRAN and ROLLBACK TRAN to run without committing
● Use F11 to step through and watch variables

Wonderware Conference. Schneider Electric confidential.


MES Log Messages

● MES SMC Log Flags


● UCO – EquipmentStatusRuntime1
● OCO – JobExecutionRuntime1
● SRO – SampleCharacteristicRuntime1
● Entity Model Builder – EntityModelBuilder
● MES Service – FactMES.Server.Services
● MES ArchestrA Objects
● .ErrorMessage attributes on many levels

Wonderware Conference. Schneider Electric confidential.


What’s New in
Wonderware MES

Wonderware Conference. Schneider Electric confidential.


MES 2014 SP1 – Current Release

● Wonderware MES Web Portal


● Line Monitor tab in MES Web Portal
● Automatic bottleneck detection
● Utilization reasons:
● Automatic rollover and priority
● Auto disable entities for OEE calculation
● MES Quality Management
● Sampling based on production unit counts
● SRO – trigger on-demand samples

Wonderware Conference. Schneider Electric confidential.


Wonderware MES 2014 R2

● Anticipated Release in Q4 2015


● Sales Brief / Posting early 2016
● Version 5.2
● Includes about 40 Hotfixes since MES 2014 SP1 Release
● Still uses MES 5.0 version license file
● Existing MES 4.0 or 4.5 license files must be upgraded

Wonderware Conference. Schneider Electric confidential.


Wonderware MES 2014 R2

● Adding Support for Windows 10


● Drop Support for Windows 2008
● Support for SQL Server 2014 SP1
● Continued support for SQL 2008 R2 and 2012 (including R2)
● Not Bundling SQL Server on DVD
● Drop Support for SQL Server 2008
● Drop Support for Oracle 11G R2
● Oracle is no longer a supported database for Wonderware MES

Wonderware Conference. Schneider Electric confidential.


Wonderware MES 2014 R2

● Compatibility Statement
● System Platform 2014 R2 and 2014 supported
● Will test with latest service pack / patch

Wonderware Conference. Schneider Electric confidential.


Utilization Capability Object Changes

● Updated Code to Latest AppObject Toolkit


● Removed Production Counters
● The UCO counters were not consistent with the OCO
● OCO counters have been recommended for last few years
● Turn Off Logging of Utilization Events (Manual mode)
● Import / Export of Raw Reason Codes (XML)
● Without Response Mode for Logging Events
● Migration of Old UCO to New UCO

Wonderware Conference. Schneider Electric confidential.


UCO Code Update

● Essentially a Rewrite of the UCO in the New AOT


● Added Default Batch Size to Entity Configuration
● Allow for Entry of Spare Fields in Configuration
● Coordination of Sessions between UCO, OCO, and SRO
● Handling of Array Variables in RRC Expression
● Improved Handling of I/O Quality for all Attributes
● Improved Failover
● Improved Handling of Out-of-Bounds Data and Mismatch Datatypes

Wonderware Conference. Schneider Electric confidential.


UCO Update

● Editor updates

Wonderware Conference. Schneider Electric confidential.


Security Related Changes

● Remove FactWeb Access as an Installation Option


● Hide the FactWeb Access from the Installation
● Still include it on the DVD
● Customer will need to copy files manually to use it
● Part 1 of GetDSbySQL Remediation
● No change to existing methods of GetDSbySQL
● Add new method GetDSbySP to execute a custom stored procedure
● Add new method ExecSP for when there is no returned dataset
● Next release to limit GetDSbySQL to only allow a SELECT statement

Wonderware Conference. Schneider Electric confidential.


API Changes

● Create New Stateless API Namespace Commerce


● This is to expose some Supply Chain Connector options within the stateless
API
● WEI will replace Supply Chain Connector in a future release
● In the Commerce Namespace Add:
● Cust class for base table transactions (customers)
● SO class for base table transactions (sales orders)
● SOLine class for base table transactions (sales order line)
● Add new DataLog48 class

Wonderware Conference. Schneider Electric confidential.


Thank you!

©2015 Schneider Electric. All Rights Reserved.


Wonderware Conference.
All trademarks Schneider
are owned by Electric
Schneider confidential.
Electric Industries SAS or its affiliated companies or their respective owners.
Wonderware Conference. Schneider Electric confidential.

You might also like