Skip to content

Commit 98e25d7

Browse files
Adds lower and upper bound function blocks
Introduces F_LOWER_BOUND and F_UPPER_BOUND XML configurations to compute the lower and upper bounds of array dimensions. Includes event inputs/outputs and variable declarations for precise functionality. v .
1 parent d47a5ab commit 98e25d7

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FBType Name="F_LOWER_BOUND" Comment="Returns the lower bound of the dimension of the given array">
3+
<Identification Standard="61131-3" Description="Copyright (c) 2026 Demmler Andreas Fahrzeugbau&#10; &#10;This program and the accompanying materials are made&#10;available under the terms of the Eclipse Public License 2.0&#10;which is available at https://www.eclipse.org/legal/epl-2.0/&#10;&#10;SPDX-License-Identifier: EPL-2.0">
4+
</Identification>
5+
<VersionInfo Organization="Demmler Andreas Fahrzeugbau" Version="1.0" Author="Franz Höpfinger" Date="2026-01-23" Remarks="Initial Implementation">
6+
</VersionInfo>
7+
<CompilerInfo packageName="iec61131::selection">
8+
</CompilerInfo>
9+
<InterfaceList>
10+
<EventInputs>
11+
<Event Name="REQ" Type="Event" Comment="Service Request">
12+
<With Var="ARR"/>
13+
<With Var="DIM"/>
14+
</Event>
15+
</EventInputs>
16+
<EventOutputs>
17+
<Event Name="CNF" Type="Event" Comment="Confirmation of Requested Service">
18+
<With Var="OUT"/>
19+
</Event>
20+
</EventOutputs>
21+
<InputVars>
22+
<VarDeclaration Name="ARR" Type="ANY_DERIVED" Comment="input array"/>
23+
<VarDeclaration Name="DIM" Type="ANY_INT" Comment="Dimension, 1-based" InitialValue="UDINT#1"/>
24+
</InputVars>
25+
<OutputVars>
26+
<VarDeclaration Name="OUT" Type="ANY_INT" Comment="lowest index of the Dimension"/>
27+
</OutputVars>
28+
</InterfaceList>
29+
<Attribute Name="eclipse4diac::core::TypeHash" Value="''"/>
30+
</FBType>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FBType Name="F_UPPER_BOUND" Comment="Returns the upper bound of the dimension of the given array">
3+
<Identification Standard="61131-3" Description="Copyright (c) 2026 Demmler Andreas Fahrzeugbau&#10; &#10;This program and the accompanying materials are made&#10;available under the terms of the Eclipse Public License 2.0&#10;which is available at https://www.eclipse.org/legal/epl-2.0/&#10;&#10;SPDX-License-Identifier: EPL-2.0">
4+
</Identification>
5+
<VersionInfo Organization="Demmler Andreas Fahrzeugbau" Version="1.0" Author="Franz Höpfinger" Date="2026-01-23" Remarks="Initial Implementation">
6+
</VersionInfo>
7+
<CompilerInfo packageName="iec61131::selection">
8+
</CompilerInfo>
9+
<InterfaceList>
10+
<EventInputs>
11+
<Event Name="REQ" Type="Event" Comment="Service Request">
12+
<With Var="ARR"/>
13+
<With Var="DIM"/>
14+
</Event>
15+
</EventInputs>
16+
<EventOutputs>
17+
<Event Name="CNF" Type="Event" Comment="Confirmation of Requested Service">
18+
<With Var="OUT"/>
19+
</Event>
20+
</EventOutputs>
21+
<InputVars>
22+
<VarDeclaration Name="ARR" Type="ANY_DERIVED" Comment="input array"/>
23+
<VarDeclaration Name="DIM" Type="ANY_INT" Comment="Dimension, 1-based" InitialValue="UDINT#1"/>
24+
</InputVars>
25+
<OutputVars>
26+
<VarDeclaration Name="OUT" Type="ANY_INT" Comment="highest index of the Dimension"/>
27+
</OutputVars>
28+
</InterfaceList>
29+
<Attribute Name="eclipse4diac::core::TypeHash" Value="''"/>
30+
</FBType>

0 commit comments

Comments
 (0)