Skip to main content

Attribute: pingroup

The effect of this pragma is that the input pins or output pins (parameters) are grouped in the declaration of a function block. In the FBD/LD editor, a pin group defined in this way can be displayed as an expanded or reduced unit on the inserted function block. Several groups are possible and are distinguished by their names. CODESYS saves the respective state (reduced) per function block box with the project options.

Syntax:

{attribute 'pingroup' := '<group name>'}

Insert location: Line above the declaration of the input or output variables concerned in the declaration part of a function block.

Example 285. example

Two groups are defined: general (i1, out1) and group1 (i2, g1). r1, r2, outRes1 and g2 are always displayed.

FUNCTION_BLOCK FB
VAR_INPUT
    r1 : REAL;
    {attribute 'pingroup' := 'general'}
    i1 : INT;
    {attribute 'pingroup' := 'group1'}
    i2 : INT;
    r2 : REAL;
END_VAR
VAR_OUTPUT
    outRes1 : REAL;
    {attribute 'pingroup' := 'general'}
    out1 : INT;
    {attribute 'pingroup' := 'group1'}
    g1 : INT;
    g2 : REAL;
END_VAR