Execute a Business Logic Tier (BLT) component
- Last UpdatedApr 08, 2026
- 2 minute read
This scenario guides you through the steps required to execute the TestBLT Business Logic Tier (BLT) component.
To identify the code associated with each step, see the code comments in the Example code section.
The TestBLT component is called using the following input parameters:
- table and point names
- numberOfAlarms
The TestBLT component returns the following outputs:
- numberOfAlarms parameter
- numberOfEvents parameter
- table and point names are returned as a tabular result or dataset
To execute the BLT component
- Open the Program.cs file from the created project.
In this example, the project is named BLTTest and the BLT component is named TestBLT.
- Create a BLT client instance.
- Add the BLT component parameters, providing initial values for the input parameters and output variables for the output parameters.
- Execute the BLT component.
- Process the output.
- Run the BLTTest.exe to check the TestBLT component execution by doing the following:
- On the desktop, double-click the Windows PowerShell for DNA shortcut.
- Execute the following commands:
set-silo RealTime
blttest
Example code
// Create a BLT client instance.
using (var bltClient = new BLTClientFactory().Create("TestBLT", "common", "es"))
{
// Add the BLT component parameters.
// Table.
bltClient.AddParameter("analog");
// Point.
bltClient.AddParameter("0Analog");
// Number of alarms. It is an input/output parameter initialized to 100.
bltClient.AddParameter(100, out BLTParameterValueAccessor numberOfAlarms);
// Number of events. It is an output parameter.
bltClient.AddParameter(out BLTParameterValueAccessor numberOfEvents);
try
{
// Execute the BLT component.
bltClient.Execute();
// Process the output.
var res = bltClient.GetResults().Single();
foreach (var resRow in res)
{
Console.WriteLine(quot;Parameter name: {resRow[0]}, Value: {resRow[1]}");
}
Console.WriteLine(quot;Number of alarms: {numberOfAlarms.Value}");
Console.WriteLine(quot;Number of events: {numberOfEvents.Value}");
}
catch (Exception e)
{
Console.WriteLine(quot;TestBLT execution failed {e.Message}");
}
}