Run an fnput with RealTimeVPath
- Last UpdatedApr 08, 2026
- 1 minute read
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;- Open the Program.cs file from the created project.
- Open the RTDB.
- Access a RealTimeVPath.
In this example, access a manual flag is used. - Perform the fnput.
In this example, the point is changed from "realtime" to "manual." - (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}");
}