Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in BlockInterface Parsing. #84

Merged
merged 1 commit into from
Sep 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions LibNoDaveConnectionLibrary/PLCs/S7_xxx/MC7/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,10 @@ internal static S7DataRow GetInterface(byte[] interfaceBytes, byte[] startValueB
GetVarTypeEN(parameterRETVAL, DataType, false, false, VarNameGen.GetNextVarName(), interfaceBytes,ref InterfacePos, startValueBytes, ref StartValuePos, ref ParaList, ref StackNr, VarNameGen, myBlk);
}
break;
default:
{
throw new Exception(string.Format ("invalid or unknown interface declarations found while parsing the block interface at pos {0} with Paratype {1} and Datatype {2}",InterfacePos, interfaceBytes[InterfacePos +1], interfaceBytes[InterfacePos]));
}
}
}

Expand Down Expand Up @@ -859,8 +863,9 @@ internal static void GetVarTypeEN(S7DataRow currPar, S7DataRowType datatype, bo
break;

default:
System.Diagnostics.Trace.WriteLine("Found unknown Datatype while parsing an Interface:" + Convert.ToString(datatype) + ")");
break;
{
throw new Exception(string.Format("invalid or unknown interface declarations found while parsing the block interface at pos {0} with Paratype {1} and Datatype {2}", InterfacePos, interfaceBytes[InterfacePos + 1], interfaceBytes[InterfacePos]));
}
}

ParaList.Add(VarName);
Expand Down