Skip to main content
Skip table of contents

Data collection from Wonderware (Aveva) Historian

About the Wonderware Data Historian activity

Manufacturers often collect data from monitored machines/equipment during production and then store the data in a Wonderware Historian SQL database. The collected data identifies the machine and date and time, but doesn't include the unit UID.

Before a unit is processed by monitored machines, a validation should be done to ensure the conditions are suitable. Once a unit is validated, the conditions it experiences as it is processed through or past the monitored machines can be recorded in the unit’s build history in FactoryLogix as sampled data

The Wonderware Data Historian activity in the NPI Process Definition window allows you to configure and collect sampled measurement data so you can identify data trends during production runs. The Wonderware Data Historian activity is available for serialized production processes or serialized operations within hybrid processes.

Note

Since many measurements are being recorded and the volume is huge, only sampled results are collected using the FactoryLogix Wonderware Data Historian activity.

Configure Wonderware database connection details

Settings button

Before you can add the Wonderware Data Historian activity to a process definition in NPI, you need to configure the connection details for the Wonderware database. This configuration includes four settings found in the System Configuration > Settings area of NPI, under the Option Type: Wonderware Historian Activity in the Process Planning category of the Global Options tab.

Wonderware global options

Specify the appropriate Wonderware information for each of these options:

Option

Description

Server Address

The IP address of the Wonderware server

Database Name

The name of the Wonderware database

User Name

The user name associated with the Wonderware database

Password

The password to log into the Wonderware database

Add the Wonderware activity to a process definition in NPI

Wonderware Data Historian activity

If you didn't configure the Wonderware database connection details in NPI Settings (see the previous topic), you will see this message:

Wonderware error message

When the Wonderware Data Historian activity is added to a process definition in the NPI Process Definition window, the process designer can do the following:

  • Author the instructions for the shop-floor operator related to this activity.

  • Indicate whether the activity is required or optional.

  • Identify zero or more validation parameter tags to be validated before a unit can be processed (see Point A in the following illustration).

  • Identify zero or more trending measurement tags whose values are recorded against a unit while the unit is being worked on. To reduce the volume of data recorded in FactoryLogix, the process designer will specify the number of measurements to be recorded (between Point A and Point B in the following illustration).

  • Identify zero or more final value measurement tags whose values are against a unit in FactoryLogix.


    Wonderware5.png


What happens in Production?

After you configure the Wonderware Data Historian activity for a process definition in NPI, here's what happens in Production:

  1. When a serialized unit reaches the point in its route where it will be processed through monitored machines, the unit queries the Wonderware Data Historian for specific tag values.

  2. The returned values are validated.

    If the validation is successful, the unit is allowed to begin the production that will be performed in conjunction with the monitored machines.

  3. When the unit completes production through the monitored machines, the operator will inform FactoryLogix.

  4. FactoryLogix queries the Wonderware Data Historian and records the query results as part of the build history for the serialized unit.

    Process designers also have the ability to configure FactoryLogix to also query for specific tags and record those values at the time the serialized unit is completed through the monitored machines.


When the Wonderware Data Historian activity is displayed for a serialized unit in Production, the instructions authored in NPI are displayed to the operator and an Activity is Completed? check box and a Start button are displayed:

Wonderware1.png



When the shop-floor operator selects the Start button, the activity uses the validation parameters to validate that the latest value for each tag recorded in the Data Historian data is within the acceptable range as defined in the activity configuration in NPI. If the validation parameters pass their validation, the Start button is disabled/dimmed. The unit (now at Point A in the previous illustration) is ready to be processed through the monitored machines.

Wonderware6.png

When the unit has been processed through the monitored machines, the shop-floor operator selects the Activity is Completed? check box. At this point the activity (now at Point B in the previous illustration) is complete.

Note

 If the activity is marked as a required activity and the operator tries to select the Activity is Completed? check box while the Start button is enabled, a message informs the operator that the activity can't be completed at that time.

Activity Work Area dialog

If the Start button is disabled and the operator pauses the WIP transaction, when the WIP transaction resumes—either by the same operator or a different one—upon entering the activity, the Start button is disabled.

When the activity is recorded as Completed, the activity queries the Wonderware Data Historian for the data to record the trending measurements. Further, if any final value measurements were defined, the activity queries the Wonderware Data Historian for the data to record those measurements.

