Using our internal log, I noticed that a function block had a delay of approximately 50 ms. Here are the two log entries:
08.07.2026 10:11:24.776 1 GateClient 40 bytes received
08.07.2026 10:11:24.828 1 GateClient Response|ProcessingInfo ...
Normally, these two log entries are generated at the same time. Here is an entry from an earlier time:
08.07.2026 10:11:18.926 1 GateClient 40 bytes received
08.07.2026 10:11:18.926 1 GateClient Response|ProcessingInfo ...
These two logs are generated in a C#/C++ function block. (I have reduced the functions to the essentials)
[Execution]
public void __Process()
{
...
// Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
if (socket.Poll(0, SelectMode.SelectRead))
{
try
{
byte[] buffer = new byte[1024];
int bytesReceived = socket.Receive(buffer);
EventsInterface.AddDebug(ModuleID, "{0} Bytes received", bytesReceived); // first log entry
if (bytesReceived > 0)
ReadResponse(ref buffer);
else {
...
}
}
catch (SocketException ex)
{
...
}
}
}
public void ReadResponse(ref byte[] buffer)
{
...
// Function DecodeProcessingInfo is defined in C++
// this.PickUp and this.ForProcess are [Output] Variables of the Functionblock
DecodeProcessingInfo(ref buffer, ref this.PickUp, ref this.ForProcess);
EventsInterface.AddDebug(ModuleID, "Response|ProcessingInfo, ... "); // second log entry, no time consuming function in between. Timestamp should be the same
...
}
Boolean DecodeProcessingInfo(SZArray** buffer, Boolean* pickUp, Process* forProcess)
{
if (!pickUp || !forProcess) {
EventsInterface::AddEvent(LoggingType::Fatal, "Flatbuffers", "Invalid pointer(s)");
return false;
}
auto responseMessage = HResponse::LMS::GetResponseMessage((*buffer)->getData());
if (!responseMessage) {
EventsInterface::AddEvent(LoggingType::Fatal, "Flatbuffers", "Invalid Response-Message");
return false;
}
if (responseMessage->data_type() != HResponse::LMS::Command::ProcessingInfo) {
EventsInterface::AddEvent(LoggingType::Fatal, "Flatbuffers", fmt::format("Invalid flatbuffer, no ProcessingInfo response: {0}", HResponse::LMS::EnumNameCommand(responseMessage->data_type())));
return false;
}
*pickUp = responseMessage->data_as_ProcessingInfo()->pickUp();
*forProcess = static_cast<Process>(responseMessage->data_as_ProcessingInfo()->processID());
return true;
}
I don’t see any function that would be causing a bottleneck. The messages sent via AddDebug are processed in parallel in a separate thread and cannot cause any delay.
Could the execution be disrupted in some other way?