beckhoff TE1200 — 4.4.1.17 Response For Class (RFC)

Configuration | Metrics FUNCTION_BLOCK FB_Base FUNCTION_BLOCK FB_Sub EXTENDS FB_Base FUNCTION_BLOCK FB_SubSub1 EXTENDS FB_Sub FUNCTION_BLOCK FB_SubSub2 EXTENDS FB_Sub The metric Number Of Children is: For FB_Base : 1 child (FB_Sub) For FB_Sub : 2 children (FB_SubSub1, FB_SubSub2) For FB_SubSub1 : 0 children For FB_SubSub2 : 0 children 4.4.1.17 Response For Class (RFC) | Response For Class (RFC) Sample: Function block FB1: FUNCTION_BLOCK FB1 VAR d,x,y : INT; END_VAR x := METH(d+10); y := FUN(42, 0.815); Method FB1.METH: METHOD METH : INT VAR_INPUT i : INT; END_VAR METH := FUN(CUBE(i), 3.1415); Function Cube: FUNCTION CUBE : INT VAR_INPUT i : INT; END_VAR CUBE := i*i*i; Function FUN:

FUNCTION FUN : INT VAR_INPUT a : INT; f : LREAL; END_VAR FUN := LREAL_TO_INT(f*10)*a; FUN , CUBE : These functions have an RFC of 0, as neither function calls other functions, function blocks or methods for their calculations. FB1.METH: The method uses FUN and CUBE , which results in an RFC of 2. FB1: ◦The function block FB1 calls METH and FUN , which increases its RFC by 2. TE1200 103 Version: 2.11.1 Title short form RFC Categories Maintainability, reusability Definition Number of different POUs, methods or actions that can be called by a POU Further information RFC = Response For Class The value is used for measuring the complexity (in terms of testability and maintainability).

All possible direct and indirect method calls can be reached via associations are taken into account. These can be used to respond to an incoming message or to respond to an event that has occurred.