@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.0">
|
||||
<POU Name="FB_PerfChurn" Id="{00000000-0000-0000-0000-000000000202}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[// Rotating writer for GVL_Perf.aTags so the perf integration test isn't
|
||||
// reading completely static data — keeps the runtime's symbol caches honest.
|
||||
// Increments each tag's value at MAIN-task cadence; touches all 1000 entries
|
||||
// over the 1000 cycles spanning ~10s at the default 10ms PlcTask period.
|
||||
FUNCTION_BLOCK FB_PerfChurn
|
||||
VAR
|
||||
nIndex : INT := 1;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[GVL_Perf.aTags[nIndex] := GVL_Perf.aTags[nIndex] + 1;
|
||||
nIndex := nIndex + 1;
|
||||
IF nIndex > 1000 THEN
|
||||
nIndex := 1;
|
||||
END_IF
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user