Creating Rdbms proxy points

You can create proxy points under the Rdbms Device Extension for any of the database device types provided in NiagaraAX. As with device objects in other drivers, each RdbmsNetwork device has a single Points extension Graphic

 
NOTE: The Rdbms Point Query Manager works differently than in other Point Manager views because of the way it uses the Rdbms Points Query component. This component (using its Sql property) filters the data to provide the candidate records that are available for "adding" as proxy points in the manager view. Although the default view of the Rdbms Point Device Extension is the Rdbms Point Device Ext Manager, you may often need to use the Property Sheet view and the Rdbms Query view, as well.
 

The process of creating Rdbms proxy points can be divided into three procedures, as listed below:

    Add and Configure the Rdbms Point Query

     
    NOTE: In the following procedure, the term “rdbDatabase” represents any valid Rdbms Database Device Extension
     

    To add and configure the Rdbms Point Query component, do the following:

  1. Make sure that you have reviewed and accomplished all items listed under Prerequisites
  2. In the WorkbenchAX nav tree, under the station Driver's node Graphic , expand the RdbmsNetwork node Graphic and the desired rdbDatabase node Graphic to expose the Rdbms Point Device Ext node Graphic
  3. In the nav tree, double-click on the Rdbms Point Device Ext node. The Rdbms Point Device Ext Manager view appears.
  4. At the bottom of the Rdbms Point Device Ext Manager view, click the New button. The New dialog box displays with the following two properties:
    • Type to Add: The only choice here is the default (Rdbms Point Query) - that is what you are adding.
    • Number to Add: Type in the number of Rdbms Point Query components that you want to add.
       
      NOTE: If you add more than one, you can batch-edit most of the properties to configure them all at once.
       
  5. Click the OK button at the bottom of the dialog box. A second New dialog box appears with the following properties:
    • Rdbms Point Query pane

      This pane lists a number of Rdbms Point Query components (equal to the number you chose to add in the previous step). You can edit the properties for each entry separately or batch-edit most of the properties (if desired) by selecting one or more rows in the pane and editing them in the lower part of the dialog box.

    • Name

      A single default name appears in this field. You can accept the default name(s) or edit them one at a time by selecting a single entry in the pane and editing it using this field. If more than one entry in the pane is selected, the Name field is not available.

    • Sql

      Enter a query in this field, or leave it blank for later editing in the Rdbms Point Query Property Sheet view. If the query is not valid, the Point Query view does not display.

    • Key Column1

      Identify a key column for the returned data (see About the Rdbms Point Device Extension).

    • Key Column2

      If necessary, identify a second key column (usually this is not necessary, see About the Rdbms Point Device Extension).

    • Update Frequency

      Set the time for how often you want the query to execute automatically. You can always manually execute an update.

  6. Click the OK button. The new Rdbms Point Query component(s) are added under the Points Device Extension node in the nav tree and also appear in the Rdbms Point Device Ext Manager view.

    Discover Rdbms points

    The discovery process uses the Rdbms Point Query Sql property to query the targeted rdbDatabase and return only those points that satisfy the query.

    To discover Rdbms points, do the following:

  1. Double-click on the desired Rdbms Point Query component. The Rdbms Point Query Manager view displays.
  2. In the Rdbms Point Query Manager, click the Discover button (at the bottom of the view). This executes the query (as defined in the Rdbms Point Query "Sql" property) and any "discovered" points appear in the Discovered pane at the top of the view.

    Add Rdbms points

    To add Rdbms points, do the following:

  1. In the Discovered pane, select one or more points to add as proxy points.
     
    NOTE: The Point Manager's Add button is available when you have one or more data items selected (highlighted) in the top Discovered pane. Also, the toolbar has an available Add tool Graphic , and the Manager menu has an Add command. Also, you can simply double-click a discovered item to bring it up in the Add dialog box.
     
  2. At the bottom of the view, click the Add button. The Add dialog box appears, with all selected points in the top pane of the dialog box.
  3. In the Add dialog box, edit the following properties, as desired:
    • Name

      Individually edit the Name property, if desired, by selecting a single point and typing in this field. This is the display name of the proxy point, when added.

    • Type

      Individually edit (or batch-edit) this property for all points in the top pane, as desired. Once the Point type is designated, it cannot be changed without deleting and re-adding the point.

    • Value Column

      Individually edit (or batch-edit) this property for all points in the top pane, as desired. The value column is the table column that holds the value that you want the proxy point to display.

  4. Click the OK button. The points are added to the Database pane and appear in the nav tree.

Example Rdbms implementation

 
NOTE: The following is a hypothetical example to illustrate how the RdbmsNetwork proxy points might be created and used.
 
A nationwide convenience store corporation uses a remote SqlServer database to archive fuel sales records from each of its stores, archiving store records for three types of fuel to the database every 15 minutes. In order to graphically display updated information over the Internet, they use the NiagaraAX RdbmsNetwork and the Point Device Extension, as illustrated in the following list of screen captures:

  • Each store exports transaction histories from its JACE via a Supervisor, to a central SqlServer database using the Sql Server History Device Ext and the History Export Manager view, as shown below.

    Graphic

     
    NOTE: For embedded JACEs, the HsqlDbDatabase is the only database that is supported.
     
  • For each store, an AXSupervisor station creates proxy points for each fuel type, by creating and configuring an Rdbms Point Query for each fuel type, shown below.

    Graphic

  • An Sql query for total fuel sold as of the latest update is shown below, scheduled to update every 15 minutes. This query provides a total that is updated every 15 minutes, along with the time of the update.

    In this example, the following Sql parameters are optional:

    • “1 AS myKey”: this creates a new column as a key column and is not required
    • “1 AS Total”, “AS Time”, “AS Status”: these create titles for there respective columns. If these optional parameters are not used, columns are titled “column1”, “column2”, “column3”, respectively.

    Graphic

    Data is "Discovered" and "Added" under the Rdbms Point Device Extension node, as shown below:


    Graphic

  • Once added to the RdbmsNetwork, these proxy points are used to graphically display total gallons of each fuel type sold, as of the update time.

    Graphic