Applications and Services


Stopping and Starting PPA services with a batch file

The code below can be saved to a batch file to stop the services. Execute and watch for errors by opening CMD as Administrator

:: Save this as StopPPAServices.BAT :: stop plant apps :: Stopping proficy server manager will gracefull stop other PPA services in the right order net stop "Proficy Server Manager" :: stop workflow services net stop "Proficy Server" net stop "Proficy STS" net stop "ProficyPublisherService" :: stop the license manager net stop "Proficy Server License Manager" net stop "Proficy Licensing" :: go to the buffer files directory and delete everything if you suspect corrupted buffer files

The code below can be saved to a batch file to Start the services. Execute and watch for errors by opening CMD as Administrator

:: Save this as StartPPAServices.BAT :: start license CCFLICO service net start "Proficy Licensing" :: this creates a wait for 10 seconds ping 1.1.1.1 -n 1 -w 10000 > nul net start "Proficy Server License Manager" :: wait here 10 seconds for the license manager to start ping 1.1.1.1 -n 1 -w 10000 > nul net start "Proficy Server Manager" :: wait here for a couple of minutes before starting workflow ping 1.1.1.1 -n 1 -w 120000 > nul net start "Proficy Server" net start "Proficy STS" net start "ProficyPublisherService"

Plant Applications Maintenance (Applications Server)

Plant Applications server houses the Proficy Windows services that combined, form the engine that drives the Plant Applications MES application. In addition to the general server monitoring described in the Server Monitoring section, there are specific indicators to review to determine how this "engine," as well as the stored procedures that they often call in the SQL server, are performing. Proficy services can run in any order.
The Proficy Windows services are:

WorkFlow Services

The Proficy Server, Proficy Publisher Service, Proficy Certificate, and Proficy STS server are services related to WorkFlow. Plant Applications can function without these services running.
This relates to installations of PA 6.2 and later. These services are not required with a version of PA 5 or before installation.

Proficy Server

Supports most of this product's functionality. It must be running at all times for Workflow to function.

Proficy STS

Authenticates application users. It must be running at all times.

Proficy Publisher Service

Publishes data to the active directory (Microsoft ADAM/LDS). It must be running if you are using ADAM/LDS.

Proficy Certificate

Generates security certificates.

Infrastructure Services

The Proficy Manager, Database Manager, and Message Bus make up the core service structure of Proficy. These services create the path to and from SQL Server for all Proficy services. They also manage "buffering" to ensure all data transfers are successful.

Proficy Manager

The Proficy Manager Service operates as a "watch dog" ensuring that all other Proficy Services are working properly. It will start and stop the other services when the Proficy Manager is started and stopped. Also, it will restart any monitored service that stops. If Proficy Manager does not monitor the other services as described above then either, there is a "bug" or the default configuration has been changed preventing it.
The Proficy Manager can be configured to monitor other services by adding a record to the CXS_Service table. Typically, this is used for a custom interface application.
The Proficy Control Manager allows Administrators to manually intervene with the Proficy Manager "watch dog" service. Please see the Proficy Control Manager section below for more information.

Database Manager

The Database Manager stores all Proficy data in the SQL database connected to it. Usually, it will have a name with the letters "GBDB" or "SOADB" associated with it which is established at the time of the original install. It processes writes and confirmations that the write occurred.

Proficy Router: The Message Bus

The Proficy Server applications are built on an asynchronous messaging protocol based on TCP/IP. The message bus is the central hub that coordinates the movement of data between Proficy Windows Services and guarantees the delivery of data to its destination regardless of the status of individual clients or services. The Message Bus (Router) service acts as the postal service. The Plant Applications Client and Plant Applications Server both send and receive messages. The Database Manager Service handles all database updates. Instead of directly updating the Plant Applications database with SQL Insert and Update statements in a custom Stored Procedure, Result Sets use the Plant Applications Messaging infrastructure to make the database changes and allows the Clients that are currently running to see these database changes in real time. This method of issuing a message is necessary to notify the Client a change has been made to the database.
Port 10000/12280: used by Proficy message router for all Plant Applications messages.
These ports are modified using the INI files (e.g. cmRTR.ini, cmConfigMgr.ini, PlantAppsMessging.ini, Message.ini). The standard location for these files is normally:

