Technical Bulletin Issue Date March 12, 2004 N1 Trend Collector for MVE N1 Trend Collector for MVE..................................................................3 Key Concepts...................................................................................................... 4 N1 Trend Collector ............................................................................................................ 4 Data Collection Configurations.......................................................................................... 4 N1 Trend Collector Specifications..................................................................................... 6 Metasys Remote Server (MRS) ........................................................................................ 7 USER_APP File Destination ............................................................................................. 8 Metasys Point History Reports .......................................................................................... 8 Fast Scan .......................................................................................................................... 9 Point Status....................................................................................................................... 9 Metasys Trend Reports ................................................................................................... 10 N1 Trend Collector Application Window.......................................................................... 11 Historian Node Monitoring............................................................................................... 14 Database Management System (DBMS) Offline Buffering ............................................. 17 Missing Trend Sample and Report Reduction ................................................................ 18 ODBC.............................................................................................................................. 21 Related Information......................................................................................................... 21 Detailed Procedures......................................................................................... 22 Configuring a Trend Collection........................................................................................ 22 Enabling Trend Collection for Metasys N1 Objects......................................................... 26 Displaying the N1 Trend Collector Application Window .................................................. 26 Defining the USER_APP File Destination ....................................................................... 26 Defining Analog Data (AD) Points and Binary Data (BD) Points for Historian Node Monitoring ....................................................................................................................... 27 Enabling Offline Node Detection ..................................................................................... 27 Disabling Offline Node Detection .................................................................................... 28 Defining N1 Trend Collection as a Windows Service...................................................... 28 Troubleshooting ............................................................................................... 31 © 2004 Johnson Controls, Inc. Code No. LIT-1201706 www.johnsoncontrols.com Software Release 5.3.1 2 N1 Trend Collector for MVE Technical Bulletin Troubleshooting the Historian Node Monitor................................................................... 31 Trend Sample Bandwidth in Fast Scan Mode ................................................................. 31 Fast Scan Configuration.................................................................................................. 33 Verifying the Operation of the Metasys Remote Server .................................................. 34 Error Codes..................................................................................................................... 34 Special Error Codes ........................................................................................................ 36 Data Collection Troubleshooting ..................................................................................... 36 Troubleshooting the Windows Registry Entries .............................................................. 37 N1 Trend Collector for MVE Technical Bulletin N1 Trend Collector for MVE N1 Trend Collector for Metasys system for Validated Environments (MVE) retrieves historical data from the Metasys® N1 network subsystem through the Metasys Remote Server (MRS). As the N1 Trend Collector receives data from the Metasys system, it stores the data in an FX Historian database. M-Trend is used to view the stored data. This document describes the N1 Trend Collector and how to: • configure a trend collection • enable trend collection for Metasys N1 objects • display the N1 Trend Collector application window • define the USER_APP file destination • define Analog Data (AD) points and Binary Data (BD) points for Historian node monitoring • enable offline node detection • disable offline node detection • define N1 Trend Collection as a Windows® Service 3 4 N1 Trend Collector for MVE Technical Bulletin Key Concepts N1 Trend Collector The N1 Trend Collector interfaces with the Metasys N1 network to receive trend and point history data. N1 Trend Collector stores its configuration information into user files, referred to as trend collection definitions (*.tcd files). The collected data is stored in the installed FX Historian databases. The N1 Trend Collector resides on the data center client collector machine. The N1 Trend Collector collects data from the Metasys Network via a connection to the MRS. The connection between the N1 Trend Collector and the MRS can be local or remote. A local connection means the N1 Trend Collector and the MRS are located on the same computer. A remote connection means the collector and server are located on different computers on an Ethernet-based network. N1 Trend Collector receives Trend and/or Point History reports from the MRS, using the USER_APP file definition feature (Figure 1). For information, see Data Collection Configurations in this document. Metasys Trend /Point History Reports via USER_APP Trend/Point History Reports Metasys Remote Server N1 Trend Collector Trend Samples via ODBC M-Trend SQL Database N1 Trend Collect Flow Trend Samples Figure 1: N1 Trend Collector Flow Data Collection Configurations Figure 2 illustrates the two data collection configurations. Table 1 lists the considerations of the two configurations. Note: Microsoft® Message Queuing (sometimes called MSMQ or Message Queuing) is used to support the local buffering of data when the database is offline. You need to install Message Queuing on the computer running N1 Trend Collector. For more details, see Database Management System (DBMS) Offline Buffering. N1 Trend Collector for MVE Technical Bulletin 5 Beginning with Release 5.3.1, you can now run N1 Trend Collector as a Windows Service. See Defining N1 Trend Collection as a Windows Service. Collector - N1 Trend Collector - Message Queuing - SQL Write API Workstation - PMI/MRS NCM SQL Database N1 Trend Collector Running as an Windows Service with a remote MRS NCM SQL Database N1 Trend Collector Running as an Application with a local MRS mrs_configs Collector - N1 Trend Collector - Message Queuing - SQL Write API - PMI/MRS Figure 2: Configuration Diagrams Table 1: Configuration Comparisons Configuration Considerations N1 Trend Collector Running as a Windows Service with a remote MRS The N1 Trend Collector can run as a service without a user being logged in to the Workstation. You can specify multiple MRS connections to provide fail over support if one of the MRS connections becomes unavailable. The computer with the N1 Trend Collector must be on a network connected to all computers running an MRS. The MRS cannot run on the computer with the N1 Trend Collector running as a service. N1 Trend Collector Running as an Application with a local MRS The MRS and the N1 Trend Collector are on the same computer. The user must be logged in for the application to operate. 6 N1 Trend Collector for MVE Technical Bulletin N1 Trend Collector Specifications See Table 2 for N1 Trend Collector specifications. Table 2: N1 Trend Collector Specifications Feature Limits Details Default Value Trend and Point History* Maximum Number of Simultaneous Metasys Reports 2000 2000 (Set when MVE is installed.) Fast Scan Minimum Points 1 100 Maximum Points 5000 100 Minimum Scan Rate 20 seconds 60 Maximum Scan Rate 1200 seconds 60 Minimum Number of Samples 0 (When 0, the display is effectively disabled.) 500 Maximum Number of Samples 5000 500 Display * See Trend Buffer Size. Trend Buffer Size When you are planning to trend more than 2,000 Metasys points, consider the trend buffer sizes carefully. There is a high probability that the Trend Collector will be forced to continually request the trend and point history data from the Network Controllers (NCs). This adds to the Metasys network and NC loads, and effectively introduces unnecessary inefficiency into the Metasys system. When trending more than 2,000 points collected at the same interval (for example, 1 minute trends), we recommend that you stagger the size of the trend buffers, which reduces the chance of having more than 2,000 simultaneous reports. NC 1 … set trend buffer sizes to 23. NC 2 … set trend buffer sizes to 29. NC 3 … set trend buffer sizes to 37. Prime numbers NC 4 … set trend buffer sizes to 43. Figure 3: Example Showing 4 NCs with 800 Points Each You can further minimize the chance of simultaneous data transmissions to the N1 Trend Collector by using Prime numbers for each NC. N1 Trend Collector for MVE Technical Bulletin 7 Note: The Metasys system reports the trend data to the collector when the buffer is 80% full or when 60 samples are available. Buffer sizes above 59 are more likely to result in the data being sent from more than one NC at the same time. Therefore, if you are concerned about the 2,000 simultaneous report limit, specify buffer sizes to fewer than 60. Metasys Remote Server (MRS) The MRS is a Metasys system communication interface that is being provided with Person-Machine Interface (PMI) software to the Metasys system. The MRS forwards information from the PMI report destination USER_APP to the N1 Trend Collector. The N1 Trend Collector stores that information in an FX Historian database. The MRS receives Trend and Point History reports from the Metasys system using the USER_APP reports definition. USER_APP is a special file report destination that applications may use to receive report data. To receive all Metasys trend data from all Metasys Report Groups, define a file destination with the name USER_APP. You must define this file destination for the Trend or History category under the required report access groups on the PMI to which the N1 Trend collector is connected. (The choice between Trend and History file destination depends on your requirements.) Multiple MRS Nodes The N1 Trend Collector now allows you to define a list of Metasys Remote Server fail-over nodes. The list of MRS Nodes improves the reliability of data collection by providing reports to the N1 Trend Collector as long as at least one MRS node is online. The N1 Trend Collector automatically switches to the next available MRS node when the currently connected node goes offline, reducing the possibility of missing reports. You can define multiple MRS nodes when first setting up the collection as well as after the collection is set up. To define multiple MRS nodes during setup, specify the nodes in the Connect dialog box. Beside the Primary node IP address field is the Node List button. When you press this button, the MRS Node List dialog box appears (Figure 11). Within the MRS Node List dialog box, you can add, edit, and remove Internet Protocol (IP) addresses. You can also reorder the addresses in the list. If you initially typed in an IP address in the Primary node IP address field of the Connect dialog box, that particular address is the first one displayed in the list. When creating a new collection, the first node in the list (that is, the primary node) must be online to proceed to the next step of the definition. 8 N1 Trend Collector for MVE Technical Bulletin You can also define multiple MRS nodes once a collection is defined and running. On the Edit menu, select MRS Node List. The MRS Node List dialog box (Figure 11) appears allowing you to edit the MRS node list. Once the collector is running and connected to an MRS node, the node list has an asterisk (*) beside the node that the collector is currently connected to (this is the active node). You cannot edit or remove the active node, but you can edit and remove other nodes in the list. If the collector switches to a different node while you are editing the list, the active node in the list automatically updates. When a node goes offline, the collector automatically looks for the next available node. If all nodes in the list are offline, the collector tries to connect to all nodes every 20 seconds. If, while all nodes are offline, you add a new node to the list, the collector immediately scans the list again without waiting for the next 20-second interval. USER_APP File Destination The Metasys system uses the USER_APP file destination to enable the routing of reports to client applications. MRS clients include N1 OPC Server and N1 Trend Collector. You must configure these custom clients (USER_APP). For more information on configuring the USER_APP file destination, see the Defining the USER_APP File Destination section later in this document. Metasys Point History Reports The Metasys Point History reports store samples of the VALUE attribute for all monitored points every 30 minutes and whenever a point’s status changes. Only the attributes compatible with the database are stored with each sample (for example, date, time, status, and value). If you set the Enable Point History flag to Y, the NCM is instructed to take a sample of the object whenever a change of state occurs on attributes such as alarm state, override state, and online/offline state. (Refer to the Point History Technical Bulletin (LIT-636112) for a full list). In addition, all Analog Input (AI), Accumulator (ACM), and Analog Data (AD) objects take additional samples every 30 minutes. By default, samples created from Metasys Point History reports are stored using the same Tag Name as the one used for the VALUE attribute of trend samples. If required, samples created from Metasys Point History reports can be stored using a different Tag Name from the Metasys Trend samples. Metasys Point History samples can be stored under the Tag Name network.system.object#PHValue, if required. N1 Trend Collector for MVE Technical Bulletin 9 Fast Scan Fast Scan mode collects analog point data at more frequent intervals than the standard 30-minute interval for Point History reports. If Fast Scan mode is enabled, it is activated whenever a point goes into a non-normal state (Override, Warning, Alarm, and so on). When an analog Point History report is triggered and received, the N1 Trend Collector checks to see if it has gone into alarm. If it is in Warning or Alarm, the point is put into Fast Scan mode. In Fast Scan mode, the point is sampled at a user-configurable interval. This interval is set during configuration of the N1 Trend Collector. Each read value creates a sample and stores it in the M-Historian database. Note: The time stamp used for each sample is the N1 Trend Collector’s local clock synchronized to the server’s clock on the Metasys system. To minimize the impact on performance, the points in Fast Scan mode are kept in a Fast Scan list. The number of points serviced in this list is limited by the user-configurable maximum. The default maximum value is 100. This value can be modified in the Options dialog box of the N1 Trend Collector. If the value is 100, the Fast Scan algorithm generates reports for the first 100 points in alarm. Any point beyond 100 is in a wait-state. When a point from the first 100 is removed from Fast Scan mode, all points numbered higher than the removed point are moved up by the N1 Trend Collector. This feature allows you to control the impact on performance by decreasing the number of serviced points in Fast Scan mode, if necessary. Boolean point type objects (such as light switches) are not fast scanned, since their values toggle between two states. If one value causes the object to go into alarm, then Point History reports are automatically generated. Configure Fast Scan through the N1 Trend Collector configuration options. Fast Scan samples appear in the N1 Trend Collector view as FastScan in the Report Type column. Point Status The N1 Trend Collector can store the status of each Point History sample received from the Metasys system. The Metasys Point History Status is a numeric value ranging from 0 to 6; see Table 3. The value currently being reported is stored in the database using a Tag Name with the format network.system.object#PHStatus. 10 N1 Trend Collector for MVE Technical Bulletin Table 3: Metasys Point Status Status Description 0 Normal 1 Trouble 2 Alarm (Binary) 3 Low Warning 4 Low Alarm 5 High Warning 6 High Alarm Metasys Trend Reports If more frequent sampling is required than Metasys Point History reports can provide, use the Metasys Trend feature. Samples created from Metasys Trend reports are stored with the Tag Name format, network.system.object#attrname. You may specify the interval at which reports are collected from the N1 network subsystem. Metasys Trend reports also can deliver information on any numerical attribute of the monitored points. For example, if the N1 Trend Collector monitored a programmable thermostat, the Metasys Trend report could include the VALUE attribute (the value of the temperature it is currently sensing), and the SET_POINT attribute (the value at which the thermostat is set). This allows building operators to monitor whether the thermostat’s SET_POINT is changing as it is programmed, or if it is being manually reset. N1 Trend Collector for MVE Technical Bulletin 11 N1 Trend Collector Application Window The application window shows the status of the connection and the most recent samples received from the Metasys system. The Collection Viewer has a fixed size that is defined in the N1 Trend Collector Configuration Options dialog box (Figure 12). The default value is 500. The view is treated as a circular buffer, which means that when the last line is filled, the N1 Trend Collector begins displaying the most recent reports at the top. The next line to be replaced is marked with an underscore in the Number column. Once the N1 Trend Collector has demonstrated it is functioning correctly, you can set the sample value to zero. The fewer entries that appear in the application window, the less impact the application window can have on computer performance. Note: If a Trend report contains more than one sample, only the first sample from the report appears in the application window. Figure 4: N1 Trend Collector Application Window 12 N1 Trend Collector for MVE Technical Bulletin Table 4: N1 Trend Collector Application Window Menu Items Menu Item Option Description File Exit* Terminates the Trend Collector application and stops data collection. Edit Options Displays the N1 Trend Collector Configuration Options screen. See the Configuring a Trend Collection section of this document for more information. View Status Bar When checked, displays Windows status bar. Statistics Displays performance-related data. The information appears in a dialog box and also is written to the N1 Trend Collector’s log file when the application is manually terminated or the system is shut down. About Trend Collector Displays N1 Trend Collector information, including version number. Help * If you are running the N1 Trend Collector as a service, the Exit menu option does not stop the collection. The Exit menu option only closes the collection view; the collection still runs. Table 5: N1 Trend Collector Application Window Fields Field Description Number The number of the sample entry in the order it was received since the trend was started Report Type The type of sample, Trend or Point Date The date that the sample was received Time Time sample was taken Tag Name Full Tag Name, representing an object attribute in the system Reliable Sample reliable, Y or N (Yes or No) Value Value of sample Type Analog or binary Write-Status Database Write Status 0 = OK -1 = Not selected for storage Any other value indicates an error. See Table 13. Write Time Time in milliseconds it took to store the sample 30-70 ms average Write Time N1 Trend Collector for MVE Technical Bulletin 13 Statistics Window The Statistics window (Figure 5) allows you to view the statistics of the configured collection. The statistics are also logged in the N1 Trend Collector log file when the collection is terminated or when the statistics are manually cleared using the Clear button in the Statistics window. See Table 6 for the fields and descriptions within the N1 Trend Collector Statistics window. Table 6: N1 Trend Collector Statistics Field Description Database Write Indicates the number of milliseconds it takes the N1 Trend Collector to write a single sample into the database. Min is the shortest amount of time (fastest) to write a sample to the database. Max is the maximum time (slowest) to write a sample to the database. Avg is the average time. Total Samples indicates the total number of actual samples stored in the database since the time the collector was started or since the last time the statistics window was cleared. Read Attribute Indicates the minimum, maximum, and average time in milliseconds it takes to service a read attribute request. The N1 Trend Collector processes a single read attribute for each point in Fast Scan. Total Samples indicates the total number of Fast Scans performed by the N1 Trend Collector. Read and Write Attribute Indicates the minimum, maximum, and average time it takes to perform a read attribute and to write the data into the database. The values for this entry are always equal to, or greater than, the values for Read Attribute. Total Samples indicates the total number of Fast Scans performed by the N1 Trend Collector and should be equal to the number shown for the Read Attribute statistic. Fast Scan Cycle This statistic is not used. The entry always reads N/A. Reports Indicates the minimum, maximum, and average time it takes to process a Trend or Point History report received from the Metasys system. The values are always greater than, or equal to, the Database Write statistic. Total Samples indicates the number of reports received. Figure 5: N1 Trend Collector Statistics Window 14 N1 Trend Collector for MVE Technical Bulletin System Tray Icon An icon appears in the Windows System Tray once the trend collection session is configured and running. When the cursor is held over the icon (Figure 6), N1 Trend Collector and the name of the session appear. Figure 6: N1 Trend Collector System Tray Icon Right-click on the icon to display the options listed in Table 7. Table 7: N1 Trend Collector Icon Shortcut Menu Options Option Description Collection Viewer Displays Trend Collector application window. Edit Options Displays N1 Trend Collector Configuration Options dialog box (Figure 12). Used to change Trend Collector configuration options. See the Configuring a Trend Collection section in this document for more information. View Statistics Displays performance related data. The information appears in a dialog box and also is dumped to the trend collector’s log file when the program is manually terminated or the system is shut down. About Displays N1 Trend Collector information, including version number. Terminate* Terminates the Trend Collector session. A dialog box appears to confirm the termination. * If you are running the N1 Trend Collector as a service, the Terminate menu option does not stop the collection. The Terminate menu option only closes the collection view; the collection still runs. Historian Node Monitoring The Historian Node stores all the Metasys Point History data. This optional feature allows the Metasys system to detect trouble with the Historian node (an offline condition or problems with database Write operations) and the communication links between the network controller level that is generating historical data and the N1 Trend Collector. N1 Trend Collector for MVE Technical Bulletin 15 Define all Node Monitor points on a single Network Control Module (NCM) within the Metasys Network. The points are divided into two different functional components: watchdog functionality and error handling functionality. A sample Data Definition Language (DDL) file is located in the M-Data\N1 Trend Collector subdirectory. The file contains all the required point definitions. You can modify the system and object names, if required; however we recommend that you use the default names. Modify the Network Controller (NC) to contain these points. Specify two points, one AD and one BD, in the Configuration Options of the N1 Trend Collector. The default names in configuration options match those in the sample DDL definitions. If monitoring a single node with a single trend collector, use the default object names supplied in the DDL. However, you must define additional sets of points (one for each node or collection) to monitor additional nodes or collections. The best method for defining an additional set of points is to copy the default set and rename the System name. Note: If a new Node monitor feature (M5 5.1A or later) is installed on top of older versions of the Node monitor feature, make sure the old node monitor JC-BASIC process (datahist.bas) is deleted from the archive Operator Workstation (OWS) and Historian Node Monitor NC. Online/Offline Node Detection via Watchdog One set of points is responsible for monitoring the online/offline status of the N1 Trend Collector. Define one BD point (HISTAT2) in the Configuration Options dialog box. Watchdog functionality was implemented using a Multiple Command Object (WATCH_TC) and two BD points (HISTAT and HISTAT2) for monitoring the online status. Once per minute, the N1 Trend Collector writes a watchdog value (0) to the HISTAT2 BD object. If the collector is unable to write the value within a minute and a half, an offline condition is triggered. The Multiple Command Object (MCO) has an adjustable default value of one and a half minutes. The delay may need to be lengthened on some projects. The HISTAT object generates a Metasys Critical Alarm value of OFFLIN or ONLINE when an offline or online condition is triggered. Figure 7 details the watchdog functionality. 16 N1 Trend Collector for MVE Technical Bulletin WATCH_TC (MC) Associated input = HISTSTAT.2VALUE *see the slave commands below HISTAT2 (BD) State 0 = N1TC State 1 = WAIT HISTSTAT (BD) State 0 = OFFLINE State 1 = ONLINE 1/minute N1TC sends a command to HISTAT2 (BD) On Alarm (state0) Output Crit1 On Normal (state1) Output Crit4 Watchdog N1TC Task (N1Trendcollector.exe) Figure 7: Historian Node Monitoring–DBMS Watchdog Under normal conditions the N1TC task writes a 0 (Normal) to the HISTAT2 (BD) point approximately once per minute. This status then triggers the WATCH_TC (MC) object to send commands to the HISTSTAT and HISTAT2 objects. When the WATCH_TC object sees the signal from the N1TC, it forces the HISTAT2 point back into the wait state which in turn triggers the WATCH_TC to command HISTSTAT to OFFLINE (after a 1 1/2 minute delay). If the N1TC fails to write to HISTAT2 point within the next 1 1/2 minutes (adjustable in WATCH_TC), the previous command timer expires and a 0 is sent to the HISTSTAT (BD) point, which has an output of CRIT1. CRIT1 indicates the OFFLINE state to the operator. A return to Normal has an output of a CRIT4 message. Table 8 lists the slave commands for the WATCH_TC (MC) point. Table 8: WATCH_TC (MC) Point Slave Commands Scenario Slave Command Comments If state = 0 (N1TC) then: HISTSTAT Set_BD, 1, 3 Put the HISTSTAT point to ONLINE (NORMAL) state. If state = 1 (WAIT) then: HISTAT2 Set_BD, 1, 3 Put the HISTAT2 point to WAIT state. HISTSTAT Set_BD, 0, 3 w/Delay Put the HISTSTAT point to OFFLINE (ALARM) state after 00:01:30* * This only occurs if the N1TC cannot get back to write a 0 within the 1 1/2 minute time frame. N1 Trend Collector for MVE Technical Bulletin 17 Database Management System (DBMS) Offline Buffering In order for the N1 Trend Collector to buffer reports while the FX Historian DBMS is offline, you must ensure that the Message Queuing (MSMQ) component is installed on the computer. To install the component, launch Add or Remove Programs from the Control Panel. Click the Add/Remove Windows Components icon. Select Message Queuing Services option (Figure 8) and accept the default responses to complete the installation. Note: You may need the Operating System (OS) installation disks to complete the Message Queuing Services installation. Note: effect. You need to restart the computer for the changes to take Figure 8: Message Queuing Services On start up, the N1 Trend Collector automatically detects and uses the MSMQ component to store samples in the situation where the DBMS is offline. You can verity that MSMQ is operational by examining the status bar of the collector’s window. The letters MSMQ appear in one of the panels if the feature is enabled. The N1 Trend Collector log file (N1TrendCollector(name of collection).log) also has an entry that indicates that the feature is enabled or disabled. For example, when enabled, a line appears with the text “MSMQ feature is enabled” (Figure 9). 18 N1 Trend Collector for MVE Technical Bulletin Figure 9: N1TrendCollector(name of collection).log Example While the DBMS is online, the N1 Trend Collector stores the data directly into the database. However, as soon as the collector detects a DBMS offline condition, the N1 Trend Collector automatically stores all incoming samples into a local buffer on disk using MSMQ. The collector attempts to store the oldest buffered sample into the DBMS once per minute. You can see this attempt by looking in the collector’s window. The collector repeats the display of the same report with an error value of 1008 (DBMS offline condition). While the DBMS is offline, the collector buffers all incoming samples. Once an online condition is detected, the collector automatically starts saving all buffered samples into the database. When the trend collection shuts down, the collector inspects the buffer. If the buffer is empty, the collector automatically removes it from the system. The buffer is re-created when the collector is started up again. If the buffer is not empty, its contents are retained on the hard disk. When the collector is restarted, it automatically re-opens the same buffer. As soon as the database comes back online, all of the reports in the buffer are automatically saved into the database. Each collection defined on the computer has its own independent buffer. If you wish to remove a defined collection from the computer, make sure that the DBMS is online. When the DBMS is online, all samples have been flushed out of the MSMQ buffer and saved into the database. If you manually terminate the collection, the collector removes the empty buffer from the system. You can verify that the buffer is gone by checking for an entry in the N1 Trend Collector log file that says, “Removed empty report queue successfully.” Missing Trend Sample and Report Reduction Three features in the N1 Trend Collector reduce the number and occurrence of missing trend samples and reports. These features are missing trend sample detection, trend report anticipation, and point history data retrieval. The missing trend sample detection and the trend report anticipation features are automatic. The point history data retrieval feature is optional. N1 Trend Collector for MVE Technical Bulletin 19 Missed Trend Sample Detection The Missed Trend Sample Detection feature gives the N1 Trend Collector the ability to detect missed trend samples. If it detects missed samples, the collector automatically initiates a request for all previous samples that still exist in the NCM. Note: This feature is not used for any tag that only has a single sample in a report. If the buffer size is 1 in the NCM for a particular tag, this feature is not used for that tag. Method of Detection The collector keeps track of the last two received trend reports for each tag. By examining each trend report, the N1 Trend Collector can determine the sample interval defined at the NCM. When a new report is received, the collector examines the sample interval of that report. If the interval is different from the previously received report, the difference is noted. If the interval is the same, the collector then examines the time difference between the latest sample of the previous report to the oldest sample of the latest report. If the time difference is not the same as the sample interval, the difference is noted. Missed Trend Data Retrieval If a sample interval difference was noted (by the detection method), the collector initiates a trend data request. The date of the latest sample in the previously received report is used as the begin time range value. The date of the oldest sample in the latest report is used as the end time range value. When the corresponding response is received, the collector filters out the samples that have the same timestamps as the begin/end time range values used in the request. The remaining samples are saved to the database. Frequency of Data Requests As long as the sample interval remains the same in each trend report and between each pair of trend reports for a tag, the N1 Trend Collector never makes a trend data request. Trend Report Anticipation Using the last received trend report, the collector determines when the next report should arrive. If the next report does not arrive in time, the collector initiates a trend data request for all samples that still exist in the NCM between the time of the last received sample (in the last trend report) and the present time. 20 N1 Trend Collector for MVE Technical Bulletin This feature is particularly important in retrieving samples from the NCM before they are overwritten with newly recorded samples and has a better chance of retrieving the older samples than the Missed Trend Sample Detection feature. Note: This feature is not used for any tag that only has a single sample in a report. In other words, if the buffer size is 1 in the NCM for a particular tag, this feature is not used for that tag. Method of Detection The collector uses the sample interval and the number of samples in the last received report to determine when the next report should arrive. The expected time is calculated and stored as part of the data the collector keeps for each tag. The expected report time for a tag is recalculated each time a report for the tag is received. A single timer is used for detecting a missed report of the tag with the earliest set time. The expected report time of a tag is reset each time a report is received. Frequency of Data Requests As long as a trend report is received on time for a tag, the N1 Trend Collector never makes a trend data request. If all MRS nodes are offline, the collector automatically initiates a trend data read request for all past-due reports as soon as the next MRS node connection is established. Point History Data Retrieval To reduce the chance of missing point history samples, the N1 Trend Collector issues a request for point history samples after every point history report that it receives. It only requests those samples that may have been generated between the time of the previous point history sample and the time of the current point history report that was just received. The only exception is the case where a previous point history report was not received. In that case, the collector does not issue another request for that point. You can enable or disable this feature using the N1 Trend Collector Options dialog box (Figure 12). The option is called Scan for previous samples, and is located in the Point History Report Processing section. Note: All Trend and Point History data requests are placed in a local queue, which is managed by the N1 Trend Collector. Only one request is sent to the N1 network at a time. A subsequent request is only sent after a response for the previous request is received. This technique is the same as that used for the Fast Scan feature, and significantly reduces the demand on the N1 network. N1 Trend Collector for MVE Technical Bulletin 21 ODBC ODBC is an acronym that stands for Open Database Connectivity. The ODBC Application Programming Interface (API) allows client applications to store and retrieve data using a standardized interface. Client and server applications may be installed on different computers and may use different operating systems. Related Information Using M-Historian in the M5 Workstation requires setting up several pieces of software to work together. For information on the software and tasks involved, see the documents listed in Table 9. Table 9: N1 Trend Collector Related Information For Information On Refer To Installing M5 Workstation M5 Workstation Installation Technical Bulletin (LIT-1153300) Enabling Metasys Point History Archive and Defining Report Destinations Operator Workstation User’s Manual Viewing Trend Data M-Trend User’s Manual 22 N1 Trend Collector for MVE Technical Bulletin Detailed Procedures Configuring a Trend Collection To configure a trend collection: 1. Verify the MRS is running, either locally, or remotely. Note: See Verifying the Operation of the Metasys Remote Server in the Troubleshooting section for additional information. Note: M-Password control is available for controlling access to the configuration of the N1 Trend Collector. Users may be restricted from creating new definitions and from making modifications to existing definitions. This prevents unauthorized users from terminating a collection. The N1 Trend Collector generates an event log when creating a new collection or modifying an existing collection. 2. From the Windows Start menu, select Programs > Johnson Controls > N1 Trend Collector. The N1 Trend Collector Setup screen (Figure 10) appears. Figure 10: N1 Trend Collector Setup Screen 3. Select the Local option to connect to a local MRS. To connect to a remote MRS, select the Remote option, and specify an IP address and port number. See Table 10. N1 Trend Collector for MVE Technical Bulletin 23 Table 10: N1 Trend Collector Setup Fields Field Description Connection Name Name of the file where configuration options are stored. This name must contain valid file name characters and describe where the MRS is located. The name is not restricted to eight characters and may contain spaces. If you are defining more than one trend collection on the same computer, you must use a different name for each connection (for example, OWS1). Run as service Allows the N1 Trend Collector to run as a Windows Service. See Data Collection Configurations for more information. IP Address IP number of remote machine. The IP address is not required when connecting locally. Node List Allows you to edit the MRS node list. Metasys Remote Server Location Option for either local or remote location. A local connection means the N1 Trend Collector and the Metasys Remote Server are located on the same computer. A remote connection means the N1 Trend Collector and Metasys Remote Server are located on different computers on an Ethernet-based network. The port number is predefined. In most situations, the default TCP/IP port number (24688) should remain. Only change this number if a conflict exists with another application that is using the same port number. If it is necessary to change this number, you must first change the port number within the Metasys Remote Server. To do this, modify or add the following parameter to the [METAHOST] section of the METAHOST.INI file: MetahostPort=nnnnn Where nnnnn is a TCP/IP port number. Once this is done, proceed with the N1 Trend Collector setup and enter the same port number in this dialog box. Port Number Figure 11: MRS Node List Dialog Box 24 N1 Trend Collector for MVE Technical Bulletin 4. Click Connect. If the connection is not successful, a message appears and the N1 Trend Collector Setup dialog box reappears. If this happens, verify the MRS is running on the computer to which you are connecting and you have entered the correct IP address. The N1 Trend Collector queries the MRS for a list of all Metasys Network names. When a response is received, the N1 Trend Collector Configuration Options screen appears (Figure 12). Note: To verify if MRS is running, check the Windows Task Manager for Metasrvr. If Metasrvr is not present in the Task List, restart the M5 Workstation. Figure 12: N1 Trend Collector Configuration Options Dialog Box 5. Enter the required configuration options. See Table 11 for detailed field descriptions. Select the Metasys Networks from which you wish to receive reports. For storage of the trend samples, you must select one of the available Historian Server databases, either Microsoft Access or AspenTech® InfoPlus.21® Historian. Select the appropriate database by selecting the associated ODBC Data Source. Choose the Data Source Name (DSN) that you entered during installation. The TrendSample DSN is a sample database and should not be selected for storing samples. Click OK. The N1 Trend Collector dialog box appears. N1 Trend Collector for MVE Technical Bulletin 25 Table 11: N1 Trend Collector Configuration Options Fields Field Description Metasys Network(s) Lists names of all Metasys Networks accessible by the MRS. Typically this list includes the name of an N1 network but may also list NC Direct and PC Dial network names. Time Zone Indicates the time zone of the Metasys Network. Data storage location Determines type of trend information storage. Specify the ODBC DSN that you specified during installation. Do not select the TrendSample DSN. Collection Viewer Determines maximum number of samples to display in the collector window. Trend Report Processing Enables and disables collection of trend reports from the Metasys system for storage in Historian database. Does not affect Metasys trend collection. This feature can be disabled when you only want Point History. Point History Report Processing Enables storing point’s value attribute and status change. Default Point History Tag format is network.system.object#attrname. Enable Point History reporting in the Metasys system. Use trend tag name When selected, the Point History Tag Name is network.system.object#Value. When not selected, the Point History Tag Name is network.system.object#PHValue. This feature allows you to store Point History and Trend data separately by using two different Tag Names. Store Status (separate tag) Enables storing the status of each Point history sample received from the Metasys system. The Metasys Point History Status is a numeric value: 0 = Normal 4 = Low Alarm 1 = Trouble 5 = High Warning 2 = Alarm (Binary) 6 = High Alarm 3 = Low Warning This Tag format is network.system.object#PHStatus. Scan for previous samples Enables the automatic Point History Data Retrieval feature. See Point History Data Retrieval. Fast Scan Enables Fast Scan mode. When a point goes into alarm, the point is sampled at an interval defined in this dialog box while the point is in alarm. Each read value is a sample used for creating a sample in the database. The points in Fast Scan mode are kept in a Fast Scan list with a maximum number of points defined in this dialog box. See Table 2 for details about settings for the Fast Scan mode. Interval (in seconds) Indicates the time interval between point samples in seconds. Maximum # points in scan Indicates the maximum number of points allowed in a scan. History Mode Monitor Check box Enables node monitor feature for trend collection. This feature enables alarms when data is not stored in a M-Historian database. See the Historian Node Monitoring section for more information. Metasys Network Metasys N1 network name where historian node monitor objects are created System Name Metasys N1 system name where Historian node monitor objects are created AD Object Name AD Object name created for Historian node monitoring BD Object Name BD Object name created for Historian node monitoring 6. Click OK. Once the trend collection is configured and running, the trend collector icon (Figure 6) appears in the Windows System Tray on the taskbar. 26 N1 Trend Collector for MVE Technical Bulletin Enabling Trend Collection for Metasys N1 Objects To enable trend collection for Metasys objects, verify the following: • If the Metasys Trend feature for trend data collection is used, make sure the Trend is defined and started for desired attributes (most likely VALUE) of each object. • If using the Metasys Point History feature, ensure that Point History Archive is enabled for each object. • Make sure that the USER_APP file destination is defined on the system to which the N1 Trend Collector is connected. The USER_APP file destination must be defined for each desired Access Report Group and Report Type (Trend and/or Point History). • Verify that the N1 Trend Collector is running, configured, and connected to the system containing MRS. Upon connection, the N1 Trend Collector shows Connected in the status line of the window. Displaying the N1 Trend Collector Application Window To display the N1 Trend Collector application window: 1. On the System Tray, right-click the N1 Trend Collector icon. 2. Select Collection Viewer to open the N1 Trend Collector application window (Figure 4). The fields are described in Table 5. Defining the USER_APP File Destination Note: For applications to receive Metasys reports, you must define the Personal Computer (PC) file destination called USER_APP. Johnson Controls® products are not shipped with this destination predefined. For additional information, refer to the Operator Workstation User’s Manual. To define the USER_APP file destination: 1. From the Metasys Setup menu, choose Report/Access Group. The Report/Access Group summary appears. 2. Double-click the Report/Access Group assigned to the system from which you want the N1 Trend Collector to receive reports. The Report Access Group window appears. Note: If you want to configure hardware objects for data collection, assign USER_APP to Report/Access Group 1. 3. From the Action menu, click Add Destination. The Add Destination dialog box appears. N1 Trend Collector for MVE Technical Bulletin 27 4. For Destination Type, click PC File. For Destination, select the name of the OWS running the MRS used by the N1 Trend Collector. 5. In the File Name field, type USER_APP. 6. Under Report Type, select the Trend and/or History check box. This instructs the Metasys system to send all data to the MRS. 7. Click OK to accept the new destination file. 8. Click Save from the Item menu to save the new destination file. 9. Perform a Global Upload to save the changes to the archive global database. After completing these steps, all data from this system is sent to the MRS. Defining Analog Data (AD) Points and Binary Data (BD) Points for Historian Node Monitoring To define AD and BD points for Historian node monitoring: 1. Edit the supplied DDL to define the AD and BD points. 2. Include the edited DDL into the required NCM DDL file. Note: The supplied DDL (HistStat.ddl) is copied to the target disk when the M5 Workstation is installed and is stored in the M-Data\N1 Trend Collector subdirectory. Enabling Offline Node Detection To enable offline node detection: 1. From the Windows Start menu, choose Programs > Johnson Controls > N1 Trend Collector. The N1 Trend Collector Application window appears. 2. From the Edit menu, choose Options. The N1 Trend Collector displays the Configuration Options dialog box (Figure 12). 3. Check the Enabled check box in the Historian Node Monitoring frame. 4. Click OK. You must ensure that the names of the AD and BD points are identical in all the steps listed above. 28 N1 Trend Collector for MVE Technical Bulletin Disabling Offline Node Detection To disable offline node detection: 1. Double-click on the N1 Trend Collector icon in the system tray. The N1 Trend Collector Application window appears (Figure 4). 2. From the Edit menu, choose Options. The N1 Trend Collector displays the Configuration Options dialog box (Figure 12). 3. Uncheck the Enabled check box in the Historian Node Monitor frame. 4. Click OK. Defining N1 Trend Collection as a Windows Service To define N1 Trend Collection as a Windows Service: 1. On the Start menu, select Programs > Johnson Controls > N1 Trend Collector. The N1 Trend Collector Setup dialog box appears (Figure 10). 2. Select the Run as service check box. 3. Select the IP Address of the computer running the MRS. Note: The Local option is automatically disabled when running the N1 Trend Collector as a service. 4. Complete the remaining fields according to Table 10 and click Connect. 5. After a successful connection, enter remaining options in the N1 Trend Collector Configuration Options dialog box (Figure 12). See Table 11. Note: You can verify that N1 Trend Collector is running as a service by opening the Services window. On the Start menu, click Settings > Control Panel. Double-click Administrative tools and double-click Services. The Services window appears. Verify that N1 Trend Collector is in the Name column (Figure 13). N1 Trend Collector for MVE Technical Bulletin 29 N1 Trend Collector running as a Service Figure 13: Windows Services Configuring the N1 Trend Collector Windows Service The benefit of having the N1 Trend Collector run as a service is that it can be configured (by default) to automatically start when the Operating System (OS) starts whether a user is logged in or not. Also, you can configure the service to be more resistant to failure by having the OS restart the service in the event of a failure (Figure 14). You can set different actions for the first, second and any subsequent failures. By default, the OS takes no action in the event of a failure. Minimally, you should configure the service to restart in the event of a failure. To configure the N1 Trend Collector Windows Service: 1. On the Start menu, click Settings > Control Panel. Double-click Administrative tools and double-click Services. The Services window appears (Figure 13). 2. Right-click N1 Trend Collector and select Properties from the pop-up menu. The N1 Trend Collector Properties (Local Computer) dialog box appears (Figure 14). 3. Click the Recovery Tab and set the fields in the dialog box according to Table 12 and click OK. 30 N1 Trend Collector for MVE Technical Bulletin Table 12: Service Properties Field Recommendation First failure Restart the Service. Second failure Restart the Service. Subsequent failures Restart the Service. Reset fail count after 1 day Reset service after 1 minute Run file - Figure 14: N1 Trend Collector Properties (Local Computer) Dialog Box – Recovery Tab N1 Trend Collector for MVE Technical Bulletin 31 Troubleshooting Troubleshooting the Historian Node Monitor If the Offline Critical Alarm is received from the Watchdog process, one or more of the following error conditions may have occurred. Check for these conditions, in the listed order: 1. The N1 Trend Collector is not currently running. (The N1 Trend Collector icon should appear in the Windows System Tray.) 2. The Historian Node Monitor feature is not enabled within the collector. (Check the N1 Trend Collector Configuration Options dialog box.) 3. The M-Series Workstation/Metasys system to which the N1 Trend Collector is connected is not currently running. 4. The Metasys system is running, but the MRS is not running or has problems communicating with the Metasys system. Check the Metasys errorlog.txt file. 5. The physical Ethernet network between the N1 Trend Collector and the Metasys system has been interrupted. 6. The Metasys N1 network is not functioning between the MRS and the NCM running the Historian Node Monitoring. Trend Sample Bandwidth in Fast Scan Mode When the N1 Trend Collector enters Fast Scan mode, the number of samples that can be received and stored is estimated to be approximately 6.5 points per second. (This figure is influenced by the speed of the slowest Ethernet network connection conveying the samples to the N1 Trend Collector, the clock speed of the computer, and the speed of the hard disk storing the samples.) Examples 1. To calculate the number of points that may be processed within a specified time, use the following formula: maximum points = 6.5 x number of seconds To calculate the number of points that can be processed in ten minutes, use the formula in this manner: maximum points = 6.5 x 600 maximum points = 3900 32 N1 Trend Collector for MVE Technical Bulletin 2. To calculate the time required to process a specified number of points, use the following formula: time required = number of points / 6.5 To calculate the time required to process 5000 points, use the formula in this manner: time required = 5000 / 6.5 time required = 770 seconds (rounded up) time required = 12.9 minutes (rounded up) Note: These formulas are based upon laboratory testing and are intended to be representative of real-world performance. Actual performance may vary. Actual Performance Benchmarks Every time the N1 Trend Collector is shut down, performance statistics are stored in the log file. After collecting data for approximately one week, the N1 Trend Collector should supply enough useful information to calculate its actual performance. Note: If you delete the log file while the N1 Trend Collector is working, the N1 Trend Collector log file does not rebuild. You must shut down and restart all N1 Trend Collector sessions in the start-up group. Since the log file is designed to maintain the maximum size, there is no need to delete the log file. The N1 Trend Collector’s performance statistics are stored in the file N1TrendCollector.log. This file is stored (by default) in the following location: C:\Documents and Settings\All Users\Application Data\Johnson Controls\M-Data\N1 Trend Collector. In N1TrendCollector.log there is a parameter called Read and Write Attribute. This parameter contains four values: Minimum, Maximum, Average, and Total Samples. The Read and Write Attribute: Avg figure can be used to calculate the actual performance benchmark. See Figure 15. N1 Trend Collector for MVE Technical Bulletin 33 The Read and Write Attribute: Avg statistic is measured in milliseconds. Use the following formula to obtain the number of samples per second: benchmark = 1000 / Read and Write Attribute:Avg This number is the actual performance benchmark (average) measured in samples per second. To calculate the actual performance benchmark, use the formula in this manner: benchmark = 1000 / Read and Write Attribute:Avg benchmark = 1000 / 154 benchmark = 6.5 (rounded up) Debug Log opened.... Connected to Metasys Remote Server on Local Disconnected from Metasys Remote Server on Local OEM Historian Write Time (ms/sample): N/A MS-Access Write(ms/sample):Min:0, Max:80, Avg:14, Total:1143 Read Attribute (ms/attr): Min:20, Max:7912, Avg:61, Total:689 Read and Write Attribute (ms/attr): Min:30, Max:7922, Avg:154, Total Samples:689 Fast Scan Cycle (ms/obj):N/A Reports (ms/rec): Min:10, Max:100, Avg:21, Total Samples:454 Debug Log closed.... Figure 15: N1TrendCollector.log Sample Performance statistics for the current N1 Trend Collection session can be viewed at any time by choosing View > Statistics from the N1 Trend Collector Application Window (Figure 4). Note: Log file is designed as circular file to not exceed 5,000 lines in size (when reaches maximum size, N1 Trend Collector deletes lines from the top). If the log file is deleted while the N1 Trend Collector is running, shut down and restart the N1 Trend Collector to create the new log file. Fast Scan Configuration Fast Scan may be configured to scan as many as 5,000 points (maximum) every 20 seconds (minimum). Using the calculation in Example 2 above, scanning 5,000 points requires approximately 770 seconds (12.92 minutes). In this case, N1 Trend Collector initiates the first scan of 5,000 points; wait until it has processed all 5,000, (12.9 minutes), wait the specified interval of 20 seconds, and then repeat the process until conditions dictate that Fast Scan mode is disabled. 34 N1 Trend Collector for MVE Technical Bulletin Verifying the Operation of the Metasys Remote Server To verify the operation of the Metasys Remote Server: Check the Processes tab of the Windows Task Manager for a process called Metahost. Figure 16: Processes Tab of Windows Task Manager Error Codes Table 13 lists all the error codes that can be generated when the N1 Trend Collector is writing to database. All the Numeric Value error codes are a negative number. Prior to writing the value to the primary AD point in the Metasys system (DataStat), the error code is changed to a positive number (* -1), and then offset by 100 (+100). For example: an error code of -4 is stored as 104 in DataStat. However, the true (negative) error codes are stored in the N1 Trend Collector error log file without being converted. N1 Trend Collector for MVE Technical Bulletin 35 Table 13: Write Error Codes Internal Symbol Numeric Value As Positive Value Description JCI_NO_ERRORS JCI_NAME_ALL_BLANK 0 -1 0 101 JCI_NAME_TOO_LONG JCI_ASCII2XTS_FAILED JCI_WHIS21DAT_FAILED JCI_INISETC_FAILED JCI_NAME_ALREADY_EXISTS JCI_HISTORIAN_FULL JCI_BAD_COPY_NAME -2 -3 -4 -5 -6 -7 -8 102 103 104 105 106 107 108 JCI_COPY_FAILED -9 109 JCI_NAME_NOT_EXIST JCI_ENG_UNITS_FAILED JCI_TIMEZONE_FAILED JCI_HISTORIAN_UNAVAIL JCI_HIST_NO_CONNECT -10 -11 -12 -13 -14 110 111 112 113 114 JCI_ALREADY_DISCONNECTED -15 115 JCI_ALREADY_CONNECTED JCI_LONGNAME_FAILED -16 -17 116 117 JCI_BAD_TYPE JCI_BAD_ARRAY_TYPE JCI_BAD_ARRAY_CONTENTS JCI_ARRAY_ACCESS_ERROR JCI_CHG_WORDSIZE_FAILED -18 -19 -20 -21 -22 118 119 120 121 122 JCI_SYSPROC_GET_ERROR -23 123 JCI_HISTTASK_NOT_ACTIVE JCI_ERROR_FATAL JCI_ERROR_INVALID_DSN JCI_ERROR_ADO -24 -25 -26 -27 124 125 126 127 JCI_ERROR_UNAVAIL_ADO JCI_ERROR_NAME_GENERATE JCI_ERROR_INVALID_TABLE JCI_ERROR_EMPTY_RECSET JCI_ERROR_INVALID_DATE JCI_ERROR_ADO_DUPREC JCI_ERROR_INSERT_SUP JCI_ERROR_ARRAY_DIM JCI_ERROR_ARRAY_ELEMENT JCI_ERROR_ELEMENT_WRITE JCI_ERROR_ARRAY_WRITE JCI_ERROR_UNAVAIL_OEM JCI_ERROR_OEM -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 128 129 130 131 132 133 134 135 136 137 138 139 140 JCI_ERROR_TAGNAME_SUP -41 141 JCI_ERROR_REGKEY_OPEN -42 142 Good return value Blank name passed into Create or Write function. Name exceeds 128 characters maximum. Invalid Time passed to Write function. InfoPlus.21 Database call to write data failed. InfoPlus.21 initialization call failed. Create called with existing name. Historian Database Full (no more names) InfoPlus.21 API call for CopyRec Name setup failed (in Create Function) InfoPlus.21 API calls for CopyRec failed (in Create function). Modify routine failed to find name. Modification of engineering units failed. Modification of time zone failed. Historian connection is not available. InfoPlus.21 API calls for INITSETC fails, historian probably not running. Historian already disconnected, as per request. Historian already connected, as per request. Insert of LONG_NAME failed in Create function. Bad data type passed in variant structure. Bad data type passed in OLE array. Invalid OLE array, or bad data in array. Unable to access an OLE array. InfoPlus.21 API calls for CHGDBWDS failed during increase for new point. Unable to get system processes to check for tasks running. One of the tasks for historian is not running. Fatal error (undetermined) Invalid DSN or Variant type for DSN Error occurred in ADO interface. IErrorInfo provides more details. Unable to determine ADO error(s). Unable to generate a new name (number). Invalid table type specified. No data available – empty record set. Timestamp is not valid. Duplicate record found during Insert. Insert mode is not supported. OLE array dimensions are invalid. OLE array elements are not the same. One or more OLE array elements Write failed. One or more OLE arrays Write failed. Unable to determine OEM Historian error. Error occurred in OEM Historian database. IErrorInfo provides more detail. OEM Historian database does not support tag name change. Registry key Open failed. 36 N1 Trend Collector for MVE Technical Bulletin Special Error Codes The error codes in Table 14 are typically caused by communications trouble between the N1 Trend Collector and a database interface. Table 14: Special Error Codes Internal Symbol Numeric Value ERR_COLE_EXCEPTION 1000 ERR_COMM_ERROR_EXCEPTION 1001 ERR_UNKNOWN_EXCEPTION 1002 ERR_C_EXCEPTION 1003 ERR_OEM_HISTORIAN_NOT_RUNNING 1004 ERR_CANNOT_CONNECT_TO_DATA_SOURCE 1005 ERR_INVALID_REPORT_TYPE 1006 ERR_INVALID_SAMPLE_TYPE 1007 ERR_NOT_CONNECTED_TO_DBMS 1008 ERR_DBMS_NOT_SELECTED 1009 ERR_NO_SAMPLES_AVAILABLE 1010 ERR_TIMEZONE_NOT_AVAILABLE 1011 Note: A numeric return value of -1 usually means the database is not selected for storage. Data Collection Troubleshooting To Determine if Data Is Being Stored 1. Double-click the N1 Trend Collector icon in the Windows system tray. 2. Examine the value in the Status column. Notes: If the value in the Status column is zero, the database write is successful. Any value other than zero indicates an error. See Table 13 and Table 14 for a complete listing of M-Historian error codes. To Determine if the Metasys OWS Is Receiving Data from the N1 Network 1. Add a computer file as the destination for Trend and/or Point History. 2. Check the contents of the file for data. If no data is being stored to the file, the N1 Trend Collector is not receiving data. N1 Trend Collector for MVE Technical Bulletin 37 To Determine if N1 Trend Collector Is Receiving Data from the Metasys System Examine the N1 Trend Collector application window. All received data appears in this window, up to the configured limits. To Determine if N1 Trend Collector Is Experiencing Errors Check N1TrendCollector.log for errors. N1TrendCollector.log is stored in the M-Data\N1 Trend Collector directory. Examine the message dates carefully, as this file is created by appending new entries to the existing entries, and some messages may be very old. Trend Collection Does Not Start Automatically If trend collection does not begin automatically when the system initializes, check TrendCollector.log for error messages. If the associated ODBC DSN is not available, trend collection cannot begin, and the Trend Collector icon does not appear in the Windows system tray. Local Trend Collection Connection Errors The connection status of a trend collection may be verified by looking in the status bar of the N1 Trend Collector application window. The status bar contains either Connected or Not Connected. TCP/IP is used for trend collection communications in both the All in One and Remote System installations. Check the operation of TCP/IP to resolve trend collection connection errors. See Enabling Trend Collection for Metasys N1 Objects in this document for additional information. TrendDB.mdb Has Become Corrupt If the installed copy of TrendDB.mdb is unusable, overwrite the installed copy with a blank copy found in the M5 M-Data\Access Historian\ Empty Database directory or on the Workstation CD-ROM. Troubleshooting the Windows Registry Entries Any wrong alteration to Windows registry entries can cause serious damage to the system. Take extra caution when altering registry values. Locate all registry entries used specifically by N1 Trend Collector at: HKEY_LOCAL_MACHINE\SOFTWARE\Johnson Controls\N1 Trend Collector 38 N1 Trend Collector for MVE Technical Bulletin Performance Related The N1 Trend Collector performs well under normal circumstances. It processes and stores data very quickly. However, the collector may take a few minutes to process extreme volumes of incoming trend and point history data, especially data that occurs on the half-hour intervals when point history collection is enabled. If the collector is processing incoming reports for more than 60 seconds, it is possible for the collector to falsely detect that the Metasys Remote Server is offline. It is also possible for the read attribute requests to time out during Fast Scan processing. Note: The offline detection is done in a shared component that the collector uses for communicating to the MRS. The component is called MHClient. This offline problem can be seen by examining the N1TrendCollector.log file. The entries for the offline detection appear as follows: 2001/10/30 14:01:53 // // Disconnected from Metasys Remote Server on Local 2001/10/30 14:02:13 // // Connected to Metasys Remote Server on Local If these entries continuously appear in the log file, check if the node where the Metasys Remote Server resides is shutting down and restarting due to operator intervention. Perhaps a user is restarting Metasys system on that node. If this problem is not caused by user intervention, you may use the MRS_WatchdogPeriod registry entry to increase the watchdog period used for detecting the disconnects. By default, this value is ffffffff (in hexadecimal). This value indicates that the default from MHClient should be used. The default is 60,000 milliseconds or 60 seconds. To modify the default value: 1. Double-click on the MRS_WatchdogPeriod in the registry. 2. Click on the Decimal radio button. 3. Type in a value greater than 60000. Note: Try 90000 or 120000 (90 or 120 seconds). The problem for the read attribute timeout appears: 2001/10/30 14:31:50 // Timeout on a read attribute call. Retry. N1 Trend Collector for MVE Technical Bulletin 39 This happens if a read attribute request takes longer than 5 seconds. For large data requests, increase the timeout that closely matches the value of MRS_WatchdogPeriod. The registry entry for this timeout value is called MRS_MetasysMsgTimeOut. This value is located in the same part of the registry as the watchdog period entry. The default is obtained from MHClient and has a value of 5000 milliseconds (5 seconds). If the above error log entry is seen multiple times, try increasing the value of this timeout to some value close to the value entered for MRS_WatchdogPeriod (for example, 85000 or 115000 in decimal). Another registry entry related to MRS_MetasysMsgTimeOut is called FastScanTimeout. The value of this should match the value of MRS_WatchdogPeriod. The default value of this entry is 60000 milliseconds (60 seconds). Table 15: N1 Trend Collector Registry Entries for Timing Adjustments Name Default Value Default Interpretation Description MRS_WatchdogPeriof ffffffff 60,000 mSecs Timeout value between MHClient and MRS. MRS_MetasysMsgTimeout ffffffff 5,000 mSecs Timeout value between MHClient and Metasys system for read attribute calls FastScanTimeout 60000 60,000 Timeouts in N1 Trend Collector in regards to each read attribute request to MHClient Any one of these registry entries can be set to ffffffff (in hexadecimal). When this value is entered, the N1 Trend Collector uses the default value for the attribute. Controls Group 507 E. Michigan Street P.O. Box 423 Milwaukee, WI 53201 www.johnsoncontrols.com Published in U.S.A.
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project