Application program interface to collect alarm/event data

Abstract
An article of manufacture, method, and system for automatically collecting, formatting, parsing, and transferring data from a distributed control system (DCS) to a diagnosis/analysis program are provided. The article of manufacture embodies an application interface program (API) which, when executed, performs the steps of: automatically collecting, formatting, and parsing process alarms from each DCS node; automatically collecting, formatting, and parsing operator actions from each DCS node using an SQL call; and automatically collecting, formatting, and parsing system monitor messages from each DCS node using an SQL call. The data may be parsed according to the time collection limits between when the API was last run and the current time. In one embodiment, the DCS is Foxboro's I/A DCS®, and the collected data is transferred by FTP for transmission over a network, such as the Internet, to a remote diagnosis/analysis program such as Honeywell's Control Performance Solution™ including Loop Scout™.
Description


FIELD OF THE INVENTION

[0001] The present invention relates generally to computerized methods for collecting and transferring data, and more specifically to an application program interface (API) for automatically collecting, formatting, parsing, and transferring data from a distributed control system (DCS) to a performance diagnosis/analysis program or network.



BACKGROUND OF THE INVENTION

[0002] A distributed control system (DCS) is a type of a process control system (network) that uses dispersed computers (nodes) throughout a manufacturing/process line for control thereof. A DCS is typically capable of collecting various alarm/event data at the dispersed computers. One example of a DCS is Foxboro's I/A DCS® (Intelligent Automation Distributed Control System), which can collect data such as process alarms, operator actions, and system monitor messages recorded at each of the dispersed computer nodes. Process alarms are alarms created by the DCS node reporting upset process conditions, while operator actions are recorded data of input by an operator, and system monitor messages are messages that report the health of each DCS node.


[0003] The collected data, to be useful, needs to be analyzed for use in optimizing the manufacturing/process line. One such means is provided by Honeywell's Control Performance Solution™ (Hi-Spec Solutions @sset.MAX® solutions) including Loop Scout™. Loop Scout™ is a performance diagnosis/analysis solution adapted to aid plant productivity and maintenance efficiency by pinpointing those loops with problems, suggesting improvements, and allowing users to prioritize efforts and allocate resources on a facility-wide basis. Remote performance diagnosis/analysis by Loop Scout™ is available via a secure Internet connection.


[0004] Currently, a user must manually upload data from Foxboro's I/A DCS® to Honeywell's Control Performance Solution™ to be analyzed. Specifically, Foxboro's I/A DCS® allows a user to only manually view/print/save process alarms through a user interface. Thus, the process alarms data must be manually parsed and transferred to Control Performance Solution™, which typically takes 15 minutes per DCS node plus the user's travel time from one DCS node to another. Further, Foxboro provides a Graphic User Interface™ to only manually retrieve/print/save operator actions from an Informix™ database provided at each DCS node. Thus, again, the operator actions data must be manually transferred to Control Performance Solution™, which typically takes 5 minutes per DCS node. Finally, Foxboro provides another utility to only manually retrieve/view/print/save system monitor messages from an Informix™ database at each DCS node. Thus, again, the system monitor messages data must be manually transferred, which typically takes 10 minutes per DCS node. Accordingly, currently, collection and transfer of these various alarm/event data take approximately 30 minutes in total per DCS node. These alarm/event data are typically required to be transferred to a diagnosis/analysis program or network (e.g., Control Performance Solution™) at least several times (2-5 times) per day.


[0005] Several attempts have been made to more efficiently transfer required data from Foxboro's I/A DCS® to Honeywell's Control Performance Solution™. One such attempt was to use Foxboro's pre-built set of application program interface (API) calls (FoxAPI™ calls). These API calls, however, are not reliable in that they cannot retrieve alarm/event data from any Informix™ databases provided in the DCS. Another attempt was made to utilize printer-port-capture software called LogMate™, available from Tips, Inc. The LogMate™ was linked to a serial port of each of the DCS nodes using a terminal server, and each DCS node was configured to send all alarm/event data (not parsed) to the serial port. This option was undesirable, as it would cause excessive network loading.


[0006] Therefore, a need exists for means for automatically collecting, formatting, parsing, and transferring various alarm/event data from a DCS, such as Foxboro's I/A DCS®, to a performance diagnosis/analysis solution or network, such as Honeywell's Control Performance Solution™. Preferably, no user action/intervention is required during such a data collection/transfer process.



SUMMARY OF THE INVENTION

[0007] In order to meet the needs described above, the present invention offers a method and an article of manufacture embodying an application program interface (API) which, when executed by a computer, allows a DCS to automatically collect, format, parse, and transfer data therefrom to a diagnosis/analysis program. The API generally performs three steps: (1) automatically collecting, formatting, and parsing process alarms from each DCS node; (2) automatically collecting, formatting, and parsing operator actions from each DCS node using a Standard Query Language (SQL) call; and (3) automatically collecting, formatting, and parsing system monitor messages from each DCS node using an SQL call.


