The Number Of GVL Usages metric is used to get information about how many global variables a programming object (programs, function blocks, functions, methods, and so on) uses (reading or writing).
Each programming object (program, function block, function, method, property get, property set, action,and so on) is handled individually.
Example
Number Of GVL Usages calculation example for IEC-61131-3 code:
FB_MyAlphaModule
VAR
iMyState : INT;
END_VAR
iMyState := GVL_IOs.G_iState;
if (iMyState = 10) THEN
;
END_IF
Number Of GVL Usages Result (for variable FB_MyAlphaModule)
Number Of GVL Usages = 1