You can test to determine if these Ports are Listening by going to the PA Server and Workstations and use CMD prompt to run the command:
netstat -a -n
Next determine if Port 12280 is listening or established and what Foreign IP Address it is established to.


In the case above, there are 12 connections established. These are the 12 Plant Applications windows services sending on Dynamic Ports, also known as the Private or Ephemeral Ports, with a range from 49152-65535 (never assigned) and connecting on port 12280. In actuality, it is services on the same server sending to the router port which will route the message to where it needs to go.

If you turn off one of the Plant Applications services, you will see the established go from 12 connections to 11. Use nslookup and the IP address to determine the DNS name for the foreign server.

Historian Services

The Reader, Writer, Event Manager and Summary Manager services pass information back and forth to the Historian(s). Depending upon the data changes in the Historian, it may trigger actions within Proficy, such as calculations, summaries, etc.

Reader

The Reader retrieves all Time-Based (Historian, Base Variable, Base Unit) data. Every hour, it wakes up and identifies which variables are time-based, and then adds the data to the cache.
The Reader service should be reloaded when time-based variables are updated or added.
The Reader service provides a Summary of data over time.

Writer

The Writer Service stores all data configured for Plant Applications to write to Historian (results of calculations, lab tests, anything required to be sent back).
The Writer service should be reloaded when the Output Tag for variables are changed.

Event Manager

The Event Manager Service watches for different types of data to change, and it creates events based on that data. Events are detected using "Event Models," which describe what data to watch, and how to interpret that data to produce an event. For example, an event model may call for the Event Manager to watch a set of tags in the Historian and to capture when a batch was started or completed, the batch ID, and the product code of the batch.
It also interfaces with foreign systems. (ODBC connections)
The Event Manager Service should be reloaded when new event detection information has been configured. It is very important when reloading to set the reload date to the last day an event was detected before starting up if the system has been down for more than one hour.
In general, it is best to reload as few times as possible because the system may get bogged down for a while during its catch-up phase.

Summary Manager

Retrieves all Event-Based Historian data and produces run summaries based upon the event. It also writes specifications to the Historian through the Writer Service.

Internal Services

Internal Services are those services that perform site-specific logic such as the Calculation Engine, Data Stubber and Alarm/SPC Manager. The logic is manually preconfigured, is specific to the site, and gets triggered by variable or event changes within Proficy.

Calculation Engine

The Calculation Engine Service performs calculations, VB scripts and stored procedures (SQL Calculations) on a time and event basis. A unique feature of Proficy Calculations is dependency, which is the ability to recalculate results or re-trigger events whenever dependent data changes.
The Calculation Engine Service should be reloaded when any calculations are changed or added. It is best to reload the service as few times as possible

Data Stubber

Stubs out (creates new) time-based sheet columns in an Autolog Sheet at a specified time interval. It also stubs out NULL tests for when tests are required on an interval basis (Test Frequency). A NULL test is when the cell turns white (from Default color scheme) to indicate to an Operator that data entry is required. It also replicates Repeating Values, for example, when the last value entered is repeated until an Operator makes a change to that value, and then the new value gets replicated.
The Data Stubber Service should be reloaded when Time-Based Sheets are edited and when Repeating Values on Sampling Intervals are edited.

Alarm/SPC Manager

The Alarm/SPC Manager Service handles alarm transactions and looks for trends of data movement (migration) out of a specified normal range, Statistical Process Control (SPC).

Interface Management Services

Interface Management Services control the interaction of the Proficy Server with the external systems. Interfaces with Proficy may be developed using FTP, ODBC, or by using the Enterprise Adapter SDK (EAS). The EAS provides a method of plugging into the asynchronous messaging of the Proficy Server. It manages data transfer to and from the Proficy Client.

FTP Engine

The FTP Engine Service is configurable to watch specific directories for data transfer. If data exists, it transfers the file to another location. These files are passed to and from FTP servers, using configurable models for performing ftp puts and gets.

Email Manager

The Email Manager Service communicates to and from a MAPI client such as Microsoft Outlook. The service can be used, for example, to send emails to a system administrator for priority alarms or to clients with a Certificate of Analysis attachment when an order is complete. This service must run using an account with an email profile.

Gateway

The Gateway Service manages all information passing between active Proficy Clients and Services. It is the communication linkage between Proficy Clients or EAS Applications to the Proficy Server.

 

AutomaTech Inc.