[0008] According to one aspect of the present invention, the API further performs the step of transferring the collected, formatted, and parsed process alarms, operator actions, and system monitor messages by FTP (File Transfer Protocol) to a network server for transmission over a network, such as the Internet.


[0009] According to another aspect of the present invention, the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set between the time that the API was last run and the current time. In this regard, the API is preferably configured to run periodically according to a predefined schedule. Alternatively, the time collection limits may be set by a user.


[0010] According to a further aspect of the present invention, the DCS comprises Foxboro's I/A DCS® and the diagnosis/analysis program comprises Honeywell's Control Performance Solution™ including Loop Scout™.


[0011] The present invention also offers a system for automatically collecting, formatting, parsing, and transferring data from a DCS to a remote diagnosis/analysis program. The system generally includes three components: (1) a DCS including a plurality of DCS nodes, each DCS node being linked to an API of the present invention as described above; (2) a network over which the collected, formatted, and parsed process alarms, operator actions, and system monitor messages are transferred from the DCS; and (3) a diagnosis/analysis program for receiving the process alarms, operator actions, and system monitor messages from the DCS.


[0012] According to the present invention, various alarm/event data such as process alarms, operator actions, and system monitor messages are automatically collected from various DCS nodes, formatted, parsed, and transmitted to a diagnosis/analysis program for further processing and analysis. No user intervention is required during the data collection/transfer process, and the data collection/transfer may be configured to occur periodically according to a predefined schedule. Therefore, the present invention significantly improves the efficiency of a DCS operation, in particular, its collection and transfer of necessary data to a diagnosis/analysis program to optimize the manufacturing/process line under its control.







BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:


[0014]
FIG. 1 is a diagram illustrating an exemplary hardware environment used to implement an embodiment of the present invention; and


[0015]
FIG. 2 is a flowchart illustrating the steps performed according to an embodiment of an API of the present invention.







DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0016]
FIG. 1 is a diagram illustrating an exemplary hardware environment used to implement an embodiment of the invention. All hardware components in the diagram, including the configuration of various networks included therein, are well known in the art and thus are not described in detail. A process control network 10 consisting of, for example, Foxboro's I/A DCS®, includes one or more computer nodes 12 at dispersed locations. In the illustrated embodiment, each of the dispersed computer nodes 12 is a Foxboro I/A AW 51™ application workstation including Historian™, which is capable of collecting, processing, and storing various alarm/event data in the form of history files. As illustrated, the computer nodes 12 are all coupled to a network server 14, such as a Windows NT® Server, via one or more switches 16. According to one embodiment, an API of the present invention is resident at, and is executed by, each of the computer nodes 12. The API is configured to automatically collect, format, and parse data such as process alarms, operator actions, and system monitor messages recorded at each of the computer nodes 12, and to transfer the collected, formatted, and parsed data to the network server 14. The network server 14 is an FTP server, and thus, the data from the computer nodes 12 is FTP to the network server 14 for transmission over a network. The API's function essentially ends upon uploading the data to the network server 14.


[0017] The data is then to be transmitted to an information technology (IT) network 18, consisting of a router 20, another WindowsNT® server (@sset.MAX® server) 22, and an Internet proxy server 24. In one embodiment, after a Honeywell application called ScoutExpress™ compresses the data (alarm/event files) on the network server 14, the compressed data is transferred via the router 20 to the @sset.MAX® server 22 and then retransmitted via the Internet proxy server 24. The data is then automatically uploaded via the Internet 26 to a remote performance diagnosis/analysis network, such as Honeywell's Control Performance Solution™ including Loop Scout™. Loop Scout™ analyzes the performance of the manufacturing/process line based on the process alarms, operator actions, and system monitor messages data transferred from the process control network 10.


