Skip to content

Commit 21a0648

Browse files
committed
Allow arrays of anything which has a relation id (e.g. Array of FB)
1 parent de194c9 commit 21a0648

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/S7CommPlusDriver/ClientApi/Browser.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,9 @@ private void AddSubNodes(ref Node node, PObject o)
172172
// Die Zugriffs-ID beginnt hier immer bei 0, unabhängig von Lowerbounds
173173
for (uint i = 0; i < ArrayElementCount; i++)
174174
{
175-
// Struct Array gesondert behandeln/kennzeichnen. Hier ist noch eine zusätzliche ID hinter Array Index
175+
// Struct/FB Array gesondert behandeln/kennzeichnen. Hier ist noch eine zusätzliche ID hinter Array Index
176176
// und Zugriffs-LID vorhanden.
177-
178-
if (vte.Softdatatype == Softdatatype.S7COMMP_SOFTDATATYPE_STRUCT)
177+
if (vte.OffsetInfoType.HasRelation())
179178
{
180179
var arraynode = new Node
181180
{
@@ -252,7 +251,7 @@ private void AddSubNodes(ref Node node, PObject o)
252251
}
253252
}
254253

255-
if (vte.Softdatatype == Softdatatype.S7COMMP_SOFTDATATYPE_STRUCT)
254+
if (vte.OffsetInfoType.HasRelation())
256255
{
257256
var arraynode = new Node
258257
{

0 commit comments

Comments
 (0)