Problem with PlcProgramBrowseAsync with Struct[] #74
micheleBridi
started this conversation in
General
Replies: 1 comment 9 replies
-
I managed to browse the entire datablock, the error was that it also passed the name of the array to the browse function. However, the navigation function returns the two variables Start and End but their address is always 0 for start and 8 for end, both for AlarmsTime[0] and for AlarmsTime[1],AlarmsTime[2]AlarmsTime[3],... |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make the browser of a datablock 42, its structure is this:
But when I try to browse AlarmsTime of type struct[] I get this error:
The dimensions and edges of the array-indexes do not match the typeinformation of the plc. Did you provide a (correct) index?
the code I'm using is this:
`
public async Task PlcProgramBrowse()
{
try
{
var allMyPlcProgramBlocks = (await requestHandler.PlcProgramBrowseAsync(ApiPlcProgramBrowseMode.Children)).Result;
}
public async Task RetrieveInfo(ApiPlcProgramData block)
{
try
{
if (block.Has_children ?? false)
{
var items = (await requestHandler.PlcProgramBrowseAsync(ApiPlcProgramBrowseMode.Children, block)).Result;
break;
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
public List GetFather(ApiPlcProgramData myPlcProgramDataBlock)
{
var result = new List();
}
`
Beta Was this translation helpful? Give feedback.
All reactions