Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Aug 25, 2024
2 parents c8079cd + 98bf5d4 commit 6932f37
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,24 @@ public Block GetBlock(ProjectBlockInfo blkInfo, S7ConvertingOptions myConvOpt)

FBStaticAccessConverter.ReplaceStaticAccess(retVal, prgFld, myConvOpt);

for (int i = 0; i < retVal.AWLCode.Count - 1; i++)
{
S7FunctionBlockRow akRw = (S7FunctionBlockRow)retVal.AWLCode[i];

if (akRw.CombineDBAccess)
{
S7FunctionBlockRow nRw = (S7FunctionBlockRow)retVal.AWLCode[i + 1];
if (!nRw.Parameter.Contains("["))
{
nRw.Parameter = akRw.Parameter + "." + nRw.Parameter;
nRw.MC7 = Helper.CombineByteArray(akRw.MC7, nRw.MC7);
nRw.Label = akRw.Label ?? nRw.Label;
retVal.AWLCode.RemoveAt(i + 1);
retVal.AWLCode[i] = nRw;
}
}
}

#region UseComments from Block
if (myConvOpt.UseComments)
{
Expand Down Expand Up @@ -800,24 +818,6 @@ public Block GetBlock(ProjectBlockInfo blkInfo, S7ConvertingOptions myConvOpt)
retVal.AWLCode = newAwlCode;
}
#endregion

for (int i = 0; i < retVal.AWLCode.Count - 1; i++)
{
S7FunctionBlockRow akRw = (S7FunctionBlockRow)retVal.AWLCode[i];

if (akRw.CombineDBAccess)
{
S7FunctionBlockRow nRw = (S7FunctionBlockRow)retVal.AWLCode[i + 1];
if (!nRw.Parameter.Contains("["))
{
nRw.Parameter = akRw.Parameter + "." + nRw.Parameter;
nRw.MC7 = Helper.CombineByteArray(akRw.MC7, nRw.MC7);
nRw.Label = akRw.Label ?? nRw.Label;
retVal.AWLCode.RemoveAt(i + 1);
retVal.AWLCode[i] = nRw;
}
}
}
}

retVal.Networks = NetWork.GetNetworksList(retVal);
Expand Down

0 comments on commit 6932f37

Please sign in to comment.