C# function read json

Hi, Is it possible to use JSON.Net in a C# created function or function block? I have read the supported functions in plcnext info center but I can’t find any support. Best regards Stefan

No, when targeting the embedded CLR, it is only possible to use the classes supported by the eCLR: https://www.plcnext.help/te/Programming/Csharp/Csharp_Supported_functions.htm At the moment this does not include classes for JSON handling. There is an IEC 61131 library in the PLCnext Store for JSON handling, otherwise it is also possible to do JSON handling in a .NET Core app or in another language. ~ Martin.

Ok, So you have to run .net core app outside the PLC then? /Stefan

Hello Stefan, you could use the PLCnext Base Shell command to execute a .Net core binary. https://www.plcnext-community.net/en/hn-makers-blog/616-how-to-create-a-simple-plcnext-console-application-in-c.html If you need nuget features or .Net Functions that are not included in the https://www.plcnext.help/te/Programming/Csharp/Csharp_Supported_functions.htm Our Csharp implementation is limited to those functions that are usefull in a RealTime environment and come with some restraints to ensure the operation of the RealTime. Such as limits on memory etc…

grafik.png
grafik.png

Thanks for the explanation and the replies. /Stefan