Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Enterprise SCADA High Performance Database (HPDB) API Reference

Run an fnput with RealTimeVPath

This scenario guides you through the steps required to perform an fnput in the RealTime database (RTDB).

To identify the code associated with each step, see the code comments in the Example code section.

To run an fnput with RealTimeVPath

In this scenario, aliases are required due to ambiguous references:  

using RealTimeDatabase =OASySDNA.RealTime.Data.Common.HighPerformanceDBWrapper.RealTimeDatabase;
using RealTimeVPath =OASySDNA.RealTime.HighPerformanceDB.RealTimeVPath;
  1. Open the Program.cs file from the created project.
  2. Open the RTDB.
  3. Access a RealTimeVPath
    In this example, access a manual flag is used.
  4. Perform the fnput.
    In this example, the point is changed from "realtime" to "manual."
  5. (Optional) Run a command.
    For example, "acknowledge an alarm."
    vpath.FunctionPut("acknowledge :hilo");

Example code

try
{
    IRealTimeDatabase database = new RealTimeDatabase();
    // Open the RTDB.
    if (!database.IsOpen())
    {
        database.Open();
    }
    // Access a RealTimeVPath.
    RealTimeVPath vpath = new RealTimeVPath("analog", "AutoCommandAnalog01", "flag.manl");
    Console.WriteLine(
quot;
{vpath.FieldName} is in manual mode: {vpath.FieldGetBool()}"); // Perform the fnput. vpath.FunctionPut("manual"); Console.WriteLine(
quot;
{vpath.FieldName} is in manual mode: {vpath.FieldGetBool()}"); } catch (Exception ex) { Console.WriteLine(
quot;An error occurred while running the functionput:
{ex.Message}"); }
TitleResults for “How to create a CRG?”Also Available in