Skip to main content
Skip table of contents

How-to save a OPC value to a data series each minute

Intermediate
This document will go through all the step needed in order to save a value from an OPC tag to a data series.

📘 Instructions

  1. Go to “System administration” and open “Event handling \ Observations”

  2. Select “Create”

  3. Double-click the “Observation container” in order to start building the evaluation criteria if the form should be shown or not.

  4. In this case, the event handling should occur each time the event is raised for the “Injection molding” machine. Connect the “StartCondition” with “Current producing unit”, select the “Injection molding” producing unit and then connect it with the “EndCondition”.

    This way the observation will only be evaluated to be true when the minute event is raised for the “Injection molding” machine.

  5. Now the observation criteria are completed.

    The next thing to do is to define what shall happen when the observation is true, in this how-to a value from an OPC tag should be written to a data series.

    Go back to the root and double-click the “Actions” container.

  6. Now it is time to build the action part it will use three tasks:

    - “Read OPC input value”
    - “Convert string to double”
    - “Write a value to a data series”

    1. First the “Read OPC input value”, reads a value from an OPC input value in string data format. It needs to be configured by which input we want to read, in this case, we select an input called Temperature which will read out the current machine temperature.

    2. As the output from the task is of type string it needs to be converted to a Double in order to add it to a data series. The next step is to add a converter for that the task “ToDouble”.

    3. The last task that is needed is to write the value now converted from a string value to double to a Data series. Add the “Write to data serie” task and select the data series “Mold Temperature”.

  7. Now all the logic is ready and the only thing left to do is to give the event handling a name and connect it to the “Minute changed”-event.

  8. Now the event handling is saved and has a name, the last thing is to connect it to the “Minute changed”-event.

  9. All done!

📋 Related articles

JavaScript errors detected

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

If this problem persists, please contact our support.