[0018]
FIG. 2 is a flowchart illustrating the logic performed according to one embodiment of the API of the present invention. In block 30, the API is triggered to run from a scheduler of an operating system. In the illustrated embodiment, the Foxboro I/A DCS® is running on a UNIX™ platform, and a scheduler may be a Unix Crontab Scheduler™. In block 32, the API determines when (i.e., date and time) it was last run. In block 34, time collection limits are set so that data is to be collected between the last time the API was run and the current time. In block 36, an alarm history stored in each Foxboro DCS node, such as Foxboro I/A AW51 (Historian)™ operator/engineering terminal, is copied to a temporary alarm history file. At this time, the entire alarm history from each DCS node (Historian™) is copied, without any time collection limits, which could include up to 80,000 characters (5,000 alarms lines long). In block 38, the temporary alarm history file is formatted from a rotational file (see Table 1 below, for example) to a fixed column file (see Table 2 below, for example). (The sample temporary alarm history includes all process alarms registered since May 11, 18:37:34. Table 2 shows fewer entries than Table 1 due to space limitations.)
1TABLE 1RAW ROTATIONAL ALARM HISTORY DATA (WRAPPED TO FIT WINDOW)KNOTTER ACCEPTS TANK LEVEL 0HIABS 05-11 18:37:34 47.78% (50.00) LEVEL HIGH RTNBS1_THICK:38LT063B.S THI 0HIABS 05-11 18:38:54 79.07% (82.00) LEVEL HIGH RTNBS1_SCREEN:38LIC012 KNOTTER ACCEPTSTANK LEVEL 2HIABS (50.00) LEVEL HIGH ALMBS1_THICK:38LT063 B.S THICKENER LEVEL 1HIABS 05-1118:39:42 82.79% (82 ALMBS1 SCREEN:38LIC012 KNOTTER ACCEPTS TANK LEVEL 0HIABS 05-11 18:39:5548.00% (50.00) LEVEL HIGH RTNBL1_ 5% SULPHURIC ACID SYSTEM 0STATE 05-11 18:40:05 Pnt 00RTNBS1_SCREEN:38L1C012 KNOTTER 2HIABS 05-11 18:40:06 50.39% (50.00) LEVEL HIGHALMBS1_THICK:38LT063 B.S THICKENER LEVEL 0HIABS (82.00) LEVEL HIGH RTNBS1_WASH:38FIC115B.S TO SCREENING FLOW 2LOABS 05-11 18:41:31 −116.84 LPM (4800 ALMBS1_WASH:38FIC115 B.S TOSCREENING FLOW 1ENABLE 05-11 18:41:31 ALARM MESSAGES ENABLED LOABS BS1_ B.S TO SCREENING FLOW0LOABS 05-11 18:41:36 5904.03 LPM (4800.00) FLOW LOW RTNBS1_THICK:38LT063 B.S THI 1HTABS 05-1118:41:54 83.00% (82.00) LEVEL HIGH ALMBS1_THICK:38LIC065 B.S THICKENER SEALTANK LEVEL 2LOABS(40.00) LEVEL LOW ALMPLC40_1MISC:HD_TK_LVL HD STORAGE TK LEVEL/PLC 5LOABS 05-11 18:42:10 24.99%(25 ALMBS1_THICK:38L1C065 B.S THICKENER SEALTANK LEVEL 0LOABS 05-11 18:43:08 42.33%(40.00) LEVEL LOW RTNPLC4 HD STORAGE TK LEVEL/PLC 0LOABS 05-11 18:43:15 25.03% (25.00)RTNPLC40_1MISC:HD_TK_LVL HD STOR 5LOABS 05-11 18:43:20 24.95% (25.00)ALMBS1_THICK:38CIT076 4HIABS US/CM (1500.00) CONDUCTIVITY HIGH ALMBS1_THICK:38LT063 B.STHICKENER LEVEL 0HIABS 05-11 18:45:32 79.40% RTNBS1_SCREEN:38LIC012 KNOTTER ACCEPTS TANKLEVEL 0HIABS 05-11 18:46:36 47.93% (50.00) LEVEL HIGH RTNPLC4 HD STORAGE TK LEVEL/PLC0LOABS 05-11 18:47:14 25.03% (25.00) RTNBS1_THICK:38CIT076 0HIABS 05-11 18:58:53 1247.07 US/CM(1500.00) CONDUCTIVITY HIGH RTNPLC40_1ALARM:PULP_MC_BRK.PULP DE BREA PULP MACH DRY END SHT BRK1>BRK 2STATE BREAK Pnt 00 ALMBL1_T10:40LIC001 B.S H.D SURGE TANK LEVEL 0LOABS 05-11 19:35:0222.02% (20.00) LEV RTNBS1_THICK:38LT063 B.S THICKENER LEVEL 1HIABS 05-11 19:55:27 82.07%(82.00) LEVEL HIGH ALMBS1_ B.S THICKENER LEVEL 0HIABS 05-11 19:59:16 79.85% (82.00) LEVELHIGH RTNBL1_CLNR2:40FIC305 SEC. CL 4LOABS 05-11 20:14:59 739.10 LPM (800.00) FLOW LOWALMBL1_CLNR2:40FIC305


[0019]

2





TABLE 2








FORMATTED ALARM FILE BEFORE DATE PARSING
























BS1_SCREEN:38LIC012
KNOTTER ACCEPTS
TANK LEVEL
0HIABS
05-11
18:37:34
47.78%
(50.00)
LEVEL HIGH
RTN


BS1_THICK:38LT063
B.S THICKENER
LEVEL
0HIABS
05-11
18:38:54
79.07%
(82.00)
LEVEL HIGH
RTN


BS1_SCREEN:38LIC012
KNOTTER ACCEPTS
TANK LEVEL
2HIABS
05-11
18:39:09
50.59%
(50.00)
LEVEL HIGH
ALM


BS1_THICK:38LT063
B.S THICKENER
LEVEL
1HIABS
05-11
18:39:42
82.79%
(82.00)
LEVEL HIGH
ALM


BS1_SCREEN:38LIC012
KNOTTER ACCEPTS
TANK LEVEL
0HIABS
05-11
18:39:55
48.00%
(50.00)
LEVEL HIGH
RTN


BL1_CHEM:170FAL0066.














SYSTEM STATU
5% SULPHURIC ACID SYSTEM
0STATE
05-11
18:40:05
Pnt 00 PEN
















BS1_SCREEN:38LIC012
KNOTTER ACCEPTS
TANK LEVEL
2HIABS
05-11
18:40:06
50.39%
(50.00)
LEVEL HIGH
ALM


BS1_THICK:38LT063
B.S THICKENER
LEVEL
0HIABS
05-11
18:40:16
77.74%
(82.00)
LEVEL HIGH
RTN















BS1_WASH:38FIC115
B.S TO SCREENING
FLOW
2LOABS
05-11
18:41:31 −116.84
(4800.00)
FLOW LOW
ALM







    LPM













BS1_WASH:38FIC115
B.S TO SCREENING
FLOW
1ENABLE
05-11
18:41:31
ALARM MESSAGES ENABLED LOABS















BS1_WASH:38FIC115
B.S TO SCREENING
FLOW
0LOABS
05-11
18:41:36 5904.03
(4800.00)
FLOW LOW
RTN







    LPM
















BS1_THICK:38LT063
B.S THICKENER
LEVEL
1HIABS
05-11
18:41:54
83.00%
(82.00)
LEVEL HIGH
ALM















BS1_THICK:38LIC065
B.S THICKENER SEALTANK LEVEL
2LOABS
05-11
18:41:54
39.86%
(40.00)
LEVEL LOW
ALM


PLC40_1MISC:HD_TK
HD STORAGE TK LEVEL/PLC
5LOABS
05-11
18:42:10
24.99%
(25.00)

ALM


LVL


BS1_THICK:38L1C065
B.S THICKENER SEALTANK LEVEL
0LOABS
05-11
18:43:08
42.33%
(40.00)
LEVEL LOW
RTN


PLC40_1MISC:HD_TK
HD STORAGE TK LEVEL/PLC
0LOABS
05-11
18:43:15
25.03%
(25.00)

RTN


LVL


PLC40_1MISC:HD_TK
HD STORAGE TK LEVEL/PLC
5LOABS
05-11
18:43:20
24.95%
(25.00)

ALM


LVL













BS1_THICK:38CIT076
4HIABS
05-11
18:45:121929.00
(1500.00)
CONDUC-
ALM





US/CM

TIVITY







HIGH
















BS1_THICK:38LT063
B.S THICKENER
LEVEL
0HIABS
05-11
18:45:32
79.40%
(82.00)
LEVEL HIGH
RTN


BS1_SCREEN:38LIC012
KNOTTER ACCEPTS
TANK LEVEL
0HIABS
05-11
18:46:36
47.93%
(50.00)
LEVEL HIGH
RTN















PLC40_1MISC:HD_TK
HD STORAGE TK LEVEL/PLC
0LOABS
05-11
18:47:14
25.03%
(25.00)

RTN


LVL













BS1_THICK:38CIT076
0HIABS
05-11
18:58:531247.07
(1500.00)
CONDUC-
RTN





US/CM

TIVITY







HIGH










[0020] In block 40, the formatted temporary alarm history file is then parsed to include only such data as that which falls within the time collection limits set in block 34 above (i.e., from the last time the API was run to the current time). Next, in block 42, the parsed and formatted alarm history file is saved to a data directory with a file name that contains the hostname (i.e., from which DCS node the alarm history is obtained) and timestamp (i.e., the time at which the parsed and formatted alarm history file is saved to the data directory). Table 3 below shows a sample parsed and formatted alarm history file saved to a data directory. In Table 3, the data is parsed to include only the process alarms registered on May 23 between 7:12:36 and 7:44:33, i.e., the last time the API was run and the current time, according to the illustrated embodiment. Although it is preferred that the API does not require any user action during data collection/transfer, the API may be written so as to permit a user intervention to set arbitrary time collection limits, different from the last time the API was run to the current time, if desired.
3TABLE 3ALARM HISTORY FILE AFTER DATE PARSINGBS1_THICK:38LT063B.S THICKENERLEVEL1HIABS05-2307:12:3682.06%(82.00)LEVEL HIGHALMBS1_WASH:38FIC115B.S TO SCREENINGFLOW1DISABL05-2307:12:43ALARM MESSAGES INHIBITEDBS1_THICK:38LT063B.S THICKENERLEVEL0HIABS05-2307:12:5479.98%(82.00)LEVEL HIGHRTNBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL2LOABS05-2307:16:4139.84%(40.00)LEVEL LOWALMBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL0LOABS05-2307:16:5742.07%(40.00)LEVEL LOWRTNBS1_SCREEN:38LIC012KNOTTER ACCEPTSTANK LEVEL2HIABS05-2307:26:3150.08%(50.00)LEVEL HIGHALMBS1_SCREEN:38LIC049PRI SCREENS REJTANK LEVEL2HIABS05-2307:27:0965.14%(65.00)LEVEL HIGHALMBS1_SCREEN:38LIC050SEC SCREENS REJTANK LEVEL2HIABS05-2307:36:4065.02%(65.00)LEVEL HIGHALMBS1_THICK:38LT063B.S THICKENERLEVEL1HIABS05-2307:37:0682.44%(82.00)LEVEL HIGHALMBS1_THICK:38LT063B.S THICKENERLEVEL0HIABS05-2307:37:3678.27%(82.00)LEVEL HIGHRTNBS1_SCREEN:38LIC012KNOTTER ACCEPTSTANK LEVEL0HIABS05-2307:38:0647.40%(50.00)LEVEL HIGHRTNBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL2HIABS05-2307:38:1590.53%(90.00)LEVEL HIGHALMBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL0HIABS05-2307:41:5187.97%(90.00)LEVEL HIGHRTNBS1_WASH:38FIC115B.S TO SCREENINGFLOW2LOABS05-2307:41:52 396.16(4800.00)FLOW LOWALM    LPMBS1_WASH:38FIC115B.S TO SCREENINGFLOW1ENABLE05-2307:41:52ALARM MESSAGES ENABLED LOABSBS1_WASH:38FIC115B.S TO SCREENINGFLOW0LOABS05-2307:42:02 5570.44(4800.00)FLOW LOWRTN    LPMBS1_WASH:38FIC115B.S TO SCREENINGFLOW2LOABS05-2307:42:48 4593.18(4800.00)FLOW LOWALM    LPMBS1_WASH:38FIC115B.S TO SCREENING FLOW1DISABL05-2307:42:51ALARM MESSAGES INHIBITED LOABSBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL2HIABS05-2307:42:5890.36%(90.00)LEVEL HIGHALMBS1_THICK:38LT063B.S THICKENERLEVEL1HIABS05-2307:43:1484.05%(82.00)LEVEL HIGHALMBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL0HIABS05-2307:43:2087.84%(90.00)LEVEL HIGHRTNBS1_THICK:38LT063B.S THICKENERLEVEL0HIABS05-2307:43:3276.66%(82.00)LEVEL HIGHRTNBS1_THICK:38LIC065B.S THICKENER SEALTANK LEVEL2HIABS05-2307:43:3790.04%(90.00)LEVEL HIGHALMBS1_WASH:38FIC115B.S TO SCREENINGFLOW2LOABS05-2307:44:33 34.93(4800.00)FLOW LOWALM    LPMBS1_WASH:38FIC115B.S TO SCREENINGFLOW1ENABLE05-2307:44:33ALARM MESSAGES ENABLED LOABS


[0021] In block 44, operator actions are collected using Informix™ SQL calls. As briefly discussed above, the operator actions are stored in a Foxboro Historian™, which is in accordance with an Informix™ relational database management system and thus can be readily accessed using the American National Standards Institute (ANSI) SQL. In block 44, the data is also parsed to include only the operator actions that fall within the time collection limits set in block 34 above. In block 46, the parsed operator actions are saved in a data directory with a file name that contains the hostname and timestamp. Table 4 below shows a sample operator actions file saved to a data directory.
4TABLE 4FORMATTED OPERATOR ACTIONSINFORMIX-SQL Version 4.20.UclCopyright (C) Informix Software, Inc., 1984-19962002-05-2307:11:1640DMO5SCNPLC40N10_2IN_8Resetto Set2002-05-2307:11:2140DMO5SCNPLC40N10_2IN_8Setto Reset2002-05-2307:11:2240DMO5BS1_SCREEN238FIC088MAManualto Auto2002-05-2307:11:2840DMO5BS1_SCREEN238PIC035OUT0.0000to 85.002002-05-2307:11:3340DMO5BS1_SCREEN38FIC037OUT0.0000to 50.002002-05-2307:11:3540DMO5BS1_SCREEN38FIC037MAManualto Auto2002-05-2307:11:4740DMO5BS1_SCREEN238PIC035OUT85.00to 90.002002-05-2307:11:5940DMO5BS1_SCREEN238FIC088MAAutoto Manual2002-05-2307:12:0440DMO5BS1_SCREEN238FIC088OUT5.3524to 50.002002-05-2307:12:0540DMO5BS1_SCREEN238FIC088MAManualto Auto2002-05-2307:12:3140DMO5BS1_SCREEN238PIC030OUT85.00to 0.00002002-05-2307:12:4140WP05SCNPLC40N10_0IN_5Setto Reset2002-05-2307:12:4640WP05SCNPLC40N10_0IN_5Resetto Set2002-05-2307:12:5140WP05SCNPLC40N10_0IN_10Resetto Set2002-05-2307:12:5640WP05SCNPLC40N10_0IN_10Setto Reset2002-05-2307:12:5840WP05BS1 SCREEN38PIC013OUT80.00to 75.002002-05-2307:13:0040WP05BS1_SCREEN38PIC013OUT75.00to 70.002002-05-2307:13:0140WP05BS1_SCREEN38PIC013OUT70.00to 65.002002-05-2307:13:0540WP05BS1_SCREEN38PIC013OUT65.00to 60.002002-05-2307:13:2240DM05BS1_THICK38SIC053MAAutoto Manual2002-05-2307:13:2240DM05BS1_THICK38SIC053LRRemoteto Local


[0022] In block 48, system monitor messages are collected also by using Informix SQL calls. Again, the data is parsed to include only the system monitor messages that fall within the time collection limits set in block 34 above. In block 50, the parsed system monitor messages are saved in a data directory with a file name that contains the hostname and timestamp. Table 5 below shows a sample system monitor messages file saved to a data directory.
5TABLE 5FORMATTED SYSTEM MESSAGESINFORMIX-SQL Version 4.20.UClCopyright (C) Informix Software, Inc., 1984-19962002-05-2308:16:15SYSMON = MON331CP3312Fault Tolerant ExecSM_MSG -00047 Fault Tolerant Prim Module Now Single.ROM Addr 00006C0744272002-05-2308:16:15SYSMON = MON331CP3312Error ProtocolFTXSS 000090 Modules failed to sync up prior to mem to mem00006C0744302002-05-2308:16:16SYSMON = MON331CP3312Error ProtocolFTXSS 000090 Modules failed to sync up prior to mem to mem00006C0744302002-05-2308:17:36SYSMON = MON331CP3312Software ManagerSYSMON -00003 Powerup reboot OK. ROM Addr = 00006C0744302002-05-2308:17:39SYSMON = MON331CP3312Fault Tolerant ExecSM_MSG -00046 Fault Tolerant Modules Now Married2002-05-2311:28:09SYSMON = MON331CP3312StationSYSMON -00045 Equipment failure acknowledged2002-05-2323:39:03SYSMON = MON331CP3312Fault Tolerant ExecSM MSG -00047 Fault Tolerant Prim Module Now Single.ROM Addr 00006C0744272002-05-2323:39:04SYSMON = MON331CP3312Error ProtocolFTXSS 000090 Modules failed to sync up prior to mem to mem00006C0744302002-05-2323:39:04SYSMON = MON331CP3312Error ProtocolFTXSS 000090 Modules failed to sync up prior to mem to mem00006C0744302002-05-2323:40:24SYSMON = MON331CP3312Software ManagerSYSMON -00003 Powerup reboot ON. ROM Addr = 00006C0744302002-05-2323:40:29SYSMON = MON331CP3312Fault Tolerant ExecSM MSG -00046 Fault Tolerant Modules Now Married


[0023] In block 52, the current date and time are recorded, to be used the next time the API is run. (See block 32 above.) In block 54, all the temporary files created are deleted. In block 56, the three collection files generated and saved by the API containing parsed process alarms, operator actions, and system monitor messages, respectively, are FTP to a WindowsNT® server (14 in FIG. 1). Finally, in block 58, the API deletes any collection file that is older than a predetermined time period, for example 7 days, from the corresponding data directory. Preferably, though, all the collection files are not deleted from the WindowsNT® server 14 to be archived.


[0024] Accordingly, an API of the present invention provides a convenient way of automatically collecting, formatting, parsing, and transferring various alarm/event data including process alarms, operator actions, and system monitor messages from a DCS to a performance diagnosis/analysis program or network.



EXAMPLE

[0025] The following lists four sets of sample code adapted for automatically collecting, formatting, parsing, and transferring data from Foxboro's I/A DCS® to Honeywell's Control Performance Solution™ including Loop Scout™. The first set of code, Setup File (setup_pas), converts three temporary directory files for storing process alarms (pas_collect.tmp), operator actions (oaj.tmp), and system monitor messages (sys.tmp), respectively, to permanent directory files. The second set of code, Operator Action SQL Call (oaj.ace), is an SQL call for collecting, parsing, and formatting operator actions from each DCS node. The third set of code, System Monitor Message SQL Call (sys.ace), is another SQL call for collecting, parsing, and formatting system monitor messages from each DCS node. Finally, the fourth set of code, Main Data Collector Code (pas_collect), embodies an API for performing the steps illustrated in the flowchart of FIG. 1. Basic UNIX™ operating system commands are used in the API of the present embodiment to format and parse data in an alarm history file. Also, the API embodied in Main Data Collector Code (pas_collect) utilizes the permanent directory files created by Setup File (setup_pas) and includes calls to Operator Action SQL Call (oaj.ace) and System Monitor Message SQL Call (sys.ace).
6Setup File (setup_pas)#!/bin/sh##File Name: setup_pas#INFORMIXDIR=/opt/informixDBPATH=/opt/informix/binHOMEDIR=′pwd′export INFORMIXDIR DBPATH HOMEDIR#aplbug=′cat /etc/aplbug′hist=′cat /etc/histlocs | grep $aplbug | cut -c1-6′#mkdir $HOMEDIR/dataset -e ′ s#HOMEDIRSETUP# ′ $HOMEDIR ′ # ′ -e ′ s/APLBUG/ ′ $aplbug ′ / ′$HOMEDIR/pas_collect.tmp > $HOMEDIR/pas_collectsed -e ′s/historian/′$hist′/′ -e ′s/APLBUG/′$aplbug′/′ $HOMEDIR/oaj.tmp > $HOMEDIR/oaj.acesed -e ′s/historian/′$hist′/′ -e ′s/APLBUG/′$aplbug′/′ $HOMEDIR/sys.tmp > $HOMEDIR/sys.ace$DBPATH/saceprep $HOMEDIR/oaj$DBPATH/saceprep $HOMEDIR/syschmod 777 $HOMEDIR/pas_collect#echo ′″01-01 00:00:00″    ALM′ > $HOMEDIR/pas_collect.datecho ′″2002-01-01 00:00:00″    OAJ′ >> $HOMEDIR/pas_collect.dat#rm $HOMEDIR/oaj.tmp $HOMEDIR/sys.tmp $HOMEDIR/pas_collect.tmp#echo ″Setup Complete″Operator Action SQL Call (oaj.ace){File Name: oaj.aceCreated for APLBUG}databasehistorianenddefineparam[1] area char(20){Workstation LBUG}param[2] start char(20){Start Time yyyy-mm-dd}param[3] finish char(20){Finish Time yyyy-mm-dd}endoutputpage length 15000endselect *from operationwheretime_tag[1,20] >= $start{time-tag is yyyy-mm-dd hh:mm:ss}and time_tag[1,20] <= $finish{time_tag is yyyy-mm-dd hh:mm:ss}and station LIKE $areaorder by time_tag{sort result}endformaton every rowprint time_tag, station, compound, block, parm, descriptionendSystem Monitor Message SQL Call (sys.ace){File Name: sys.aceCreated for APLBUG}databasehistorianenddefineparam[1] start char(20){Start Time yyyy-mm-dd HH:MM:SS}param[2] finish char(20){Finish Time yyyy-mm-dd HH:MM:SS}endoutputpage length 15000endselect *from sysmonmsgwheretime_tag[1,20) >= $start{time_tag is yyyy-mm-dd hh:mm:ss}and time_tag[1,20] <= $finish{time_tag is yyyy-mm-dd hh:mm:ss}order by time_tag{Sort result}endformaton every rowprint time_tag, msg_name, smon_name, station, src_name, textendMain Data Collector Code (pas_collect)#!/bin/sh##File Name: pas_collect##Created for APLBUG##INFORMIXDIR=/opt/informixDBPATH=/opt/informix/binHOMEDIR=HOMEDIRSETUPexport INFORMIXDIR DBPATH HOMEDIR#station=′APLBUG′stamp=′date ′+%y%m%d%H%M%S′′username=′USER′# Change USER to Honeywell LoopScout usernameftp_serv=′hostftp′# Change to FTP Server name in /etc/hostsnt_dir=′/pas′# Change to directory name on FTP Serverlast_OAJ=′cat $HOMEDIR/pas_collect.dat | grep OAJ | cut -c0-21′last_ALM=′cat $HOMEDIR/pas_collect.dat | grep ALM | cut -c0-16′current_OAJ= ′″′′date ′+20%y-%m-%d %H:%M:$S′′′″′current_ALM= ′″′′date ′+%m-%d %H:%M:%S′′′″′echo ″Data collection from $last_OAJ to $current_OAJ″## Copy alarm history file to a temp almhist.tmp file#cp /usr/hstorian/almhist $HOMEDIR/almhist.tmp## Format almhist file from rotational to readable#cut -c161-800160 $HOMEDIR/almhist.tmp | fold -160 > $HOMEDIR/alarms.tmpecho ″awk ′substr(\$0,81,14) > $last_ALM && substr(\$0,81,14) < $current_ALM {print  $0}′$HOMEDIR/alarms.tmp″ > $HOMEDIR/script.tmpchmod 777 $HOMEDIR/script.tmp$HOMEDIR/script.tmp > $HOMEDIR/data/″$username″_″$station″_″$stamp″_0.fox## Gather OAJ information from Informix SQL database and format data#echo ″$DBPATH/sacego $HOMEDIR/oaj.ace % $last_OAJ $current_OAJ″ > $HOMEDIR/script.tmpchmod 777 $HOMEDIR/script.tmp$HOMEDIR/script.tmp > $HOMEDIR/data/″$username″_″$station″_″$stamp″_2.fox## Gather SYSMONMSG information from Informix SQL database and format data#echo ″$DBPATH/sacego $HOMEDIR/sys.ace $last_OAJ $current_OAJ″ > $HOMEDIR/script.tmpchmod 777 $HOMEDIR/script.tmp$HOMEDIR/script.tmp > $HOMEDIR/data/″$username″_″$station″_″$stamp″_4.fox## Remove all tmp files created#rm $HOMEDIR/almhist.tmp $HOMEDIR/alarms.tmp $HOMEDIR/script.tmp## Modify fox_collect.dat file to indicate last time data collected#echo ″Scurrent_ALM\tALM″ > $HOMEDIR/pas_collect.datecho ″$current_OAJ\tOAJ″ >> $HOMEDIR/pas_collect.dat## FTP data files from AW/AP to Windows NT#ftp ″$ftp_serv″ <<!EOFpromptcd ″$nt_dir″lcd ″$HOMEDIR″/datamput ″$username″_″$station″_″$stamp″*bye!EOF# Remove any data files older than 7 days#find $HOMEDIR/data/ -mtime +7 -exec rm { } \;#echo ″Operation Finished″#


[0026] While the preferred embodiments of the invention have been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the invention. For example, other types and configurations of computers, computer programs, and networks may be used, as will be apparent to those skilled in the art.


Claims
  • 1. An article of manufacture embodying an application program interface (API) that is executed by a computer, wherein the API allows a distributed control system (DCS) to collect and transfer data therefrom to a diagnosis/analysis program by performing the steps of: automatically collecting, formatting, and parsing process alarms from each DCS node; automatically collecting, formatting, and parsing operator actions from each DCS node using an SQL call; and automatically collecting, formatting, and parsing system monitor messages from each DCS node using an SQL call.
  • 2. The article of claim 1, wherein the API further performs the step of transferring the collected and parsed process alarms, operator actions, and system monitor messages by FTP for transmission over a network.
  • 3. The article of claim 1, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set between the time that the API was last run and the current time.
  • 4. The article of claim 1, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set by a user.
  • 5. The article of claim 1, wherein the DCS comprises Foxboro's I/A DCS.
  • 6. The article of claim 1, wherein the diagnosis/analysis program comprises Honeywell's Control Performance Solution.
  • 7. The article of claim 1, wherein the API is configured to run periodically according to a predefined schedule.
  • 8. A method for automatically collecting and transferring data from a distributed control system (DCS) to a diagnosis/analysis program, comprising the steps of: automatically collecting, formatting, and parsing process alarms from each DCS node; automatically collecting, formatting, and parsing operator actions from each DCS node using an SQL call; and automatically collecting, formatting, and parsing system monitor messages from each DCS node using an SQL call.
  • 9. The method of claim 8, further performing the step of transferring the collected and parsed process alarms, operator actions, and system monitor messages by FTP for transmission over a network.
  • 10. The method of claim 8, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set between the time that the last data collection occurred and the current time.
  • 11. The method of claim 8, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set by a user.
  • 12. The method of claim 8, wherein the DCS comprises Foxboro's I/A DCS.
  • 13. The method of claim 8, wherein the diagnosis/analysis program comprises Honeywell's Control Performance Solution.
  • 14. A system for automatically collecting and transferring data from a distributed control system (DCS) to a remote diagnosis/analysis program, comprising: (a) a DCS including a plurality of DCS nodes, each DCS node being linked to an application program interface (API) that is executed by the DCS node, wherein the API performs the steps of: (i) automatically collecting, formatting, and parsing process alarms from each DCS node; (ii) automatically collecting, formatting, and parsing operator actions from each DCS node using an SQL call; and (iii) automatically collecting, formatting, and parsing system monitor messages from each node using an SQL call; (b) a network over which the collected and parsed process alarms, operator actions, and system monitor messages are transferred from the DCS; and (c) a diagnosis/analysis program for receiving the process alarms, operator actions, and system monitor messages from the DCS.
  • 15. The system of claim 14, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set between the time that the API was last run and the current time.
  • 16. The system of claim 14, wherein the process alarms, operator actions, and system monitor messages are parsed according to time collection limits that are set by a user.
  • 17. The system of claim 14, wherein the DCS comprises Foxboro's I/A DCS.
  • 18. The system of claim 14, wherein the network comprises the Internet.
  • 19. The system of claim 14, wherein the diagnosis/analysis program comprises Honeywell's Control Performance Solution.
  • 20. The system of claim 14, wherein the API is configured to run periodically according to a predefined schedule.