We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18daafd + 4017078 commit c75bbd5Copy full SHA for c75bbd5
libEDSsharp/PDOHelper.cs
@@ -366,8 +366,13 @@ void build_PDOlist(UInt16 startIdx, List<PDOSlot> slots)
366
}
367
else
368
maptarget.entry = eds.ods[pdoindex].Getsubobject(pdosub);
369
-
370
- if ((maptarget.entry.prop.CO_disabled == false) &&
+ // Check if mapped sub index was found in OD
+ if (maptarget.entry == null)
371
+ {
372
+ Console.WriteLine("MAPPING FAILED, OBJEKT NOT FOUND");
373
+ continue;
374
+ }
375
+ else if ((maptarget.entry.prop.CO_disabled == false) &&
376
(datasize <= maptarget.entry.Sizeofdatatype()) &&
377
(datasize > 0))
378
{
0 commit comments