Home

ProcessView 8 - Manual

image

Contents

1. Name Enter the name of the new configuration in the Name field Node name Enter the name of the PC through which the TrendWorX SQL Server will be accessed It is local by default Note Once all configuration work here is completed you should download the configuration to the TrendWorX SQL Data Logger by clicking Make Active to ensure that the Data Logger has processed all changes Network node name The Network Node Name is the name of the network where the TrendWorX SQL Server will be accessed It can be the local name if the TrendWorX SQL Server is running locally or a remote node name Clicking the button displays a list of all available network nodes In addition to the above the following functions are available within the configuration dialog box Start data logging Clicking Start Data Logging starts the data logging mode This will not be activated if there are any errors that prevent proper logging of data i e table naming conflicts etc Within this mode you can Retrieve up to date information with respect to database generated errors Retrieve up to date information with respect to database tables currently being logged Retrieve up to date information with respect to the time it takes to log data Deactivate a database object for maintenance and then reactivate it Stop data logging Clicking Stop Data Logging stops the data logging mode Connect Clicking Connect establishes a physical co
2. Cancel Help Trend Scroll Bar Configuration Dialog Box To select the appropriate settings for the Zoom Trend button click Zooming on the Edit Trend dialog box This opens the Zoom Preferences dialog box shown below You can select how closely you want to zoom and which axis you want to use as a base for the zoom when you are using the point and click zoom function If you use the rubber band zooming feature these options will be ignored In addition these options take global effect for all the TrendWorX Viewers and they are not saved on a per individual Viewer ActiveX basis Zoom Preferences x IV X axis IV Y axis Percentage 25 Cancel Zoom Zoom Preferences Dialog Box The Grids section of the Edit Trend dialog box determines how many lines along the x axis and y axis make up the grid displayed in the Trend window Edit Period Clicking the Edit Period button on the Trend Viewer toolbar opens the Trend Edit Period dialog box shown below Trend Edit Period Data Collection Rate IV Custom Trend Period Hours Min Secs Msec Years Months Days Faparar aie ar Zip H Hours Secs Display Refresh T x rai fo ap fo Rate Samples 120 Period 2 Minutes History Refresh 60 m Rate Trend Edit Period Dialog Box 7 41 TrendWorX Viewer ActiveX The Data Collection Rate Display Refresh Rate and Samples fields are set according to the settings made on t
3. Formatting Edit Alarm Lines ata hee Obit PROL AER POE ene Show Range Time Shift Autoscale Range Show Comments Delete Insert Comments Cancel Details Window Menu Options for Pens As shown in the figure above you can select single or multiple pens from the Details window When you right click a pen a pop up menu opens as shown in the figure above The Options submenu lists the following trend display options and actions for the selected pen Visible Shows hides the pen in the Details view of the Trend Viewer Samples Retrieves historical data samples Pen marker Shows hides the pen marker in the Details view of the Trend Viewer Alarm lines Shows hides the dashed alarm lines at the Low LowLow High and HighHigh in the Details view of the Trend Viewer Stair plot Uses a stepwise draw method to plot the trend This is ideal for plotting slowly changing signals or setpoints Show range Displays the range values for the pen in the Trend Viewer In the old plot style there is a range scroll bar available only in old plot style that enables you to switch between ranges of multiple pens In stackable plots you can simply click on the pen to switch ranges 7 52 Introduction Autoscale range Disables the Low and High fields and sets these limits automatically according to the values for the pens Autoscaling if checked on the Ranges tab adjusts the range if the actual value is
4. 6 16 Features in TrendWorX Reporting Note If you choose to include qualities the maximum number of tags to be included in the report is reduced to a total of 55 If qualities are not selected the maximum number of tags to be included in the report is 110 tags To enter an expression for the Target Name click the Expr button This opens the Expression Editor When you are finished click Next to continue the Report Configuration Wizard This opens the Tags dialog box Note For information about the Expression Editor please see the Expression Editor help documentation Tags The next step in the Report Configuration Wizard is the Tags dialog box shown below which prompts you to select the database group group and tags used for the report TrendWorX Reporting supports the use of a Description text on a per report tag basis This option if used will label the resulting data columns of the target report using the defined Description entries in the TrendWorX Configurator By default when a signal is inserted in the TrendWorX Configurator the Description entry of the signal will be its logging name You can override the Description field which will be used to label the resulting data column in the final report If the Description field in the TrendWorX Configurator is left empty the logging name will be used to label the resulting data column of the report The TrendWorX Reporting application will still display in the tree vie
5. 6 39 TrendWorX Reporting optional IRowsetUpdate optional ISupportErrorInto mandatory The transaction object defines an atomic unit of work on a IConnectionPointContainer data source and determines how those units of work Transaction relate to each other This object is not directly supported mandatory ITransaction by the OLE DB provider templates That is you create optional ISupportErrorInfo your own object Each COM component represents a series of COM interfaces Some COM interfaces are mandatory while others are optional By implementing the mandatory interfaces a provider guarantees a minimum level of functionality that any client should be able to use By implementing the optional interfaces a provider can have more functionality and a richer feel to the client The client should always call Querylnterface to determine whether a provider supports a given interface The TrendWorX OLE DB Provider is a simple read only provider which implements all of the mandatory interfaces listed in the table above with the exception of the transaction based component TrendWorX OLE DB Provider supports among others the following Similar historical replay functionality to the OPC Historical Data Access specification Raw or time processed data retrieval over a user defined time interval Multiple historical tag data retrieval Dedicated trend SQL query parsing and execution capability Historical dat
6. 1 32 Chapter 2 Logger Configurator Introduction The TrendWorX Configurator is used to create and maintain a tag database for use by the TrendWorX SQL Data Logger Its main function is to perform configuration for data logging In addition to simple tag configuration the Configurator is used to create and maintain a process area hierarchy and to group tags into one or more named configurations to support servers running on multiple network nodes The TrendWorX Configurator receives field data from any OPC compliant data access server and performs configuration Using the TrendWorX Configurator you will perform the following basic steps 1 Open a new configuration for data logging 2 Configure a database group a logging group and tags 3 Download the configuration to the server by using the Make Active command on the File menu 4 Start or stop data logging The server can read its configuration information from a Microsoft Access mdb file provided the relevant driver is installed on your local machine You can select either a machine source or a file as a data source for the Configurator This means that you have the option of selecting a data source that need not necessarily reside on your local machine The Configurator can retrieve data either from a database on your PC machine source or from a database that resides on the network file source About the TrendWorX Configurator The Configurator application
7. Cancel Apply Help Appearance Tab Workspace Settings Backgrounds The TrendWorX Viewer ActiveX supports the use of background images in trend displays To enable the background check the Show Background check box as shown in the figure above Click the Browse button to select an image file to use as your background The ProcessView installation provides several background images that you can use in your displays Or you can create and use your own images Once you have selected your image click the Apply button and the image will appear in the trend background Choosing the Centered option centers the background image in the trend display and preserves the aspect ratio of the original image Choosing the Stretched option stretches the background image across the entire area of the trend display Stretching may cause some images to become distorted 7 18 Introduction Colors In the Colors section of the Workspace settings you can choose the colors for the Background Title the title and text displaying the type of trend and Foreground the actual chart To change the color simply click the box corresponding to the area that you want to change This opens a Color dialog box which enables you to select a predetermined color You may also select the Define Custom Colors button to create a color Border Siyle available only with the old plot style The Border Style section of the Workspace settings defines the type
8. a Time 1 11 53 691 PM 5 12 2004 Entered on 1 13 10 251 PM 5 12 2004 Author Supervisor Insert As Group Comment Ea Cancel Comment s Entry Dialog Box Evening Shift If the Show Comments option is enabled for the historical pen the inserted comment will be visible on the screen as shown below 7 55 TrendWorX Viewer ActiveX 100 00 83 33 16 67 Author Supervisor Time Added 1 11 53 PM 0 00 Date Added 5 12 2004 1 12 12 PM er Operator Comments in the Trend Display Editing Pens During Runtime Mode To edit a pen during runtime mode right click on the pen in the Trend Viewer and select from the following pop up menu items as shown in the figure below Options Specifies various options and actions for viewing the selected pen during runtime mode Formatting Restores the default settings for the pen during runtime mode Edit Opens the Edit Trend Pen dialog box Stack Plot Displays multiple pens in a trend display in separate stacked plots Time Shift Sets the interval and direction for the time shift Delete Removes the pen from the Trend Viewer o e 1 12 12 PM 1 512 2004 xl Description BB SimulatePLC Ramp fSimulatePLC Rando Options gt Formatting gt Stack Plot gt Time Shift Delete ilp press F1 Cancel Editing Pens During Runtime Mode Pen Options During Runtime Mode To view the options for pens du
9. boolean MainToolbar Enables disables Trend Viewer toolbar Default TRUE boolean FreezeMode Enables disables freeze mode short NumberOfPens Returns number of currently configured pens LPFONTDISP RangesFont Dispatch interface to the range field font BSTR FileName Gets sets file name for saving configuration data Set is not supported while in runtime mode boolean URLPathUsed Enables disables use of URL path for asynchronous downloads Default FALSE BSTR URLPathName Gets sets URL path name BSTR StatisticsFile Gets sets the csv txt file used for statistical information storage Set is not supported while in runtime mode boolean StatFileAppend Enables disables append mode for statistical file Default FALSE boolean GlobalRanges Enables disables the use of global ranges Not supported in runtime animation mode Default FALSE boolean ShiftGrids Enables disables the shifting of grids during runtime Not supported in runtime animation mode Default TRUE double StartUp Gets sets initial offset for plotting of curves Default O short CursorStep Gets sets the cursor step for stepping in freeze mode Default 10 LPDISPATCH Title Dispatch interface to Title object LPDISPATCH Details Dispatch interface to Details object LPDISPATCH Ranges Dispatch interface to ranges object LPDISPATCH TimeSeitings Dispatc
10. Description OK Cancel Apply _ Hep Enabling NT Event Logging for Data Logging TrendWorX SQL Data Logger has both a data logging retrial mechanism and a database reconnection mechanism If data logging fails it puts the current data logging packet back in the queue of packages to data log It will retry by default three times to data log the packet prior to aborting In the TrendWorX Logger Configurator there is a user configurable maximum number of 3 38 Introduction Security Integration data logging packets to maintain in memory for data logging on a per group basis as shown in the figure below The default value is 12 Modified 6 21 2004 3 13 32 PM Configuration settings Control board ern loca wl H Connect MV Use Global Connection Disconnect I Use UTC Time Retrials E Max Samples 1200 Retrial Delay ls Max Logging sec z z Packets 12 7 Server status pen server is not connected Apply Reset Data Logging Retrials Settings Start Datalogaina Stop Dataloga na Adjust Log Params Add New Configuration The Max Logging Packets value controls the maximum number of data logging packets to maintain in memory The Retrials value controls the number of times the TrendWorX SQL Data Logger will retry data logging data in case of a failure The Max Samples value controls the maximum number of samples to maintain in memory
11. Each group maintains a collection of individual tags These signals can be OPC signals or calculated signals Each signal can be configured with respect to various attributes such as deadband and logging Signal name The Signal Name field shows the actual signal tag or point name or expression When you click the tag name in the left hand pane of the TrendWorX Configurator screen the tag name or ID which uniquely identifies the tag is displayed in the Signal Name field as shown above Description This field contains a description of the actual signal For Unicode applications the description can be language aliased so that trend clients will use the translated description during animation runtime mode TrendWorX Reporting uses the Description text on a per report tag basis This option if used will label the resulting data columns of the target report using the defined Description entries in the TrendWorX Configurator By default when a signal is inserted in the TrendWorX Configurator the Description entry of the signal will be its logging name You can override the Description field which will be used to label the resulting data column in the final report If the Description field in the TrendWorX Configurator is left empty the logging name will be used to label the resulting data column of the report The TrendWorX Reporting application will still display in the tree view or edit dialogs the report tags using their logging names
12. Options X Axis Indicates the horizontal axis selection for XY plots This option applies to real time pens If enabled it will shift the time axis of the pen so that the curve will be plotted within the current time frame of the Options Auto Sync Viewer This option should be used when real time pens are connected to remote OPC Data servers and there no network synchronization facility is applied Select a line style for the plot from the drop down list Solid Dashed Dotted Style Line or Dotted Dash Determines the width of the plot line If the line width is greater than 1 the Line Style Width field will be unavailable and the Solid line style will be applied Used only for circular charts determines the size of the plotter for the selected Sle Plotter pen small medium big and huge Clicking the Color box opens the Color dialog box from which you can select Style Color the color of the pen or define a custom color Specifies how data will be displayed in the Details window of the Trend Details Format Vi iewer The Filter selection is mostly used for historical replay and corresponds to the averaging method used in retrieving historical data For example if Filter is set Filter to Last Sample the last sample of the historical data within each subinterval will be retrieved The TrendWorX Viewer supports the Raw Data filter for historical replay as 7 34 Intr
13. When you click Finish you will create the data source which you have just configured The driver may prompt you for more information System Data Source Driver SQL Server Creating a Microsoft SQL Server or MSDE Database Connection 3 17 TrendWorX SQL Data Logger Click Finish to configure your new database This opens the Create a New Data Source to SQL Server dialog box shown below Enter the Data Source Name the Description and the name of the Server on which the Microsoft SQL Server or MSDE engine resides Create a New Data Source to SOL Server x This wizard will help you create an ODBC data source that you can use to connect to SQL Server What name do you want to use to refer to the data source Name rwexs QOL How do you want to describe the data source Description TwxsQL Which SOL Server do you want to connect to Server TwxsaL y cos to Create a New Data Source to SQL Server Dialog Box If it the engine resides on the same PC node as the TrendWorX SQL Data Logger select local Otherwise select or specify the appropriate server name Click Next to continue with the Microsoft SQL Server Security configuration and Connection type lt is recommended that you use the Windows NT authentication mechanism which eliminates the need for maintaining individual user accounts and passwords Create a New Data Source to SQL Server x How should SOL Server verify the authenticity
14. About Launches the About Box which contains information about Application the product version number copyright and available disk space It also contains contact information The key concept in the configuration of the Persistent Trending server is the Group A group represents a logical collection of signals for common processing and buffering To add a group select Add Group from the Edit menu or press the shortcut keys CTRL G This opens the Persistent Trending dialog box which enables you to configure a new Persistent Trending group and optionally data logging for that group to a csv or txt file The Persistent Trending dialog box contains two tabs the Group Configuration tab and the Logging Configuration tab The Group Configuration tab of the Persistent Trending dialog box shown in the figure below specifies a name for the new Persistent Trending group the desired data collection rate and the number of samples to buffer in memory for each signal of the group The Activate On Start option if enabled automatically starts data collection for the specific group when the Persistent Trending is committed to runtime mode Otherwise you can start data collection by activating the group during runtime mode through the Persistent Trending User Interface or through OLE automation Persistent Trending 3 x Group Configuration Logging Configuration Group Name BgGroup MV Activate On Start m Data Collectio
15. Global Search and Replace Dialog Box Using the Persistent Trending OLE Automation Server The purpose of the Persistent Trending OLE automation server is to function primarily as a memory based data logging engine which buffers data for user configured signals at desired data collection rates in memory In addition the buffered data can be configured to be data logged in a csv or txt file The Persistent Trending automation server is a stand alone EXE server which registers as the active running object with the tables maintained by OLE This means that there is only one instance of Persistent Trending running per computer and all interested clients should get an interface pointer to that running instance rather than create a new Persistent Trending object which will fail if Persistent Trending is already running The Persistent Trending server should be started and running at the time of committing a process control HMI application to runtime mode so it will have enough time to buffer data before any client requests are processed There are several ways this can be done 5 17 TrendWorX Persistent Trending You can start the Persistent Trending server manually from the Program Group or place it in the StartUp Folder In either case the Persistent Trending server will load the most recent configured file Then it can be committed into runtime mode by choosing Start Logging from the Actions menu or clicking the Traffic Li
16. MSAccess Jf SimulatePLC InltFanSp Jf SimulatePLC Ramp Jf SimulatePLC Random Jf SimulatePLC Square Stopped Reports 11 Report 272701 10 32 00 AM Y For Help press F1 TrendWorX Reporting Configured File TrendWorX Reporting displays a two pane screen The left hand pane contains a tree of all the configured reports and the tags for each report The right hand pane is a list view providing report 6 2 Features in TrendWorX Reporting configuration and status information TrendWorX Reporting can execute reports containing multiple database groups and or logging groups The tree in the left pane sorts all signals by database type Note Clicking a column heading in the right pane of the display such as Report Enabled or Report Type sorts the list of reports by that category Reporting Modes TrendWorX Reporting supports two modes of operation 1 A configuration mode in which you can configure reports without any report processing 2 A runtime mode in which all reports are processed and full configuration is available TrendWorX SQL Tool ActiveX Control Version 7 x included an enhanced data retrieval system which utilizes an updated approach to creating historical reports Data filter selection other than Raw will result in data time stamped at the beginning of each subinterval When retrieving data using data filters other than Raw subintervals for which there are no data because of n
17. Scheduling for minimizing system load and fully decoupling data logging from data collection while supporting data logging retrials in cases of failure Support for hot database switching during runtime mode without stopping data logging activity In this scenario you can use the TrendWorX Logger Configurator or OLE Automation to select a new database for data logging You have the option to redirect pending writes to the new database or log them to the current one OLE Automation interface to data logging Integration of data logging activity into the GenEvent Registrar Support for data logging the same OPC tags in the same data logging group but under a different logging name Integration of native OLE DB providers for faster replay and decreased CPU usage Note UTC support refers to data logging the time stamps of samples in the UTC time format However all clients will replay historical data using the local non UTC client time unless they are otherwise configured 3 4 Introduction Upgrading to Versions 6 00 and 6 10 Upgrading From Version 5 20 to Version 6 0 The biggest change in terms of upgrading an existing application of Version 5 20 to Version 6 0 is the new approach to data logging configuration and administration Now the configuration information of the TrendWorX SQL Data Logger server TWXSQLSvr exe is stored in a database file By default this file is in a Microsoft Access mdb file format The T
18. Sets the automatic print mode of circular charts upon a full trend period reset If bAutoPrint is set to TRUE the Viewer will print trend display upon full chart reset boolean GetCircularPrintMode Returns the current automatic print mode of circular charts 7 67 TrendWorX Viewer ActiveX void MoveCursorForward In freeze mode moves the cursor one step forward in time void MoveCursorBackwards In freeze mode moves the cursor one step backward in time boolean MoveCursorToTime DATE timeDate In freeze mode moves the cursor to a particular position on the time axis long ChangeTrendDataRate long trendDataRate Changes Viewer data collection rate in animation runtime mode TrendDataRate is the desired data collection rate in milliseconds boolean GetPenValues BSTR PenName VARIANT PenValues VARIANT PenTDates VARIANT PenMSecs VARIANT PenQuality Returns in variant arrays the current samples in memory buffers of the pen with point name or description PenName void SetPenComments long Penindex boolean Mode Sets the historical comment and batch information mode of a historical pen with index PenIndex If Mode is TRUE it enables the display of historical comments boolean GetPenComments long Penindex VARIANT SourceTDates VARIANT SourceMsec VARIANT Notes VARIANT NoteTDates VARIANT NoteMSecs VARIANT Authors Retrieves
19. below ER Data Link Properties xi Provider Connection Advanced Al Specify the following to connect to SQL Server data 1 Select or enter a server name SMAA QD77CQJ y Refresh 2 Enter information to log on to the server Use Windows NT Integrated security Use a specific user name and password Username Password Blank password 7 Allow saving password 3 Select the database on the server New Database Attach a database file as a database name KU Using the filename Test Connection OLE DB Provider Configuration for SQL Server Databases For Microsoft Access connections simply navigate to the desired mdb file by clicking on the browser button as shown in the figure below 6 5 TrendWorX Reporting BF Data Link Properties NN xj Provider Connection Advanced Al Specify the following to connect to Access data 1 Select or enter a database name jr eC seh UG 2 Enter information to log on to the database User name Admin Password JV Blank password D Allow saving password Test Connection OLE DB Provider Configuration for Microsoft Access Databases To connect to an Oracle database fill in the appropriate information as shown in the figure below amp Data Link Properties Provider Connection Advanced Al Specify the following to connect to Oracle data 1 Enter a server name Oracle 2 Enter i
20. 1 MSJET JetGroup 3 Get Report Names Dim ReportNames As Variant ListBox1 Clear ReportNames reports GetReportNames For i LBound ReportNames To UBound ReportNames ListBox1 Addltem ReportNames i Next i Execute Report reports StartReports reports EnableReport MyReport reports RunReport MyReport Delete Report reports DeleteReport MyReport End Sub TrendWorX OLE DB Provider OLE DB is the dominant data access methodology from Microsoft that allows high performance data access from any data source Any tabular data is viewable through OLE DB regardless of whether it came from a database This flexibility gives developers a tremendous amount of power In version 7 x the TrendWorX OLE DB Provider included the following new features New database connection dialog Enhanced data retrieval support 6 37 TrendWorX Reporting Consumer Provider Data source OLE DB Architecture The design of OLE DB includes the concept of consumer and provider The figure above shows a graphical representation of the OLE DB system The consumer represents the traditional client The provider places data into a tabular format and returns it to the client A provider is a set of COM components that contains a series of interfaces Because these are standard interfaces any OLE DB consumer can access data from any provider Since providers are COM objects consumers can access them in any language
21. All display files for Pocket ProcessView are first configured on a desktop PC using a ProcessView application such as GraphWorX TrendWorX and AlarmWorX and then saved in a format that is compatible with Pocket PC and Windows CE A display file is then downloaded to the Pocket PC or Windows CE device to be viewed during runtime Once you open the display file in the corresponding Pocket ProcessView application i e Pocket GraphWorX Pocket TrendWorX or 1 26 Getting Started Pocket AlarmWorX in runtime mode you can execute all runtime functional dynamics that have been added during configuration With a few exceptions Pocket ProcessView applications have the same basic runtime functionality as their counterpart ProcessView applications Configuring for Windows CE in ProcessView To configure for Windows CE in GraphWorX TrendWorX and AlarmWorX select Windows CE gt Configure for Windows CE from the Tools menu as shown in the figure below If you have just installed Pocket ProcessView this will be checked by default Tools Window Help Macros b Trend Configurator Ctrl Connect to Logger Shift L Persistent Trending Ctrl k Reporting Ctrl Q alle E Security b Set Working Directory VER Worx32 Replay Publish to HTML Es Configure for Windo E windows CE Preferences Configuring for Windows CE Once you have configured your display select Save As from the File menu This opens
22. CTRL D Makes a copy of a Persistent Trending group Persistent Trending will duplicate the group by inserting a new group and appending _x to the group s name in addition to duplicating all of the signals that are already configured Delete DEL Deletes a Persistent Trending group Group Status Opens the Group Status dialog box information for a selected group Right clicking a group and selecting Group Status from the menu also opens this dialog box Add Group CTRL G Adds a group to the opened Persistent Trend Edit Group CTRL E Opens the group properties dialog box for the group which enables you to change any of the original configuration settings Add Tags CTRL P Enables you to create signal connections to already configured Persistent Trending groups From the Add Persistent Tags dialog box you can add OPC tags by clicking OPC Tags or add expressions and simulated variables by clicking Tags Menu Once you add all the tags you wish to configure click OK to add these tags to the selected Persistent Trending group Delete Tags CTRL SHIFT P Enables you to delete signals from already configured Persistent Trending Groups From the Delete Persistent Tags dialog box you can choose which signals to delete Clicking OK to remove these tags from the selected Persistent Trending group Copy Tags Paste Tags Opens the Copy Tags dialog box which lists all of the tags availab
23. E TrendPrint t32 q 9 29 44 PM 9 30 08 PM 9 30 32 PM 9 30 56 PM 9 31 20 PM 5 18 2004 5 18 2004 5 18 2004 5 18 2004 5 18 2004 Value Time Date E gfwsim ramp long 680 00 9 31 28 218 PM 5 16 2004 BB gfwsim ramp float 589 62 9 31 28 216 PM 5 18 2004 Print No Prompt Print Save Ink Trend Display Print Example TWXScreenNavigation t32 This example display demonstrates how to create a Trend Navigation screen within a TrendWorX display and how to dynamically configure Trend ActiveXs It also demonstrates how to navigate between the various displays 4 6 Introduction to TrendWorX Examples ES TWXScreenNavigation t32 Horizontal Trend Histogram im Screen Navigation TrendVBADemo t32 This example display demonstrates some of the OLE automation methods of the Trend Viewer ActiveX It shows sample code on providing a user interface for the Trend ActiveX via VBA calls It also shows how to retrieve individual sample information directly from the pen buffers or the trend cursor in freeze mode ES Trend BADemo t32 Trend Viewer VBA Demo 9 31 58 PM 9 32 22 PM 9 32 46 PM 9 33 10 PM 9 33 34 P 5 18 2004 6 18 2004 5 6 2004 5 18 2004 5 18 200 E SimulatePLC Sine H Cursor Right Trend Viewer VBA Demo PersistentTrendVBADemo t32 This example display demonstrates how to interface to the Persistent Trend OLE Automation server from any VBA capable application It demonstrates how to build a user
24. Es E Fe 12 Awx32Svr test mdb p Fy Copy of CRConfig mdb My Recent rai Copy of YCRLog mdb Documents 21 Twx32CFg test mdb 21 vCRConfig mdb Desktop YCRLog mdb e My Documents w ou My Computer ET File name VCRLog mdb A Places Files of type Microsoft Access Databases mdb y Cancel Selecting a Microsoft Access Database to Convert 5 Your selection appears in the TrendWorX Database Upsize Utility dialog box as shown in the figure below The next step in upsizing is to select a destination SQL Server database Under Select Destination SQL Database click the Browse button Configure Database Upgrade 1 Select Source MS Access Database Examples WCRWorx ExamplesWCRLog mdt Browse 2 Select Destination SOL Database 89 crm About Upgrade Close Help Source Access Database Selected 6 This opens the Data Link Properties dialog box as shown in the figure below Specify the SQL Server name and the database name Click OK 8 3 TrendWorX Database Upsize Utility E5 Data Link Properties xj Provider Connection Advanced Al Specify the following to connect to SOL Server data 1 Select or enter a server name local v Refresh 2 Enter information to log on to the server Use Windows NT Integrated security Use a specific user name and password User name Password F Blank password JU Allow saying password 3 Sele
25. GraphWorX ActiveX Control AlarmWorX ActiveX Control TrendWorX SQL Tool ActiveX Control GraphWorX Gauge ActiveX Control GraphWorX Switch ActiveX Control 3 Beam Pe saK Ader te 2k ActiveX Toolbar The other buttons represent common ActiveX controls which are supported by and can be referenced in VBA The TrendWorX SQL Tool ActiveX Control is an invisible at runtime control used to retrieve TrendWorX historical data on a per tag basis Customizing the ActiveX Toolbar 1 22 Getting Started TrendWorX OLE Automation Application Object Twx32App Properties Methods You can add remove or relocate items on the ActiveX toolbar within TrendWorX To access the Customize Toolbar dialog box shown in the figure below simply right click the toolbar and the dialog box will appear Reset Available toolbar buttons Current toolbar buttons IV Microsoft Forms 2 0 CheckBo_ a Microsoft Forms 2 0 SpinButtc Microsoft Forms 2 0 OptionBu Help Microsoft Forms 2 0 ScrollBar kee Smar TWXView 5 Smar Timer Activex Separator ekk Add gt lt Remove tf ove U a dove Down Customize Toolbar Dialog Box To remove a button from the ActiveX toolbar select the button from the Current toolbar buttons list on the right and click lt Remove Similarly if you wish to add a button to the toolbar select the button from the Available toolbar buttons on the left
26. TrendWorX Viewer ActiveX Details Objects 0 integration factor computed in seconds units are seconds 1 integration factor computed in minutes units are minutes 2 integration factor computed in hours units are hours 3 integration factor computed in days units are days boolean IdealPenMode Gets sets the ideal pen mode for a historical pen boolean AutoTimeSync Pen Objects Methods Gets sets the autosync mode for a real time pen boolean GetPenStat double Max double Min double Avg double StdDev long NumSamples Returns the associated statistical values for the pen using the visible samples at the current state of the pen boolean IsHistoryPen Returns TRUE if the pen is historical boolean SetldealDate DATE Date Sets the ideal date for a historical ideal pen This is the reference starting time of the ideal pen DATE GeildealDate Sets the Ideal date for a historical ideal pen This is the reference starting time of the ideal pen Details Objects Properties Details Objects Methods Using Visual Basic To View Details Objects Details Objects Properties boolean ShowDetails Determines whether the details field is displayed Default TRUE boolean ShowPenDate Determines whether a pen s date information is displayed boolean ShowPenHiHiLoLoAlarm Determines whether a pen s HiHi and LoLo alarm information is displ
27. Twx32Cfg exe is used to make changes to the database file that the server uses for configuration information This file is the Logger Configurator component of the TrendWorX SQL Data Logger The Twx32Cfg exe file is installed in the ProcessView Bin directory The TrendWorX Configurator has enhanced multiple configuration support The TrendWorX SQL Server stores its configuration data in a database file The TrendWorX Configurator is interfaced to the TrendWorX SQL Data Logger through a COM interface Through this COM interface you can download configurations to the TrendWorX SQL Data Logger start and stop data logging and retrieve status information The configuration data can be stored in either a Microsoft Access database or a Microsoft SQL Server database The ProcessView installation utility installs a default Microsoft Access configuration database called Twx32 mdb which is located in the ProcessView Bin directory The configuration database default file contains all of the defined configuration tables as well as all the used restrictions and constraints These files should never be altered because they can violate database integrity Starting the TrendWorX Configurator To start the TrendWorX Configurator 1 From the Windows Start menu select Programs gt Smar ProcessView gt ProjectWorX gt TrendWorx gt TrendWorX Configurator 2 This opens the Configurator as shown in the figure below The screen consists of a split
28. Use Integrated Security Yes Use Regional Settings No Prepared Statements Option Drop temporary procedures on disconnect Use Failover Server No Use ANSI Quoted Identifiers Yes Use ANSI Null Paddings and Warnings Yes di Ok Conca Testing a Microsoft SQL Server or MSDE Database Connection Note Regardless of the database type all ProcessView TrendWorX modules which interact with databases will create modify drop and update tables Therefore it is critical that the currently logged in user has permission to perform these tasks Configuring Oracle Databases The TrendWorX SQL Data Logger includes support for logging data as well as replaying data to and from Oracle databases The support for Oracle was developed under the assumption that e ODBC database connections to Oracle are established using the Oracle ODBC Driver 8 05 60 which is provided by Oracle and is available on the Smar product CD under the Tools directory e Oracle is running on a Microsoft Windows NT station To configure an Oracle database select the Oracle ODBC Driver in the Create New Data Source wizard as shown in the figure below 3 20 Introduction Create New Data Source x Select a driver for which you want to set up a data source Microsoft FoxPro YFP Driver dbf 6 01 8629 01 Microsoft ODBC Driver for Oracle 2 00 00 6325 Microsoft ODBC for Oracle 2 573 6526 00 Microsoft Paradox Driver db 4 00 5303 01 Micr
29. mandatory IRowsetldentity optional IColumnsRowset optional IConnectionPointContainer optional IRowsetChange optional IRowsetLocate optional IRowsetResynch optional IRowsetScroll Connection from the consumer to the provider The object is used to specify properties on the connection such as user ID password and data source name The object can also be used to administer a data source create update delete tables and so on The session object represents a single conversation between a consumer and provider It is somewhat similar to the ODBC HSTMT in that many sessions can be active simultaneously The session object is the primary link to get to OLE DB functionality In order to get to a command transaction or rowset object you go through the session object The command object handles operations on data such as queries It can handle statements with or without parameters The command object is also responsible for handling bindings for parameters and output columns A binding is a structure that contains information about how a column in a rowset should be retrieved It contains information such as ordinal data type length status and so on The rowset object represents the data from the data source The object is responsible for the bindings of that data and any basic operations update fetch movement and so on on the data You will always have a rowset object to contain and manipulate data
30. method Boolean SetPenValues BSTR PenName VARIANT PenValues VARIANT PenTDates VARIANT PenMSecs VARIANT PenQuality Fills a custom pen with user data PenName is the description text of the pen as it appears in the Details window PenValues is an array of doubles PenTDates is an array of date values corresponding to the PenValues PenMSecs is an array of milliseconds subdivisions corresponding to the PenTDates values PenQuality is an array of OPC defined qualities DATE GetRightTime Returns the Viewer ActiveX right time and date Supported only in runtime animation mode boolean SetHistTrendMode Boolean Mode Toggles history only mode of the Viewer ActiveX Supported only in configuration mode boolean GetHistTrendMode Retrieves the status of history replay mode of the Viewer ActiveX boolean AddHistoryPen BSTR PenName Adds a history pen to the Viewer ActiveX The PenName string should be the same as the one produced by the Tag Browser when browsing historical servers boolean UpdateHistoryPens Forces an update of all historical signals Typically 7 65 TrendWorX Viewer ActiveX this would be called after setting the Viewer s right reference time Supported only in freeze mode boolean SetPenFilter BSTR PenName short PenFilter Sets the data filter type for a pen with description text matching PenName Used fo
31. 2a Large Icons Displays items as large icons 27 Small Icons Displays items as small icons List Displays items as a list Details Displays items as a list with details Dialog View Displays additional configuration options Global Refresh Refreshes the data for the entire Configurator screen Start Stop Data Logging Starts stops data logging to the database About Displays information about the application Help Displays context sensitive help SEIE 45 Help Topics Launches online help for the application 2 12 Introduction Data Manipulation Toolbar To show or hide the Data Manipulation toolbar select Toolbars gt Data Manipulation Buttons from the View menu The Data Manipulation toolbar shown below contains the following command buttons New Configuration Inserts a new configuration at the Master Configuration level New Database Group Inserts a new database group at the Configuration level New Logging Group Inserts a new logging group the Database Group level Insert New OPC Tags Inserts a new OPC tag at the Group level New Simulation Variable Inserts a new simulation variable at the Group level Peep Pe New Expression Inserts a new expression at the Group level D Multiply Multiplies the selected item in the tree control uz Delete Deletes the selected item from the tree control x Menus The menu bar of the TrendWorX Configurator contains the following menus e File e
32. 6 2 Microsoft FoxPro YFP Driver dbf f Microsoft NBC far Oracle e gt Aa Create New Data Source Wizard Selecting a Driver 4 In the next dialog box of the Create New Data Source wizard shown below click Finish to create the data source you have just configured 2 33 TrendWorX Logger Configurator 5 Selecting a Logging Database You can now select the data source to which you want to log the data by using the following Create New Data Source 3 x When you click Finish you will create the data source which you have just configured The driver may prompt you for more information User Data Source Driver Driver do Microsoft Access mdb Cancel Create New Data Source Wizard Completing Data Source Creation The wizard will then provide you with further instructions procedure 1 2 Select a logging database by clicking Browse in the ODBC Data Source field in the Database Group properties as shown in the figure below A Name DEGroug Errors to keep foo Database connection settings Test DB connection ODBC Data source Twx32D emo Browse Perform following test if you want to make sure that the database Username admin connection settings is valid for data logging and Password data replaying Database type ms Access Perform test Control board Activate Deactivate Switch database Server database group sta
33. BSTR PenText Pen description BSTR PenUnits Pen engineering units BSTR RangeFormat The format type for showing ranges BSTR TWXBgGroupName The Persistent Trend group name double AlarmHigh High alarm value for pen double AlarmHiHi High high alarm value for pen double AlarmLoLo Low low alarm value for pen double AlarmLow Low alarm value for pen double HighLimit High limit value double LowLimit Low limit value long NumberOfSamples Gets number of samples for the pen OLE_COLOR DetailColor The fill color to be used in the Details window OLE_COLOR PenColor Gets sets the color associated with the pen OLE_COLOR RangeColor The fill color to be used in the range window OLE_COLOR RangeTextColor The color to be used for text in the range window short HistoryFilter Returns the filter type for the historical data The width of the pen in logical units Default 1 Returns the type of the pen such as real time history BSTR PenType and custom Read only property short PenWidth 7 72 Introduction short HistoryFilter double AutoResetLevel Returns the history filter for the pen Possible values are Raw 0 Average 1 Minimum 2 Maximum 3 Standard deviation 4 Last sample 5 Minimum with actual time 6 Maximum with actual time 7 Gets sets the autoreset value for a pen in configuration mode if the totalizer mode is enabled double PreLoadValue Gets sets the preload valu
34. Enabled Target Name My epor Expr ox Ea e Editing a Report To copy a report select an existing report and click Duplicate on the Edit menu or the main toolbar This will copy all the configuration data of the original report modify the original report name and reset the enabled flag as shown below File Edit View Actions Tools Help OSA ARRAS SSS eK SB Test Report enabled Report Ty status Jf gfwsim ramp float Testi No Once Normal PY gfwsim ramp long Test2 No Event Normal Pe gfwsim randombool Test2_x No Event Normal Jf gfwsim random long JY afwsim sine double J gfwsim toggle bool H B Test2 Y 4 For Help press Stopped Reports 3 Reports 1220 99 12 29 05 PM 4 Copying a Report Runtime Mode To enter runtime mode select Start Reports from the Actions menu TrendWorX Reporting will enable scanning of all reports and process them accordingly In addition both the right hand and left hand panes will be updated to reflect the latest status of reports In runtime mode you can e Add new reports 6 30 Features in TrendWorX Reporting e Edit existing reports e Duplicate reports e Delete reports e Cancel reports e Get report status information You can fully edit or delete reports in runtime mode as long as they are not running If the reports are currently running or are in stand by mode they need to be cancelled first and then e
35. In addition for the Unicode version of TrendWorX Reporting the Description field can be language aliased to be used with various languages Logging name Initially the signal s Logging Name is set to match the actual tag s point name You can override this setting and choose a more appropriate name such as Temperature Measurement This in turn will represent the signal name by which historian clients will access the data logged for that signal If the signal is an expression its logging name should be replaced with a description that does not include expression specific syntax Note You can configure the same OPC tag for data logging multiple times under the same logging group in order to log historical information for the tag using various data logging filters However the corresponding logging names must be different so that the historical replay will clearly identify the related tags 2 44 Introduction Note Avoid using long logging names If reporting will be used logging names should be a maximum of 60 characters If the tag is an expression the logging name should be modified not to contain expression symbols or mathematical symbols In addition avoid using special characters such as O 8 and Engineering units This field allows you to enter engineering units that will be used For a Unicode application the Eng Units field can be language aliased and as a direct result the trend
36. Introduction TrendWorX SQL Data Logger supports MSDE Microsoft Data Engine which is a fully compatible Microsoft SQL Server engine with the following limitations e The maximum database size is 2 GB e Performance may decrease if more than five connections are open to the database MSDE has the full core server functionality of Microsoft SQL Server and MSDE databases can easily be upgraded to full Microsoft SQL Server databases To install MSDE you can use the ProcessView MSDE Manager or browse the ProcessView CD to get to the Tools folder which has both MSDE 7 0 and MSDE 2000 installations The setup exe can be used to install MSDE create an empty database and verify installation Once you install MSDE you should create an ODBC data source associated with this database The key advantages of MSDE include e Fully compatible Microsoft SQL Server database engine e Central and dynamic memory management across all database connections e On the fly index maintenance and management e Optimized query processing e Automatic database space management e Microsoft SQL Server database upgrade path e Ability to use Microsoft Access 2000 as a front end configuration tool Note Since MSDE has intelligent online maintenance features including database expansion and contraction it is recommended that physical writes to the database be spread over time to allow for better performance For example when the data collection rate is 5 s
37. NEW FEATURES IN TRENDWORX PERSISTENT TRENDING uu eee cece eee eeeeeeee eee eee eaeseaeeeaesnsaeseaeeeaeeeaeeneeees 5 1 PERSISTENT TREND OLE AUTOMATION OBJECT DESIGN Qu cece eeceeeee ence cree eaeeeaeesaecaeseaeeeaeseaesseeeteeeeeeeees 5 2 OLE AUTOMATION PROPERTIES iiine secs ecdee eh elec iiia ai a aoid i i ai iaia aigi 5 2 OLE AUTOMATION METHODS viii e dd dedo idad da 5 3 CONFIGURING THE PERSISTENT TRENDING OLE AUTOMATION SERVER c oocoiccccocononononccnconononnncnn nono nannacanano 5 9 TOOLBARS iii A aiii a ti 5 9 MENUS cion A A A A tees vie vn a ee ee Ascot aati the 5 10 FILE MENG ooo eats ad a ei ei ba tage ei re o a a e ita 5 10 EDIT MENU La late 5 10 MEWMENIU coo ciudad ii da da ir ed cat lia da onda dl aa da 5 11 AGTIONS MENU isc raae n Medici cives Settee eet ete aa N a ea T ea e ey na Ea a de eet hota e ES titty 5 12 TOOLS MENU er a a a e e aaa A aa Aa aa a a aa a Aa Ta a adenda 5 12 HELP MENU nen oie e A teats adres ihe bees e a aae LANE e Leanai 5 13 GROUP Siac ate blag A A a a da A a a eli td len ik ed 5 13 ADDING AND CONFIGURING GROUPS occicccicococinnononincconocononononononn rr 5 13 GROUP CONFIGURATION TAB acudido data 5 13 LOGGING CONFIGURATION TAB ocnccnccconcconnnnncnncnono nono 5 14 GROUP STATUS arar aia 5 14 TAGS taa aaa data 5 15 ADDING PERSISTENT TAGS outra Ana 5 15 DELETING PERSISTENT TAGS uu tradi 5 15 COPYING PERSISTENT TAGS cuina irrita tania 5 16 SEARCH AND REPLACE cecilia aiii eat 5 16 GROUP SEARC isc 5 16 GLOBA
38. Projector Security Login Starting the TrendWorX Container eer ae DEAT Eee E la Smar ProcessView If you do not install an Smar Software License you will only be able to run TrendWorX Container in a two hour Demo mode If you have a software license and do not wish to run in Demo mode make sure that the license is properly installed When you start TrendWorX the TrendWorX Container screen will open and a Trend Viewer window will appear as shown in the figure below CEELI EEEE oxi DILILISAAAALAAAASAAAAAAAAAAAAAAAAAAAAAAALAAAAALAAAAAALAAAALLITTLA CLEAN AAA AA AA A ANA AAA AAA AAA AAA AA AAA 1000 00 Time Plot 833 33 666 67 500 00 333 33 166 67 0 00 12 11 43 AM 12 12 07 AM 12 12 31 AM 12 12 55 AM 12a 6 9 2004 6 9 2004 6 9 2004 6 9 2004 692 4 4 4 4 4 A 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 d 4 4 4 4 4 4 4 4 A 4 4 4 4 4 4 4 4 A A 4 4 4 4 4 4 4 4 4 4 A ne PUBS gt ULL DEA e al For Help press F1 Configure fi 6 9 2004 12 13 43 AM TrendWorX Container Screen and Trend Window The table below lists the basic TrendWorX Container screen components and their functions Refer to the Screen Features section for a complete description of the menu bar toolbar and status bar functions Component Function Displays the name of the application and the name of the current screen Title bar displayed To
39. The toolbar shown below contains the following command buttons gt 4D OA New Creates a new configuration Open Opens an existing configuration Save Saves the current configuration Add Group Inserts a new group into the configuration Edit Group Opens the properties dialog box for the selected group Duplicate Group Makes a copy of the selected group Delete Group Deletes the selected group from the configuration Add Tags Deletes current selection sending it to the clipboard Delete Tags Copies the current selection to the clipboard Global Search Pastes the current contents of the clipboard Start Stop Data Logging Starts stops data logging to the database Security Launches the ProcessView Security Configurator 5 9 TrendWorX Persistent Trending File Menu Edit Menu The menu bar of TrendWorX Persistent Trending contains the following menus File Edit View Actions Tools Help The File menu commands are listed in the table below File Menu Commands Command Shortcut Keys Function New CTRL N Creates a new configuration Open CTRL O Opens an existing configuration Save CTRL S Saves the current configuration Save As Saves the current configuration under a different name as a b32 file Exit Closes Persistent Trending The Edit menu commands are listed in the table below Edit Menu Commands Command Shortcut Keys Function Duplicate
40. TrendWorX smar First in Fielclous MAY 06 TrendWorX VERSION 8 FOUNDATION SSS hth USER S MANUAL TrendWorX Ele Edit View Actions Tools Window Help 21226PM 2 12580PM 2 13 14PM 2 1338PM 2 14 02 PM 5 12 2004 5 2 2004 5 12 2004 5 12 2004 5 12 2004 E gfwsim ramp long 120 00 2 14 08 808 PM E gfwsim ramp float 968 82 2 14 08 808 PM 5 12 2004 PVI EWT WKME smar www smar com Specifications and information are subject to change without notice Up to date address information is available on our website web www smar com contactus asp Table of Contents TABLE OF CONTENTS Chpter l GETTING STARTED A e Er REE Rinoa 1 1 INTRODUCTION ioti ina tt ai eis erat Wi iy A E AE Ala 1 1 STARTING TRENDWORKX ccccecsev deeds ceeedieescevieseedeevi A Dd Edo eb 1 1 STARTING TRENDWORX CONTAINER cece eee eceee creer eae cae nono see eeeeeeeaeseaesseeseeeseeeseeeseaeesaeeseeeesaeesaessaeseaeeeaeee 1 1 USING THE MOUSE AND KEYBOARD 0 0 eeee eee cent eeee corno rr 1 3 MOUSE FUNCTIONS siai natu cede tention a aan Solve ceva eo ds 1 3 SHORTCUT KEY Sisi tere ob hala pail anes Avante a DA O a abi A 1 3 NEW FEATURES IN THE TRENDWORX CONTAINER 0 0 cece cece eeee sees eee eaeesaeesaaesaaeeaeseaeeeaeseaeeseeseaeeeeeeneags 1 4 ABOUT THE TRENDWORX CONTAINER cerren ea aae cheney aio rato 1 4 SCREEN FEATURES corista iii aio codi ibi cipal edad 1 5 MENUS tota dota alada tilda e
41. ax Save in Y examples y e EEE Slush SQL Databases 2 GenClientStatistics xml File name Global liasingD emo xml Save as type XML Files xml y Cancel 4 Exporting Configuration Data to a XML File Importing Configuration Data Importing Data From a Text or CSV File The Configurator offers the flexibility of importing data from a text txt file or a Microsoft Excel csv file to your configuration database To import data select Import CSV from the File menu This opens the Import Configuration Data From File dialog box shown below You can then specify the delimiters and choose from the following import settings Create new items When the import file contains items that are not yet in the configuration database then it creates them Otherwise it skips these items Update existing items When the import file contains items that are in the configuration database then it updates them using data from the import file Otherwise it skips these items Note Either Create new items or Update existing items must be selected Otherwise there is nothing to import Display errors When this item is checked the Configurator shows a dialog box if an error occurs and then asks you if you want to proceed with the import When it is not checked it skips all items where an error occurred Import Configuration Data from File zi xi Look in S Ein e e Fae Untitled 1 mimMxSounds Projecto
42. creating historical reports Data filter selection other than Raw will result in data time stamped at the beginning of each subinterval When retrieving data using data filters other than Raw subintervals for which there are no data because of no data logging activity will be marked as empty slots at the corresponding time with a zero value You can check the returned qualities for further processing The historical qualities supported are as follows o OPCHDA_EXTRADATA 0x0001 More data may exist o OPCHDA_INTERPOLATED 0x0002 6 44 Features in TrendWorX Reporting a Interpolated data value o OPCHDA_RAW 0x0004 a Raw data value o OPCHDA_CALCULATEDOx0008 Q Calculated data value o OPCHDA_NOBOUND 0x0010 A No data found to provide upper or lower bound o OPCHDA_NODATA 0x0020 No data collected Archiving not active o OPCHDA_DATALOST 0x0040 a Calculation started stopped lost o OPCHDA_CONVERSION 0x0080 Q Scaling conversion error o OPCHDA_PARTIAL 0x0100 Q Aggregate value is for an incomplete interval Critical Note Because of the new compliance changes in historical replay and reporting a version 7 x and subsequent versions historical replay or reporting may not produce identical results to existing 6 1x version reports and or historical replay screen captures for the same signals and time periods The TrendWorX OLE DB Provider supports a minimal set of trend SQL keywords that can be use
43. for example Then the Totalizer Totalizer Type Preset function if enabled for a circular chart would help monitor the flow rate When counting upwards when the total exceeds the preset value it is reset When counting downwards the preset value is reset at a point when it becomes negative Initial Value Specifies a counting option When Enable Totalizer is checked the Totalizer will run according to the other configurations on this tab In runtime mode the Manual Reset button is available in the Manual Reset Totalizer tab When it is reset the system returns to its initial value and everything else is disabled Sets the level at which the system will automatically reset returning to its initial value and disabling everything else Enable Totalizer Auto Reset Level If you select two pens connected to the same OPC tag and enable the Totalizer function for one you can view the details namely that the Totalizer function is enabled in the output window When the signal is 0 the Totalizer will remain at the same value When it is on it will show the cumulative value The TrendWorX Viewer has Totalizer support on a per pen basis even for non circular chart plot types Trend Viewer Toolbar The Trend Viewer toolbar is the runtime user interface for the ActiveX The toolbar offers you access to various runtime TrendWorX Viewer ActiveX functions and operations To view or hide the tool
44. 5000 5000 A Name MSSQLDB Enorstokeep 1100 r Database connection settings Test DB connection DDEC Data source Perform following test if you want to make sure TwxSQLD emo Browse ere crease Username connection settings is e valid for data logging and Passiord data replaying Database type feat Server Perform test r Control board Activate r Server database group status gga server is stopped Reset Add New DB Group Deactivate Switch database TrendWorX Logger Configurator This opens the Select Data Source dialog box shown below Choose the Machine Data Source tab and an existing database Select Data Source 4 2 x File Data Source Machine Data Source Data Source Name Description dBASE Files User dBase Files Word User Excel Files User FoxPro Files Word User MS Access Database User Visual FoxPro Database User Visual FoxPro Tables User New 4 Machine Data Source is specific to this machine and cannot be shared User data sources are specific to a user on this machine System data sources can be used by all users on this machine or by a system wide service Cancel Help Select Data Source Dialog Box Or you can create a new database by clicking New in the Machine Data Source tab of the Select Data Source dialog box This opens the Create New Data Source wizard shown below which enabl
45. 7 12 USING VISUAL BASIC TO VIEW TIME SETTINGS OBJECTS ooocciccinccinoncnoncnnoconoconcnon cnn narrar nn 7 12 USING VISUAL BASIC TO VIEW DETAILS OBJECTS conmniccnnncnnnnnnncnnncnnncronnconarorrrnr rr 7 12 USING VISUAL BASIC TO VIEW PEN OBJECTS o0onnninnccnncconccononononononanonnnc nn nrnn rana 7 13 CIRGULAR CHAR TS dl bd ida 7 13 ALTERING THE APPEARANCE OF A CIRCULAR CHART 0 0eecceecceeseeee tence saeeeeeeecaeesaeecaeecaaesaaesaeseaeeeaeseeeeneneeegs 7 14 CIRGULEAR CHARTS IN RUNTIME io tian indecent en ei Le Pe eee a eed eee 7 15 AGTIVEX PROPER HES ccoo a cetags E aaa Eaa a eaaa a A EEA E 7 15 GENERAL TAB Aia r aa o dae os a HARE el oti dee A a dean da a 7 16 APPEARANCE TAB coser it a ella la obese iaa alts 7 17 RANGES TAB 25d sc esbencs EE A a E T 7 24 PENS TAB siii ey Ae eens ee eed eect A ne sted eee tare certian age 7 25 RATES TAB outils opa oa 7 27 SETTINGS TAB 000500400 long E indirecto eds licor E 7 27 ORG TAGS ia alicia ala Dal IAE 7 28 TAGS MENU ica aia 7 29 EXPRESSION EDITOR aee roae raeadr pa E aora aeae AA tasidh a TEE ap dial Ea aaaea E EE EEEE AE RE otters 7 30 EDITING THE TREND PEN iiiar a tlt AH at da E ei A A a 7 30 SIMULATION VARIABLES vireen aa iets sete dnd a 7 31 PERSISTENT TREND copiosa ron ati iaa ato 7 31 HISTORY TAG ie cece tect tertile ad atleti de deta ito bridas 7 32 EDITING REN Serina on a lod adas Dala alada 7 33 OS 7 33 ALARMS TAB otitis A Ae ee Le ee Sie a a 7 35 RANGES TABS E E E A ii a Deen e
46. ActiveX Persistent Trend Groups Close Refresh 4 gt Connect Help dul Group Tags Persistent Trend Dialog Box Double clicking a group displays all signals configured for that specific group You can select which signals to connect from the Persistent Trending server and click Connect TrendWorX Viewer fills its buffer from the data existing in Persistent Trending prior to drawing History Tag Selecting History Tag from the Tags menu in the Pens tab of the Properties dialog box opens the Unified Browser Then you can browse for OPC HDA tags e gt B 1 m A a x Qhep Selected Item IDs 0 OPC HDA E y My Computer B q Smar TWASQLSyr 1 L SimulatePLC Ramp MDB LogGroup1 SimulatePL EM MDB SimulatePLC Random MDE LogGroupi SimulatePL i OREA Q SimulatePLC Sine MDB LogGroupi SimulatePL Network Neighborhood El a Internet ve Favorites Browsing for Historical Tags 7 32 Introduction Editing Pens Clicking Edit in the Pens tab of the Properties dialog box when a pen is selected opens the Edit Trend Pen dialog box shown below which contains the following tabs General tab Alarms tab Ranges tab Totalizer tab Ideal Pens tab Edit Trend Pen i x General Alarms Ranges Totalizer Ideal Pen Options MDB LogGiroup SimulatePLC Random El I7 Visibl Tx isible Amis Desc SimulatePLC Random El Stair Plot 7 AutoSync P t Units Not
47. Assigned E z y T en Marker Type History d Show Samples Persistent Group Not Assigned EN fo o Al o Style Detail Line Solid y aid soc HH fel Color E Width fi Filter Last Sample y Plotter Big eet 120 Edit Trend Pen Dialog Box General Tab The General tab shown below is the default tab of the Edit Trend Pen dialog box This tab allows you to change the tag with which the selected pen is associated the description of the pen and the units assigned to the pen It also provides various options and style settings for the pen Note In the new plot style the pen description is used as the pen identifier title in the ranges field in a stacked plot In the Unicode version of TrendWorX Viewer the Description Desc Units and Details Format fields can be language aliased If the language alias for the units also has a related equation this will result in the automatic range and value scaling for the pen upon switching languages To select an alias to use click the button to the right of the Tag Desc Units Persistent Group or Details Format fields and select either Global Aliases or Language Aliases from the respective alias browsers which enable you to choose from a list of available aliases 7 33 TrendWorX Viewer ActiveX Edit Trend Pen 3 x General Alarms Ranges Totalizer Ideal Pen m Options Tag MDBE LogGroup1 SimulatePLC Random
48. Avg F Use calculation period Epply Heset Add New Tag Logging Tag Configuration Dialog Box Data Logging Filters The TrendWorX SQL Data Logger supports data logging filters based on a statistical description of the available samples You can configure the desired filter on a per tag basis by choosing the desired type e Min e Max e Avg e Standard Deviation e Running Min e Running Max e Running Avg e Moving Avg e Moving Min e Moving Max e Totalizer For the selected data logging filter TrendWorX SQL Data Logger will only log one sample to disk which will be computed as follows If the Calculation Period option is used then all samples within the calculation period will be used to compute the actual sample that will be data logged 3 23 TrendWorX SQL Data Logger Database Access Scheduling If the Calculation Period option is not used all samples within the log to disk interval will be used to compute the actual sample that will be data logged Using the data logging filters can greatly improve performance and historical database size requirements The TrendWorX SQL Data Logger has flexible options for controlling the frequency of data logging to the database Using these tools you can control the frequency of database writes and spread them in such a way that not all groups write to the database at the same time Internally TrendWorX SQL Data Logger tries to achieve thi
49. Bi You can select to log to a csv file or a txt file When you are using a csv file decimal places will be indicated by the When you are using the txt file decimal places will be indicated by the This is useful if you are using the TrendWorX Reporting on systems set up for European standards which r Report Threads Number of Threads Make Thread P A Priority Below fi Normal m Text Reporting File Extension Use CS Extension with Decimal Separator It will create a Comma Separated File C Use TXT Extension with Decimal Separator It will create a Tab Separated File V Show Excel when reporting to Excel F PreProcess Database Connections Lang None Le Subset OK Cancel Help Reporting Preferences Dialog Box use as a decimal separator 6 14 Features in TrendWorX Reporting You can also indicate whether you want to show Microsoft Excel after a report has run This option is selected by default but may be deselected if you do not wish to view your report after each instance A temporary path is used for intermediate table creation When you click Temp Path in the Reporting Preferences dialog box TrendWorX Reporting will use a temporary database table to create the report and then populate Microsoft Excel csv files or the target database Prior to Version 6 00 this temporary table was created in the source historical database Thus
50. Databases For Microsoft Access connections simply navigate to the desired mdb file by clicking on the browser button as shown in the figure below E Data Link Properties x Provider Connection Advanced Al Specify the following to connect to Access data 1 Select or enter a database name EE 2 Enter information to log on to the database User name Admin Password IV Blank password D Allow saving password Test Connection OLE DB Provider Configuration for Microsoft Access Databases To connect to an Oracle database fill in the appropriate information as shown in the figure below 6 42 Features in TrendWorX Reporting E3 Data Link Properties F x Provider Connection Advanced Al Specify the following to connect to Oracle data 1 Enter a server name Oracle 2 Enter information to log on to the database User name Password Blank password Allow saving password Test Connection Cancel Help OLE DB Provider Configuration for Oracle Databases To increase speed and efficiency the TrendWorX OLE DB Provider establishes a connection on a per data logging group basis and retrieves data for the historical tags in that group You can always close an existing connection set different properties and reopen the connection to retrieve data for a different group of historical tags Alternatively you can set the required properties for opening a connection of the Tre
51. Divides the overall time range of the report into subintervals and provides the computed maximum sample Divides the overall time range of the report into subintervals and provides StDev the computed standard deviation sample Last Divides the overall time range of the report into subintervals and provides the computed the computed last value sample All Statistics The columns of the report will be the statistical quantities Average Min Max StDev etc computed for every subinterval RunningMax Running maximum value RunningMin Running minimum value RunningAvg Exponentially weighted moving average Moving Average Average computed over a sliding time window Moving Max Maximum computed over a sliding time window Moving Min Minimum computed over a sliding time window Totalizer Performs totalizer function If Include Qualities is checked in the Report dialog box values OPC Data Access and historical data qualities will be retrieved The Filter Order field becomes available when the Moving Average Moving Max or Moving Min filter is selected under Data Filter If Filter Order X then X samples in the past from the current time will be used to calculate the Moving Average Moving Max or Moving Min Other Options The following table lists the functions of the Input Signal and Totalizer Type fields in the Report dialog box Function Amount per second Description The si
52. Enables disables the display of the header in the Details window boolean ShowFilter Enables disables the display of the data filter in the Details window boolean ShowMSecs boolean ShowPenStyle Details Objects Methods None Grid Objects Properties Grid Objects Methods Using Visual Basic To View Grid Objects Grid Objects Properties Enables disables the display of milliseconds in the time column of the details window Enables disables the display of the pen s style in the Details window rather than the squares filled in the color of the pen boolean ShowGrids Determines whether grids are displayed in the Viewer s main display area Default TRUE BSTR GridStyle Gets sets grid style such as solid dotted and dashed OLE_COLOR GridColor The color of the grid short GridNumber Gets sets grid number short GridWidth The grid width in logical units short SubGridNumber Gets sets the subgrid number for the Viewer in configuration mode if the circular chart mode is enabled short SubGridWidth Gets sets the subgrid width for the Viewer if the circular chart mode is enabled BSTR SubGridStyle Gets sets the subgrid style for the Viewer if the circular chart mode is enabled boolean ShowSubGrid Enables disables the display of the subgrids number for the Viewer if the circular chart mode is enabled OLE_COLOR SubGridColor Gets sets the subg
53. In the Rates tab of the Properties dialog box shown below you can select the desired Data Collection Rate and the number of Samples among other variables Currently the fastest data collection rate is 10 milliseconds ms The update rate is calculated by inserting the variables on the Rates tab into an equation Therefore if you change one of these variables all other variables will be updated automatically Notice also that the data collection rate is configured independently of the drawing action The fastest display update rate is 50 ms with the exception of bar plots in which the display rate matches the data collection period General Appearance Ranges Pens Settings Data ee Rate Display Refresh Rate Hours Secs Msec p m h p h yy Collection i Rate m Trend Period History Refresh Rate Years pei a du E Cancel Apply Help Properties Dialog Box Rates Tab The Display Refresh Rate controls the speed at which the signal curves will be drawn If for example the data collection rate is set to 250 ms and the Display Refresh Rate is set to 4 the samples will be collected at 250 ms but the signal curve will be updated every second without loss of data This is a great option to minimize system resource usage The History Refresh Rate controls the frequency at which the historical pens will be refreshed with new historical data from the TrendWorX Historical Database
54. Localized Ireland Jamaica C Native New Zealand Republic of the Philippin South frica IV Installed Locales Only Trinidad y Tobago United Kinadom Available Language United States Translations Only Zimbabwe y Help 2 20 Introduction Select Language Dialog Box Define the parameters listed in the table below Then click OK to return to the work area Select Language Parameters Parameter Description Lists available languages Depending on which item you have selected the view on the left will change If English is checked the languages will appear as their English name If Localized is List checked the languages will appear with the native country in parentheses for languages with several dialects only When Native is checked the languages are displayed the way they would be written in that language Installed Locales Only If this is checked local languages appear in the box Available Language Checking this box allows you to choose from available language Translations Only translations only Go Menu The Go menu commands are listed in the table below Go Menu Commands Command Shortcut Keys Function Back CTRL ALT Left Moves the cursor back to the previously selected item in the Arrow tree control F CTRL ALT Moves the cursor forward to the previously selected item in orward Ri
55. Microsoft ActiveSync to connect to the CE device Setting up the Download The download to CE tool requires modules on both a desktop or workstation PC as well as a Pocket PC or CE device because Microsoft ActiveSync services are used for connecting and authenticating the CE device Configuring the Desktop 1 27 TrendeWorX Container The desktop is the only part that has to be configured If the file download tool is installed properly it will be listed in the ActiveSync Manager list of ActiveSync modules in the Sync Options tab of the Windows Options dialog box You must enable the file download ActiveSync module in the ActiveSync Manager by checking the Download box as shown in the figure below A ht itt Sync Options Sync Mode Rules To synchronize a particular type of information select its check ta box To stop synchronization of that information clear its check box Calendar Microsoft Outlook B Contacts Microsoft Outlook El Inbox Microsoft Dutlook tS Tasks Microsoft Outlook vi i Download 88 Channels Channel Synchronization Pocket Access Microsoft Databases Files Synchronized Files To find out more about and to customize what gets Settings synchronized click on that information type in the list e and then click Settings J Synchronize mobile device clock upon connecting Cancel Windows Options Dialog Box An association
56. Microsoft Data Engine which is a Microsoft SQL Server 7 0 or 2000 compatible database engine with the following limitations e The Maximum database size is 2 GB 3 16 Introduction e Performance can decrease if more than five connections are open at one time However MSDE is a Microsoft SQL Server compatible engine that can be directly upgraded to the full Microsoft SQL Server Thus database connections to MSDE are identical to the database connections to Microsoft SQL Server To establish an ODBC connection to this database when configuring a new ODBC data source for Microsoft SQL Server or MSDE select the appropriate ODBC driver To configure a Microsoft SQL Server or MSDE database select the SQL Server driver in the Create New Data Source wizard as shown in the figure below Create New Data Source m x Select a driver for which you want to set up a data source Microsoft FoxPro YFP Driver dbf Microsoft ODBC for Oracle Microsoft Paradox Driver db Microsoft Paradox Treiber db Microsoft Text Driver txt csv Microsoft Text Treiber txt cs v Microsoft Visual FoxPro Driver Microsoft Visual FoxPro T reiber SUL Server NOOR REED a Selecting a Microsoft SQL or MSDE Server ODBC Driver When you have selected the Microsoft SQL Server driver click Next to proceed to the final dialog box in the Create New Data Source wizard shown below Create New Data Source Y xj
57. Moving Max and Moving The Rate value is specified in milliseconds and it can have a maximum value of 1814400000 about 21 days Note that this is the maximum sample to sample resolution in the returned historical data If the rate is set to 0 all the historical data within the search interval will be averaged 6 10 Features in TrendWorX Reporting The MaxSamples value specifies the maximum number of samples to be retrieved when the data filter is set to Raw It can range from 3 to 3600 TrendWorX SQL Tool ActiveX Control Methods boolean GetDBases VARIANT DBNames Returns all TrendWorX SQL Server database objects for a given database connection boolean GetGroups VARIANT GroupNames Returns all group objects for a given TrendWorX SQL Server S database object BSTR GetGroupTable Returns the name of the table that the current group is data logging void SetStartTimeDate DATE StartDate Sets the start time and date for historical data retrieval void SetEndTimeDate DATE EndDate Sets the end time and date for historical data retrieval boolean GetGroupSignals VARIANT SignalNames Returns the signal names for the currently selected group boolean GetSignalValues VARIANT Values VARIANT TDates VARIANT MSecs VARIANT OPCQualities VARIANT HDAQualities Retrieves the historical data based on the selected ODBC data source name TrendWorX SQL Server da
58. Option o Library CA Configuring an Oracle ODBC Database Connection Performance Optimization and Evaluation Data Compression Tools Deadband This section provides some insight into the options for optimizing a data logging application The biggest and most obvious performance booster is the hardware available For data logging fast processors increased memory capacity and fast hard disks accompanied by caching capabilities increase performance tremendously In addition multiprocessor servers drastically increase database performance and capacity TrendWorX SQL Data Logger supports a variety of data compression tools which can limit the amount of data stored in the database The TrendWorX SQL Data Logger supports absolute and relative deadband on a per tag basis Using the TrendWorX Logger Configurator you can configure this individually for each tag as shown below Only those samples that are above the deadband will be actually data logged 3 22 Introduction Signal Smar Simulator 14SimulatePLC Ramp OPC Taas Expressions Name Description SimulatePLC Ramp e i Ranges Deadband Logging Name SimulatePLC Ramp Hi Limit 100 2 E os ercent Eng units Lo Limit 0 y Update ranges on start 0 m Log to disk AllSamples C Running Max C Max Running Min C Min C Running Ava C Ava Moving Max C Sind Dey Moving Min Totalizer C Moving
59. Penindex long TimeShift long GetPenTimeShift long PenIndex boolean RefreshidealPen long Penindex Sets the time shift for the pen with index PenIndex by TimeShift seconds Not supported for XY plots Supported only in freeze mode Returns the time shift for the pen with index Penindex in seconds Not supported for XY plots Supported only in freeze mode Refreshes the ideal pen with index PenIndex with new historical data based on its ideal pen settings boolean DeletePen2 long Penindex boolean SetPenFilter2 long PenIndex short PenFilter Deletes the pen with index PenIndex Sets the data filter type for a pen with index Penindex Used for historical pens Valid PenFilter types are OHDA_RAW 0 OHDA_AVG 1 OHDA_MIN 2 OHDA_MAX 3 OHDA_STDEV 4 OHDA LAST 5 OHDA_MINTIME 6 OHDA_MAXTIME 7 void ToggleMainToolbar Toggles Trend Viewer toolbar if enabled Supported only in runtime animation mode void ToggleMainToolbar2 long top long left Toggles Trend Viewer toolbar if enabled and positions it at the top left coordinates Supported only in runtime animation mode void AboutBox Displays the Viewer s About Box void Refresh Standard refresh method Call after visual modifications boolean PrintTrend boolean bShowPrinterDlg Prints the TrendWorX Viewer display If bShowPrinterDlg is set to TRUE the Windows Print dialog box will
60. Persistent Trending 28 boolean GetPointDataAtUTC BSTR PointName long Rate long Samples boolean Stamp DATE TDateFrom VARIANT Values VARIANT TDates VARIANT MSecs VARIANT Quality Call this method to retrieve buffered data in memory from Persistent Trending for a specific signal PointName Rate is the desired time resolution of the returned samples Samples is the desired number of samples to be returned The variants Values TDates MSecs and Quality represent variant arrays of element types VARIANT which contain the values time and date stamps millisecond resolution and quality information about the retrieved samples Values variants utilize double values VT_R8 and TDates variants utilize DATE types VT_DATE Msecs and Quality variants utilize VT_14 types The Persistent Trending will allocate memory for these arrays and the caller of this method must always FREE the associated memory Also if no samples are retrieved the method will return FALSE and the variants will be empty Upon executing this method the Persistent Trending server will search all groups configured for the first group which has the PointName signal configured Once found it will perform a time stamped search to retrieve all values buffered in memory that satisfy the desired data collection rate and number of returned samples starting from the most current one Persistent Trending will search for the requested data at
61. Persistent Trending is to provide a real time OLE automation server for data collection in memory RAM with simultaneous data logging capability to a user defined CSV file Client applications can request access from the Persistent Trending server through OLE automation to its buffered data in order to enhance their functionality The TrendWorX Viewer ActiveX is already interfaced to the Persistent Trending server and if the server is installed on the client PC and is running the TrendWorX Viewer will connect to Persistent Trending to initialize its pens Persistent Trending targets small to medium load applications which require trending displays to be populated with available data upon initialization In general Persistent Trending is responsible for Collecting real time data from OPC servers in memory RAM Supplying automation clients with the above buffered data Logging data to a user configurable csv or txt file Managing a sophisticated multithreaded data buffering system to guarantee data integrity with support for customer configurable data collection rates In terms of implementation the Persistent Trending OLE automation server s main features include A highly customizable server Fast data retrieval from memory buffers Independent data collection rates for each group of points A full set of exposed OLE automation methods Built in buffering system Security integration Support for
62. R Starts previously configured reports Stop reports CTRL SHIFT R Stops the reports that are currently running Tools Menu The Tools menu contains the following commands Command Shortcut Keys Function Opens the Security Login dialog box Enter your Security login F6 user name and password to access the Security Server Security Opens the Security Configurator If a proper login configuration F7 Ka pe eee you will be prompted for one at Opens the Set Working Directory dialog box which allows you to set the directory in which all files associated with this report will be located Click Browse to select the directory Working directory F8 Help Menu The Help menu contains the following commands Command Shortcut Keys Function Help Topics F Launches the online Help for TrendWorX Reporting Launches the About Box which contains information about the product version number copyright and available disk space It also contains contact information About Application Report Configuration In configuration mode you can add edit or delete reports without report processing taking place To add a report select Add Report from the Edit menu or the toolbar This opens the Report Configuration Wizard which is a series of dialog boxes that guide you through the report 6 15 TrendWorX Reporting configuration General e Tags e Report e Target e Schedule Range Note F
63. Random Smar Simulator 1 SimulatePLC Sine Cancel Help Copying Persistent Tags The Persistent Trending configuration enables you to perform two different kinds of search and replace functions Group Search Group search Global search Selecting Group Search from the Edit menu opens the Search and Replace dialog box shown in the figure below Click the Tags Menu button to select all the tags to which you want to apply the search and replace Define a search string which can be the fully configured tag or a portion of it define a replacement string and then click Replace 5 16 Introduction to Persistent Trending Global Search Search Text Replace Text MV Match Case Tags Menu i Point Names Smar Simulator 1 SimulatePLC PumpS peed Smar Simulator 1 SimulatePLC Random Smar Simulator 1 SimulatePLC Sine All C Selected Replace Group Search and Replace Dialog Box Selecting Global Search from the Edit menu opens the Search and Replace dialog box shown in the figure below You can search for a given string across all or selected configured groups by clicking Find Groups Select a replacement string and the groups to which you want to apply the new string and then click the Replace button to continue Global Search amp Replace 3 x Search Text Replace Text Tags Menu V Match Case Groups to be All Selected Replace 4 gt Help
64. To Display I Tile All Displays J Cascade All Displays Cancel Help Application Preferences General Tab You can choose to have the new display by default appear either as a Blank window or as a window with an embedded Trend Viewer Checking Fit Object to Display maximizes the size of the object in the container window Checking Tile All Displays changes the size of your objects to fit them into the evenly into the display window This is helpful if you want to compare data in different objects or if you are moving back in forth from object to object Checking Cascade All Displays resizes all of the open objects and overlaps them so that you can see the top and left side of every open object window 1 18 Getting Started Window Dimensions Runtime Tab Runtime Title Bar Options Runtime Frame Style The Window Dimensions field specifies dimensions in pixels from the left and the top of the window as well as the width and the height of the window The Runtime tab in the Application Preferences dialog box shown in the figure below configures runtime mode options for the entire TrendWorX application As you can see the Runtime tab contains the following features e Runtime title bar options e Runtime frame style e Runtime settings The right side options allow you to decide how the application will start in runtime and how you want the application to appear in runtime mode Additionally th
65. To set the edited database as the active database click the Yes button 2 18 Introduction Edit Menu The Edit menu commands are listed in the table below Edit Menu Commands Command Shortcut Keys Function New Creates a new item depending on what is selected in the tree control Rename CTRL R Renames the selected item Multiplies the selected object in the tree control For Multiply CTRL M more information on this command see the section below Delete CTRL DEL Deletes the selected object Cut CTRL X Cuts the selected object from the view and places it on the clipboard Copy CTRL C Copies the selected object to the clipboard Paste CTRL V Pastes the last object placed on the clipboard Selects all objects in a list The selection is shown in the Select CREEA upper right hand section of the viewer Unselects all selected items and selects all unselected Invert Selection items in a list in the upper right hand section of the viewer Multiply Item Command The Configurator allows you to multiply items in the tree control including aliases folders alias values themes and theme items Multiplication provides a simple way of developing configurations where there are many similar items in a given category To multiply an item 1 Select the item in the tree control that you wish to multiply 2 Either right click the item and select Multiply from the pop up menu or select Multip
66. VBScriptEx gdf display that uses VB scripting 7 77 TrendWorX Viewer ActiveX 7 78 Chapter 8 INTRODUCTION TO DATABASE UPSIZING You can upsize your TrendWorX Logger databases from Microsoft Access mdb to MSDE allowing you to take advantage of the powerful relationship database technology in MSDE MSDE supports databases up to 2 GB with up to five concurrent users This document provides instructions for upsizing databases from Microsoft Access to MSDE Though the default TrendWorX Logger database is a Microsoft Access database TWX32 mdb mdb file the TrendWorX Logger is designed to work with SQL Server databases as well In some cases the transition to a SQL Server database is required to make use of the better memory management database security robustness and higher performance of SQL Server or MSDE Auto Starting the SQL Service When upsizing databases you must set the SQL service to auto start 1 Double click on the SQL Server icon in the Windows task bar to open the SQL Server Service Manager as shown in the figure below 2 Make sure that Auto start service when OS starts check box is checked 3 Close the SQL Server Service Manager dialog Fo SOL Server Service Manager TEE Server SERVER NAME y Services sal Server y Refresh services gt StartyContinue il Pause a Stop JV Auto start service when OS starts Auto Start Enabled for SQL Service Using the TrendW
67. Viewer display as shown in the figure below so that the toolbar is always visible during runtime mode Note The toolbar docking option is available only in the new plot style as shown in the figure below 7 45 TrendWorX Viewer ActiveX Historical Replay ES Trena ES SimulateP LC Random ee oe Ea ESTA Ee ee N 12 27 53 PM 12 28 17 PM 12 28 41 PM 12 29 05 PM 54 2 2004 52 2004 52 2004 52 2004 KT Hei te A ll a EA a wa S W SimulatePLC Sine 1 00 12 29 28 PM 52 2004 BB SimulatePLC Random Ideal 2777 Re RH RE RE RE RH Trend Viewer Toolbar Docked in Trend Display The TrendWorX Viewer is interfaced through the OPC Historical Data Access specification to the ProcessView TrendWorX SQL Server as well as to other third party historical servers supporting the specification The TrendWorX Viewer ActiveX is compliant with the latest OPC HDA release specification 1 2 In general the OPC HDA specification is an extended OPC specification which includes an increased number of interfaces and methods not all of them being mandatory On the other hand the TrendWorX Viewer ActiveX trend client requires an advanced HDA server implementation to support its rich user interface Since not all OPC HDA servers will support the TrendWorX Viewer s required advanced interface set and since there is currently no available way to classify OPC HDA server functionality or equivalently compliance levels the TrendWorX Viewer ActiveX h
68. a Calculated data value o OPCHDA_NOBOUND 0x0010 a No data found to provide upper or lower bound O OPCHDA_NODATA 0x0020 a No data collected Archiving not active O OPCHDA_DATALOST 0x0040 a Calculation started stopped lost O OPCHDA_CONVERSION 0x0080 a Scaling conversion error O OPCHDA_PARTIAL 0x0100 a Aggregate value is for an incomplete interval The following OPC HDA COM interfaces are supported e interface IOPCHDA Server e interface lOPCHDA Browser e interface IOPCHDA_SyncRead e interface IOPCHDA_AsyncRead e interface IOPCHDA_SyncAnnotations 3 51 TrendWorX SQL Data Logger Methods The TrendWorX SQL Server supports the following OPC HDA Interfaces and methods e interface IOPCHDA_Server Y HRESULT GetltemAttributes Y HRESULT GetAggregates Y HRESULT GetHistorianStatus Y HRESULT GetltemHandles Y HRESULT ReleaseltemHandles Y HRESULT Validateltem Ds Y HRESULT CreateBrowse e interface lOPCHDA_ Browser Y HRESULT GetEnum Y HRESULT ChangeBrowsePosition Y HRESULT GetltemID Y HRESULT GetBranchPosition e interface IOPCHDA_SyncRead Y HRESULT ReadRaw Y HRESULT ReadProcessed Y HRESULT ReadAtTime Y HRESULT ReadModified Y HRESULT ReadAttribute e interface IOPCHDA_AsyncRead Y HRESULT ReadRaw Y HRESULT ReadProcessed Y HRESULT ReadAtTime Y HRESULT ReadModified Y HRESULT ReadAttribute Y HRESULT Cancel e interface OPCHDA_SyncAnnotations Y HRESULT QueryCapabilities Y HRESULT Read Y HRESULT Insert MSDE Support 3 52
69. a Microsoft Access Configuration Database To create a new Microsoft Access configuration database in the Configurator 1 Select New from the File menu as shown in the figure below File Edit view Go Tools Help Open rs Ctrl 0 Save As Connection Properties Export CSV Import CSV XML Export XML Export Schema XML Import Creating a Configuration Database 2 The introduction screen for the Configuration Database Wizard appears Click the Next button to continue 3 You have two options for creating your new database as shown in the figure below Select Create new configuration in MS Access database Click the Next button to continue 2 3 TrendWorX Logger Configurator Which type of database would you like to use This wizard will create configuration database depending on the choice below Choose the type of database you would like to create Create new configuration in MS Access database This will create configuration in a single file mdb Configurator can open this file directly no other files needed C Create new configuration in MS SOL Server database This will create configuration in MSDE or MS SOL server Configurator has to use univesal datalink file udl to access this database lt Back Finish Cancel Help Creating a New Microsoft Access Database 4 Specify the directory path and file name for the new database as shown in the figure below Cli
70. are posted e Started Logging Severity 500 e Stopped Logging Severity 500 e Error Starting Data Logging Severity 800 e Activated Database Group Severity 600 e Deactivated Database Group Severity 600 e Activated Logging Group Severity 600 e Deactivated Logging Group Severity 600 e Switched Database Connection Severity 650 e Failed to Activate Severity 750 e Failed to Deactivate Severity 750 e Errors in Loading Configuration Severity 650 3 37 TrendWorX SQL Data Logger e Failed to Switch Database Severity 750 e Missing Logging Tag Severity 650 e Lost Database Connection Severity 800 e Got Database Connection Severity 500 e Maximum Number of Logging Packets Reached Severity 650 e Lost Logging Packet Severity 750 e Retried to Log Data Severity 650 e Not Enough Client Units for Database Switching Severity 500 To activate the NT Event Logger you need to enable this option under the ProcessView License Monitor shown below by checking Always Write to Local NT Event Log License monitor xi License Events r Relay Events to Node Primary Backup NT Event Log Severity Level 500 0 1000 0 Everything 1000 nothing I Always Write to Local NT Event Log Use local time stamp NT Event Log Applications O Security Server Security Server TWwXReport Trendwor lt Report TWxS lS vr Trendwor Logger O Twxview Trendwor Viewer DIVCR Wor VCRWor Server
71. calculated variables Interface to OPC real time servers Easy Visual Basic integration Embedded signal simulator The internal architecture of Persistent Trending allows the data to be collected at a different rate and logged to disk at a multiple of the data collection rate in order to minimize the overall system load Currently the minimal scan rate is set to be 10 milliseconds and all data collection rates that you set must be an integer multiple of the minimal scan rate In addition you can configure the desired number of samples to buffer up to a maximum of 12 000 and the desired logging to disk interval In addition you can configure the file management system for logging to disk New Features in TrendWorX Persistent Trending TrendWorX contains many new features that make the use of Persistent Trending much easier These features include Improved buffering management for load balancing Faster client data retrieval mechanism Support for the Unicode version OLE automation methods to retrieve data in universal time coordinates UTC time format Enhanced expression support Daylight savings time switch over support 5 1 TrendWorX Persistent Trending Note TrendWorX up to and including Version 6 1x is using the Windows based APIs for converting a time from local time to UTC or from UTC to local time The Windows APIs do not correctly adjust the conversion for the daylight savings time if th
72. changes are downloaded to the Data Logger or the Switch Database button is clicked 2 Click the Switch Database button to switch the logging database A message box will warn you again and will give you the choice of whether to redirect pending writes to the new database connection When the Data Logger detects a database switch operation it also may require a higher count of client units if the database switch is an upgrade from a Microsoft Access database to a SQL server database or an Oracle database If the client units are not available the database switching operation will fail and the active logging database will revert back to the old one For more information please review the ProcessView licensing and client units registration documentation You can also create a new data source and establish a new database connection for the new database group you have just created by using the following procedure 1 Click the New button in the Select Data Source dialog box as shown in the figure below Select Data Source a 21x File Data Source Machine Data Source Data Source Name Description dBASE Files User dBase Files Word User Excel Files User FoxPro Files Word User MS Access Database User Visual FoxPro Database User Visual FoxPro Tables User New A Machine Data Source is specific to this machine and cannot be shared User data sources are specific to a user on this machine System data sources can be
73. create a new database by selecting New and following the Report Configuration Wizard When you make your selection TrendWorX Reporting will fill in the type of the source database user ID and name Note If TrendWorX Reporting is running on a PC other than the one on which the TrendWorX SQL Data Logger is running you will have to configure an ODBC data source by connecting to the databases on which the TrendWorX SQL Data Logger is logging data Logging to a Text File To configure the report to log to a txt or csv file select Text File on the Target dialog box as shown in the figure below Then click Report Path to select the directory in which the file will be created After you have selected the location for the file select the Number Format for the data from the report If Add Header is checked TrendWorX Reporting will add a report header to the file 3 C Database Table Report Path Not_Assigned Number Format oc o y IV Add Header C Excel File Create Report with Date C Overwrite Report lt Back Cancel Help Logging to a Text File in the Target Dialog Box Logging to an Excel File To configure the report to log to an Excel file select Excel File from the Target dialog box as shown in the figure below 6 23 TrendWorX Reporting rarae ij x C Database Table C Text File Excel File Template Not Assigned Report Path Not Assigned P Publish HTML Path Not_Assigned F
74. currently supports only Microsoft Access Microsoft SQL Server and Oracle databases as targets configured as machine data sources not file data sources Refer to the Tagssection as needed Note When you are creating reports to Excel or to a txt or csv file remember that Excel 2000 can handle a maximum of about 65 000 rows Make sure that your report will not exceed this amount so that the report will be completed without errors 6 22 Features in TrendWorX Reporting Note When you are creating reports to Excel the target report file name will always be appended by the time and date extension at the time the report was executed TrendWorX Reporting will create a table in the target database The table name will be produced from the target name If Create Report with Date is selected the time and date of the report creation will be appended to the name If Overwrite Report is selected the table name will be the same as the report name and all the existing data will be overwritten Now that you have selected the Target Type and location click Next to continue the Report Configuration Wizard This opens the Schedule dialog box Logging to a Database If you choose to create a report that will write to a database you must configure a database that will contain all the resulting data from the report Click the DSN button in the Target dialog box to open the Select Data Source dialog box You can select an existing database or you
75. data Options Compact Repair MS Access Database MSDE Manager Launches the ProcessView MSDE Manager for configuring MSDE Opens the Compact Repair MS Access Database dialog box 2 21 TrendWorX Logger Configurator databases Setting the Working Directory Selecting Set Working Directory from the Tools menu opens the Set Working Directory dialog box shown below which enables you to configure a custom directory in which all application configuration files will be stored and retrieved Click Browse to select the directory Select working directory xj C Program Files Smart Process View Examples Browse I Save to Registry Cancel Set Working Directory Dialog Box Compacting and Repairing Microsoft Access Databases You can compact Microsoft Access databases which can be either TrendWorX configuration databases or historical databases using the Compact Repair MS Access Database dialog box shown below Microsoft Access based databases are subject to database fragmentation over time and the support for the database will compact the target database reclaim unused space and drastically improve database performance Compact Repair MS Access Database i x m Compact Repair Connected Configuration Database C Other Database Username Admin Password M Use blank password IV Backup original database before compacting starts recommended D Make sur
76. data logging 17 BOOL GetGroupPointData BSTR GroupName BSTR PointName long Rate long Samples BOOL Stamp VARIANT Values VARIANT TDates VARIANT MSecs VARIANT Quality Call this method to retrieve buffered data in memory from Persistent Trending for a specific signal PointName Rate is the desired time resolution of the returned samples Samples is the desired number of samples to be returned The variants Values TDates MSecs and Quality represent variant arrays of element types VARIANT which contain the values time and date stamps millisecond resolution and quality information about the retrieved samples Values variants utilize double values VT_R8 Tdates variants utilize DATE types VT_DATE and Msecs and Quality utilize VT_14 types Persistent Trending will allocate memory for these arrays and the caller of this method must always FREE the associated memory Also if no samples are retrieved the method will return FALSE and the variants will be empty Upon executing this method the Persistent Trending server will search all Persistent Trend groups for a group called GroupName and then it will search for the PointName signal in the requested group Then it will perform a time stamped search to retrieve all values buffered in memory that satisfy the desired data collection rate and the number of returned samples starting from the most current one Persistent Trending will search for the re
77. database uses a hierarchical organization which involves database groups and logging groups within each database group This enables you to organize data logging activity logically in smaller loads and in your desired areas of interest It is recommended that you do not add more than 500 tags per group depending on available hardware and the overall data logging load as well as the database type This way the database tables will become more manageable and the data logging activity will not require extensive system resources In general for frequent data logging it is recommended that you configure your data logging activity such that the historical tables created will not exceed a size of 80 MB Note Microsoft SQL Server and MSDE have database maintenance capabilities even when active connections are open In certain cases for an above average data logging load it may be preferable to create databases with a large initial size in order to avoid frequent database expansion operations TrendWorX SQL Data Logger has a multithreaded architecture This yields more responsive single processor systems and increases the overall system performance of multiprocessor systems The multithreaded architecture of the TrendWorX SQL Data Logger is designed around the database group Each database group has a set of threads to log data to disk and to share the cataloging load across multiple threads In addition you can have multiple database groups logging da
78. down Application Preferences x General Runtime Loading Persistent Trending Reporting Logging r Launch Shutdown Start Stop I Launch On Startup Maximized IM Minimized J Start On Runtime I Stop On Configure I Shutdown On Exit Cancel Help Application Preferences Reporting Tab 1 21 TrendeWorX Container Logging Tab ActiveX Toolbar The Logging tab shown in the figure below enables you to interface with the TrendWorX SQL Data Logger Note that the TrendWorX Container will connect to the SQL Data Logger via a COM interface As a result when the TrendWorX SQL Data Logger is loaded it will not be visible The most important feature on this tab is the Computer Name field which allows the user to choose which machine on the network they want to start the TrendWorX SQL Data Logger It is assumed that all components are properly registered and DCOM properly configured for this function to work Application Preferences x General Runtime Loading Persistent Trending Reporting Logging r Launch Shutdown m Start Stop T Launch On Startup Start On Runtime Tl Stop On Configure Computer Name SMAA QD77CQJ Cancel Help Application Preferences Logging Tab The ActiveX toolbar consists of two main parts The OLE button is used to display the ActiveX Control Selection dialog while the next five buttons represent Smar ActiveX controls
79. eta cele 6 15 HERR MEN E coros tl E E E E E E EE dhe ad cored 6 15 REPORT CONFIGURATION ici ld aces 6 15 GENERAL siii iaa ii 6 16 TAGS cotton A a tie hs 6 17 REPORT is c ctstisthvics ats eethtende ated shan ivi EEEa AE TESE EKAA NENE a AE NEE SEa TA AEA OETAN pecas 6 19 TARGET m orior a a r a a a a a a a a G 6 22 SCHEDULE E TT E E A 6 25 RANGE iaa A A nine ecient igh 6 27 EDITING A REPO a e E E malas padilla teo ias 6 29 RUNTIME MODE ico cotidiano etedibecety 6 30 TRENDWORX REPORTING SECUR Y a Te a ara a ar aara aa Sana e a Erre eean SE Ea araa A EEA aaa 6 31 GENEVENT REGISTRAR INTEGRATION uscar mitin seraa e a aA pa sevice aAA EEE a aE lara 6 32 OLE AUTOMATION A A datada E E AA E EEN 6 32 OLE AUTOMATION PROPERTIES onran aloe 6 32 OLE AUTOMATION METHODS e g nr aa nes eked db sega E E on ra e N E i 6 33 TRENDWORX OLE DB PROVIDER irriken ea iiae e aa aaae a Eeke ia iaeia 6 37 Vi Table of Contents USING THE TRENDWORX OLE DB PROVIDER 00 cece eee eeeeene cent ener eter eeeeeseeeseaeesaeesaaessaeesaeesaeesaaesaeseaeeeaeseaeee 6 40 CONNECTING TO TRENDWORX OLE DB PROVIDER occocccioccnoncnonccononononononononnnc nro 6 40 RETRIEVING HISTORICAL DATA o oo cee ceeceecre cette eeeeeeeeeeeaeecaeecaeeeaaesaaeceaeseaeseaaeseaeseaeseaesseeeseeeseeeseeesaaesaeseaeeeaeeeatees 6 44 RETURNED RECORDSET STRUCTURE ooccoicnicccnnccnanncnnncnononn oiidid narrar narrar narran didain diui datati 6 46 EXAMPLE APPLICATION USING TRENDWORX OLE DB PROVIDER ooo
80. f Continuous Initial value fo Amount per min Preload Amount per hour Preset Amount perday AutoReset Level 2000 coca o Report Dialog Box Note When running an AllStats report for every month or year the report should return the Min Max Avg and StDev for the last month or year for the specified tags Also only one value for each of the stats should be reported per tag To do this properly set all values in the Process Data Every field of the Report dialog box to 0 The following table describes the different Data Filter types listed in the Data Filter field of the Report dialog box Filter Type Description All of the actual raw samples stored in the database will be retrieved and time aligned to produce the report If no samples were stored for a specific Raw time interval a NULL value will be stored You can override this by enabling the Backfill Empty Cells option As a result TrendWorX Reporting will copy over the previous sample value if it is available This is 6 20 Features in TrendWorX Reporting a time intensive and CPU consuming report type that may increase hardware requirements or prolong report execution times Average Divides the overall time range of the report into subintervals and provides the computed average sample Min Divides the overall time range of the report into subintervals and provides the computed minimum sample Max
81. in the title bar If you do not want a button to appear in the title bar simply click the box that applies to that button to remove the check mark The Outer Frame Edge drop down list enables you to choose from the following three frame styles for the TrendWorX Container screen e None 1 19 TrendeWorX Container Runtime Settings Loading Tab e Raised resizable e Raised fixed size The runtime settings listed along the right side of the Runtime tab enable you to choose how the TrendWorX Container screen will appear during runtime mode For example check the appropriate box to minimize or maximize the TrendWorX Container screen You can also choose whether to have menu bars toolbars or the status bar showing during runtime mode The Loading tab shown in the figure below enables you to add or delete previously created Trend displays during startup If Auto Load is checked the selected displays will be loaded upon startup of TrendWorX If Auto Update is checked TrendWorX will automatically add the existing displays to the list of displays to be loaded during the next startup If Auto Runtime is checked the selected displays will automatically start in runtime mode upon startup You can also select displays to add to the display startup list by simply clicking Add which will open a Display dialog box Similarly you can delete a display from the startup list by selecting it and then clicking Delete For this feature t
82. interface and a browsing interface as well as how to retrieve individual samples for a signal from Persistent Trending 4 7 TrendWorX Examples ES PersistentTrend BADemo t32 E Persistent Trend VBA Demo VBScript Examples The VB Script Examples folder contains a TWX VBScriptEx gdf display that uses VB scripting Open this file in GraphWorX and go into runtime mode as shown in the figure below Click on the various buttons to see how the VBScript functions work In configuration mode you can click on the buttons to see how the script pick actions are configured Title Trend Viewer Set Title Text Set Right Hand Time Time 12 00 Update 8 7 2002 Change Trend Period k minutes Useful Buttons Toggle Freeze Mode Toggle Title Toggle Global Ranges Pees MM SimulstePLC Random 6 00 9 40 34 PM J EE pat 2 H SimulatePLC Sine 0 89 9 40 34 PM Toggle Details 2 PickaPen 0 wll Pens Grids Toggle X Grids Toggle Y Grids Pen Name ee A ofXGrids 5 wl al Hide Show Pen Toggle Autoscale Pen Color M ofY Grids 5 w a Hide Show Samples Toggle Stairplot Pen Width 1 xfa X Grid Width 1 wa Hide Show Markers Delete All Pens Get Number of Pens Y Grid Width 1 wha Add Pen Change Pen Delete Pen Show Pen in Range VBScript Examples 4 8 Chapter 5 Persistent Trending Introduction to Persistent Trending The primary purpose of
83. interfaced to the ProcessView Security Server and currently supports the following security actions within runtime mode as shown in the figure below 6 31 TrendWorX Reporting Actions GenEvent Registrar Integration OLE Automation AW gt lt Report AWS yr J AW gt View Bridge ors Dw DwsRedundancy Gwe Login bam hat Actions Users Association lt lt Move gt gt Users Groups 97 AWxContainer AW Ind AWXLog AWAMMA AwWXReport AWS vr AA Vier e BridgeWors Dwg DwxRedundancy Gwg OA e 3 Cancel Security Server 4H E a AA AE v hal TrendWorX Reporting is interfaced to the GenEvent Registrar Server If it is enabled within the GenEvent Registrar configuration tools it will post events to the GenEvent Registrar and subsequently to the NT Event Logger The following events will be posted Started Reports Severity 500 Normal Event Stopped Reports Severity 500 Normal Event Error in Starting Reports Severity 800 Abnormal Event e Report Deleted Severity 650 Warning Event Report Cancelled Severity 650 Warning Event Report Executed Severity 500 Normal Event if no errors occurred Report Executed Severity 650 Warning Event if errors occurred The TrendWorX Reporting Application registers with the OLE ROT Running Object Table as a single instance OLE Automation server If it has started all cli
84. interval This specifies the interval in msec between processed samples The TrendWorX OLE DB Provider will process all samples which have time stamps within a time interval to compute the corresponding sample with the desired filter It is ignored if the data retrieval filter is set to Raw or AllStat If it is set to 0 all historical samples within the search time interval will be included in creating a processed sample which will be returned to the user Note that when the data filter is set to Raw the Smar TrendWorX OLE DB Provider will return all historical samples which fall within the search time interval using the original time stamp that was data logged On the other hand if it is not set to Raw the Smar TrendWorX OLE DB Provider will divide the search time interval into subintervals of Subinterval duration and process all samples that fall within each subinterval to calculate a processed sample to return Start yyyy mm dd hh mm ss This specifies the starting time for retrieving historical data and it has to match the indicated format If it is not specified the time search will include all historical values starting at the beginning of the historical data End yyyy mm dd hh mm ss This specifies the ending time for retrieving historical data and it has to match the indicated format If it is not specified the time search will include all historical values up to the most recent ones Important No
85. it added an additional load to the database while the database was actively data logging and retrieving historical data for clients Now this temporary table is created inside a temporary Microsoft Access mdb file in the chosen temporary path and it is deleted as soon as the report is completed If Make Thread Priority Below Normal is checked in the Reporting Preferences dialog box TrendWorX Reporting will start its background report processing threads at a lower priority than normal so that the system will be able to spend more time executing other more important tasks Note By default TrendWorX Reporting uses only a single thread This allows for lower usage of CPU on single processor systems In general it is suggested that you increase the number of threads to more than one only if the TrendWorX Reporting tool is running on a dedicated node In the Unicode version the Language and Subset fields in the Reporting Preferences dialog box allow you to select a desired language set from the Language Server To select a language click the button to the right of the Language field Actions Menu The Actions menu contains the following commands Command Shortcut Keys Function Opens the Report Status dialog box which Report status SHIFT S provides you with pertinent information about the Pe iz SPSS Cancel report SHIFT A Cancels the report that is currently selected and running Start reports CTRL
86. listed above you can also connect to the Smar TrendWorX OLE DB Provider through ADO in the following ways Dim twx As New ADODB Connection Set Provider twx Provider Smar TWXOLEDB Set up Properties twx Properties Prompt 0 twx Properties Data Source local 333 twx Properties Password twx Properties User ID twx Properties Extended Properties TWXPROVIDER sqloledb TWXDBASE MyFirstDBase TWXGROUP LoopX twx Properties Location TWXSQL_TEST_1 Open Connection twx Open This code assumes the following The historical database is a Microsoft SQL Server database A trusted connection is used The SQL Server database where the historical data are logged is called TWXSQL_TEST_1 The Microsoft SQL Server is located on the local workstation In addition to the above properties the Smar TrendWorX OLE DB Provider supports language aliasing by making its resources available in a resource dll When translating the resources do not translate the strings related to the default properties of the provider Retrieving Historical Data TrendWorX Reporting has been updated to be compliant with the latest OPC HDA specification 1 2 Although TrendWorX Reporting is not a direct OPC HDA client or server it creates reports with data outputs as specified by the OPC HDA specification Version 7 x introduced an enhanced data retrieval system which utilizes an updated approach to
87. local file every time the HTML page that hosts the Viewer is loaded inside the Web browser You can also select aliases to use for the configuration file Clicking the button opens the Global Aliases tab of the Unified Browser as shown in the figure below Select a global alias from the Unified Browser which includes all global aliases in the global alias database This eliminates the need to manually type in the alias name All global aliases that are configured in the Global Alias Engine Configurator are conveniently available to choose from inside the browser The tree control of the Global Alias Engine Configurator is mimicked in the tree control of the Global Alias Browser Select a global alias by double clicking the alias name e g Floor in the figure below The alias name appears at the top of the browser which automatically adds the lt and gt delimiters to the alias name Click the OK button lt Floor gt Global Aliases CTA ee Rae al Building 4 Buildingldent al Floor FloorCaption FloorIdent Floor human readable identification string iH Room l RoomCaption a RoomIdent Room human readable identification string H RoomTemper ae Aliases Building human readable identification string cea Selecting a Global Alias from the Unified Browser Appearance Tab The Appearance tab of the Properties dialog box shown below sets the appearance properties for th
88. made all your selections click Next to continue the Report Configuration Wizard This opens the Target dialog box 6 21 TrendWorX Reporting Target The next step in the Report Configuration Wizard is the Target dialog box shown below The target name that you entered will be used as the basis of the generated target report database table csv file txt file or Excel worksheet target j x Database Table Text File Excel File DSN Not Assigned User ID NotAssigned SS Type Password None Create Report with Date C Overwrite Report lt Back Cancel Help Target Dialog Box The Target dialog box has several options for logging a report including e Logging to a database e Logging to a txt or csv file e Logging to an Excel file In addition you can select to Overwrite the report Create a new report with a date If you overwrite the report the target report table or file will be named using the selected target name and any previous data will be overwritten If you create a new report a new table or file will be generated every time the report is run and its name will consist of the report name and a string representation of the time and date when the report was created TrendWorX Reporting can also generate a report table within the same database in which the historical data reside The selection process is identical to the one described earlier Note TrendWorX Reporting
89. made by selecting History Tag from the Tags Menu to view all of the available OPC HDA servers In addition to real time and historical data the TrendWorXViewer also supports the custom pen type through OLE Automation This pen can be fed with user data using OLE Automation methods Runtime Mode Operations The Trend Viewer toolbar shown below enables you to modify the trend display during runtime mode E te Lol ilo DOM mw RS ew Trend Viewer Toolbar During runtime mode the TrendWorX Viewer provides support for the following functions Adding deleting and editing a pen Freezing or unfreezing the Trend display does not halt data collection Editing trend options such as grids ranges cursor step and language resources Editing the trend period or data collection rates Note that by changing data period TrendWorX Viewer may modify the data collection rate in order not to exceed the configured number of samples Displaying statistical information for all the pens regarding the displayed values This statistical information can be stored in a csv file You first need to provide a valid file name for the function to work Zooming on a specific region of a trend when the trend is in Freeze Mode You can zoom by pressing the left mouse button while holding down the SHIFT key and selecting the area you on which you would like to zoom Clicking the left mouse button on the trend display undoes the zoom In addition
90. milliseconds during runtime mode To display time information in the trend display check the Show Time check box To display the date in the trend display check the Show Date check box To display seconds in the trend display check the Show Seconds check box To display milliseconds information in the trend display check the Show Millisecs check box 7 21 TrendWorX Viewer ActiveX 000 00 833 35 666 70 500 05 333 40 166 75 General Appearance Ranges Pens Rates Settings Workspace Details Ranges E i Grids Colors Border Style F Show Time Text E Sunken gt M Show Date V Show Secs Background Rectangle I Show Msecs Size Normal Y Tine Stern Gap Change Font nicl 5 18 2004 10 01 35 0 per OK Cancel Apply Help oK Appearance Tab Time Settings Time Stamp Gap The Time Stamp Gap determines how many time stamps to remove between time labels in a trend plot In the time plot shown in the figure below the time stamp labels appear at fixed intervals along the x axis If you resized the trend window to make it smaller the time labels would collide and overlap making the time stamps impossible to read However if you remove some of the time stamp labels on the plot the labels will not collide and will still be readable Click the arrow buttons to change the spacing between time stamps as needed Note The Time Stamp Gap setting does not affect the
91. of border and placement the display will have There are four options for the Trend Border Style Bumped Etched Raised and Sunken In the bumped style only the border looks raised while the etched style is mostly flat In the raised style the border looks as if it is coming out of the window In the sunken style the border looks as if it is going into the window The Trend Border Options list enables you to select where you want the border to be placed Bottom Bottom Left Bottom Right Left Rectangle Right Top Top Left or Top Right You can select which components of the trend you want to appear on the display Additionally you can select Trend Border Style and the Trend Border Options To enable the trend border check the Border check box To give the border a three dimensional appearance check the 3D Edge check box Appearance Details The Details section of the Appearance tab shown below manages the detail display information area and the enabled choices closely match the selected plotting type General Appearance Ranges Pens Rates Settings Workspace Ranges Time Grids Colors 3 r Border Style 7 Show Details Text E Sunken y V Show Header Fevers i M Show Tooltips Number of Entries 3 se eh Style ow Msecs Change Fort Spacing Columns OK Cancel Apply Help LOK Appearance Tab Details Settings Colors In the Colors section of the Details setti
92. of the login ID e With Windows NT authentication using the network login ID With SQL Server authentication using a login ID and password entered by the user To change the network library used to communicate with SQL Server click Client Configuration Client Configuration Vv Connect to SQL Server to obtain default settings for the additional configuration options Login ID brendan Password RRR cel ee Configuring a Microsoft SQL or MSDE Database Connection 3 18 Introduction Click Next to continue with the selection of the default database for the connection Make sure it is not the master database but the one created for the purpose of data logging Create a New Data Source to SQL Server E xi Bats a IV Change the default database to as Attach database filename a so ARA REUNEN Vv Create temporary stored procedures for prepared SQL statements and drop the stored procedures Only when you disconnect When you disconnect and as appropriate while you are connected V Use ANSI quoted identifiers JV Use ANSI nulls paddings and warnings B Use the failover SQL Server if the primary SQL Server is not available Next gt Cancel Help Setting the Default Microsoft SQL Server or MSDE Database Note When connecting to an Microsoft SQL Server or MSDE database make sure that the desired database for historical data logging is selected in the Chang
93. on a per data logging tag basis The Retrial Delay value is the time between successive retrials By default the TrendWorX SQL Data Logger will establish a connection to the database for logging and leave that connection open for the duration of the data logging activity To have the TrendWorX SQL Data Logger open a database connection only for the duration of writing a new logging packet to disk you can change the Global Connection setting to 0 However this is not recommended for high volume or frequent data logging activity Note The Max Logging Packets default value is set to 12 This assumes a small data logging load For larger data logging applications it may have to be reduced to a lesser value The TrendWorX SQL Data Logger is interfaced to the Smar Security Server and it provides support for the following security actions as shown in the figure below 3 39 TrendWorX SQL Data Logger Actions Users Asso i lt lt Move gt gt Actions _ lt lt Move gt gt Users Groups E A AW lt Log32 Fe Twx32 4 AwxMMx32 1 3 TWBgTrend a AW gt Report32 TwXReport AWS vi32 a TWXSOLS vr ano ienw32 a Configure EH Dwx32 a Exit Application Gen gent a Exit Data Logging GenBroker a GenTray Automatic GenTray a GenTray Autostart yi
94. ool Control object into your document Insert Object Dialog Box During configuration you can place this component inside TrendWorX displays VBA forms or any other container Use the TWXSQL Tool Control Properties dialog box shown below to configure the component This dialog box has only one tab the General tab shown below which prompts you to complete the configuration TWXSQLTool Control Properties x General Provider Type Ms SOL SERVER y MS ACCESS Connection String MS SOL SERVER ho DBGroup Not Assigned Group Not Assigned Filter Rate msec Average Ee E 2600000 Samples fi 00 Signal Not Assigned Cancel Apply TWXSQL Tool Control Properties Dialog Box To configure the SQL Tool control do the following 1 Microsoft SQL Server Oracle From the Provider Type list box in the TWXSQL Tool Control Properties dialog box select the OLE Database DB Provider type relating to the TrendWorX historical database Currently the following OLE DB Providers are supported Microsoft Access 6 4 Features in TrendWorX Reporting When you select a database type and then click Connect the corresponding OLE DB Provider configuration dialog box opens as shown below For Microsoft SQL Server select a server name an authentication type Windows NT Integrated Security or user name and password and the desired historical database as shown in the figure
95. or Visual Basic container applications The ProcessView containers such as GraphWorX provide Toolbar support for inserting the TrendWorX Viewer ActiveX Once inserted into a document or a form the TrendWorX Viewer ActiveX can be resized and configured Within the ProcessView containers and in Visual Basic forms the component is initially placed in design mode In design mode you can configure the TrendWorX Viewer ActiveX using the TWXView ActiveX Properties dialog box Once the application is committed to runtime mode the Trend Viewer toolbar is activated In addition it becomes a drop target for text and therefore can establish signal connections through drag and drop The TrendWorX Viewer ActiveX configuration data are saved directly in the container form or within its own streamed file format with the file extension v32 You must provide a valid file name before the data are serialized and saved TrendWorX Viewer uses the concept of a working directory defined in the ProcessView containers such as GraphWorX This represents the working directory where project files and configuration files will be stored TrendWorX Viewer will use this directory as a starting point for saving and loading its configuration files The TrendWorX Viewer can display data from real time signals connected to OPC servers calculated variables using expressions Smar simulated data and custom user fed data through OLE Automation or historical data connec
96. pen as an ideal pen at any time during animation mode and you can modify its starting time and date The Ideal Pen has time and date pick controls as well as an interface to the historical operator comments and batch information To use this feature 1 Select a history pen from the Details window of the trend display 2 Right click to display the pop up menu 3 Select Edit to display the Edit Trend Pen dialog box 7 50 Introduction Alternatively you can 1 Click the Edit Pens button on the Trend Viewer toolbar to open the Trend Pen Configuration dialog box 2 Select a historical pen from the list 3 Click Edit to display the Edit Trend Pen dialog box In the Select Comment Batch Lot dialog box 1 Select a start time and date To select a desired date for the trend period you want to view click the down arrow in the Date field and then choose a date from the calendar 2 Select an end time and date 3 Click Search to initiate the search 4 Once the search is completed use the lt lt and gt gt buttons to scroll through multiple operator comments and batch entries 5 When you locate the desired one click OK Note Selecting the View Batch Only option filters out the historical operator comments so that only the related batch lot entries are displayed Editing Historical Pens During runtime mode you can edit a historical pen and change the filter type to obtain a different plot For example you can
97. pen s you would like to reposition as shown in the figure below The Spacing button in the Details section of the Appearance tab in the Properties dialog box allows you to configure a default format for the Details window to be recalled during runtime mode 512 2004 52 2004 52 2004 5 Set As Default Spacing Edit Stack Plot Time Shift Delete Cancel Formatting Pens During Runtime Mode Stacking Trend Plots During Runtime Mode If you have multiple pens displayed in a trend plot display normally the two pens overlap each other inside the same plot Now you can display multiple pens in a trend display in separate stacked plots To stack a plot right click the desired pen in the Details window and select Stack Plot gt Insert New Plot from the pop up menu as shown in the figure below Note Stacked plots are supported only in the new plot style If you are viewing stacked plots time plots switch to a different type of plot e g an XY plot and then revert to the time plots the time plots will no longer be stacked DI 2ILUUF DI ZIZUR Orla KM SimulatePLC Random E ulatePLC Ramp Options b Formatting gt Edit Time Shift Delete Cancel Stacking Trend Plots During Runtime Mode The pens are stacked vertically displaying the pens in two separate plots as shown in the figure below 7 58 Introduction 100 00 g es AAA E S E O VE cc ME A E TINA TA o E MAN 1667 SU
98. range and description IV Force to update Logging Name Hi Lo Ranges and description when Signal Name is changed OPC Tag Browser only On Apply J Auto connect the server JV Auto activate configuration database IV Display warning when the server isn t connected IV Display warming when the server is data logging IV Display warming when Use UTC time is set on Server Monitoring JV Auto connect the server when related item is selected JV Auto disconnect the server when item is unselected JV Auto update server status ltem refresh time 2 min Server response timeout 30000 ms Cancel Options Dialog Box Editor Preferences Tab Help Menu The Help menu commands are listed in the table below Help Menu Commands Command Shortcut Key Function Help Topics F1 Launches the online Help for the Configurator What s This SHIFT F1 Displays context sensitive help Launches the About Box which contains information about About Application the product version number copyright and available disk space lt also contains contact information TrendWorX Configurator Setup The TrendWorX Configurator setup tree in the left hand pane of the Configurator screen shown in the figure below contains the following levels of configuration from lowest to highest e Tags e Logging group e Database group e Configuration 2 24 Introduction File Edit View Go A
99. submenu controls the positioning of currently selected ActiveX objects The Size to Display command maximizes the size of the currently selected ActiveX object within the open Trend window This command is not available if an object is not selected The Tile to Display command changes the size of all ActiveX objects to fit them evenly into the Trend window This is helpful if you want to compare the data in different objects or move between objects The Cascade command overlaps all of the open ActiveX objects The Grid command toggles the grids available in Design mode The Select Language command opens a dialog box that enables you to select the user language If a language resource dll is present in the TrendWorX Bin directory TrendWorX will automatically load the language and switch the menus and dialog boxes to the chosen language It will also start up in that language The Actions menu commands are listed in the table below Actions Menu Commands Command Shortcut Keys Function Animation Mode CTRL A Animates or deanimates the active Trend window in the display Runtime Mode CTRL U Activates runtime mode for all Trend windows Persistent Trend Toggles runtime mode for the TrendWorX Persistent Trending CTRL E De gt ae aa Mode application if it is loaded Toggles runtime mode for the TrendWorX Reporting application if it is loaded Toggles data logging mode for the TrendWorX SQL Data Logging Mode CTRL M Logger a
100. the OPC HDA server supported aggregates and allow editing of the historical pen to select the desired aggregate If the OPC HDA server does not support any aggregates the only historical data retrieval filter supported will be the Raw Data filter e Detection of OPC HDA Server Annotation Support The TrendWorX Viewer ActiveX trend client will detect if OPC HDA servers support annotations and it will modify its user interface accordingly 7 46 Introduction In terms of historical replay and reporting the following key changes have been made Data filter selection other than Raw will result in data time stamped at the beginning of each subinterval When retrieving data using data filters other than Raw subintervals for which there are no data because of no data logging activity will be marked as empty slots at the corresponding time with an empty VT_EMPTY value You can check the returned qualities for further processing e The historical qualities supported are as follows o OPCHDA_EXTRADATA 0x0001 a More data may exist o OPCHDA_INTERPOLATED 0x0002 a Interpolated data value o OPCHDA_RAW 0x0004 a Raw data value o OPCHDA_CALCULATED 0x0008 Q Calculated data value o OPCHDA_NOBOUND 0x0010 No data found to provide upper or lower bound o OPCHDA_NODATA 0x0020 No data collected Archiving not active o OPCHDA_DATALOST 0x0040 a Calculation started stopped lost o OPCHDA_CONVERSION 0x0080 Q Scaling
101. the Save As dialog box which allows you to save your configuration as a display for Windows CE file Give the file a name and select one of the following file types from the Save As Type box In GraphWorX select either GraphWorX Displays for WinCE gdc or GraphWorX Templates for WinCE gdc In AlarmWorX select AWXview32 CE File ace In TrendWorX select TWXviewerCE File tce Click the Save button Upon saving your configuration file for Windows CE features that are not supported by Pocket PC or Windows CE will be removed from the Pocket ProcessView display Note When opening a Pocket ProcessView display in ProcessView you must specify the proper Windows CE file extension Remote Connections In order to connect remotely to OPC servers over a network you must install and use GenBroker Please see the GenBroker Help documentation for more information about configuring GenBroker Downloading ProcessView Configuration Files to Your Pocket PC Once you have configured your application in ProcessView and saved the Pocket ProcessView display file you can use the file Download to Windows CE Utility in ProcessView to download configuration files from GraphWorX TrendWorX and AlarmWorX to your Pocket or CE device When developing a configuration file for a Pocket ProcessView application this feature allows you to download the configuration file to a Windows CE or Pocket PC device The file download function uses
102. the down arrow in the Date field and then choose a date from the calendar 2 Select an end time and date 3 Click Search to initiate the search 4 Once the search is completed use the lt lt and gt gt buttons to scroll through multiple operator comments and batch entries 5 When you locate the desired one click OK Note Selecting the View Batch Only option filters out the historical operator comments so that only the related batch lot entries are displayed Show Comments If historical pens are configured in the TrendWorX Viewer clicking the Show Comments button on the Trend Viewer toolbar places the Viewer in freeze mode and retrieves all historical operator comments and batch information available You can then select a historical pen from the Details window or double click the comment icon to display the following the Commeni s Entry dialog box shown below 7 44 Introduction Comment s Entry q x A More Evening Shift Time 1 11 53 691 PM 5 12 2004 Entered on 1 13 10 251 PM 5 12 2004 Author Supervisor Insert s Group Comment M Cancel Comment s Entry Dialog Box If more than one comment exists in the same area the lt lt and gt gt buttons will be enabled These buttons allow you to scroll through all available comments Note Historical comments are not supported for XY plots and bar plots Historical comments are integrated into the ToolTip support as well as the histo
103. there is Point and Click support for zooming by clicking the Zoom Trend button on the Trend Viewer toolbar Scanning the range of a trend by using the cursor to view specific sample values Selecting the focus pen which is the pen whose details and if desired range information will be displayed first in the TrendWorX Viewer Retrieving and replaying from the TrendWorX Persistent Trending server Paging forward and backward in time Time shifting for comparison of pens Docking the toolbar in the Trend Viewer available only with the new plot style old plot style must be unchecked VCRWorX Data Replay The TrendWorX Viewer ActiveX includes support for VCRWorX which is a powerful tool in ProcessView that enables the replay and reanimation of graphical historical and alarm data VCRWorX replays trend pen data that have been logged to a trend logger database If you are using a trend viewer display to view replayed data in VCRWorX only pens that have been data logged will be viewable in VCRWorX playback mode If multiple pens are shown in the trend display and only some of those pens have been logged to a trend logger database in playback mode you will see only those pens that have been data logged Any pens that have not been data logged will not be displayed For complete information about configuring VWCRWorX please see the VCRWorX Help documentation 7 4 Introduction Functions Not Supported in Runt
104. time intervals reflecting the desired data resolution The last valid sample within each search interval will be returned to the caller If bStamp is set to TRUE the actual time and date stamp of the retrieved sample will be modified to reflect the time and date stamp of the search interval Time stamps are returned in UTC time format 29 boolean GetGroupPointInfo BSTR GroupName BSTR PointName VARIANT HighRange VARIANT LowRange VARIANT EngUnits VARIANT Description This method returns point information for a given signal such as HighRange and LowRange EngUnits and Description given a Persistent Trend GroupName 30 boolean GetPointinfo BSTR PointName VARIANT HighRange VARIANT LowRange VARIANT Description VARIANT EngUnits This method returns point information for the first signal such as HighRange and LowRange EngUnits and Description that matches PointName 5 7 TrendWorX Persistent Trending ProjectWorX Support Several OLE automation methods facilitate ProjectWorX deployment and WebHMI enhanced support 1 ReplaceStringinString StringToReplace as String OldSubstring as String NewSubstring as String as String 2 ReplaceHost OldHostName as String NewHostName as String as Long 3 ReplaceFilePath OldSubstring as String NewSubstring as String as Long 4 ReplaceTag OldSubstring as String NewSubstring as String as Long 5 ReplaceHostEx OldHostNameS
105. to a text txt file or a Microsoft Excel csv file To export data select Export from the File menu This opens the Export Configuration Data to File dialog box as shown in the figure below You can then specify the delimiters for exporting the data Unless you specify delimiters in the Export Configuration Data to File dialog box the file uses Commas as delimiters by default Each group contains headings and columns that provide information about each item such as descriptions and associated translations and expressions It also provides the tree pathway for each item Choose the directory to which you want to export the data from your database In the Save As Type field choose the file type txt or csv that you would like to save 2 14 Introduction Export Configuration Data to File Boiler Room FAX Boiler Room FontInstall J Boiler Room2 images Boiler Room4 MMxSounds Default MDBs Pager Dialog Ci Power Plant L Factory Power Plant1 Factory1 Power Plant2 l Factory2 Project 4 File name 21x Save in Bin gt e amp e Ed eS Jtest csv Btest2 csv ProjectWorx radFFBF9 tmp Script Script Wizard SnapShots Topaz Untitled 1 vba 4 sQL1 csv Y Save as type Text files csv y Cancel Export All for all configurations C All for configuration z Delimiters C Tab Comma Other E 4 Exporting Configuration Data Exporting Data to an XML Fi
106. use Max to view the trend at its peaks Note that the MaxTime and MinTime options retrieve the actual maximum and minimum values within the resample interval as well as the actual time stamps at which these maximum and minimum values occurred Quality Status The Viewer has integrated quality status support for both Historical Data Access and OPC Data Access tags If the Quality column is checked in the Details section of the Appearance tab of the Properties dialog box the Viewer will display quality status information for each sample in the Details window of the trend display as shown in the figure below Airtel E See 12 54 54 PM 12 55 18 PM 12 55 42 PM 12 56 06 PM 12 56 30 PM 52 2004 5 12 2004 52 2004 5 12 2004 5 12 2004 SimulateP LC P umpStatus Quality Hj SimulatePLC PumpStatus 1 00 Good 12 56 36 PM 5 12 2004 Quality Status in the Details Window In addition to the standard OPC Data Access qualities the Viewer supports the Historical Data Access quality specification to indicate time intervals where data logging stopped actual raw data samples or calculated samples During runtime mode the Details window supports extended functionality on a per pen basis or a group of pens if selected 7 51 TrendWorX Viewer ActiveX a a E E E a 1 01 32 PM 1 01 56 PM 1 02 20 PM 1 02 44 PM 5112 2004 52 2004 52 2004 52 2004 AJ FE HR RR RR HERR RE 7 PM 5 12 2004 HERRERA 2277 as ame
107. value The deadband is always computed using the most recent sample value and it is not based on the High Low range sample information A deadband value of 0 results in storing all samples to the database Ranges The Hi Limit field sets the values for the tag s high limit The Lo Limit field sets the values for the tag s low limit In addition if Update Ranges on Start is checked the ranges for each tag will be refreshed from the OPC server This ensures that ranges for this tag will be updated at the start of data logging Log to Disk Clicking the Simple Advanced button hides shows the Log to Disk options The Log to Disk field allows you to select the value s of the signal to log to the disk If All Samples is selected the server will log all values for that signal that were collected during that specific data collection period Max will log the maximum of these values Min will log the minimum of these values Avg will log the average of these values Stnd Dev will log the standard deviation of these values Totalizer will run the totalizer function for these values Running Max will log the running maximum of these values Running Min will log the running minimum of these values Running Avg will log the running average of these values computed using an exponentially weighted moving average filter Moving Min will log the moving minimum of these values Moving Max will log the moving maximum of these values Moving Avg will log the moving
108. with the CE device must be created to synchronize the download ActiveSync modules as shown in the figure below When the CE device responds without any problems the download synchronization module is active When enabled the file download tool immediately downloads the configuration file for Windows CE to the CE device When disabled the configured file will only be saved For more information about Microsoft ActiveSync services please refer to the Microsoft ActiveSync help documentation 1 28 Getting Started Microsoft ActiveSync ioj x File View Tools Help Details Explore Options Sync Stop Handheld_PC Not connected Last Synchronized 13 3 01 18 03 Information Type Status Microsoft ActiveSync File Download Application Configuration GraphWorX TrendWorX and AlarmWorX have their own version of the file download tool In these applications choose Tools gt Windows CE gt Windows CE Preferences as shown in the figure Tools Window Help Macros Trend Configurator Ctrl W y Connect to Logger Shift L ELLLLALLLLALALIA LILIA SALAS LALA SSALASLALA LILLO Persistent Trending Ctrl K Reporting Ctrl Q Security Set Working Directory YERWorx Replays Publish to HTML Windows CE Starting the Windows CE Download Tool This opens the Windows CE Preferences dialog box which allows you to enable or disable the file download tool To enable this tool check the D
109. y Ranges Configuration for XY Plots Pens Tab The Pens tab of the Properties dialog box shown below handles the signal connection editing and configuration for the data displayed in the trend Clicking OPC Tags opens the Unified Browser 10 x General Appearance Ranges Pens Rates Settings Default Pen Value Format r e 7 E I History Only OPC Tags r Expression Editor Simulation Variables gt Persistent Trend gt History Tag Pen Description Pen Type OPC Tag Alias Persistent Trend Alias History Tag Alias Apply 800 0 Description Value Time Properties Dialog Box Pens Tab To display only historical data in freeze mode you must check History Only Then you can make connections to OPC HDA servers If this option is not set you can make both real time and historical tag connections on the same TrendWorX ActiveX Viewer You can connect signals to pens which are coming from an OPC server or are the result of a calculated expression to show the real time data This is illustrated in the following sections e OPC Tags Tags Menu Edit Button You can also delete modify and replace pens To delete one or more pens select the pen and then click Delete on the Pens tab Then click Yes to delete the pen To replace or modify the pen click Replace on the Pens tab This opens the Search and Replace dialog box shown below You can sear
110. 1 5 PIE MENU A NO 1 5 EDIT MENU cocotero taaan catala ais 1 5 MS A chance annaran eas acvetdaubina cothieas cnesbabewtnd na udeubiausiwasharsdtchenet Aaaa OT aED Ea aa EAA Eaa AERAN 1 6 ACTIONS MEN U ar T aa re a E a AT aa aa e a ea bev cheney aa aa E A eraa ae aAa e Ea E AE e Ta 1 7 TOOLS MENU A A E AE TE DEE a dotes 1 8 WINDOW MENU E A AEE TEE EEE E da E dara 1 9 HELP MENU lt a E A E A E E E E EE 1 10 PRINTING E parra batista 1 10 PRINT SA A A A A a 1 10 PRINTING SCREEN INFORMATION coccccicnnccnnicionconconononnn conocio nro nor rro rro 1 11 CANCEL PRINTING cti tiren reia lie a leida ntc 1 11 STATUS BAR AND TOOLBARS oooniicococinoninoninnnnnnnnnnrnnr earannan ta Daioiet a neate ti epai ati patei iaiia aanika 1 11 STATUS BAR creirie ana ices states i a ania A Aita ates aare ASi 1 12 TOOLBAR Sci a it E a tee AAE aa RE EAD 1 12 CREATING NEW TREND DISPLAYS 0 00 cece eee tenet cece caer seeeeeaeesaeesacesaaecaaesaaeseaeeaeseaessaeeseeeseeeseeessessaeesaeeenaesaaes 1 12 TREND AGTIVEX VIEWER TYPES oir dia a notes eesti detecte tei a Dei 1 13 EDITING TREND WINDOWS vac orita paa aaa araea Aa eaa T ei dar tai tess 1 13 PROPERTIES WINDOW comicos cece cadets vad et ard c eats caves pad eden iia irradia 1 14 DISPLAY PREFERENCES ariaa a cise falle oa rides 1 14 GENERAL TAB 20d Abia eval a a dues kaas ain aa dai alaasant a a aa AaS 1 15 WINDOW DIMENSIONS Sti it ae ee tl eee ali de dete ee a ee eal 1 15 NEW OBJECTSO c0cco copiada E E A E E Gaevii
111. 3 Devicel Group up Tag Select Group Signal List Box 5 Choose the data filter type to be used in historical data retrieval from the corresponding list in the Filter field of the TWXSQL Tool Control Properties dialog box as shown below TWXSQLTool Control Properties E x General Provider Type ms access y Comect Connection String Not Assigned DBGroup Not Assigned Group Not Assigned O Raw TWXSQL Tool Control Filters The following filters are currently supported Raw actual samples stored in the database Average Min Max 6 8 Features in TrendWorX Reporting StDev standard deviation MinTime returns actual time for Min value MaxTime returns actual time for Max value Last last sample in averaging interval AllStat all statistical values averaged through the entire period Running Max Running Min Running Average exponentially weighted moving average Moving Average Moving Max Moving Min If the data filter selected is Moving Average Moving Max or Moving Min the data will be retrieved using a sliding statistics window taking the last number of samples into consideration 6 Select the maximum number of samples to retrieve from the Samples field of the TWXSQL Tool Control Properties dialog box This is used mostly in the case of a Raw data filter to avoid returning an excessive number of samples Select the data time resolution in msec to be
112. Aliasing The files in this folder demonstrate the use of the OLE Automation interface of the TrendWorX Viewer ActiveX within a VBA enabled application such as GraphWorX in aliasing Excel Templates The files in this folder are example Excel templates that can be used when creating Excel workbooks to be used with TrendWorX Reporting Real Time Trend Configuration The files in this folder demonstrate the use of the OLE Automation interface of the TrendWorX Viewer ActiveX within a VBA enabled application such as 1 25 TrendeWorX Container TrendWorX Security Important Note GraphWorX lt demonstrates how to add pens on the fly by reading the pen configuration from a Microsoft Access database mdb file and utilizing the OLE Automation properties of the TrendWorX ActiveX through VBA scripts TrendWorX Data Logging and Reporting This folder contains sample TrendWorX data logging configuration a sample historical database as well as sample reporting and historical replay displays TrendWorX Backgrounds This folder contains several image files that can be used as backgrounds for the TrendWorX Viewer ActiveX display TrendWorX VBA Examples This folder contains various examples that demonstrate the use of the OLE Automation interface of the various TrendWorX modules and components VB Script Examples This folder contains a TWX VBScriptEx gdf display that uses VB scripting TrendWorX has an interface with the ProcessVie
113. C Basic Java and so on ADO is a lightweight object set for accessing data from any OLE DB provider using a consistent API within any programming language and or environment The TrendWorX SQL Server application which is Smar next generation enterprise data logging and historical data server uses relational databases as storage media to log process historical data The historical data can be accessed through a variety of methods such as Using the OPC Historical Data Access interface which is supported in TrendWorX SQL Server Using the TrendWorX SQL Tool ActiveX Control to retrieve process data in a VBA scripting environment Using the TrendWorX Reporting which creates a variety of historical data reports in databases csv and ixt files and Excel Using ADO within any programming environment to parse TrendWorX SQL Server historical tables The TrendWorX OLE DB Provider which encapsulates all the work needed to retrieve historical data spanning multiple historical data tables interpolate and or extrapolate for missing values and perform custom averaging of data over desired time periods OLE DB providers are a set of COM objects that transfer data from a durable source to a consumer The OLE DB provider places those data in a tabular format in response to calls from a consumer Providers can be simple or complex A provider may return a table allows the client to determine the format of that table or perform operat
114. Configuration Example TrendWorX Backgrounds The TrendWorX Backgrounds folder contains several image files that can be used as backgrounds for the TrendWorX Viewer ActiveX display TrendWorX Data Logging and Reporting The TrendWorX Data Logging and Reporting folder contains sample TrendWorX data logging configurations a sample historical database as well as sample reporting and historical replay displays To prepare for the examples you must e Set the ProcessView working directory to be TrendWorX Examples TrendWorX Data Logging and Reporting where the examples are installed For example you can use the Set Working Directory command in the Tools menu of the TrendWorX Container e Make sure that none of the files in this folder has a read only attribute To use the data logging example do the following 1 Create an ODBC Microsoft Access system data source called TWX32DEMO and select the Twx32demo mdb file in this folder without specifying any password or login ID 2 Start the TrendWorX Configurator 3 Select Open from the File menu and load the Twx32DemoCfg mdb in this folder TrendWorX will try to start the Data Logger and a message box may appear 4 Select Cancel 4 2 Introduction to TrendWorX Examples 6 7 8 In the TrendWorX Configurator set the Computer Node Name to your Computer Name or leave it set as local Click on the Connect button to connect to the Data Logger Click on the D
115. Data Logger enters runtime mode at 10 15 00 AM the data collection and data logging activity for the selected logging group will start at 11 00 00 AM On interval When On Interval is checked you can specify the time period interval during which you want data logging and data collection to start On condition When On Condition is checked you can define a specific condition for starting data logging Once you check this box you can click the Browse button on the right This will display the Edit Expression dialog box Refer to the Expression Editor help documentation for more information On start Checking On Start starts data collection and data logging for the selected group whenever the Data Logger enters runtime mode default selection 2 38 Introduction Logging Tab uy E MyGroup Unknown server is stopped Data Collection Loggina Table s management ety Control board A Start Conditions LEA Days Hours Secs On Time F y Be T On Interval fo fi fo fo On Condition Add New Log Group fret statistics Logging Group Stop Conditions The Stop Conditions field contains the following options for stopping data collection On time When On Time is checked data logging and data collection for the selected group will stop at a specified time in hours minutes and seconds On interval When On Interval is checked you can specify the time period interval during
116. Database Connection Settings field This opens the Select Data Source dialog box shown below You have the option of selecting an existing machine data source that is specific to the machine or creating a new machine data source When you have made your selection click OK Note Currently the TrendWorX SQL Data Logger only supports the Machine Data Source tab of the Select Data Source dialog box This tab establishes the data source and sets a database connection Select Data Source i 2h xi File Data Source Machine Data Source Data Source Name Description dBASE Files User dBase Files Word User Excel Files User FoxPro Files Word User MS Access Database User Visual FoxPro Database User Visual FoxPro Tables User New A Machine Data Source is specific to this machine and cannot be shared User data sources are specific to a user on this machine System data sources can be used by all users on this machine or by a system wide service Select Data Source Dialog Box Configuring Database Group Properties You can configure the following database group settings using the database group dialog box as shown in the figure below ee Name DBGroug Errors to keep fioo r Database connection settings r Test DB connection DDEC Data source Perform following test if Twx32Demo Browse you want to make sure Browse that the database User name admin connection settings is te valid for data loggin
117. E ees YA 6 0 00 a 100 00 G 8333 a 6687 a 50 00 E 33 33 E 1667 0 00 22 08 PM 1 22 32 PM 1 22 56 PM 1 23 20 PM 1 23 44 PM 5412 2004 5 12 2004 5112 2004 5112 2004 5112 2004 te 8 ll 0 randy MS E Time KM SimulatePLC Random 34 00 Good 1 24 02 PM 52 2004 i SimulatePLC Ramp 60 00 Good 1 24 02 PM 5 2 2004 E Stacked Trend Plots Switching Pen Ranges in Stacked Plots If you have multiple pens displayed in a single stacked plot the ranges for only one of the pens will be displayed in the stacked plot To switch to the ranges view for a different pen in the same stacked plot simply click on the pen name in the Details window Combining Pens in a Stacked Plot To combine or aggregate pens into a single stack plot right click a pen in the Details window and select Stack Plot gt pen name from the pop up menu as shown in the figure below The selected pen will be combined into a single stack plot with the pen name you selected Note You can also combine pens into stacked plots by dragging and dropping pens into the trend plots 7 59 TrendWorX Viewer ActiveX SimulateP LC Ramp iar TTI TCS AE AA OA ep APENAS TT A E A O SimulateP LC PumpSpeed 2 51 PM 18 2004 7 13 15 PM 518 2004 7 13 39 PM 518 2004 7 14 03 PM 518 2004 MM SimulatePLC PumpSpeed 67 00 7 14 48 PM 518 2004 MM SimulatePLC Ramp 16 00 7 12 27 PM 5118 2004 SimulatePLC Range 39 00 7 14 48 PM 518 2004 Options b Form
118. ERLib TWXVGRIDS Visual Basic Object Browser Using Visual Basic To View Title Objects Title manages title information such as the title name font options and drawing of the title The Title Object serializes all title specific information Using Visual Basic To View Grid Objects Grid manages grid options and drawing of the grid The Grids Object serializes all grid specific information There are individual objects for X grids and Y grids Using Visual Basic To View Ranges Objects Ranges manages range information such as border options and drawing of the ranges according to plot type The Ranges Object serializes all range specific information Using Visual Basic To View Time Settings Objects Time Settings manages time information such as border options font options and drawing of the time field The Time Settings Object serializes all time field specific information Using Visual Basic To View Details Objects Details manages detail information such as border options and drawing of the Details field The Details Object serializes all detail specific information 7 12 Introduction Using Visual Basic To View Pen Objects Circular Charts Pen manages all visual aspects of the signal being trended including display management statistics and curve style The Pen Object serializes all pen specific information A circular chart is a trend type that plots signal values in a circular field The signal va
119. ESAMPLES sacra te esis a tied tat Aenea te eall 7 76 USING THE COMPONENT INSIDE VISUAL BASIC 2 00 eee cece eee tee eee eee nan nnan cnn nn cnn nc nn cnn cnn nena 7 76 VBA EXAMPLES coin o A A A ee 7 77 Chpter 8 INTRODUCTION TO DATABASE UPSIZING sssscssssresssenssscnesssennsscenesssensseeesssnnsnsssnsssnenenenas 8 1 AUTO STARTING THE SQL SERVICE isilena iii a iraan aiian a aa a aadd eaea neia a aair ada datda 8 1 USING THE TRENDWORX DATABASE UPSIZE UTILITY 8 1 vIII Chapter 1 Getting Started Introduction Starting TrendWorX Starting TrendWorX Container TrendWorX 32 is a powerful collection of real time trending historical data logging reporting and analysis tools that seamlessly integrates with enterprise wide information systems Based on the OPC Historical Data Access specification for creating Plug and Play historical data servers and clients TrendWorX offers an open solution to applications requiring scalable and distributed real time performance The powerful Microsoft based ADO OLEDB data logging provider is at the core of TrendWorX OPC HDA provides the standard COM and OLE interface for Smar Trend ActiveX Viewer Control to display real time and historical data separately or simultaneously Several trend display types are supported including time plots XY plots logarithmic plots bar plots the popular strip chart recorder and even circular charts Acquire thousands of data points and organize them into
120. Edit e View e Go e Action e Tools e Help File Menu The File menu commands are listed in the table below File Menu Commands Command Shortcut Keys Function New CTRL N Creates a new configuration database Opens a Microsoft Access mdb or Microsoft Data Link udl file Open CTRL O which allows you to connect to any OLE database source such as a SQL database Gaya As Saves the current database under a different name as a Microsoft Access mdb or Microsoft Data Link udl file O Displays the current database connection properties roperties Exports configuration data from your database to a text file txt or a CSV Export Microsoft Excel file csv You can specify the delimiters and what to export Imports data into your configuration database from a text file txt or a CSV Import Microsoft Excel file csv You can then specify the delimiters and choose from the import settings XML Export Exports configuration data to an XML file Lei sl Exports configuration data to an XML Schema file XML Import Imports configuration data from an XML file This feature does not import an XML data file but it will try to validate XML Validate its structure using stored XML schema Once it passes this validation the XML file is acceptable for import by the Configurator Activates the current database and downloads the configuration to the Make Active server before data logging If this command i
121. El F Vabe TX isible P A His Desc SimulatePLC Random El PT Stair Plot J AutoSyne Units Not Assigned lg x ii a en Marker Type History Y Show Samples Persistent Group Not Assigned El fo o Al o Style Line Solid y paia oca y E Color Width ft Filter Last Sample bd Plotter Big ES 120 Edit Trend Pen Dialog Box General Tab General Tab Functions Function Description Indicates whether the plot of the selected pen will be visible If Visible is not Options Visible checked the Viewer will still buffer data for the pen but it will not draw it Describes how the plot will appear The stair plot uses a stepwise draw Options Stair Plot method to plot the trend It is ideal for plotting slowly changing signals or setpoints If the pen being edited is a historical pen then the Pen Comments check box Options Pen will be enabled If checked when the TrendWorX Viewer ActiveX is in freeze Comments mode it will retrieve and display all related historical comments and batch information if any Options Pen Provides a marker for the pen on the right hand side of the trend display Marker indicating the last data point drawn on the graph Inserts a shape of your choice e g square circle triangle or diamond around every point on the graph that represents an actual data point The default shape is a square Options Show Samples
122. F3 This opens the Display Preferences dialog box shown in the figure below Display Preferences E x General Runtime Grids Window Dimensions Pixels New Objects i Place In Display Lett fE Top o Fit To Display width 540 Height 320 2 ee Printing Tile Objects On Resize I Ignore Display Background Apply To All Displays J Ignore Object Background Display Color FE Cancel Help Display Preferences Dialog Box As you can see the Display Preferences dialog box contains the following tabs which enable you to modify the display 1 14 Getting Started General Tab Window Dimensions New Objects Printing Options Apply to All Displays e General tab e Runtime tab e Grids tab The General tab in the Display Preferences dialog box shown in the figure below enables you to e Set the size of the Trend window e Choose how to arrange open Trend ActiveX Viewers and or other ActiveX objects e Change the display background color e Configure the display for printing This last option has been implemented to save ink while printing Trend displays Display Preferences 3 xj General Runtime Grids Window Dimensions Pixels New Objects y Place In Display Lett 8 Top o Fit To Display width 540 Height 320 gt a Printing Tile Objects On Resize Ignore Display Background I Apply To All Displays Ignore Object Background D
123. Group To create a new logging group 1 Right click on a database group and select New gt Logging Group from the pop up menu as shown in the figure below E Configurations E ED TWX Demo e i Name DEGroup gt ER SE source Rename Multiply Delete admin Trab Creating a New Logging Group AAAA 2 This opens the Logging Group dialog box in the right hand pane of the TrendWorX Configurator screen as shown below 3 In the Name field type a name for the new logging group 4 Define the parameters for the following three tabs Data collection tab Logging tab Table management tab Name MyGroup Unknown server is stopped Data Collection Logging Table s management Ez dy Control board a Start Conditions PS Stop Conditions Hours Secs Msecs Control board Data col rate fo fo 7 s ls o o Activate Calcul ls a b a oe o E jo z z Deactivate I Enable Batch Tracking ree Refer opa Lot Tag aj Reset Add New Log Group Get statistics Logging Group Properties Configuring Logging Group Properties The logging group properties dialog box contains the following three tabs e Data collection tab e Logging tab e Table management tab 2 36 Introduction mo MyGroup Unknown server is stopped Data Collection Loggina Table s management ES Control board A Start Condi
124. Gwx32 a GenTray Autostop Login H re Ue Nar ee zl Cancel Apply Smar Security Server In data logging mode you can log in to the Smar Security Server by choosing Login from the Security submenu of the Tools menu The login function is only available in data logging mode This opens the Smar Security Login dialog box shown below User Name y Keypad Password Change Password LogIn Log But Advanced Cancel Smar Security Login If you already have a user name and password enter them and then click OK Otherwise click Cancel The Smar Security Login window opens as shown below User Options Help Security Server Location local gt Server Start Time pa 9 2001 9 39 10 4M Server Current Time pa 9 2001 9 42 47 AM Server Configuration File v Logged In User s Login Time Auto Logout Time Ready aus Smar Security Login Window 3 40 Introduction It is possible to log in from the User menu of the Smar Security Login Window You can also change your password and your security preferences in this window In configuration mode you can access the Smar Security Server by choosing Configuration from the Security submenu of the Tools menu Enter an Administator user name and password or leave the user name blank and enter the default Administrator password User Name Password Challenge 1 0155 Cancel Smar Security Login To configur
125. Information Data Source PD 2 User Name Admin Password D D gt rovider String e Open Mode DB_MODE_READWRITE y omeni OLE DB Initialization Information Dialog Box 3 6 Introduction Click Export in the Export Configuration dialog box to export your configuration s to the Configurator database From this point on the TrendWorX SQL Data Logger will e Use as the current configuration the last exported configuration unless otherwise assigned by the new Configurator tool e Always load upon startup the most recently assigned database configuration by the Configurator application or the most recently exported database configuration Upgrading From Version 5 20 to Version 6 00 Step 4 When you have finished exporting databases shut down the TrendWorX SQL Data Logger Upgrading From Version 5 20 to Version 6 00 Step 5 Start the TrendWorX Logger Configurator from the Programs menu in Windows Choose Open from the File menu to select the Twx32 mdb file By default the TrendWorX Logger Configurator will load all of the exported configurations as shown in the figure below When a configuration is selected the TrendWorX Logger Configurator will start the TrendWorX SQL Data Logger through OLE Automation Signal Smar Simulator 1 SimulatePLC R amp OPC Taas Expressions Name Description SimulatePLC Ramp E r Ranges Deadband Logging Name Sine E SimulatePLC Ramp H
126. L SEAR Cintas ra 5 17 USING THE PERSISTENT TRENDING OLE AUTOMATION SERVER ceccceseeeeceeeeeeeeeeaeseeeeaeeseeeseeeseeeeeeeeeaes 5 17 PERSISTENT TRENDING OLE AUTOMATION EXAMPLES 000 eccee cece eeneeereeeeeeaee sacs caus saeeeaeesaesaessaeenaeeeaeee 5 19 SECURITY Aar a door acallar rre 5 19 Chpler 6 REPORTIN G aa r aaar ra aaea hae net seeds hati as 6 1 FEATURES IN TRENDWORX REPORTING netigi iee iai atia iare ia aiee en ii aed ier iii aaien 6 1 INTRODUCTION asiaan a a e a chi a a adana Gadi a aa a ee a eaa e a deis 6 2 STARTING TRENDWORX REPORTING ccoccoccccoccconcconccnnncnnncon coronar narrar rre rr 6 2 TRENDWORX SQL TOOL ACTIVEX CONTROL oocoiccnnicnnininicinnnnnnconancnr cnn rre 6 3 TRENDWORX SQL TOOL ACTIVEX CONTROL PROPERTIES ccccicconncnnnconnnnonononnnono nono n crono nono cnn ancora no nannnnnncans 6 10 TRENDWORX SQL TOOL ACTIVEX CONTROL METHODS oocciccincconcconoconononnnconononnnonn ccoo nn nono nora no nn norris 6 11 TRENDWORX SQL TOOL ACTIVEX CONTROL EVENTS ncconccioncnoncnonconnncnn ccoo nono no rn r nn rca 6 12 TRENDWORX SQL REPORTING coo dara 6 12 TOOLBAR os or aa 6 12 MENUS E pa ar da 6 13 FIRE MENU Qda carita E E E E E E deidad Dile dy tea did E qa 6 13 A A sgestrensttaaesevitt ated aa Taa aa Aaa e E a as a a aa e A aaa ea amatehe Ear aai 6 14 VIEW MENU genioten ice Li e eee a ie a ea eat O A e E a ia iA 6 14 ACTIONS MENU 000 od Aa E N A 6 15 TOOLSMENU ierann atts tte taal bak ges e dile E deste O ti Decidir coral
127. L file The XML export import functionality was mainly developed for Windows platforms that do not support databases e g Windows CE and Windows Embedded XML has the following advantages over the CSV import export function e XML has a standardized format unlike the text CSV format which uses various delimiters e g TAB instead of commas strings could not accept all characters etc e XML is language independent whereas CSV converts date time floats and currency fields according to local settings in Windows For example using CSV you cannot export data on German Windows and import it on English windows without making changes e Windows has an installed automation object that has the capability to work with XML Thus programmers can create modify their configurations outside the Configurator using Visual Basic if desired XML supports schemas A schema is a special XML file that specifies the data structure of an XML data file To import data select XML Import from the File menu This opens the Import XML File dialog box as shown in the figure below Give the file a name and then choose the directory from which you want to import the data You can then specify the delimiters and choose from the following import settings Click Open Create new items When the import file contains items that are not yet in the configuration database then it creates them Otherwise it skips these items 2 17 TrendWorX Logger Configur
128. NT Quality This method is the same as GetGroupPointData with the exception that now you can specify a starting time and date stamp in TDateFrom to retrieve data from Persistent Trending s memory buffers 21 BOOL GetPointDataAt BSTR PointName long Rate long Samples boolean Stamp DATE TDateFrom VARIANT Values VARIANT TDates VARIANT MSecs VARIANT Quality This method is the same as GetPointData with the exception that now you can specify a starting time and date stamp in TDateFrom to retrieve data from Persistent Trending s memory buffers 22 void Refresh Call this method to refresh the Persistent Trending window This method should be called only once 23 boolean GetPointDataUTC BSTR GroupName BSTR PointName long Rate long Samples BOOL Stamp VARIANT Values VARIANT TDates VARIANT MSecs VARIANT Quality Call this method to retrieve buffered data in memory from Persistent Trending for a specific signal PointName Rate is the desired time resolution of the returned samples Samples is the desired number of samples to be returned The variants Values TDates MSecs and Quality represent variant arrays of element types VARIANT which contain the values time and date stamps millisecond resolution and quality information about the retrieved samples Values variants utilize double values VT_R8 Tdates variants utilize DATE types VT_DATE and Msecs and Quality utilize VT
129. NT integrated security recommended Use a specific user name and password User name Password F Blank Password Finish Cancel Help Renaming the Existing SQL Server Database 7 Specify a directory path location in which to create the database as shown in the figure below You can either use the default SQL Server database folder or you can click the button and browse for a specific folder 2 10 Introduction SQL Server Database Creation Please specify the following to create database files 3 Specify database files location Use default SOL server database folder recommended Use specific folder local node only je Program Files Microsoft SOL Server MSSQL Data El Database files properties Simple lt lt Database File Log File Initial Size MB 1 Initial Size MB 1 File Grow M AutoShrink File Grow C InMB 1 C InMB 1 By Percent 20 By Percent 20 Finish Cancel Help Specifying the Database Location and Properties Under the Database Properties section specify an initial size for the database which should be as large as possible You can also specify a Database Growth option in megabytes or as a percentage of the total size MSDE servers are capable of growing the database on the fly to store more data However if this operation is performed frequently the overall system performance may decrease Choosing an initially large
130. OLGroup_2 gt Start Time 2 2 01 10 23 23 AM gt End Time 2 2 01 11 21 54 AM MySOLGroup_3 y a Group Tables Info Note The Unicode version has enhanced language aliasing support including automatic value scaling You need to configure the Language Server as well as configure language aliases in the TrendWorX Configurator Once all language aliases are configured TrendWorX Reporting will automatically scale all historical values to those corresponding to the startup language While TrendWorX Reporting is in runtime mode all subsequent events generated by you selecting a different language will result only in updating the user interface to match the currently selected language but not the scaling equations used in the report generation Finally clicking Finish will complete the new report configuration and addition If any errors are found the new report s enabled flag will be reset and will be marked with an X In configuration mode you can also edit delete and copy a report using the Edit menu commands or the toolbar Alternatively you can select a report and right click to display the configuration mode report inspector menu as shown below The editing tabs in the TWXReport dialog box shown below are identical to the series of dialog boxes in the Report Configuration Wizard 6 29 TrendWorX Reporting General Tags Report Target Schedule Range Report Name
131. ProcessView Tray menu Then do the following 1 Register TrendWorX SQL Data Logger to run as an NT Service by clicking the purple triangle Select TrendWorX gt SQL Server gt NT Service from the pop up menu as shown in the figure below GenBroker gt DataWorx32 b Secure Desktop gt ScriptWorx32 b AlarmWorX32 gt GraphwWorx32 gt Screen Manager gt gt d Trendworx32 Persistent Trending gt Reporter Custom Application Start Container b Stop Auto Start Auto Stop HESS F Registering the Data Logger as a NT Service Automatic 2 TrendWorX SQL Data Logger will appear in the Services window as shown below 3 54 Introduction Services x HW Profiles e eee Server Automatic Spooler Started Automatic Start SOLS erverAgent Automatic System Event Notification Manual Stop Task Scheduler Started Automatic TCP IP NetBIOS Helper Started Automatic Paso Telephony Service Started Manual CA Trendwo lt 32 SOL Server Manual y UPS Manual Startup Visual Studio Analyzer RPC bridge Manual f z D Services Window 3 Use ProcessView Tray to set TrendWorX SQL Data Logger to start automatically as an NT service the next time the PC is rebooted Click the purple triangle in the task bar This opens a pop up menu as shown below Select TrendWorX gt SQL Server gt Automatic from the pop up menu as shown in the figure below GenBroker DataWorx32 Secur
132. Replay You can also use the Windows CE Preferences dialog box to configure other settings for the CE device You can set the resolution of the target device by clicking the Resolution button This displays a list of resolutions from 200 x 320 up to 1024 x 768 Downloading the File to the CE Device When you have finished configuring a display file and would like to save it to Windows CE choose Save As from the File menu This opens the Save As dialog box In GraphWorx enter the file name and select either GraphWorX Displays for WinCE gdc or GraphWorX Templates for WinCE gdc from the Save As Type box In AlarmWorX enter the file name and select AWXview32 CE File ace from the Save As Type box In TrendWorX enter the file name and select TWXviewerCE File tce from the Save As Type box The Smar Import File dialog box will be displayed indicating that the files are downloading to the Windows CE device Starting Pocket ProcessView Applications on Your Pocket PC Once you have downloaded your GraphWorX AlarmWorX or TrendWorX configuration files from your desktop PC to your Pocket PC or CE device you can run the applications on your Pocket PC Open the Pocket ProcessView client applications Pocket GraphWorX Pocket AlarmWorX and Pocket TrendWorX you wish to run and then select Open from the File menu Browse for the desired gdc ace or tce file VCRWorX is a powerful tool in ProcessView that enables t
133. Server Microsoft SQL Server and MSDE introduce a dynamic memory management scheme that uses system memory based on need and availability In any case it is recommended that for Microsoft 3 26 Introduction Monitoring Performance SQL Server and MSDE data logging applications you do not allocate more than two thirds of the total physical RAM available for database server memory usage In addition it is critical that the PC on which Microsoft SQL or MSDE is installed has virtual memory at least two times the total amount of physical RAM available Microsoft Access is entirely different It utilizes memory on a per connection basis and it can easily consume a significant amount of system resources For version 7 0 ProcessView modules and applications will automatically adjust the Microsoft Jet Engine registry settings with default values For data logging applications to Microsoft Access that require a high tag count please contact Smar technical support on how to change these settings By setting a number other than 0 in the MaxBufferSize entry you can limit the memory used by Microsoft Jet Engine on a per connection basis A setting of 8192 KB in decimal form provides a reasonable value for most Microsoft Access based applications Note that this setting may have to be set at all registry settings relating to Jet 3 x as well as to Jet 4 x engines Note It is very critical that you adjust the default setting for MaxBufferSize Man
134. T WSheet Select Not_Assigned Row 5 T Auto Print Y AddHeader Format J Protect Column 2 5 Create Report with Date C Overwrite Report Email To Not_Assigned Subject Not Assigned lt Back Cancel Help Logging to an Excel File in the Target Dialog Box TrendWorX Reporting has the following integration with Microsoft Excel Microsoft Excel template support HTML output support Report header support E mail support Enhanced directory management Enhanced performance integration with Microsoft Excel which greatly reduces the time required to populate an Excel spreadsheet with the report data This functionality may require the utilization of more memory resources Date format support which includes the month name for international support TrendWorX Reporting now supports an internally created password for creating Microsoft Excel reports Based on this internal password the resulting Microsoft Excel worksheet will be locked and no data changes will be allowed When creating reports in Microsoft Excel you need to create and customize if desired a source Excel workbook which should be saved as a template TrendWorX treats each Excel workbook selected from the Template button as an Excel template and it creates an Excel based report using the user configured format and layout in the source workbook To configure an Excel report you need to do the following 1 Create
135. The TrendWorX Configurator has all the tools required for configuring data logging and it provides a comprehensive set of tools for data logging monitoring and troubleshooting The Security submenu allows for the configuration of the Smar Security Server if the TrendWorX application is currently in configuration mode or for login to the Smar Security Server if the TrendWorX application is currently in runtime mode The Windows CE submenu refers to the capability of configuring Pocket TrendWorX displays to be downloaded to the CE device To start Pocket TrendWorX configuration mode choose Configure for Windows CE from the Windows CE submenu The Windows CE options are not available if Pocket TrendWorX is not installed on your PC The CE features are further explained in the Pocket TrendWorX documentation IMPORTANT NOTE The TrendWorX Container has support for starting the TrendWorX Configurator which enables TrendWorX data logging configuration and administration Although the ProcessView Security Server protects this menu action the TrendWorX Configurator itself has not been interfaced with the ProcessView Security Server It is recommended that floor operators do not have access to the TrendWorX Configurator since they might accidentally delete data logging configurations and or stop data logging The Window menu commands are listed in the table below Window Menu Commands Command Shortcut Keys Function Close Closes the act
136. This can be used as an optimization and load balancing tool For example if the TrendWorX SQL Server is configured to log to the database every 1 min then the History Refresh Rate should be set to a maximum of 1 min Settings Tab The Settings tab of the Properties dialog box shown below manages various aspects of the trend configuration General Appearance Ranges Pens Rates E m Preferences J Autostart IV First Update 7 Reset circular chart V Main Toolbar J UTC Replay JS Print circular chart on reset Shift Grids J Save Ink J Old Plot Style 4 Print Background Location fo m Statistics File File Not Assigned J Append Browse Scrollbar OK Cancel Apply Help ok Properties Dialog Box Settings Tab 7 27 TrendWorX Viewer ActiveX OPC Tags If Autostart is checked the TrendWorX Viewer ActiveX will automatically enter animation mode when the container application switches from design mode to use mode Note that in the TrendWorX and AlarmWorX containers this option is disabled and both applications will start the ActiveX Viewers through OLE Automation If Main Toolbar is checked you can access the Trend Viewer toolbar during runtime mode When Shift Grids is checked the relative location of the grids on the axis is time scale based You can also enable the restoration of range information that may have been changed during runtime mode Choosing startup determines a r
137. Typically in a Microsoft Access database historical data logging the fragmentation occurs even when historical data tables are deleted or truncated Microsoft Access will not reclaim the space the deleted data occupied and as such its size it will keep growing until the next time it is compacted Note however that the above example is a worst case scenario that assumes all tags are updated 3 8 Introduction Data Logging Load Data Storage Requirements every second from the OPC server In reality OPC servers are event based so they will update only when the value of the tag changes The TrendWorX SQL Data Logger also supports various data logging filters on a per tag basis as well as deadband These can be used to reduce the database storage requirements effectively When the targeted size of the database is more than 1 GB it is recommended that you use Microsoft SQL Server or MSDE for up to 2 GB instead Microsoft Access To help you in maintaining the target database size and avoiding situations in which the database size grows uncontrolled the TrendWorX SQL Data Logger supports a cyclic database table structure which if configured will always maintain the configured number of tables into the database by overwriting existing data as it rolls over each table Refer to the TrendWorX Logger Configurator documentation for more information In addition keep in mind that ordinary database maintenance tasks such as defragmentat
138. UPPORTING OBJECTS 0 cccecceeseeeeeeeeseeeeeaaeeeceeeeceaeseeaaeseeeeeseaeeesaeenennees 7 70 TITLE OBJECTS iii a ai etna i aie Wh Galena Ani ian Adi eat A Me aera 7 70 TITLE OBJECTS PROPERTIES cuco tilda ieee Nie echoed a weal eet dine 7 70 TITLE OBJECTS METHODS coo Sac eke hiits lena Lattin led tee ean ed ae 7 70 TIME SETTINGS OBJEC TSA cai it engines ber centateedate tas vies fecal dic AAE aiaa atie teed 7 70 TIME SETTINGS OBJECTS PROPERTIES ceceeseee cee anec rieseni anan iaa a e Eea EN EE e asa 7 70 TIME SETTINGS OBJECTS METHODS Grisi hirup nyp aea a eeta aaa arde da paT AEEA earn base athe 7 71 RANGES OBJECTS Stata o hes Na aat 7 71 RANGES OBJECTS PROPERTIES vs sie szex c03 cccsez sss cacteahctasiesshe e Ea aa aaea iaaa ea raa aE iaa ASE a see Eaa ETE EEEa aia eanta 7 71 RANGES OBJECTS METHODS pining eoe ee a ee el eee ee ei abl Lc tele te 7 72 PEN OBIJECOR4 aie wtih a MAA ea teil ee Aces Ae el el eae 7 72 PEN OBJECTS PROPERTIES coco concilio Sei oll eld eR Bg es eee ee ae age EL 7 72 PEN OBJECTS METHODS 41 torso atte octet een aac dali 7 74 DETAILS OBI E A oie east sane ana 7 74 DETAILS OBJECTS PROPERTIES ss sto litio lidia ii 7 74 DETAILS OBJECTS METHODS coord ivi eee 7 75 GRID OBUEGC PS leis eteResessetesleavthteacesdevtarebedl tet ETETE soeeneassiall A E T EO ET EE E 7 75 GRID OBJECTS PROPERTIES voi oca Ki al 7 75 GRID OBJECTS METHODS 600 Atay eat tet te traida Tellado ez A aa a a ate saat eas 7 75 COD
139. VBA examples under the Smar ProcessView Examples TrendWorX Examples directory The following folders located inside the Examples directory are associated with the Viewer Aliasing The files in this folder demonstrate the use of the OLE Automation interface of the TrendWorX Viewer ActiveX within a VBA enabled application such as GraphWorX in aliasing Excel Templates The files in this folder are example Excel templates that can be used when creating Excel workbooks to be used with TrendWorX Reporting Real Time Trend Configuration The files in this folder demonstrate the use of the OLE Automation interface of the TrendWorX Viewer ActiveX within a VBA enabled application such as GraphWorX It demonstrates how to add pens on the fly by reading the pen configuration from a Microsoft Access database mdb file and utilizing the OLE Automation properties of the TrendWorX ActiveX through VBA scripts TrendWorX Data Logging and Reporting This folder contains sample TrendWorX data logging configuration a sample historical database as well as sample reporting and historical replay displays TrendWorX Backgrounds This folder contains several image files that can be used as backgrounds for the TrendWorX Viewer ActiveX display TrendWorX VBA Examples This folder contains various examples that demonstrate the use of the OLE Automation interface of the various TrendWorX modules and components VB Script Examples This folder contains a TWX
140. Visual Basic integration Drag and drop support during runtime Extensive real time signal information including signal quality Expression handling Real time statistical information with csv file support User configured alarm levels for signals 7 1 TrendWorX Viewer ActiveX New Features User defined global or relative signal ranges Fixed location or scrolling grids Embedded signal simulator Support for multiple plot types including Time plots XY plots Bar plots Logarithmic plots Strip charts Circular charts Custom data displaying Global aliasing with browsing support Language aliasing with browsing support Latest HDA compliance support Global aliasing with browsing support Language aliasing with browsing support Latest HDA compliance support Enhanced daylight savings time support for historical replay Reordering on Trend pens TraceWorX debug tracing support Enhanced expression support Progress indicator dialogs for potentially time consuming pen connections or historical updates Note TrendWorX up to and including Version 6 1x uses the Windows based APIs for converting a time from local time to UTC or from UTC to local time The Windows APIs do not correctly adjust the conversion for the daylight savings time if the timestamp to be converted was obtained from a different time period i e it was obtained in summer time but now we have winter time T
141. When applied to a database on a periodic basis they can significantly improve database performance and reduce database disk space usage Example Configurations Example 1 If you wanted to data log 100 signals per second you would write to disk every minute or 60 samples creating a new table every 4 6 hours Example 2 If you wanted to data log 500 signals per minute you would write to disk no faster than every 5 minutes or five samples creating a new table once a day or once a week This section provides some useful tips for troubleshooting data logging applications Using a technology that has been incorporated into all Smar products TraceWorX provides online diagnostics and tuning of applications running in the ProcessView system TraceWorX is designed expressly for systems integrators OEMs and customers who want to have tools for doing their own troubleshooting and diagnostics TraceWorX tracks the runtime activity for the TrendWorX SQL Data Logger and logs the runtime data to a log file based on user configured trace levels The log file provides a thorough color coded report detailing all activity for the application including the time the date the severity level and a description of the event or problem TraceWorX also features several options for reporting issues to technical support If you are experiencing problems with any applications the log file deployment options such as compressing and e mailing log files are ideal f
142. WorX Viewer ActiveX allows the connection of OPC Data Access tags to its alarm limits The OPC enabled alarm limits will hold the most current value of the alarm limits The alarm limits can be a constant value an OPC Data Access tag or an expression In addition the alarm limits are interfaced to the Global Alias and Language Alias servers This functionality is not available in History Trend mode due to the nature of this specific historical replay mode Several OLE automation methods support this functionality void SetPenLoAlarmString BSTR PenName BSTR AlarmString BSTR PenType void SetPenLoLoAlarmString BSTR PenName BSTR AlarmString BSTR PenType void SetPenHiAlarmString BSTR PenName BSTR AlarmString BSTR PenType void SetPenHiHiAlarmString BSTR PenName BSTR AlarmString BSTR PenType 7 35 TrendWorX Viewer ActiveX If Show Alarm Lines is checked dashed lines at the Low LowLow High and HighHigh marks will be inserted into the trend A sample of this is shown below Note If you desire buffering of alarm values historical replay functionality etc you should not use the alarm lines support of the TrendWorX Viewer ActiveX but rather use individual pens to represent each alarm line limit Alarm Lines Shown Ranges Tab The Ranges tab of the Edit Trend Pen dialog box shown below deals with the field to the left of the trend display and the relative scaling of the pen curves for drawing This tab is available onl
143. Y OF OPTIMIZATION FOR MICROSOFT SQL AND MSDE cccccccccccsesscesesececcecsesseaeceeeeseeesessaeeeeees 3 28 TROUBELESHOOTIN G aii ada Doctor so deen atten oO TAE nai Dn dete A EA a EAE AE tacos De 3 36 DATABASE DRIVER ERRORS ctra l nin deste teat aaa tee Or Roa a adn a aa E cada 3 36 INSPECTING DATA LOGGING ACTIVITY c cccccccccscsesscseececceececseseaeceeeesceceesseaeseseeesesesesseaeseseeseaesasaecesenesesseaeeas 3 36 GENEVENT REGISTRAR AND NT EVENT LOGGER INTEGRATION cccccccsessececeseeeseecseseaeseeeeseeeseseaeeeeees 3 37 SECURITY NTE GRA TON fisssitedsascecccdsteciet attics sadesaabeas beck aa e ahah ooataes Boe Gentes baa dest yotea A Aa ET aa EE E ERASER ARA 3 39 DATABASE SCEMA aee a E e a a a sue aaa a a cda isa cito De 3 41 TAGS GABLE E EE E E EN AA OE E E AE A T 3 43 INAST e E rr T AE tes E A E A A N EE EEA OTETA 3 43 NOTESTABLE 3 a rota E E A AO E AAN A E A AE EET 3 43 NUMBERED ABLES EA E EA E A A AAA E A ateos a oo no cion ies 3 44 GLOBALATABLE E A E o A AA add de AAT 3 44 TRENDWORX SQL DATA LOGGER OLE AUTOMATION INTERFACE c ccccccccccsesssseceseeececssesseaseeseseeeesesseaees 3 47 OPC HDA COM INTERFACE E r a aa a a a a m a a a a a A a a a a aaa a a eaaa araia eieaa 3 51 INTERFACES tr dec o A ado dle ls e ne ale a A 3 51 METHODS cotas o e a de coed ool aes e o At 3 52 MSDE SUPPOR Tirar A o e e e a e eae eters ty 3 53 RUNNING TRENDWORX SQL DATA LOGGER AS A NT SERVICE ooccccccnnnonoconicononnn
144. _14 types Persistent Trending will allocate memory for these arrays and the caller of this method must always FREE the associated memory Also if no samples are retrieved the method will return FALSE and the variants will be empty Upon executing this method the Persistent Trending server will search all Persistent Trend groups for a group called GroupName and then it will search for the PointName signal in the requested group Then it will perform a time stamped search to retrieve all values buffered in memory that satisfy the desired data collection rate and the number of returned samples starting from the most current one Persistent Trending will search for the requested data at time intervals reflecting the 5 5 TrendWorX Persistent Trending desired data resolution The last valid sample within each search interval will be returned to the caller If bStamp is set to TRUE the actual time and date stamp of the retrieved sample will be modified to reflect the time and date stamp of the search interval Time stamps are returned in UTC time format 24 boolean GetGroupPointDataUTC BSTR GroupName BSTR PointName long Rate long Samples BOOL Stamp VARIANT Values VARIANT TDates VARIANT MSecs VARIANT Quality Call this method to retrieve buffered data in memory from Persistent Trending for a specific signal PointName Rate is the desired time resolution of the returned samples Samples is the desired number o
145. a Logger TrendWorX SQL Data Logger can be deployed using the same PC on which the database resides or using a different PC that is networked to the database In addition you can have TrendWorX SQL Data Logger is deployed on multiple PCs data logging to the same or different databases therefore providing a scalable and distributed data logging architecture yemi ACCESS aa TrendWorX SQL Data Logger Multiple Database Capability A key feature of TrendWorX SQL Data Logger is its ability to handle data logging and data retrieval with respect to multiple types of databases concurrently therefore enabling you to develop a very cost effective data logging and data retrieval application TrendWorX SQL Data Logger will support data logging and data retrieval to or from e Microsoft Access e Microsoft SQL Server 6 5 7 0 and 2000 e MSDE 7 0 and 2000 e Oracle 8 0 3 2 Introduction Configuration TrendWorX SQL Data Logger is a MFC ATL free threaded server application that performs data logging and data retrieval by implementing a draft of the OPC HDA Historical Data Access specification The configuration layout of the TrendWorX SQL Data Logger is quite similar to that of an OPC server configuration The key concept here is the database group object which replaces the device of the OPC data server configuration A database group object represents a e High level grouping of groups of signals to data log e Mu
146. a logging filters in which calculation is involved the quality of the calculated sample is based upon the qualities of the samples participating in the calculation If any of them are bad the calculated sample will be marked with bad quality For running averages if the quality of the new sample coming in is bad the historical sample logged to the database will have the last EWMA computed value with updated time stamp the time stamp of the actual sample and uncertain quality Note TrendWorX SQL Server supports a variety of data logging filters which you can customize to meet specific needs These filters can also provide considerable levels of data logging compression and disk space savings For example if you are setting up a monitoring application at a high speed data collection rate where only certain statistical values are required to be historically archived using data collection filters and calculation period can considerably save disk space used for data storage and improve historical data replay performance 2 47 TrendWorX Logger Configurator Troubleshooting Data Logging Using a technology that has been incorporated into all Smar products TraceWorX provides online diagnostics and tuning of applications running in the ProcessView system TraceWorX is designed expressly for systems integrators OEMs and customers who want to have tools for doing their own troubleshooting and diagnostics TraceWorX tracks the runtime ac
147. a points are plotted within the trend period during runtime mode one of the following will occur All data points will disappear and a new trend period will begin All data points will remain and continuously scroll as old data points are replaced by new data points You can control these conditions using the Settings tab of the TWXView ActiveX Properties dialog box When Reset Circular Chart is checked in the Settings tab all data points will disappear at the beginning of each new trend period In addition you can choose to have the circular chart auto print upon resetting after a full trend period has elapsed Altering the Appearance of a Circular Chart You can change the appearance of a circular chart using the tabs in the TWXView ActiveX Properties dialog box Particularly relevant to the appearance of the circular charts are the Appearance tab and to a lesser extent the Ranges tab For more information on how to use these tabs please see the appropriate sections 7 14 Introduction Circular Charts in Runtime The following figure is an example of how a circular chart looks during runtime mode E Trendl Ox ActiveX Properties Circular Chart in Runtime Mode This section describes the user interface for TrendWorX Viewer ActiveX The TwxView ActiveX Properties dialog box also called the Properties dialog box shown below is the configuration user interface for the ActiveX Double clicking the ActiveX du
148. abase browsing prompting capability Schema information support for the Recordset structure it returns Support for a MaxRecords property to limit the total number of returned samples Multiple historical data filter support The TrendWorX OLE DB Provider internally uses a high speed data retrieval mechanism based on the native OLE DB providers for the historical databases configured in the TrendWorX SQL data logging server Using the TrendWorX OLE DB Provider In this section we will discuss how the TrendWorX OLE DB Provider can be used to retrieve data from the TrendWorX SQL Server historical database capability Connecting to TrendWorX OLE DB Provider To connect to the TrendWorX OLE DB Provider you must set the corresponding properties or ask the provider to prompt and provide database navigation and browsing tools In order to have the provider prompt a typical VBA type of code would be Dim twx As New ADODB Connection Set Provider twx Provider Smar TWXOLEDB Set up for Prompting twx Properties Prompt 1 Open Connection twx Open Use the TWXSQL Tool Control Properties dialog box shown below to connect to a database This dialog box has only one tab the General tab shown below which prompts you to complete the configuration 6 40 Features in TrendWorX Reporting TWXSQLTool Control Properties General Provider Type MS SOL SERVER X MS ACCESS Connection String MS SOL SERVER
149. abase connections will be open at any time it is recommended that you use Microsoft SQL Server instead of Microsoft Access Microsoft Access cannot handle a large number of simultaneous connections whereas Microsoft SQL Server because of its Enterprise architecture can In addition remember that MSDE performance decreases with more than five active open connections to an MSDE database However both Microsoft SQL Server and MSDE offer central server like memory management of all database connections thereby providing better system resource management than Microsoft Access which manages each database connection independently on a per client basis Database Backup and Maintenance Database backup and maintenance are key factors in choosing a suitable database for the target application You will need to back up historical data perform periodic maintenance on the database and defragment the database after extended periods of use Microsoft Access does not offer most of the above while client database connections are open In addition it requires periodic shutdown and maintenance to deal with data fragmentation issues Typically in a Microsoft Access database historical data logging the fragmentation occurs even when historical data tables are deleted or truncated Microsoft Access will not reclaim the space the deleted data occupied and as such its size it will keep growing until the next time it is compacted In contrast Microsoft SQL Server
150. above or below the set limits For example if autoscaling is selected and the ranges are set from O Low to 200 High and the actual value is 250 then the ranges will autoscale to 0 to 280 The adjustment will be around 20 percent above the actual value Show comments If historical pens are configured in the TrendWorX Viewer selecting Show Comments places the Viewer in freeze mode and retrieves all historical operator comments and batch information available Insert comments Displays the Comment s Entry dialog box for historical pens This option is available only in freeze mode Note that the same functionality is also available for real time trending Time Shifting One feature of historical replay is the time shifting of pens in freeze mode This allows for direct comparison of pens regardless of the time axis settings To use time shifting select the desired pen s from the Details window Then right click and select Time Shift from the pop up menu This opens the Set Pen s Time Shift dialog box shown below Set Pen s Time Shift x m Time Shift By Years Months Days T Undo Time Shift m J0 10 ME NE Hours Min Secs o jo a o Cancel m Time Shift Direction C Shift Forward in Time Shift Backward in Time Set Pen s Time Shift Dialog Box You can then choose the interval and direction for the time shift When you click OK the selected pens will be redrawn to display refreshed h
151. acre Nad 2 36 CONFIGURING LOGGING GROUP PROPERTIES ocio iia cias 2 36 DATA COM ECHON TAB a acabas 2 37 a 2 39 TABLE MANAGEMENT TAB Sc bbdes 2 40 CONTROL BOARD FOR GROUP Suite 2 41 CREA TANGA NE TAG osa dolia 2 42 CONFIGURING STAG PROPERTIES earnrarainan loci 2 43 TROUBLESHOOTING DATA LOGGING 2 laica 2 48 Chpter 3 1e E E EP EEEE E 3 P da eee a inh 3 1 INTRODUCHON ar N A T decane E E ba E 3 1 CONFIGURATION ci di IO A a a tude Ee a Ten ssh 3 3 FEATURES OF THE TRENDWORX SQL DATA LOGGER ssssesssssesesssesessessessuesesseseesessesstesessesessssiessnsnessnenessesess 3 3 UPGRADING TO VERSIONS 6 00 AND 6 10 essa ans 3 5 UPGRADING FROM VERSION 5 20 TO VERSION 6 00 STEP scsscssessessessessessessessesssesesssessssssessntsessneressnesesseesess 3 5 UPGRADING FROM VERSION 5 20 TO VERSION 6 00 STEP 2 c scssessessessessessessessesssesesstsssssssessntsessnesensnenesaeesess 3 5 UPGRADING FROM VERSION 5 20 TO VERSION 6 00 STEP 3 c scsssssessessessessessessesseesesssssessssssntsessntressesesatsess 3 5 IV Table of Contents UPGRADING FROM VERSION 5 20 TO VERSION 6 00 STEP 4oooooooccccccncconccoccconononnnnnnonononoconnnnonananononcnnnnnananonnnnnnos 3 7 UPGRADING FROM VERSION 5 20 TO VERSION 6 00 STEP Doooooooccccccncnonccononononcnnnnonononnnoconnnnnnnnnnnnnnnoncnnanannononons 3 7 CHOOSING A DATABASES wii A Li E LAA E Blatant wage a dada 3 8 DAT A LOGGING EOAD ia AS E E A A bss 3 9 DATA S FORAGE REQUIREMENTS cocos ita E A E
152. actual time data of the trend it only affects how much space appears between the time labels Time Plot 8 12 36 PM 8 13 00 PM 8 13 24 PM 8 13 48 PM 5111 2004 5111 2004 5111 2004 5111 2004 Spacing Between Time Stamps Colors In the Colors section of the Time settings you can choose the colors for the Background of the time box when the old plot style option is checked and Text the title and text displaying the type of trend To change the color simply click the box corresponding to the area that you want to change This opens a Color dialog box which enables you to select a predetermined color You may also select the Define Custom Colors button to create a color Border Style available only with the old plot style The Border Style section of the Time settings defines the type of border and placement the display will have There are four options for the Border Style Bumped Etched Raised and Sunken In the bumped style only the border looks raised while the etched style is mostly flat In the raised style the border looks as if it is coming out of the window In the sunken style the border looks as if it is going into the window The Border Options list enables you to select where you want the border to be placed Bottom Bottom Left Bottom Right Left Rectangle Right Top Top Left or Top Right 7 22 Introduction Appearance Grids The Grids section of the Appearance tab shown below configures the appearanc
153. alog Box Then click Performance Options to open the Performance Options dialog box shown below Performance Options Application response Optimize performance For Applications Background services Virtual memory Total paging file size For all drives 192 MB OK Cancel Performance Options Dialog Box Click Change to display the Virtual Memory settings dialog box shown below Here you can modify your virtual memory settings 3 34 Introduction Drive Volume Label Paging File Size MB A Paging file size For selected drive Drive ep 1468 MB Space available Initial size MB 192 Maximum size MB 384 Set mTotal paging file size For all drives Minimum allowed 2 MB Recommended 286 MB Currently allocated 192 MB Registry size 16 MB 52 concel_ Virtual Memory Settings Dialog Box Current registry size Maximum registry size MB Microsoft SQL Server will use as much memory as it needs to boost its performance However if it has to give back physical RAM it will substitute with virtual memory In some cases it will use more virtual memory than physical RAM Also note that Microsoft SQL Server 2000 or MSDE 2000 uses less memory than Microsoft SQL Server 7 0 or MSDE 7 0 and performs better at the expense of using more disk space Optimizing Data Logging Configuration To optimize the data logging configuration Use deadba
154. an Excel workbook to be the source of the report formatting and layout 2 Click Template in the Target dialog box to select the workbook 3 Click Report Path in the Target dialog box to assign a path where the generated reports will be created 4 Select Publish if HTML output of the Microsoft Excel based report is desired 6 24 Features in TrendWorX Reporting 5 Ifthe Publish option is checked click HTML Path to select a target directory for the HTML output of the report 6 If you want to select a specific worksheet from the source workbook you should enable the WSheet option and then click Select to display a list of all workbooks available Then select the desired workbook 7 You can specify the starting cell of the Excel workbook in which the report will be stored by supplying the desired values for the Row and Column fields In addition to the above you have the following options Auto Print If enabled the generated report will be sent automatically to the current Windows default printer Add Header If enabled TrendWorX Reporting will add an informative header to the generated report Format If enabled TrendWorX Reporting will automatically format the generated report and adjust the column width so that the values within the column cells will be readable If you want to provide a custom format and layout this option should not be checked As an example to hide a certain column in the generated re
155. ancncnnncncnonnnnnncnnnnncnnnnnanananonos 3 53 Chpter 4 INTRODUCTION TO TRENDWORX EXAMPLES ocmnonnnconnssmrmrercrrs 4 1 E OO 4 1 EXCEL TEMPLATES arado odias latas eia e O eaaa e AEE E EEE eaaa D ate Da eE A e ica Ona 4 1 REAL TIME TREND CONFIGURATION occcccoconoconocnncnccononononononononononnnnnnononnnnononononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnninannnonannns 4 2 TRENDWORX BACKGROUNDS e aaaea a a aa a a E AEA aE a Ea a desdasardanait af ddvhaseecehes e EAn ERAGE Eai 4 2 TRENDWORX DATA LOGGING AND REPORTING c cccccccccsesssecesececcecseseeeeceseescecseseeaeceecesesesesasaesesecesesesestsaeeeeess 4 2 TRENDWORX OLE DB PROVIDER DEMO cccccccccesssceecceseesesseeeeececesseseaeeeseeecseseeaaeeeseescessesaeeeseeceseseaeeeeeeseseesasteeeeesenses 4 3 REPORTING TOOLS EXAMPLES c ccccccccsssssscceecceecsessenaeeeeeeccseseaaeeeeeeecsesasseeeeeececeeaaeeeseeeesssussseeseeceeeaseeeeeeseeesesaeeeeeesenses 4 4 TRENDWORXVBA EXAMPLES niori co caveat A da a dand ben adia e a 45 TRENDCUSTOMPENT 1 li ida 4 5 TRENDGUSTOMPEN2 32 00 69 a 0 ates ov a ves dac su eo oaths cad 4 5 TRENDPRINTI Sl ocio A A a title toas 4 6 TWXSCREENNAVIGATION T 32 coccion a A il ainda 4 6 TRENDVBADEMO ES2 o cto ester Shr era CIRO 4 7 PERSISTENTTRENDVBADEMO alii iaa 4 7 VBSCRIPT EXAMP E O e ear a a tad 4 8 Chpter 5 PERSISTENT TRENDING occiso 5 1 INTRODUCTION TO PERSISTENT TRENDING cocccccccccinnonnnonnnonnnnrnn nro 5 1 TrendWorX User s Manual
156. and MSDE are self maintaining database engines that can accommodate scheduled backups periodic maintenance tasks defragmentation and much more Unlike Microsoft Access Microsoft SQL Server and MSDE databases do not require stopping all database activity in order to perform these tasks To maintain your Microsoft Access database 1 Shut down all data logging data replay and reporting applications 2 Start the TrendWorX Logger Configurator 3 From the Tools menu choose Compact Repair MS Access Database as shown in the figure below File Edit View Go Action Tools Help o rm BA da Set working directory h Options Compact Repair MS Acc MSDE Manager Accessing Database Maintenance Tools 4 This opens the Compact Repair MS Access Database dialog box as shown in the figure below You can choose to compact the configuration database or any other historical Microsoft Access database Note that database compaction requires that you have available free hard disk space equal to the size of the Microsoft Access database prior to compaction It is a good idea to always back up any database prior to compaction Microsoft Access database compaction should be done after several iterations through the cyclic table creation configuration of TrendWorX data logging For example if the data logging configuration is set to create a new table every 1 day and maintain a total of 7 tables a reasonable choice fo
157. and Methods for the TrendWorX Viewer ActiveX The following properties and methods are categorized by the object in which they exist Viewer Properties boolean AutoStartRuntime Toggles the runtime mode when the container application switches from design mode to active mode Default TRUE boolean ShowTitle Determines whether the main title is displayed Default FALSE boolean ShowRanges Determines whether the ranges field is displayed Default TRUE boolean ShowDetails Determines whether the details field is displayed Default TRUE BSTR PlotType Determines plot type Values are time plot XY plot logarithmic plot strip chart bar plot and circular chart Default time plot BSTR BorderEdge Determines trend border area settings Values are sunken raised etched and bumped Default Sunken BSTR BorderOptions OLE_COLOR DispColor Determines trend border area options Values are rectangle left bottom right top top left top right bottom left and bottom right Default Rectangle Determines trend curve area color OLE_COLOR BackColor LPFONTDISP TimeFont Determines background color Dispatches interface to the time field font LPFONTDISP DetailsFon Dispatches interface to the detail field font LPFONTDISP MainFont Dispatches interface to the main title font boolean ShowTimelnfo Determines if the time field is displayed Default TRUE
158. and click Add gt Click Move Up and Move Down to relocate buttons on the toolbar This feature is helpful because there may be a button on the toolbar that you do not use in which case it should be removed Note All functions of the ActiveX toolbar will either be in the list of available buttons or in the list of current toolbar buttons lt is impossible to remove a function entirely from the dialog box TrendWorX Container exposes a rich and useful set of OLE Automation properties and methods The various OLE objects exposed are e Application Object Twx32App e Documents Object Twx32Documents e Document The Application Object has the following properties and methods e BSTR Name e boolean Visible e boolean RuntimeMode e IDispatch Application e IDispatch Documents e boolean EnterRuntime e boolean ExitRuntime 1 23 TrendeWorX Container e void Quit e boolean LoadBgTrend e boolean ShutDownBgTrend e void CloseAllDocuments Documents Object Twx32Documents The Documents property exposes another OLE object which can be used to manipulate individual TrendWorX displays It has the following properties and methods Properties e long Count Methods e boolean Open BSTR FilePath e boolean Add BSTR Caption e boolean RunDocument BSTR Item boolean CfgDocument BSTR Item e boolean PrintDocument BSTR Item e boolean IsDocRunning BSTR Item e boolean CloseDocument BSTR Item e boolean Clo
159. anges The TrendWorX SQL Data Logger also supports various data logging filters on a per tag basis as well as deadband These can be used to reduce the database storage requirements effectively When the targeted size of the database is more than 1 GB it is recommended that you use Microsoft SQL Server or MSDE for up to 2 GB instead Microsoft Access To help you in maintaining the target database size and avoiding situations in which the database size grows uncontrolled the TrendWorX SQL Data Logger supports a cyclic database table structure which if configured will always maintain the configured number of tables into the database by overwriting existing data as it rolls over each table Refer to the TrendWorX Logger Configurator documentation for more information In addition keep in mind that ordinary database maintenance tasks such as defragmentation compaction and table index updates may require additional space on the target device s which can vary depending on the database tasks under operation It is recommended that you allow for additional device space in these cases The load of client connections refers to the capacity of the database to handle multiple users connected to the database for reading or writing data Typically writing to a database is a much more expensive and slower operation than reading data is The TrendWorX SQL Data Logger uses connections to the database for logging data previewing historical data providi
160. art or stop existing reports Example The sample code below adds a simple MS EXCEL Report Private Sub cmdReports_Click Dim reports As TWXReport Document Set reports GetObject TWXReport Document Add a report reports AddNewReport TextBox1 Text TextBox1 Text TWXReport Raw 8 False False 60 0 reports SetReportlmmediate TextBox1 Text Now Now 1 reports SetReportEXCELTarget TextBox1 Text D Logging Tests TWX EXCEL Templates Production Daily Yield xit D Logging Tests Test Reports False False 3 3 False True True False False Add a tag reports AddReportTag TextBox1 Text SimulatePLC Random SimulatePLC Random Provider MSDASQL 1 Extended Properties DSN TWXREPORT_MSJET DBQ D Logging Tests Logging Data TWXREPORT_MSJET mdb Driverld 25 FIL MS Access MaxBufferSize 2048 PageTimeout 5 UID admin 1 MSJET JetGroup 3 Execute Report reports StartReports reports EnableReport TextBox1 Text reports RunReport TextBox1 Text ProjectWorX Support Several OLE Automation methods have been added to facilitate ProjectWorX deployment and WebHMI enhanced support 1 ReplaceStringInString StringToReplace as String OldSubstring as String NewSubstring as String as String 2 ReplaceHost OldHostName as String NewHostName as String as Long 3 ReplaceFilePath OldSubstring as String NewSubstring as String as Long 4 ReplaceTag OldSubstring as String Ne
161. as integrated minimal OPC HDA server capability information which will either modify its user interface or warn the user if the third party OPC HDA server does not support the required interfaces However the TrendWorX Viewer ActiveX will not compensate for the lack of implementation of used OPC HDA interfaces or methods by combining supported method calls to produce the same end result The following additional OPC HDA compliance development effort has been done e Detection of Connection Point Support The TrendWorX Viewer ActiveX supports two methods of historical replay In Auto Updating mode default mixed real time and historical signals can be configured and updated in real time via asynchronous methods calls In History Only mode only historical signals can be configured and they are updated via user interface requests or VBA automation and no asynchronous requests will be processed If the OPC HDA server does not support connection points then the second historical replay mode should be used e Detection of Max Returned Samples If the OPC HDA server does not support return of the number of historical samples configured in the TrendWorX Viewer ActiveX based on data collection and the trend display period a warning message will notify the user to change the trend period settings e Detection of OPC HDA Aggregates Each historical pen can utilize a historical data retrieval filter called aggregate The TrendWorX Viewer will retrieve
162. at language Installed Locales Only If this is checked local languages appear in the box Available Language Translations Only Checking this box allows you to choose from available language translations only Logging Preferences Native is checked the languages are displayed the way they would TrendWorx Persistent Trending Actions Menu Tools Menu Selecting Logging Preferences from the View menu opens the Logging Preferences dialog box shown below which enables you to log to a csv file or a txt file When using the csv file decimal places will be indicated by the When using the txt file decimal places will be indicated by the This is useful for those using Persistent Trending on systems set up for European standards using as a decimal separator Logging Preferences a x r Logging File Extension Use CS Extension with Decimal Separator It will create a Comma Separated File C Use TXT Extension with Decimal Separator It will create a Tab Separated File OK Cancel Logging Preferences Dialog Box The Actions menu commands are listed in the table below Actions Menu Commands Command Shortcut Keys Function Start Logging CTRL R Starts data logging This command is only available when the Persistent Trend is not logging Stops data logging This command is only available when the slop Logging claret Persistent Trend is
163. atabase the moving average value of all samples collected for the specific tag calculating the moving average value over the entire data logging period using a Moving Average filter equation similar to the one used by Microsoft Excel where the moving average for each period is based on the average value of the tag over a specific number of preceding periods If the calculation period is enabled for the tag the Data Logger will use the calculation period to define the order of the moving average filter By default it will use a fourth order filter which means that four previous samples will be used in computing a moving average estimate for each time interval Also if no new samples are received within the calculation time period the Data Logger will use the last known value to provide a more accurate moving average estimate In addition if new samples are being received irregularly the Data Logger will try to backfill missing samples by using the last known value in order to provide a more accurate moving average estimate This way the Data Logger accommodates slowly changing signals which due to the event nature of OPC data updates change less frequently than the desired data collection If the calculation period is not enabled the Data Logger will still try to backfill missing samples by using the last known value but no new historical values will be entered to the database until a new updated sample arrives Note For all dat
164. ator e Update existing items When the import file contains items that are in the configuration database then it updates them using data from the import file Otherwise it skips these items Note Either Create new items or Update existing items must be selected Otherwise there is nothing to import Note Selecting XML Validate from the File menu does not import an XML data file but it will try to validate its structure using stored XML schema Once it passes this validation the XML file is acceptable for import by the Configurator Look in E Examples eE E E Graphworx Examples a Script Worx Exa AlarmWorx a GraphwWorxTemplates a Security YB Login DataWorxYB Samples a Images TrendWork Exa Dwx Ole a Languages EI vcRworx Example GenDemo Multimedia Demo Global Aliasing Examples E Sample Project File name O Files of type XML Fies xm Cancel IV Create new items V Update existing items Importing Configuration Data from a XML File Activating the Database Once your configuration is complete you need to make sure that it is the active database The database that is currently active is the one that the server uses To make the current database active select Make Active from the File menu If the Make Active selection is grayed out then the current database is already the active database A dialog box appears showing both the current active database and database that is currently being edited
165. atting gt Edit Stack Plot Into a New Plot Shift Time Delete Cancel Combining Pens in a Stacked Plot Time Shifting Pens During Runtime Mode US Aon ell AN OA A ARJONA Mal MAA MAA YA 7 14 27 PM 518 2004 One feature of historical replay is the time shifting of pens in freeze mode This allows for direct comparison of pens regardless of the time axis settings To enable time shifting Right click the desired pen s in the Details window and select Time Shift from the pop up menu as shown in the figure below 16 67 Options gt Formatting gt Edit 0 00 Stack Plot gt 4 Delete Description g SimulatePLC Randees A SimulatePLC Ramp Cancel Time Shifting Pens During Runtime Mode 7 60 Introduction This opens the Set Pen s Time Shift dialog box as shown below Choose the interval and direction for the time shift When you click OK the selected pens will be redrawn to display refreshed historical or real time data The time shift operation can be undone at any time by clicking Undo Time Shift Set Pen s Time Shift xi m Time Shift By i Years Months Days J Undo Time Shift m E 4 o OK Hours Secs jo o 1 fo fo Cancel Time Shift Direction C Shift Forward in Time Shift Backward in Time Setting the Time Shift Parameters for Pens You can then choose the i
166. average of these values computed using a Moving Average filter These functions are described below in greater detail Use calculation period Checking this box ensures that the calculation period set at the Group level settings will be used All samples Writes to the database all samples collected for the specific tag within each logging to disk period Maximum Writes to the database the maximum value of all samples collected for the specific tag calculating the maximum value over the calculation period defined for the logging group if enabled If the calculation period is not enabled the entire maximum value for all the available samples at the time of writing to disk will be logged to the database Minimum Writes to the database the minimum value of all samples collected for the specific tag calculating the minimum value over the calculation period defined for the logging group if enabled If the calculation period is not enabled the entire minimum value for all the available samples at the time of writing to disk will be logged to the database Average Writes to the database the average value of all samples collected for the specific tag calculating the average value over the calculation period defined for the logging group if enabled If 2 45 TrendWorX Logger Configurator the calculation period is not enabled the entire average value for all the available samples at the time of writing to disk will be logged to
167. ayed boolean ShowPenHiLo Determines whether a pen s Hi Lo information is displayed boolean ShowPenHiLoAlarm Determines whether a pen s Hi Lo alarm information is displayed boolean ShowPenPoint Determines whether a pen s information is displayed boolean ShowPenText Determines whether a pen s text is displayed boolean ShowPenTime Determines whether a pen s time information is displayed boolean ShowPenUnits Determines whether a pen s units are displayed boolean ShowPenValidity Determines whether signal quality will be displayed boolean ShowPenValue Determines whether a pen s value is displayed boolean ShowTooltips TRUE if plot ToolTips are to be shown for the currently focused pen when in freeze mode boolean ShowXAxis Determines whether x axis values are shown for XY plots BSTR BorderEdge Visual appearance of the Details window BSTR BorderOptions Visual appearance of the Details window Short Visible Pens Gets sets the number of visible pen details to be drawn in the Details window BSTR NumberFormat Gets sets the number format of the pen BSTR Size Gets sets the size of the Details window OLE_COLOR FillColor The background color of the Details window 7 74 Introduction Grid Objects OLE_COLOR TextColor boolean ShowHeader The color of all text in the Details window
168. bar double click the TrendWorX Viewer during runtime You cannot view the toolbar in configuration mode 3 te A Oo E QM 4 MAS Ll Trend Viewer Toolbar The Trend Viewer toolbar contains the following buttons Edit pens 7 38 Introduction Edit trend Edit period Freeze mode Statistics Zoom trend Page back Cursor back Cursor forward Page forward Set right time Show comments Print trend Save trend Dock toolbar Edit Pens Clicking the Edit Pens button shown at left on the Trend Viewer toolbar opens the Trend Pen Configuration dialog box shown below Trend Pen Configuration A J x The Trend Pen Pen Type OPC Tags Real Time Pen Description WB SimulatePLC PumpSp Tags Menu Edit Delete OK Help selee Trend Pen Configuration Dialog Box Configuration dialog box contains the following buttons e OPC tags e Tags menu Edit e Delete OPC Tags To make real time connections from the Trend Pen Configuration dialog box click the OPC Tags button This opens the Unified Browser which enables you to browse all available OPC servers and their signals 7 39 TrendWorX Viewer ActiveX Tags Menu Clicking Tags Menu in the Trend Pen Configuration dialog box opens the Tags menu which contains the following options Expression editor Simulation variables Persistent tr
169. be evoked Otherwise the default Windows printer will be used boolean SetinkSaveMode boolean bMode Sets the ink saving mode during printouts If TRUE during the printing process all of the Viewer background area colors will be ignored to save ink boolean GetInkSaveMode Returns the current status of the ink saving mode boolean ResetPenTotalizer long Penindex Resets a pen s Totalizer function support The PenlIndex is the order of the pen void SetUTCReplayMode boolean bMode Sets the UTC historical replay mode Supported only for a history chart Viewer If TRUE all curves are drawn using UTC time stamping boolean GetUTCReplayMode Returns TRUE if the Viewer is replaying historical data in UTC mode boolean GetSamplelnfo long Penindex VARIANT SampleValue DATE SampleTDate VARIANT SampleMSecs VARIANT SampleQual VARIANT SampleHDAQual VARIANT HistoricalSample Returns sample information for the current location of the cursor in freeze mode or zoom mode for the pen with index PenIndex boolean GetSamplelnfo2 long Penindex VARIANT SampleValue VARIANT SampleTDate VARIANT SampleMSecs VARIANT SampleQual VARIANT SampleHDAQual VARIANT HistoricalSample Returns sample information for the current location of the cursor in freeze mode or zoom mode for the pen with index PenIndex It returns the date as variant void SetCircularPrintMode boolean bAutoPrint
170. cccocccccncconoconononanonnnnonannnanannn conocio nn ncnnncnn nn 6 47 Chpler7 VIEWER ACTIVEX 00 as 7 1 INTRODUCTION ica diia 7 1 TRENDWORX VIEWER ACTIVEX FEATURES c oooccniicconccnnconicnncnnnconnonn cnn crono 7 1 NEW FEATURES coa ar OIE agers ODA EA DA oi 7 2 USING THE TRENDWORX VIEWER ACTIVEX ooooncoincciocccocococococonnnnncnnnarnnnrr rn 7 3 CONNECTIONS ruca tiara IE RRE RA 7 3 RUNTIME MODE OPERATIONS cronista A e dia oe aeeas 7 4 VORWORX DATA REPLA Vivian a sary eg aeaynda ade Rao a ceed a a ETA 7 4 FUNCTIONS NOT SUPPORTED IN RUNTIME MODE oooonccnnccnccccnoccnncnoncnonanc rancio no corn cnn nora nro rro rr rr 7 5 SECURE oa iaa ariba 7 5 ASYNCHRONOUS DOWNLOADING FEATURES coonccinccnniconiconaconnnconcono non n conan cnn 7 6 LANGUAGE ALIASING SUPPORT vinni siiin aiii iadaa daai iiidid aaide i aia 7 6 SAMPLE LANGUAGE CONA CU RAT O Na a e a r a a Er a e ar a a suse a ea Ea AE AE a EAE E orina pain EESE NTER AEE 7 7 GLOBAL ALIASING SUPPOR hicieran iiaa diania aNd dindaa even dadia dada Vidanta dd 7 10 INTERNAL ARCHITECTURE OF ACTIVEX coccccccccconnnonnnonnncnn nono noco non nn nro rn nr 7 11 TRENDWORX OBJECT CAPABILITY onnnoncciconoconocinoninani nor nnrnrrnrrrnr 7 11 USING VISUAL BASIC TO VIEW TITLE OBJECTS ooonniinicninconiccnncnonononncnn cnn nono 7 12 USING VISUAL BASIC TO VIEW GRID OBJECTS ooociinicnniconnconinonincnnncnn nono noronarrrrnr rr rr 7 12 USING VISUAL BASIC TO VIEW RANGES OBJECTS concniccinccnnccnnnononccnncnonn non cnr rro ron
171. ch for and replace text as needed to modify the pen 7 25 TrendWorX Viewer ActiveX Search amp Replace xi Search Text Replace Text MatchCase V Modify Pen Description Tags Menu All C Selected Replace L gt Help Point Names Smar Simulator 15S5imulatePLC PumpStatus ba Search and Replace Dialog Box Reordering Trend Pens The TrendWorX Viewer ActiveX supports reordering of pens in configuration mode In the Pens tab select the trend pen s you would like to reposition as shown in the figure below General Appearance Ranges Pens Rates Settings Value Forma MM Hist Ony OPC Tags Pen Type RealTime Si a Real Time si mags Menu Real Time Si Edit Real Time Si Pen Description M ofwsim ramp float i gfwsim toggle bool ES gfwsim random bool BB ofwsin ramp long Delete gt Replace HEE Reordering Trend Pens Then click the up or down arrow buttons to reposition the selected pen s The pens move up or down as shown in the figure below General Appearance Ranges Pens Rates Settings ER Hey Or Pen Type _ me gfwsim toggle bool Real Time Si a OPC Tags Tags Menu Ba gfwsim random bool Real Time Si BB ofwsim ramp float Real Time Si Edit BB ofwsim ramp long Real Time Si Delete gt Replace Hi Trend Pens Repositioned 7 26 Introduction Rates Tab
172. ck the button to browse for a directory If you want this new database to be the active configuration database check Make Database Active Creating MS Access Database Please select a file name for new MS Access File Select or enter a MS Access Database Name C Documents and Settings Administrator My Documents D atabase mdb a IV Make Database Active lt Back Next gt Finish Cancel Help Naming the New Access Database 5 Click the Finish button The new database is created and opened in the Configurator 2 4 Introduction Creating a Microsoft SQL Server Configuration Database To create a new Microsoft SQL Server configuration database in the Configurator 1 Select New from the File menu as shown in the figure below File Edit View Go Tools Help Open re Ctrl O Save As Connection Properties Export CSV Import CSV XML Export XML Export Schema XML Import Creating a Configuration Database 2 The introduction screen for the Configuration Database Wizard appears Click the Next button to continue 3 You have two options for creating your new database as shown in the figure below Select Create new configuration in MS SQL Server database Click the Next button to continue Which type of database would you like to use This wizard will create configuration database depending on the choice below 3 Choose the type of database you would lik
173. clients will scale the historical data upon switching to a new language When specifying a language alias in the Description and Eng units fields you can also select a language alias from the Language Alias tab of the Unified Browser which includes all language aliases in the language database This eliminates the need to manually type in the alias name Clicking the button opens the language alias browser The browser includes all languages aliases in the language configuration database All language aliases that are configured in the Language Configurator are conveniently available to choose from inside the browser The tree control of the Language Configurator is mimicked in the tree control of the language alias browser Select a language alias by double clicking the alias name The alias name appears at the top of the browser which automatically adds the and delimiters to the alias name Click the OK button Deadband Each group can also have an individual data logging deadband and filter for each tag signal it maintains For instance you may choose to log data for all values retrieved from a certain OPC data server or for the average of the values over a period of time In addition you can configure a deadband value absolute or percentage for each signal The Deadband field allows you to specify a specific absolute operational value or a percentage of operation value a signal must change before the server updates with the new
174. code version language aliasing support please refer to the ProcessView Language Configurator documentation The TrendWorX Viewer ActiveX supports the following language aliased strings Pen description Pen engineering units with scaling support Pen details format Title string of viewer Format strings of details Detail window column names 7 6 Introduction Note The TrendWorX Viewer requires the following additional language aliasing configuration work If any expression is to be used for range alarm limits or unit scaling you need to define both a Read Expression and a Write Expression in the Language Configurator By doing so the Viewer will be able to function properly between language switches Note To enhance language aliasing performance select the Microsoft Arial Unicode font which contains all Unicode characters The Arial Unicode MICROSOFT font must be selected separately within the Properties dialog box of each ActiveX component Sample Language Configuration The Unicode version of ProcessView installs a sample Language Server configuration called LangSupSample mdb under the Program Files Smar ProcessView Examples Languages folder of the ProcessView product installation tree In addition this folder includes a sample GraphWorX display called LanguagesDemo gdf which includes a sample Viewer configuration The figure below shows this sample display during runtime mode Notice that you can sw
175. conversion error o OPCHDA_PARTIAL 0x0100 Q Aggregate value is for an incomplete interval Critical Note Because of the new compliance changes in historical replay and reporting a version 7 x or later historical replay or reporting may not produce identical results to existing 6 1x version reports and or historical replay screen captures for the same signals and time periods Two modes of historical replay are supported 1 Mixed replay of signals 2 History only replay in freeze mode Mixed Replay In mixed replay which is the default mode you can connect real time OPC signals persistent trending signals and historical signals All the signals will auto update and the historical signals will be refreshed with new historical data as they become available You can control the frequency of historical data updates by modifying the History Refresh Rate option in the Rates tab of the Properties dialog box of the TrendWorX Viewer This should be set close to the data logging frequency i e the Log to Disk option in the TrendWorX Configurator History Only Replay To configure the Viewer for History Only Replay you must first check History Only in the Pens tab of the Properties dialog box as shown in the figure below prior to making any signal connections In this mode you can only connect to historical data Once the Viewer is committed to animation runtime mode it will populate the screen with the historical data and automatically se
176. ct the database on the server Trendw om Logger Example X Attach a database file as a database name Trendwor Logger Example Using the filename OK Cancel Help Data Link Properties Selecting a SQL Server Database 7 Your selection appears in the TrendWorX Database Upsize Utility dialog box as shown in the figure below Click the Upgrade button to begin the upsizing operation You will see a progress bar during the conversion Configure Database Upgrade 1 Select Source MS Access Database Examples VCRW or Examples CRLog mdb Browse 2 Select Destination SOL Database J a bout Upgrade Close Help Destination SQL Database Selected 8 4
177. ction Tools Help DIS Re gt amp Bs ls El Configurations S Twx Demo DBGroup MyGroup SimulatePLC PumpSpeed SimulatePLC Ramp E SimulatePLC Random SimulatePLC Sine SimulatePLC Square MS Access 17 Name D H Modified Twx Demo m Configuration settings Network local Node Name 1 0 IV Use Global Connection Use UTC Time m Server status Started Logging server is not using this c database Heset Add Ne Ready TrendWorX Configuration Tree The extent of configuration varies from level to level Starting from the highest level in the tree the extent to which you can manipulate the settings changes depending on the current selection e Tags At the tags level the lowest level you can click on a tag to view information about the tag and to manipulate its settings In addition you can add new tags by clicking Add New at the bottom of the tags display Logging group The logging group level allows more flexibility At this level you can configure data collection logging and table management settings as shown in the figure above You can also add new tags at this level e Database group At the database group level you can actually establish database connection settings You can activate or deactivate the data logging process You can also switch logging databases Configuration At the configuration level which is just below t
178. ction is made and alias the Persistent Trend group for proper operation If you select a History Tag Alias pen you will be prompted to first pick a historical tag from an OPC HDA server and then select the alias to use After the connection is made you will be asked to edit the pen and select the remaining aliases Expression Editor Selecting Expression Editor from the Tags Menu in the Pens tab of the Properties dialog box launches the Edit Expression dialog box shown in the figure below The Expression Editor shown below is available to assist you in creating expressions for your ProcessView applications The window is resizable and can be stretched as well as maximized or minimized The drop down list at the top of the Edit Expression dialog box keeps track of the last 50 expressions you have entered The expression entered most recently is the first one in the drop down list Note For more information about the Expression Editor please see the Expression Editor help documentation ES Expression x Smar Simulator 15SimulatePLC PumpSpeed v x Smar Simulator 1 SimulatePLC PumpS peed Arithmetic Relational Logical Bitwise Functions EAS OPC Tags Cae _ Cancel Simulation Yariables For Heln nress F1 Global Aliases Expression Editor Editing the Trend Pen Once you have configured a pen you can double click the pen in the Pens tab list as shown below This opens the Edit Trend Pen dia
179. currently logging Depending on the current state of a particular group activates Activate Group CTRL A or deactivates the selected group This will start or stop all data collection and logging for the selected group A check mark indicates that the group is activated The Tools menu commands are listed in the table below Tools Menu Commands Command Shortcut Keys Function Security Login F6 Prompts for login to the ProcessView Security Server Security F7 Opens the ProcessView Security Configurator Configuration Working Sets the working directory where all files associated with F8 Directory Persistent Trending are kept Setting the Working Directory Selecting Set Working Directory from the Tools menu opens the Set Working Directory dialog box shown below which enables you to configure a custom directory in which all application configuration files will be stored and retrieved Click Browse to select the directory Select working directory x C Program Files Smar Process View Examples Browse T Save to Registry Cancel Set Working Directory Dialog Box 5 12 Introduction to Persistent Trending Help Menu Groups Adding and Configuring Groups Group Configuration Tab The Help menu commands are listed in the table below Help Menu Commands Command Shortcut Keys Function Help Topics F1 Launches the online Help for Persistent Trending
180. d File Menu Commands Command Shortcut Keys Function New CTRL N Creates a new trend display Open CTRL O Opens an existing trend display Close Closes the current trend display Save CTRL S Saves the current display file Save As Saves current display file with a new name or file extension Print CTRL P Prints the current trend display Print Preview Displays a preview of the screen before printing Print Setup Configures printer settings Recent File Lists the last four files opened in TrendWorX Exit Closes the application The Edit menu commands are listed in the table below Edit Menu Commands Command Shortcut Keys Function Cuts the selected object from the current view and places it Cul CTRL on the clipboard Copy CTRL C Copies the selected object to the clipboard Paste CTRL V Pastes the last object placed on the clipboard Paste Special ees pe last object placed on the clipboard with special Provides a selection of supported Trend ActiveX Viewer styles Agd Treng that you can insert directly into the Trend window Time Plot CTRL 1 Adds a time plot to the display XY Plot CTRL 2 Adds an XY plot to the display 1 5 TrendeWorX Container View Menu Bar Plot CTRL 3 Adds a bar plot to the display Log Plot CTRL 4 Adds a log plot to the display Strip Chart CTRL 5 Adds a strip chart to the disp
181. d to formulate trend queries in order to retrieve historical data A typical trend SQL statement may look like the following Select Device1 Group Tag1 Device1 Group Tag10 Filter MaxTime Subinterval 10000 Start 1999 6 16 18 00 00 End 1999 6 16 18 10 00 Select tag1 tag2 tagn This specifies the desired historical tags to participate in the query If the is used instead e g Select without other keywords the Smar TrendWorX OLE DB Provider will return information relating to the properties of the historical tags such as device point name logging name and units Note that in this query the logging names of the historical points should be used Filter filter type This specifies the desired historical data processing filter to be used when retrieving data historical data The supported filter types are Raw all values are retrieved Average Min Max StDev MinTime minimum values with actual time stamp MaxTime minimum values with actual time stamp Last decimated value All Statistics maximum minimum standard deviation and average over entire time span Total summary of values 6 45 TrendWorX Reporting Running Min Running Max Running Average exponentially weighted moving average Moving Average Moving Min Moving Max If no Filter value is specified the TrendWorX OLE DB Provider will retrieve all raw data logged values Subinterval
182. d always try to get the running instance of the server rather than create a new instance except for the first time connection The TWXBgTrend Document OLE automation object supports the following OLE automation properties and methods BOOL Visible TRUE if the application window is visible supports SET GET Returns the Full path and file name of the currently loaded file in BSTR FullName TWXBgTrend supports GET only BOOL Maximized TRUE if the application is maximized supports GET SET Returns the file name of the current file loaded in Persistent Trending BSTR Name supports GET only Returns the path for the currently loaded Persistent Trending file BSTR Path supports GET only Returns TRUE if the application does not allow any modifications BOOL ReadOnly supports GET only BOOL Runtime Returns TRUE if the application is in runtime mode supports GET only Returns TRUE if all pending changes are saved or no new changes BOOL Saved have been made supports GET only Returns the number of groups configured in Persistent Trending long GroupCount supports GET only 5 2 Introduction to Persistent Trending OLE Automation Methods 10 11 void Close BOOL SaveChanges BSTR File Call this method to shut down the application If SaveChanges is TRUE the last changes made will be saved to the user supplied file void Open BSTR File Call this method to open the user supplied File in Persis
183. d hr GenTray 41 183 Insert Notes ce eS Gwx32 1 18 Page Trend MMXPhone 9 18 Print Trend MobileHMI 484 Save Trend Projectors 4S Set Trend Time SerMarB ar 1 83 Show Comments SecureDesktop 2 48 Time Shift Pen Y Swx32 4 48 Toggle Toolbar Fe Twx32 2 18 Trend Statistics 42 TwxBgTrend 4 83 Unfreeze Trend 4 1 TwXReport 4463 Zoom Trend v HE TWXSOLS wr A ProcessView Security Server 7 5 TrendWorX Viewer ActiveX Asynchronous Downloading Features The TrendWorX Viewer supports asynchronous downloading of configuration data when used inside ProcessView ActiveX document servers such as GraphWorX to produce documents which can be viewed using Microsoft Internet Explorer To enable this feature select URL Path from the General tab of the TWXView ActiveX Properties dialog box shown below and supply a URL path In the case of viewing ActiveX documents within an intranet setup you can supply a server name and directory specifying the location of the TrendWorX Viewer configuration data must be a shared directory by using the convention file Server Name Directory File Name v32 You can also enable the Use Local Settings option which if checked stores runtime changes to a local copy of the remote configuration file It will use this local file every time the HTML page that hosts the Viewer is loaded inside the Web browser General Appearance Ranges Pens Rates Settings View
184. d ies 7 36 RANGES TAB FUNCTIONS oia oi li tilda 7 37 TOTAU Z A TAB E E a a E aA a a ea a Aa aa E a a a a aAa a Eaa i 7 37 TREND VIEWER TOOLBAR cuina taa daii aai siden di 7 38 EDIT PENS innana a A a a aaa IN Sal a Es A hg lay N 7 39 EDIT TREND 00 acia td data tdi o a ated 7 40 EDIT PERIOD E inc ie de le ba a See ea E ad et Se 7 41 AO O O NAS 7 42 STATISTICS ooo dis 7 42 ZOOM TREND conti rl a A cesar A Ida tl OVE ed ain egies E eee 7 42 CURSOR BACK CURSOR FORWARD ocococcccccocccononononononononononnnnnn cnn cnn cnn enero nene nar cnn nan nnnanin 7 43 PAGE BACK rererere henen g a a E a arae aaaea ad ie tt telde a 7 43 PAGE FORWARD iir tea ere iio A a aa aa e ae a iaia 7 43 SET RIGHT TIME ir ek ees tet A AL Ra 7 43 Vil TrendWorX User s Manual SHOW GOMMENITS ic si sieeve acest aici niisiectie Saal ee aio estat eal eat a al a te adc 7 44 PRINTTREND acia cae vances sated oa oe cdi edi de elec a ad E ie AEE dt deci Teea ETETEN aa 7 45 SAVE TREND socia ste nia tala 7 45 DOCK TOOEBAR v0 0 cucuta dt da evel sac od aaa a ateta trial edie bigs alta tela 7 45 AISTORICALRERBLA a o e e tio 7 46 ALAS A TASE eaansadeasshsdadccbhneddoesuecaadepisesduaid E E 7 47 HISTORY ONLY REPLAY orent unien a libra Dated cia dl dd te 7 47 PEN FILTERS tot lA A A A ee eee 7 49 IDEAL PENS sescecec E re ea on dacs ani E A tra nadaataqgasdechlena ditGng TT 7 50 EDITING PENS DURING RUNTIME MODE oococcnccccccoccnoconcnononcnonccnonononnnn nn cnn cc con nn a
185. d in the tree control of the Global Alias Browser Select a global alias by double clicking the alias name e g Floor in the figure below The alias name appears at the top of the browser which automatically adds the lt and gt delimiters to the alias name Click the OK button lt Floor gt Global Aliases g Aliases Name Description Al E Building E BuildingIdent Building human readable identification string a Floor FloorCaption l FloorIdent Floor human readable identification string E Room E RoomCaption f Roomident Room human readable identification string y f RoomTemper hd me Selecting a Global Alias From the Unified Browser Internal Architecture of ActiveX The internal architecture of the TrendWorX Viewer ActiveX is composed of three individual object managers e A Point manager used to store point name information A Variable manager used to store data buffers and server updates for each point A Pen manager used to represent the visual aspect of the collected data points In addition TrendWorX Viewer has the following threading mechanism A Main primary thread e A Worker thread used for data updates and buffer management The internal architecture of the TrendWorX Viewer allows the data to be collected at a different rate and graphically drawn at a multiple of the data collection rate in order to minimize overall system load Currently the minimum scan rate i
186. d is configured and the data logged signal changes frequently the result indicates an upper limit of samples data logged for that period In the case of bar plots the historical replay results in a time averaged sample across the preconfigured trend period in configuration mode That is if the period is set to one hour the bar plot type will display the averaged sample over the last hour Any historical pen can be configured as an ideal pen and there is no limitation on the number of ideal pens per TrendWorX Viewer As shown in the figure below an Ideal Pen configuration tab is automatically inserted in the Edit Trend Pen dialog box to allow you to select ideal pens and to set their starting time and date Upon entering animation mode the TrendWorX Viewer will populate the ideal pens with historical data starting at the selected time and date while all other nonideal historical pens will update with current data from the TrendWorX historical databases To select a desired date for the trend period you want to view click the down arrow in the Date field and then choose a date from the calendar This feature allows for powerful comparisons of past historical data with current historical data for the same historical pen Edit Trend Pen a x General Alarms Ranges Totalizer Ideal Pen IV Ideal Pen Date 5 12 2004 y Time 08 53 AM Select Eomment B atch Ideal Pen Configuration You can set or reset any historical
187. d properties propget id 1 helpstring property LoggerStatus HRESULT LoggerStatus out retval short pVal propget id 2 helpstring property CurrentTime HRESULT CurrentTime out retval DATE pVal propget id 3 helpstring property StatusString HRESULT StatusString out retval BSTR pVal propget id 4 helpstring property StartTime HRESULT StartTime out retval DATE pVal id 5 helpstring method GetDatabaseGroupStatus HRESULT GetDatabaseGroupStatus in BSTR bstrDBaseGroupName out short pStatus out DATE pCurrentTime out BSTR bstrStatusString id 6 helpstring method GetGroupStatus HRESULT GetGroupStatus in BSTR bstrDBaseGroupName in BSTR bstrGroupName out short pStatus out DATE pCurrentTime out BSTR bstrStatusString id 7 helpstring method GetGroupStatistics 3 47 TrendWorX SQL Data Logger HRESULT GetGroupStatistics in BSTR bstrDBaseGroupName in BSTR bstrGroupName out long pConnectionTime out long pTableOpenTime out long pDataPreparationTime out long pDataWriteTime out long pTotalLogTime out long pTotalLogMinTime out long pTotalLogMaxTime out long pTableOpenMinTime out long pTableOpenMaxTime out long pTotalAvgWriteTime out DATE pLastWriteTime out BSTR bstrTableName id 8 helpstring method LoadConfiguration HRESULT LoadConfiguration in long IC
188. dWorX OLE DB Provider 6 48 Chapter 7 VIEWER ACTIVEX Introduction The TrendWorX Viewer ActiveX is an OPC client application that provides both real time trending as well as historical data trending within the ProcessView product family It can also be used with third party OPC server applications to provide excellent trending features Features of the TrendWorX Viewer include Real time data displays Historical data displays Data utility functions Sophisticated multithreaded data buffering to guarantee data integrity with support for customer configurable data collection rates TrendWorX Viewer is interfaced to display memory based historical data from the ProcessView Persistent Trending memory based data logging OLE Automation server as well as historical servers supporting the OPC HDA Historical Data Access Interface such as the TrendWorX SQL Server TrendWorX Viewer ActiveX Features TrendWorX Viewer ActiveX includes the following features Highly customizable component Fast data replay Independent data collection screen refresh mechanism Full exposure through OLE Automation objects such as Title X grids Y grids Ranges x axis ranges for XY plots Details Time settings Statistics Pens Extensive runtime configuration Built in buffering system Integration with the Smar Security Server Support for custom imported data Multilingual support Interface to OPC Real Time servers Easy
189. da ace A dd az 3 9 EOAD OF GEIENT GONNECTIONS i naii nenn id ii a a A data sida 3 10 DATABASE BACKUP AND MAINTENANCE ccccccccesscaecececeesesseseeaeceeeesceeseseeaeseseesceesaaaeseeeaeesseecsesasaesessecsenseaeeas 3 11 SETTING UP DATA LOGGING isnin naedit tt A A EA a EE iaai teased 3 12 INTRODUCTION TO DATA LOGGING mrna a iaa ea a dad datada Da data bed 3 12 CONFIGURING MICROSOFT ACCESS DATABASEG ccccsccccccececsessaececeeeceseseeaseaeseceeseseeaaeeeeeeeeeseecseseaeeaeess 3 14 CONFIGURING MICROSOFT SQL SERVER AND MSDE DATABASES c ccccccccnccncnonccnnnnnnnncnonononnnnnnncnnnnnanancnonanonnnos 3 16 CONFIGURING ORACLE DATABASES scort ia dera 3 20 PERFORMANCE OPTIMIZATION AND EVALUATION ccccccessececeeececsesseaeceeeeseecseseeaseaeeeeeeeeseseaaeseeeeseeeseseaeeas 3 22 DATA GOMPRESSI N TOOLS occidente 3 22 DEADBAND st lll oli ds 3 22 DATA LOGGING FILTERS uta a dia ti eta 3 23 DATABASE ACCESS SCHED ULIN Ge a e iberia 3 24 DATA LOGGING LOAD DISTRIBUTION aT a a T a a aa a Ta ea Ea aa aaa aa T Eaa ar E A TE EEr rE AERAN aeS 3 25 M LTITHREADED ARCHIE C T RE ar e T a e e aaar iaa iii 3 25 MANAGING THE DATABASE TABLE ORGANIZATION c c cccccccscsessssesescecececseeaseceseeseseseseeaeceeeeescesseeaaeeeeeeseseeea 3 25 OTHER GONSIDERATION Sist a dt leia 3 26 MONITORING PERFORMANCE cc cccccccccccsesesececcecceeceesesaeeeseeececeeseaaeseseesceceeseuaecaeceeeesseeseaaeeeceseseceseaeceseeseeeeses 3 27 SUMMAR
190. database size and a corresponding database growth option can drastically improve system performance Under the Log File Properties section you can also modify the settings for the database transaction log file Specify a Log File Growth option in megabytes or as a percentage of the total size Again a sufficient initial size setting can greatly improve performance The default options should be adequate for most applications with a small to medium size load Click the Next button to create the new SQL Server database 8 The Configurator uses Universal Data Link udl files to connect to the Microsoft SQL Server database These udl files contain OLE database connection information that allows the Configurator to create and manage connections to OLE databases Enter a name and directory path for the new udl file in the Data Link File Name field as shown in the figure below You can browse for a directory by clicking the button to the right of this field Click the Next button to continue If you want this new database to be the active configuration database check Make Database Active Note If you chose to Use the existing database structure or to Override all existing configuration tables you will still need to create a new Data Link file 2 11 TrendWorX Logger Configurator Toolbars Standard Toolbar Creating Data Link File Please select a file name for new Data Link Fle Select or arkar a Data Link File Name
191. deleting a pen Fired when the Viewer encounters errors ErrorlnLoadingData upon loading its configuration data through a V32 file Fired when the right reference time of the RightTimeChanged Viewer changed while in freeze mode Fired in freeze mode as the cursor changes position You can call the GetSamplelnfo void CursorChangedPes method to retrieve detailed sample information on a per pen basis 7 69 TrendWorX Viewer ActiveX Properties and Methods for Supporting Objects Title Objects Title Objects Time Settings Objects Ranges Objects Pen Objects Details Objects Grids Objects Title Objects Properties Title Objects Methods Using Visual Basic To View Title Objects Title Objects Properties boolean ShowTitle Determines whether the main title is displayed Default TRUE BSTR TitleText The main title of the Viewer Activex Title Objects Methods None Time Settings Objects Time Settings Objects Properties Time Settings Objects Methods Using Visual Basic To View Time Settings Objects Time Settings Objects Properties Determines whether date information is displayed in the Viewer s boolean ShowDate time field Default TRUE Shows milliseconds divisions on time axis boolean ShowMSecs Default FALSE Determines whether the time field is displayed Default TRUE boolean ShowTimelnfo Visual appearance of time display BSTR BorderEdge Values a
192. disk on which they reside while Microsoft SQL Server databases can expand across multiple hardware devices In addition Microsoft SQL Server can be configured to increase the database size automatically if needed while data logging is activated The size of MSDE databases is limited to 2 GB and the size of Microsoft Access databases is limited to to 1 GB To compute an estimate of required database size on a per group basis use the following equation Total Number of Records Number of Tags x Logging Interval 36 x Data Collection Rate Required Size Total Number of Records x 1024 Bytes Record x 1 25 Example For example assume you want to data log 100 tags with a data collection rate of 1 second anda logging interval of 24 hours converted to seconds This will require the following Total Number of Records 100 x 24 hours x 60 min hr x 60 sec min 36 x 1 sec 240 000 Records Required size 240 000 x 1 024 x 1 25 295 MB per day Note When you are logging data to an Oracle database you can expect a 20 percent increase in database size because of the data types supported by Oracle When logging to Microsoft SQL 2000 or MSDE 2000 databases you can expect a 20 percent increase in database size Note however that the above example is a worst case scenario that assumes all tags are updated every second from the OPC server In reality OPC servers are event based so they will update only when the value of the tag ch
193. dited or deleted In addition you can get runtime status information by clicking Report Status on the Actions menu This opens the Report Status dialog box shown below Report Status x Enabled F Status IN ormal Once m Last Run Time Date Time Hours Minutes Seconds used Last No Errors Found error Next Run Time Date OK Cancel Report Status Dialog Box TrendWorX Reporting is a multithreaded OLE Automation server which allows for concurrent report processing Within runtime it allocates a pool of threads for simultaneous report scanning and processing The number of threads can be adjusted via a registry setting The default thread pool number is one worker thread Note that if the target of all reports is an Excel worksheet the reports will be serialized such that only one report accesses Excel at a time In this case you should not increase the thread number used by TrendWorX Reporting in the registry In addition TrendWorX Reporting implements its own scheduling mechanism which boosts the priority of reports when they are configured to run immediately Since TrendWorX Reporting may use the source database for creating temporary tables and actual report generated tables it is very important that you allow for the source database to have enough disk space for TrendWorX Reporting to perform its table creation TrendWorX Reporting Security TrendWorX Reporting is
194. e Upgrading From Version 5 20 to Version 6 00 Step 3 From the File menu choose Export Configuration This opens the Export Configuration dialog box shown below 3 5 TrendWorX SQL Data Logger Export Configuration i x Configuration Database OLEDB Provider Connection String Provider Microsoft Jet OLEDB 4 0 Data Source C Prograr 2 Set Configuration Export Name Ewo Export Configuration Dialog Box The updated installation for Version 6 0 will install the following files under the ProcessView Bin directory e Twx32Cfg src e Twx32 mdb The first file Twx32Cfg src is a template file for generating default empty configuration databases The second file Twx32 mdb is a configuration database file that is ready to use Upon proper installation when the Export Configuration dialog is opened it should list the OLE DB Provider and the Connection String to the default configuration database file Twx32 mdb as shown in the figure above If this is not the case select Microsoft Access as the OLE DB provider and then click Set This opens the OLE DB Initialization Information dialog box shown below In the Data Source field fill in the correct pathway to the Twx32 mdb configuration file including the mdb Microsoft Access file extension to properly establish a configuration database connection Then click OK Please Enter MS JET OLE DB Initialization
195. e Overriding the database may disable other applications that also use the database Click the Next button to continue 2 9 TrendWorX Logger Configurator One or more configuration tables already exist in chosen database What would you like to do Select different database name recommended This will provide you to specify different database name Use this option when you are not sure what is the content of chosen database C Use database structure as it is This will not change anything in selected database Use this option if you want to create a new datalink udl file only Override all existing configuration tables Caution This may cause that other application will stop working Use this option when you are absolutely sure that the database is not use by other applications Finish Cancel Help Adding the Configuration to an Existing SQL Server Database 6 If you chose Select a different database name recommended you are directed back to the SQL Server Database Connection dialog box as shown in the figure below Enter a new name for the database and then click Next SQL Server Database Connection Please specify the following to connect SOL server Select or enter a database name Renamed Database y I Auto append configuration into existing database Simple lt lt Select or enter a server name local Refresh Enter information to log on to the server Use Windows
196. e SQL Server instances local for the default instance and node_name instance_name for all others The drop down list may show SQL Server instances on other nodes as well SQL Server Database Connection Please specify the following to connect SOL server x Select or enter a database name Database y J Auto append configuration into existing database Simple lt lt Select or enter a server name local he Refresh Enter information to log on to the server Use Windows NT integrated security recommended Use a specific user name and password User name Password F Blank Password Finish Cancel Help Connecting to a SQL Server Database Specify a directory path location in which to create the database as shown in the figure below You can either use the default SQL Server database folder or you can click the button and browse for a specific folder SQL Server Database Creation Please specify the following to create database files Specify database files location Use default SOL server database folder recommended C Use specific folder local node only je Program Files Microsoft SQL Server MSSQL Data El Database files properties Simple lt lt Database File Log File Initial Size MB 1 Initial Size MB 1 File Grow MV AutoShrink File Grow C InMB 1 C InMB 1 By Percent 20 By Percent 20 Finish Cancel Help Specifying
197. e When the total number of tags is more than 300 Microsoft SQL Server or MSDE databases are the only choice Oracle has been shown to have less data logging capability than Microsoft SQL Server Microsoft Access may also be a valid choice for noncontinuous data logging that involves a small number of tags with very fast data collection rates TrendWorX SQL Data Logger uses event based updates and will only store the samples sent by the OPC server to the target database thereby reducing the overall data logging load Microsoft SQL Server and MSDE can use hardware resources to yield great performance even in a multiuse environment In addition some other load balancing strategies include e Trading off slower writes to the database for a higher tag count or faster data collection rates e Having one hard drive for data logging and separate one for storing operator displays program files and the operating system if graphics HMI displays are present on the actively data logging PC Data storage requirements refer to the size of the target database once data collection and data storage begin Again the differences between Microsoft Access and Microsoft SQL Server arise from the fact that Microsoft Access is a file based database engine while Microsoft SQL Server is a server based database As a result Microsoft Access databases are limited by the capacity of the 3 9 TrendWorX SQL Data Logger Load of Client Connections hard
198. e history and custom BSTR RangeSiring BSTR PenType void SetPenHiRangeString BSTR PenName Sets the point name for high range of the pen with description text matching PenName Not supported for historical pens BSTR RangeSiring BSTR PenType void SetPenLoRangeString BSTR PenName Sets the point name for low range of the pen with description text matching PenName Not supported for historical pens 7 64 Introduction LPDISPATCH GetPen BSTR PenName BSTR PenType boolean SetDetailsFromPen BSTR PenName BSTR PenType Returns dispatch interface of the pen with description text matching PenName You must release the interface when done Valid types are real time history and custom Populates details information from the pen with description text matching PenName Valid types are real time history and custom boolean ComputeStat Computes and stores statistical info for the pens configured in the Viewer ActiveX Supported only in runtime animation mode void SetHiRangeString BSTR RangeString void SetLowRangeString BSTR RangeString Sets point name for high range of range object Not supported in history only mode Sets point name for low range of range object Not supported in history only mode boolean ReplacePoint BSTR PointName BSTR OldString BSTR NewString boolean DoPenText Use to replace pen point names and pen description
199. e Desktop ScriptWorx32 AlarmwWorx32 GraphWorkX32 Screen Manager Persistent Trending gt TrendWorx32 Reporter Custom Application IDAS VU SOS SQL Server Start Container b Stop Auto Start Auto Stop v NT Service Gatw La Automatic Setting in ProcessView Tray When running the TrendWorX SQL Data Logger as an NT Service special consideration must be given to ensure that when it starts up as an NT service TrendWorX SQL Data Logger has rights to access the database where the historical data logging will take place When using ProcessView Tray to register TrendWorX SQL Data Logger as an NT Service it is configured to run under the local system account If remote historical replay is to be used it may require adjusting DCOM settings for the account under which TrendWorX SQL Data Logger will run as an NT Service as well as adding rights to the historical database for the specific account This can be done by having TrendWorX SQL Data Logger run in the context of a dedicated account and making sure that the same account has access to the database In the case of Microsoft SQL it will need to have database administrator rights to the historical database The above account also must have rights to log in to the target client PC where the historical replay will take place 3 55 TrendWorX SQL Data Logger 3 56 Chapter 4 Aliasing Excel Templates INTRODUCTION TO TRENDWORX EXAMPLES The ProcessView in
200. e display OLE_COLOR TextColor BSTR Size short MinorTick Gets sets text color of range display Size for time display It can be large normal or small Default Normal Gets sets the number of minor ticks in the range area 7 71 TrendWorX Viewer ActiveX Ranges Objects Methods None Pen Objects Pen Objects Properties Pen Objects Methods Using Visual Basic To View Pen Objects Pen Objects Properties boolean Autoscale Autoscales the pen boolean EnableAlarmLines Enables drawing of alarm lines Gets sets override for high range If set TRUE the high boolean OverHighRange range value will be computed from a tag or expression Gets sets override for low range If set TRUE the low boolean OverLowRange range value will be computed from a tag or expression boolean PenVisible Determines whether a pen is to be drawn boolean PenXAxis Gets sets a pen x axis in XY plots If TRUE a triangular marker is displayed at the position boolean ShowMarkers of the last known sample value boolean ShowSamples Indicates real samples boolean Stairplot Enables step wise plotting mode boolean UpdateServerRanges Controls the initial update of the ranges from the server BSTR DetailsFormat The format type for the details BSTR PenPointName The pen signal point name BSTR PenStyle Gets sets the pen style e g solid dotted dashed
201. e following items e Workspace e Details e Ranges e Time e Grids 7 17 TrendWorX Viewer ActiveX General Appearance Ranges Pens Rates Settings Workspace Details Ranges Time Grids Colors Border Style Show Title Title ea Sunken e Vv Show Background Background E TOCAR Rectanale Centered Foreground EE ActiveX Border Style C Stretched M Border MV 3D Edge Browse Cancel Apply Help Properties Dialog Box Appearance Tab Change Font The Appearance tab sets the font type for the Workspace Details Ranges and Time Settings sections of the Trend window Click the Change Font button to choose a font The standard Windows Font dialog box appears and you can select the font type size and style Appearance Workspace The Workspace section of the Appearance tab shown below configures various cosmetic aspects of the trend display such as colors background and borders To display the viewer title in the trend display check the Show Title check box General Appearance Ranges Pens Rates Settings Workspace Details Ranges Time Grids Colors Border Style Il Show Title Title El s unken Vv Show Background Background ee HER Rectangle Centered Foreground fe pa m ActiveX Border Style Stretched MV Border Y 3D Edge Browse
202. e for a pen in configuration mode if the totalizer mode is enabled double PresetValue Gets sets the preset value for a pen in configuration mode if the totalizer mode is enabled double IntegrationFactor Gets sets the Integration factor value for a pen in configuration mode if the totalizer mode is enabled Possible values are 1 0 integration constant computed in seconds 60 0 integration constant computed in minutes 3660 0 integration constant computed in hours 86400 0 integration constant computed in days long IntegrationDir Gets sets the integration direction value for a pen in configuration mode if the totalizer mode is enabled Possible values are 0 Totalizer counts upward from 0 1 Totalizer counts downward to 0 long TotalizerMode Gets sets the totalizer mode value for a pen in configuration mode if the totalizer mode is enabled Possible values are 0 continuous mode 1 preload mode 2 preset boolean EnableTotalizer Enables disables the totalizer mode for a pen in configuration mode long PlotterMark Gets sets the totalizer plotter mark size for the pen s curve if the totalizer mode is enabled Possible values are No marker 0 Tiny 1 Small 2 Medium 3 Big 4 Huge 5 long TotalizerUnits Gets sets the totalizer units value for a pen in configuration mode if the totalizer mode is enabled Possible values are 7 73
203. e last two options let the you decide if you want to view the ActiveX Toolbar described later and if you want the save changes dialog to appear when you make changes in runtime and then exit the application If the Suppress Save Modified Message Box check box is checked you will not be warned to save all changes made to a display while in runtime mode and these changes will be lost Application Preferences 3 q xj General Runtime Loading Persistent Trending Reporting Logging m Runtime Titlebar Options Sid T Start Maximized v ow Title Bar ae d Override Caption Start Minimize N I Always on top Y Show Runtime Menu Bar IM SystemMenu JW Minimize J Show Runtime Toolbar IV Maximize M Show Runtime Status Bar Runtime Frame Style T Show ActiveX Toolbar Duter Frame Edge Y Suppress Save Modified Raised Resizable y Message Bos Cancel Help Application Preferences Runtime Tab If the Show Title Bar box is checked the title bar of the TrendWorX Container screen will be displayed during runtime mode Similarly if the Override Caption box is checked you may enter a caption that you would like to have appear in the title bar during runtime The System Menu Minimize and Maximize options all refer to buttons that may appear in the title bar of the TrendWorX Container screen during runtime When all of these boxes are checked all of the indicated buttons show up
204. e of the grid on the display If the Show boxes are checked the respective x axis and y axis grid lines are displayed in the trend display General Appearance Ranges Pens Rates Settings Workspace Details Ranges Time Grids Y Grids 7 Line Style i Line Style y Bi tids Line Width 1 Line wiath 1 gt Grids Number of Lines fs Number of Lines JE Ticks Between JE Ticks Between JE Lines Lines Cancel Apply Help Appearance Tab Grids Settings TrendWorX conveniently provides for separate configuration for the x axis and y axis with the exception of the bar plot which does not support x axis grids You can select a Line Style for the line from the following options Dashed Dotted Dotted Dash or Solid The Line Width field specifies how wide the grid lines are for each axis You can select a color for the grid by clicking the color box and choosing a color The Number of Lines field specifies the number of grid lines you want to appear for each axis The Ticks Between Lines field specifies the number of ticks i e intervals between any two grid lines Circular Charts If you are using a circular chart the following dialog box appears Select the Grids tab to modify the color and style of the radial grids and circular grids General Appearance Ranges Pens Rates Settings Workspace Details Ranges Time Grids m Radial Grids gt r Circular Grid
205. e stamps and other parameters in the Details window In freeze mode additional trending functions such as zooming and paging are available Note If the TrendWorX Viewer has historical pens for which the Show Comments option has been enabled freezing the display will also retrieve the historical comments and batch information if available Statistics Clicking the Statistics button on the Trend Viewer toolbar opens the Trend Statistics dialog box shown below Trend Statistics i x Pen Name Pen Type Min Save SimulatePLC PumpSpeed Real Time 0 00 99 00 Save As gt Cancel F Include Samples Help Trend Statistics Dialog Box The Trend Statistics dialog box shows relative statistics for all pens in a trend In the case of bar plots the statistics window shows the statistics profile of all signals combined When the Save or Save As buttons are clicked the Save As dialog box opens and you are prompted to enter a file name for the statistics The statistics will be saved in a csv file Checking Include Samples includes each pen s samples in the saved statistics file along with any historical comments for the history pens if available Zoom Trend When you click the Zoom Trend button on the Trend Viewer toolbar in freeze mode you can zoom in on the Trend window and perform the point and click zoom function This enables you to zoom in on the trend display about the current location of the cursor
206. e that all users are disconnected from the database before the compacting repairing procedure starts Cancel Compact Repair Microsoft Access Database It is critical that no users or client applications including TrendWorX SQL Server are connected to the database at the time of compacting and that if the Backup Original Database option is selected there is plenty of available hard disk space Options To choose additional settings select Options from the Tools menu This opens the Options dialog box which contains the following tabs e General e Editor Preferences General Tab The General tab of the Options dialog box shown in the figure below sets the startup and workspace parameters for the Configurator 2 22 Introduction Options i i x General Editor Preferences Startup settings Open the active file Open the most recently used file Open a specific file a Note File can be a MS Access database mdb or MS Datalink file udl Workspace settings Auto apply editor changes PP V Enable hover selection Hover 500 Time in ms Others J Use legacy export import Cancel Options Dialog Box General Tab Startup Settings The Startup Settings options allow you to save regional settings in the registry so that they are applied each time you start the Configurator This applies to the language settings as well as time and date settings Select one of the follow
207. e the Default Database field as shown in the figure above Otherwise you will establish a connection to the master database which is not recommended Click Next to accept or modify the default settings as shown in the figure below Create a New Data Source to SQL Server E x y gra af IV Change the language of SOL Server system messages to English TF Use strong encryption for data JV Perform translation for character data Use regional settings when outputting currency numbers dates and m times JV Save long running queries to the log file CAQUERY LOG Browse Long query time milliseconds 20000 IV Log ODBC driver statistics to the log file CASTATS LOG Browse lt Back Cancel Help Configuring the Default Settings 3 19 TrendWorX SQL Data Logger Complete the connection configuration by clicking Finish lt is recommended that you test the established connection by clicking Test Data Source as shown in the figure below ODBC Microsoft SQL Server Setup E x A new ODBC data source will be created with the following configuration Microsoft SQL Server ODBC Driver Version 03 80 0194 Data Source Name TWXSOL Data Source Description TWXSOL Server TWXSOL Database Default Language English Translate Character Data Yes Log Long Running Queries Yes Query Log File C QUERY LOG Query Log Time 30000 Log Driver Statistics Yes Statistics File C STATS LOG
208. e time interval for which each table logs data The Table Management tab configures how the data will be stored in terms of the number of tables and when a new table will be started The number entered in the Number of Tables field determines the maximum number of tables that will be created Therefore when that number is reached and the last table is full the TrendWorX SQL Server will wipe out all information in the first table to make room for new data This is important to remember when configuring the settings in the Create New Table field The reason for limiting the number of tables is to save room in your system Table name Enter the name of the table Number of tables Use the up and down arrows to specify the number of tables you want created The maximum number of tables allowed in the Number of Tables field is 3000 Startup table Use the up and down arrows to specify the number of tables you want created at startup Create new table This section specifies certain conditions that will determine when a new table should be created On time When On Time is checked you can specify a time in hours minutes and seconds when you want a new table to be created On interval When On Interval is checked you can specify a time period in days hours minutes and seconds after which a new table should be created during the data logging process On condition When On Condition is checked you can define a specific condition up
209. e time stamp to be converted was obtained from a different time period i e it was obtained in summer time but now we have winter time TrendWorX Version 7 0 introduced new time conversion utilities that account for this discrepancy There are however some things to consider These functions are used by default no user enabling is required This is what they do in order to convert each time stamp o They check Windows for the PC Time Zone Settings and to see if automatic daylight savings is enabled o They also obtain from Windows the times dates for switching over These dates do not change they are in the form of e g the first Sunday of April o Depending on the previous information the new functions properly adjust the conversion times to compensate for daylight savings time Persistent Trend OLE Automation Object Design OLE Automation Properties The Persistent Trending application exposes through OLE automation its document as a single instance shared object The object s name is TWXBgTrend Document and it is registered in the system registry Once launched the Persistent Trending server will register its document as the Active Object with the OLE Running Object Table ROT and therefore all client applications can access this instance rather than create a new instance each time they desire to connect to the Persistent Trending server In Visual Basic code this is equivalent to Every client application shoul
210. e to create C Create new configuration in MS Access database This will create configuration in a single file mdb Configurator can open this file directly no other files needed Create new configuration in MS SOL Server database This will create configuration in MSDE or MS SOL server Configurator has to use univesal datalink file udl to access this database Finish Cancel Help Creating a New Microsoft SQL Server Database 4 Toconnect to a SQL Server database either select an existing database from the Database Name drop down list or a type a new name to create a new database as shown in the figure below If you choose to use an existing database you have the option of adding auto appending the configuration to the existing database For more information about the auto append function please see Adding the Configuration to an Existing Database 2 5 TrendWorX Logger Configurator In the SQL Server Name field select the local SQL Server on which to create the database If necessary enter a user name and password to log on to the SQL Server It is recommended that you use Windows NT integrated security Note Usually you have only one instance of SQL Server running on the local node In this case the drop down list under SQL Server Name has only one option local However it is possible to run multiple SQL Server instances on the local node in which case the SQL Server field lists all thos
211. e your security settings you must first have Smar security clearance Enter an administrator user name and password and then click OK Database Schema Key features of the TrendWorX SQL Data Logger data logging engine include e Multiple databases support e Automatic data buffering e Extensive data logging configuration e Data retrieval from OPC servers e Use of multithreading techniques For the actual data logging mechanism TrendWorX SQL Data Logger uses client server database technology to perform compact batch updates to the underlying database resulting in optimal use of available hardware and software resources The database locks are placed in an optimal fashion and the related tables can respond much better in multi user scenarios Note Batch updates are not currently supported for Oracle databases TrendWorX SQL Data Logger creates the necessary database schema to accommodate a various data logging needs For each physical database connection it will create the following database schema 3 41 TrendWorX SQL Data Logger Database Connection amp Table Struc ture TrendWorX SQL Data Logger Database Schema Tables The application must have complete access to the database in order to edit or delete tables If you change the name of the table on a per group basis TrendWorX SQL Data Logger will not delete the existing tables this is left to the database administrator In addition under no circumstanc
212. eWeek refers to the day of the week for the report to execute with Sunday 1 and Saturday 7 short SetReportMonthly BSTR ReportName DATE TimeToRun boolean FirstDayOfWeek long OffSetMinutes boolean UseReportTimeSpan long ReportTimeSpanSecs short EnableReport BSTR ReportName Sets the schedule of an existing report to be of periodic Weekly execution type The report needs to be disabled It returns a TWXREPORTEDIT edit status code The UseReportTimeSpan enables the time range of the report not to be defined by the periodic interval but to be set by the user The TimeToRun is the desired time of the first report execution The DayOfTheWeek refers to the day of the week for the report to execute with Sunday 1 and Saturday 7 Enables a given report for execution short DisableReport BSTR ReportName Disables a given report for execution short AddReportTag BSTR ReportName BSTR TagLoggingName BSTR TagDescrText BSTR TagEngUnits BSTR TagDBConmnString long DBType BSTR TagDBaseGroupName BSTR TagLogGroupName long TagDBHandle Adds a anew report tag to an existing report The report needs to be disabled It returns a TWXREPORTEDIT edit status code The TagLoggingName is the one defined in the TrendWorX Configurator while the TagDBConnString parameter refers to the ADO ODBC connection string for the historical database The TagDBHandle parameter is the index of the specific tag in the _Tags tab
213. econds writing to disk can be set to 30 seconds or every six samples Refer to the ProcessView MSDE Manager Help documentation for additional information Running TrendWorX SQL Data Logger as a NT Service You can register and run the TrendWorX SQL Data Logger as an NT Service When TrendWorX SQL Data Logger is installed and running as a service its functionality is modified with respect to the case where it is registered as a stand alone COM server In general TrendWorX SQL Data Logger can be registered and run as an NT service under Windows NT and Windows 2000 as well as a stand alone COM server However the following differences apply 1 There will be only one instance per node of TrendWorX SQL Data Logger running under any condition 2 If TrendWorX SQL Data Logger runs as stand alone COM server e If itis started from the desktop and clients are connected to it and if the user through the application menus chooses to exit TrendWorX SQL Data Logger will hide its window but will keep serving its clients When the last client goes away TrendWorX SQL Data Logger will shut down e If you try to double click on TrendWorX SQL Data Logger executable from the Windows desktop while its application window is not visible and clients are connected to it TrendWorX SQL Data Logger will not launch a second application instance but it will show the existing window and from there it will close only from the menus 3 If the TrendW
214. ecurity Server Configurator Configuration configuration mode only Set Working F8 Specifies a custom directory in which all application Directory configuration files will be stored and retrieved Launches the VCRWorX Control Panel which VCRWorX Data enables you to replay historical data For more Replay information please see the VCRWorX help documentation Launches the Web Publishing Wizard which allows you to export generate an HTML file based on your TrendWorX display file and or publish the Publish to PLTMIL HTML file to a Web server For more information please see the Web Publishing Wizard Help documentation Whee Starts configuration mode for Pocket TrendWorX Windows CE Configures settings for downloading the Preferences configuration to a Pocket PC or CE device Selecting Macros gt Macros from the Tools menu opens the Macros dialog box as shown in the figure below Type a name for the macro and then click the Create button This opens the Microsoft Visual Basic Editor where you can create a new macro You can run an existing macro by entering the name of the macro in the Macro Name field and clicking the Run button 1 8 Getting Started Window Menu xi Macro name tes Aun Cancel Step Into Edit ha Delete Macros in ka Standard Modules and Documents y Description Creating and Running Macros The TrendWorX Configurator command starts the TrendWorX Configurator application
215. ecution boosted internally by TrendWorX Reporting over periodic reports If the report is configured to run One Time you must pick the desired time and date for the report to run by clicking on Set in the Schedule dialog box to enable time and date selection To select the date click the down arrow in the Date field and then choose a date from the calendar After completion the report s enabled flag and time field will be reset Clicking Set opens the standard Microsoft Calendar control Select a desired date by double clicking on the date If the report is configured to be Periodic you must select the reports periodic schedule by clicking Change This opens the Edit Periodic Report dialog box shown below Edit Periodic Report x C Hourly m Occurs every 2 l Min J0 Hours rel Weekly m Occurs on C Mon Tue Wed Thur CO Fii C Sa Sun C Monthly y Occurs on O First Day Last Day Occurs at time 8 00 00 AM Dffset report 0 d execution by ad Minutes Cancel Help Edit Periodic Report Dialog Box Periodic reports can run e Hourly e Daily e Weekly on a desired day of the week e Monthly on the first and or last day of month You can select the desired time of the report for execution In addition you can select a report execution offset interval which will add a delay between consecutive report executions You can also run reports faster tha
216. elative plot of each signal on the display based on the Location value The default value is O and the pen curve will begin plotting from the far right side of the trend display Under the Statistics File section you can click the Browse button and select a csv file for saving statistical information during runtime Check Append if you want to append the statistical information to the csv file or overwrite the existing one Selecting Save Ink will conserve ink while printing by not using the configured background color fill of the individual areas within the trend display The curves and text however will be printed in the configured colors Also if you select Print Circular Chart on Reset and the Reset Circular Chart after full period option is enabled the TrendWorX Viewer will automatically print the circular chart display TrendWorX Version 8 0 introduced a new look and feel to the trend viewer display To revert to the style TrendWorX versions prior to Version 8 0 check the Old Plot Style check box If you have inserted background images into your trend display you have the option of printing the background when printing trend displays If you do not want to print the background image with trend display in order to conserve ink uncheck the Print Background check box Click the Scroll Bar button to set the time range for how far back you will be able to scroll while in freeze mode This opens the Trend Scroll Bar Configuration dialo
217. enables you to create signal connections to already configured Persistent Trending groups From the Add Persistent Tags dialog box you can add OPC tags by clicking OPC Tags or add expressions and simulated variables by clicking Tags Menu Once you have added all the tags you wish to configure click OK to add these tags to the selected Persistent Trending group Add Persistent Tags E x Persistent Tags OPC Tags _Tags Menu Menu Cancel Help Adding Persistent Tags Selecting Delete Tags from the Edit menu opens the Delete Persistent Tags dialog box shown in the figure below which enables you to delete signals from already configured Persistent Trending Groups Choose which signals to delete and then click OK to remove these tags from the selected Persistent Trending group 5 15 TrendWorX Persistent Trending Copying Persistent Tags Delete Persistent Tags x Persistent Tags Smar Simulator 14SimulatePLC PumpSpeed Smar Simulator 1 SimulatePLC R andom Smar Simulator 1 SimulatePLC Sine Cancel Help Deleting Persistent Tags Selecting Copy Tags from the Edit menu opens the Copy Tags dialog box shown in the figure below which lists all of the tags available in the selected group After you select tags they are copied to be pasted into another group Search and Replace Copy Tags xj Persistent Tags Smar Simulator 1 SimulatePLC PumpS peed Smar Simulator 1 SimulatePLC
218. end e History tag Editing Pens Clicking Edit in the Trend Pen Configuration dialog box opens the Edit Trend Pen dialog box which contains the following tabs General tab Alarm tab Ranges tab Totalizer tab Ideal tab Please refer to the Editing Pens section above for complete information about the Edit Trend Pen dialog box Delete Button You can also delete modify and replace pens To delete one or more pens select the pen and then click Delete on the Trend Pen Configuration dialog box Then click Yes to delete the pen Edit Trend Clicking the Edit Trend button on the Trend Viewer toolbar opens the Edit Trend dialog box shown below Global High Low Ranges Low jo Haas Hanjoo o Tans gt lt Y Plot Axis Range Hange Grids Pi J ee Zooming Close M Y Grids 5 Help Edit Trend Dialog Box The Global High Low Ranges fields show the ranges that were assigned in the Ranges tab of the Properties dialog box If the Global Ranges box was not checked on that tab then this section of the Edit Trend dialog box will be unavailable The Scroll Bar button sets the time range for how far back you will be able to scroll while in freeze mode as shown in the figure below 7 40 Introduction Trend Scrollbar Configuration El Y Display Scrollbar Range 3 Hours y Custom Range Years 0 Months o Days fo Hours 0 Mins fro Secs fo 4
219. ending and Data Logging Architecture The TrendWorX SQL Data Logger is a true 32 bit Windows application written from the ground up to take advantage of 32 bit operating systems for multitasking and load distribution across multiple threads and processors The TrendWorX SQL Data Logger not only contains data logging and data retrieval historian services but it also adds a scalable client server architecture to the ProcessView trending software This architecture ensures optimal load balancing and distribution even for large scale applications The TrendWorX SQL Data Logger uses the most current data access technology called Activex Data Objects ADO ADO is a database access mechanism that provides a wrapper of the OLE DB OLE DB is a COM approach to database programming that can be used to program any database relational or not relational as long as there is a dedicated OLE DB data provider for that database The end result is that applications based on ADO OLE DB can potentially access any database regardless of the underlying storage media file system and location TrendWorX SQL Data Logger currently uses ADO version 2 5 the Universal OLE DB ODBC data provider supplied by Microsoft as well as native OLE DB providers to access Microsoft Access Microsoft SQL Server MSDE and Oracle compliant databases 3 1 TrendWorX SQL Data Logger a OPC Server 1 m OPC Server 2 OPC HDA Database Functional Diagram of TrendWorX SQL Dat
220. ents can connect to it by using a GetObject call i e connecting to the running instance of reporting The TrendWorX Reporting OLE Automation server currently supports the following OLE Automation properties and methods OLE Automation Properties boolean Visible boolean Maximized Shows hides application window Maximizes minimizes application window 6 32 Features in TrendWorX Reporting OLE Automation Methods void Refresh Redraws the view void Open BSTR FileName Opens a configuration file void StartReports Starts runtime mode void StopReports booleanAreReports Running Exits runtime mode Returns true if in runtime mode voidClose boolean SaveChanges BSTR file Exits the report A set of OLE automation methods has been added to allow for flexible report manipulation For these OLE automation methods to be used effectively you should call first the GetReportNames method to get a listing of all the currently available reports and then use automation to set the desired time span etc Depending on the status of each report or the periodic schedule a VBA enabled application can filter which reports will be available to the operator for manipulation Note that the best way to make use of operator based triggering of report execution within a VBA enabled application such as GraphWorX is to configure immediate report types and do not enable the desired
221. er which you can access by choosing Security from the Tools menu It currently supports the security actions shown in the dialog box below Activate Group Deactivate Group e Edit Group Exit Application Exit Data Logging 5 19 TrendWorx Persistent Trending Actions Users Association lt lt Move gt gt Actions _ lt Move gt gt Users Groups 97 AWxContainer fo 4W XInd AWXLog AWSMMX AWSRepott AWS vr AWS View 3 BridgeWors Dwg DwxRedundancy Gwg bs te Cancel Actions Users Association Dialog Box L A W gt lt Report AWS vr Ano ie Bridge ors Dwg DwsRedundancy Gws Login FAA mmk En gt Em E PEA E gt ES En LJ ad 4H E AAA AAA AA AE v ProcessView Tray Autostart ProcessView Tray Autostop Save File Persistent Trending is a very flexible OLE automation server to configure and use lts main advantage is that it allows you to define and configure custom client side groups with individual data collection rates and number of samples to configure Persistent Trending is interfaced to the ProcessView OLExpress thin layer OPC wrapper dll which transfers requests for data to the underlying OPC server You can take some steps to optimize Persistent Trending performance and system resource usage Defining tags signals from the same OPC server in Persistent Trending groups can improve system resource usa
222. er Title Trend Viewer About Plot Type Jul Bar Plot y Circular Chart Local File C URL Path lt z Logarithmic Plot Strip Chart Not Assigned E Load Save As m Configuration File TrendWorX Viewer ActiveX Properties General Tab Language Aliasing Support The TrendWorX Viewer ActiveX component has all of its strings saved in the resource file which can be modified to provide custom versions In addition it provides real time support for loading a resource only dll to support international languages This dll file is compiled as a standard Win32 dil and it is made up of all the resources and the odl file of the TrendWorX Viewer module Any time the ProcessView applications settings are switched to a different language TrendWorX Viewer will load the corresponding resource dll The resource only dll file name uses the TrendWorX Viewer component followed by the three characters used in Windows NT as the abbreviation for a language name e g the abbreviation deu stands for German and the dll should be named TWXViewer_deu dll In addition using the OLE automation property language ID you can control this functionality through OLE automation In addition the Unicode version of the TrendWorX Viewer ActiveX supports language aliasing with automatic range and value scaling as well as unit conversions formatting and font selection For more information about configuring Uni
223. er to the Printing Screen Information section If you decide not to print click Close to exit the Print Preview screen To print the information on the screen choose Print from the File menu or press the shortcut keys CTRL P The Print dialog box will appear on the screen as shown below When you are ready to print click OK TrendWorX prints all records contained within the scroll window on the screen Printer Name EPSON Stylus C82 Series Properties Status Ready Type EPSON Stylus C82 Series Where LPT1 Comment Print to file m Print range Copies all Number of copies f1 C Pages from fi to Selection abel I Collate Cancel Print Dialog Box When the information is sent to the print queue the Printing Status dialog box appears on the screen The Printing Status dialog box indicates the number of records printed and the page that is printing The Print dialog box indicates the configured printer to which this information prints Refer to your Windows and printer documentation for complete information about how to configure a printer To cancel printing click Cancel in the Printing Status dialog box This immediately halts printing and the print job is removed from the print queue The status bar and toolbar are objects in the TrendWorX Container screen The information contained in the status bar varies depending upon the current screen displayed and the current sys
224. erform better using Microsoft Windows 2000 Microsoft SQL Server 2000 or MSDE 2000 performs better than Microsoft SQL Server 7 0 or MSDE 7 0 Data logging requires less table maintenance and memory use overall is more reasonable Microsoft SQL Server 7 0 utilizes much more memory All this is done at the expense of hard disk space Microsoft SQL Server 2000 or MSDE 2000 will achieve this performance by allocating much more disk space ahead of time so that it will not have to expand the database continuously In addition Microsoft SQL Server 2000 nor requires a minimum of 64 MB of RAM dedicated to it However during data logging Microsoft SQL Server 2000 or MSDE 2000 will use much less memory than Microsoft SQL Server 7 0 or MSDE 7 0 Deploying Microsoft SQL Server 7 0 or Microsoft SQL Server 2000 as well as MSDE requires several simple steps at startup that are very important to overall data logging and system performance During Installation When installing Microsoft SQL Server if possible specify a different drive for the masterdb and tempdb databases of Microsoft SQL Server from the location of the actual historical database If installing Microsoft SQL Server 7 0 or MSDE 7 0 please install the latest service pack available on the ProcessView Product CD under the Tools directory Note When installing Microsoft SQL Server 2000 or MSDE 2000 remember that TrendWorX Version works with Microsoft SQL Server 2000 in single i
225. erver instances on the local node in which case the SQL Server field lists all those SQL Server instances local for the default instance and node_name instance_name for all others The drop down list may show SQL Server instances on other nodes as well 2 8 Introduction SQL Server Database Connection Please specify the following to connect SOL server Select or enter a database name Database v JV Auto append configuration into existing database Simple lt lt Select or enter a server name local v Refresh Enter information to log on to the server Use Windows NT integrated security recommended Use a specific user name and password User name Password 7 Blank Password lt Back Finish Cancel Help Connecting to an Existing SQL Server Database 5 Ifthe existing database already has configuration tables you have the following options as shown in the figure below Select a different database name recommended This option allows you to rename the database without affecting the existing database as well as create a new Data Link udl file Use the existing database structure This option preserves the content of the existing database and allows you to create a new Universal Data Link udl file Override all existing configuration tables This option expunges the content of the existing database and allows you to create a new Universal Data Link udl file Not
226. es should you change the order or the data type of the columns that are already created With this in mind it should be noted that you can append new columns at the end of existing ones For each configured group each of the tables is named after the user selected table name For example using Microsoft Access opening the database will bring up the following list of database tables for each group of signals formed by TrendWorX SQL Data Logger e TwXAccessDemo Database Al ES BS Open RE Gesion E New x 25 Se erar En E ES 13 Pages f Create table in Design view Create table by using wizard Tables Create table by entering data Queries MyJetGroup_1 MyJetGroup_2 MyJetGroup_3 MyJetGroup_4 MyJetGroup_5 MyJetGroup_6 MyJetGroup_7 MyJetGroup_Info Forms Reports Macros Modules ess MyJetGroup_Notes MyJetGroup_Tags TWX_GLOBAL 88000000000 Microsoft Access Database With Tables 3 42 Introduction Notice that there are various tables for each group which will be described later Double clicking any of these tables from the database list opens the actual table so that you can view all of the corresponding data Tags Table The Microsoft Access database _ Tags table shown below contains all of the information required by data logging and reporting for the tags signals within the data logging group EN MyJetGroup_Tags Table SS Field Name TF Logging_Name Te
227. es you to configure a new database 3 13 TrendWorX SQL Data Logger Create New Data Source E E x Select a type of data source C User Data Source Applies to this machine only System Data Source Applies to this machine only Selecting System Data Source creates a data source which is specific to this machine and usable by any user who logs onto this machine lt Back Cancel Create New Data Source Wizard It is recommended that you configure the new database as a System Data Source so it is available to any user logged into the specific PC Click Next to select the corresponding ODBC driver such as Microsoft Access Microsoft SQL Server or Oracle Refer to the TrendWorX Logger Configurator Help documentation for more information on how to configure databases Configuring Microsoft Access Databases To configure a Microsoft Access database select Microsoft Access Driver mdb in the Create New Data Source wizard as shown in the figure below Create New Data Source Driver da Microsoft para arquivos texto txt cs 4 Driver do Microsoft Access mdb Driver do Microsoft dBase dbf Driver do Microsoft Excell xls Driver do Microsoft Paradox db Driver para o Microsoft Visual FoxPro Microsoft Access Driver mdb Microsoft Access T reiber mdb Microsoft dBase Driver dbf hdicracott dR asa WEP Diver ARI de 4 lt Back Cancel Selecting a Microsoft Acc
228. ess ODBC Driver When you have selected the Microsoft Access driver click Next to proceed to the final dialog box in 3 14 Introduction the Create New Data Source wizard shown below Create New Data Source A x When you click Finish you will create the data source which you have just configured The driver may prompt you for more information System Data Source Driver Microsoft Access Driver mdb lt Back Cancel Creating a New Microsoft Access Database Connection Click Finish to configure your new Microsoft Access database This opens the ODBC Microsoft Access Setup dialog box shown below Enter the Data Source Name and the Description ODBC Microsoft Access Setup i i Th xe Data Source Name Description Cancel m Database Database jat eTe Select Create Repair _ Compact Advanced r System Database None Database System Database Options gt gt ODBC Microsoft Access Setup Dialog Box Click Select to choose an existing mdb file This opens the Select Database dialog box shown below 3 15 TrendWorX SQL Data Logger a Select Database Database Name Directories OK mdb cA Aalarmwors examples E cA Cancel AWXLog32 mdb dil AwWXRep32Example me E gt Program Files Hel E Smar a gt ProcessView I Read Only 2 Examples Exclus E gt AlamworX Exa y do a List File
229. essteseeseees 2 1 CREATING CONFIGURATION DATABASES scsssesssssesssssessssesssssessnssvsscsessessesssssessseaesstsissstanssessssessesseeresaeeesseees 2 2 CREATING A MICROSOFT ACCESS CONFIGURATION DATABASE ss scesssssessssesssssessssecsesscsessessessesseesesseens 2 3 CREATING A MICROSOFT SQL SERVER CONFIGURATION DATABASE scssessessessessessesseesssessnesessnesessneeesseess 2 5 ADDING A CONFIGURATION DATABASE TO AN EXISTING SQL SERVER DATABASE o n 27 OB AS a ias dt dond e 212 SA da oy ol A eine SOND E A A A A 2 12 DATA MANIPULATION TOOLBAR ceccct rec e a e a Blac Use hl eects errennert 2 13 MENUS rr o mM MEN o rada Sooner net chee 2 13 LA E E E A ee a cot NE cae ua Mitel ea 2 13 E NU e T A A O N T a ae 2 19 ANAVEN A os ae ee E E A PIPPIN tom tan Mete inTet et ot 2 20 A A A A O O PII 2 21 INON AVIEN O 2 22 A A a chen od aun eC afore a 2 22 A A E ma ea ete nets 2 24 TRENDWORX CONFIGURATOR SETUP ssesscssessessessessesseesesecsnssessnssessussesssseesessteaesessnesessnsressnssesaeesessetasnesseeses 2 25 CREATING A NEW GONFIGUPATION a alii 2 27 CONFIGURATION PROPERTIES a a A ada tias 2 27 CREATING A NEW DATABASE GROUP stc loa rana 2 30 CONFIGURING DATABASE GROUP PROPERTIES ssssessessscsessecsessessessessesseesesssssesssessssssessnseessessessteaeeseeseeses 2 31 CREATING A NEW DATA SOURCE anaia aaa aain Siek adak aidaa aaa a a kraai 2 32 SELECTINGA LOGGING DATABASE at i 2 34 CREATING A NEW LOGGING GROUP mas
230. etadd ace seeethtecaass 1 15 PRINTING OPTIONS viene cdot ri hairiest ein nae ene einen ied a erty na veers apie venir eden Sees 1 15 APPLY TOALE DISPLAY Sicilia it ea eae cae i ead 1 16 TILE OBJECTS ON RESIZE ceccecereds orate cocedens cs ues cuore ranes aea a ola emits oe aea TEE raoa pe tees elon eee eerie 1 16 DISPLAY COLOR ii ceisia eiee areae eh paee e a a a acbiatevaaa PE EE a Ee aaia rT E E a a aaa AEE Aaa Ea tdci 1 16 RUNTIME TAB zirina eiaa aa a ta a a i i A a a ii ba 1 16 RUNTIME TITLE BAR OPTION S rerengia ae nee e iil a OR el iste 1 16 RUNTIME FRAME STYLE 000 ai a aie ewe si ate neh tien ei ae iE oe and Sc 1 16 RUNTIME START STATE orii ipt a aaa 1 17 GRIDS FAB R A E E 1 17 APPLICATION PREFERENCES vicie t i Rai 1 17 GENERAL TAB cuore a a a a EE E EE a 1 18 KANADI EET A ES E E E E E E E T E E 1 18 WINDOW DIMENSIONS scoireann eriei aneas rana a aara aaa aa aa iaaa ie aaar E aa 1 18 A eaba ea aaa aera e aa e eaa Ea aa Taare at a taara a cheubrarevachbeaesd 1 19 RUNTIME TITLE BAR OPTONS coastal a ed R da Ae eee a eh diate 1 19 RUNTIME FRAME STYLE sinc nti thee Moh oe el te is eee ite Sa tits 1 19 RUNTIME SETTINGS 50 00 inicio iii a 1 20 LOADING TAB contaran oia aiii anat nica ci iaa 1 20 PERSISTENTE TRENDING TAB curia ita E REA dE Ni asia cie 1 21 REPORTING TAB ocu ii tad 1 21 LOGGING TAB iii A A ee A A E as ee va a A a 1 22 ACTIVEX TOOLBAR uineas A ai i a E ai ny a id 1 22 CUSTOMIZING THE ACTIVEX TOOLBAR 0 cece cece eee tee
231. f samples to be returned The variants Values TDates MSecs and Quality represent variant arrays of element types VARIANT which contain the values time and date stamps millisecond resolution and quality information about the retrieved samples Values variants utilize double values VT_R8 Tdates variants utilize DATE types VT_DATE and Msecs and Quality utilize VT_14 types Persistent Trending will allocate memory for these arrays and the caller of this method must always FREE the associated memory Also if no samples are retrieved the method will return FALSE and the variants will be empty Upon executing this method the Persistent Trending server will search all Persistent Trend groups for a group called GroupName and then it will search for the PointName signal in the requested group Then it will perform a time stamped search to retrieve all values buffered in memory that satisfy the desired data collection rate and the number of returned samples starting from the most current one Persistent Trending will search for the requested data at time intervals reflecting the desired data resolution The last valid sample within each search interval will be returned to the caller If bStamp is set to TRUE the actual time and date stamp of the retrieved sample will be modified to reflect the time and date stamp of the search interval Time stamps are returned in UTC time format 25 boolean GetPointStatUTC BSTR Gr
232. fine a color for the text of the field Fill Color Clicking the Fill Color box opens the Color dialog box so that you can select define a color for the background of the field F Specifies how data will be displayed in the Ranges section of the Trend ormat Viewer Disables the Low and High fields and sets these limits automatically according to the values for the pens Autoscaling if checked adjusts the Autoscal range if the actual value is above or below the set limits For example if autoscaling is selected and the ranges are set from 0 Low to 200 High and the actual value is 250 then the ranges will autoscale to 0 to 280 The adjustment will be around 20 percent above the actual value Update From Server on Animate If this option is enabled the ranges of the pen are automatically updated from the OPC Data server or the OPC Historical servers upon entering animation mode Totalizer Tab The Totalizer tab of the Edit Trend Pen dialog box shown below enables the totalizer function which calculates the total amount covered within a certain time period based on the rate represented by the signal for example flow gallons per minute and speed miles per minute The TrendWorX Viewer has Totalizer support on a per pen basis even for non circular chart plot types Edit Trend Pen 3 x General Alarms Ranges Totalizer Ideal Pen m Input Signal is Amount per second Amount per minute C P
233. g and Password data replaying Database type M S Access Perform test m Server database group status Control board prion server is stopped Heset Add New DB Group Database Group Properties Activate Switch database 2 31 TrendWorX Logger Configurator Creating a New Data Source Name Enter the name of the database group in this field Database connection settings This section allows you to set up a connection to the data source It also allows you to set