Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. Josh
  2. PLCnext Technology & PLCnext Controls
  3. Tuesday, 16 February 2021

Any idea on what could be causing this error?

"Error","","E1002: [PlcSequenceEngine]Abl.PlcSequenceEngine.SeqParser.Parse(System.String) IL_006F : emitting of cil code failed"

"Error","CILC0001","Error during generating native code."

Here's the function in question:

        public static Sequence Parse(string json) {

            var jRoot = JSONParser.Parse(json);


            var jSeqInfo = JSONParser.GetReqObj(jRoot, "Seq_Info");

            var jCommands = JSONParser.GetReqArr(jRoot, "Commands");


            return new Sequence(

                name: JSONParser.GetReqStr(jSeqInfo, "Seq_Name"),

                desc: JSONParser.GetReqStr(jSeqInfo, "Description"),

                commands: Funcs.Map(jCommands, j => ParseCommand(j))



Eduard PLCnext Team Accepted Answer Pending Moderation

Hello Josh,

the eror message is: "emitting of cil code failed". I assume you would like to use a .Net standard library for Json parsing. Generally it is possible to add external libraries/opensourcesoftware in the C# environment (as source code or .dll lib), but you have to note that the .Net standard is not supported and .Net Core is not installed on plcnext target (it is possible that the used functions according to .Net standart will be not supported/executed on plc). The PLCnext (eCLR) C # only contains/supports what actually in the eCLR-Programming-Reference.chm is described (also linked in the project). The description is available here:

As an alternative to PLCnext (eCLR) C #, the .NET Core Runtime can also be installed on the controller. Then you have the full C # functionality (according to the .NET Core version and the restrictions of a controller). But in this case you are completely in the non-realtime area and have to use e.g. OPC-UA as an interface, please see the overview graphic:

For fast solution, I would like to recommend you to use the JSON utility Library: .

Best Regards


<hr />
<p><strong>Phoenix Contact Electronics Headquarter</strong>&nbsp;- PLCnext Runtime Product Management and Support</p>
  • Page :
  • 1

There are no replies made for this post yet.
However, you are not allowed to reply to this post.