How does the query for trending measurements work?

The query to retrieve data for trending measurements returns all values recorded to the specified tags in the Wonderware Data Historian from the time the validation parameters were validated through the time when the operator marked the activity as Completed.

Since the volume of data may be significant, it is not desirable to record all the data in FactoryLogix. The query includes a parameter to specify the number of measurements per tag to be returned to help manage the data collection.

The query to retrieve the data for the final value measurements will return the last measured value recorded for each tag identified.

Each value returned by these queries is recorded as a FactoryLogix parametric measurement:

  • The Type is the parameter name.

  • The Value is the value returned by the query for the parameter.

  • The Activity is Wonderware Data Historian.

  • The Measurement Date Time is the date/time returned by the query.

Configure the Wonderware activity in NPI

When configuring the Wonderware Data Historian activity in NPI, process designers need to define the following on the Activity Details tab of the Settings dialog:

  • Validation Parameters

  • Trending Measurements

  • Final Value Measurements

    Use the Add Item Add Item button, Edit Item Edit item button , and Delete item Delete Item button buttons on the Activity Details tab to enter, edit, and/or delete parameters and measurements related to the Wonderware activity.

Note

All tag values must be of type Float.

Wonderware activity details

Validation Parameters

You can configure zero or more Validation Parameters on the Activity Details tab of the Settings dialog:

  • Wonderware Tag Name - The tag name recorded in the Wonderware Data Historian database

  • Minimum Value - The minimum validation value

  • Maximum Value - The maximum validation value

Trending Measurements

The activity configuration allows you to define zero or more of these Trending Measurements on the Activity Details tab of the Settings dialog:

  • Wonderware Tag Name - The tag name recorded in the Wonderware Data Historian database

  • FactoryLogix Measurement Name - The tag name to be recorded in FactoryLogix

  • Sub Interval Count - An integer value with a minimum value of 1

    The processing uses the reporting window (Point A to Point B in the following illustration) and returns a measurement for each sub-interval plus one.

    Example: If the reporting window was from 1:00 PM to 2:00 PM and 4 measurement sub-intervals were requested, then 5 measurements will be recorded (the tag values at 1:00 PM, 1:15 PM, 1:30 PM, 1:45 PM and 2:00 PM).


    Wonderware5 - Copy.png

Final Value Measurements

The activity configuration allows you to define zero or more of these Final Value Measurements on the Activity Details tab of the Settings dialog:

  • Wonderware Tag Name - The tag name recorded in the Wonderware Data Historian database

  • FactoryLogix Measurement Name - The tag name to be recorded in FactoryLogix

Querying the Wonderware Data Historian

Validation parameters

This query returns the most recently recorded value for each of the identified tags.

SELECT TagName, Value

FROM Live

WHERE TagName in ('<TagName 1>[,<TagName 2>…]')

Trending measurements

This query returns all values recorded for the identified tag within the specified time window.

SELECT DateTime, TagName, Value

       FROM History

WHERE TagName = '<TagName>'

       AND DateTime >= '<Start of time window>'

       AND DateTime <= '<End of time window>'

       AND wwRetrievalMode = 'Cyclic'

       AND wwCycleCount = '<SubIntervalCount>'

      

For each row returned by this query, a parametric measurement will be recorded in the FactoryLogix database against the unit that was worked on:

FactoryLogix Parametric Measurement Value*

 

Activity

Wonderware Historian Data Collection

Time

DateTime

Name

The Measurement Name for the returned TagName

Value

Value

Type

TagName

Status

Not set

* These are the column names displayed on the Parametric tab in the Trace window in Production.

Final value measurements

This query returns the last recorded value within the specified time window for each of the identified measurements recorded.

SELECT DateTime, TagName, Value

FROM Live

WHERE TagName in ('<TagName 1>[,<TagName 2>…]')

      

For each row returned by this query, a parametric measurement will be recorded in the FactoryLogix database against the unit that was worked on:

FactoryLogix parametric measurement value*

 

Activity

Wonderware Historian Data Collection

Time

DateTime

Name

The Measurement Name for the returned TagName

Value

Value

Type

TagName

Status

Not set

* These are the column names displayed on the Parametric tab in the Trace window in Production.

Related topics

Traceability

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.