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

  1. Stefan Svanbäck
  2. PLCnext Technology & PLCnext Controls
  3. Monday, 29 March 2021
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
Accepted Answer
Oliver PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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...
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Stefan Svanbäck Accepted Answer Pending Moderation
0
Votes
Undo
Ok,

So you have to run .net core app outside the PLC then?

/Stefan
Stefan Svanbäck Accepted Answer Pending Moderation
0
Votes
Undo
Thanks for the explanation and the replies.

/Stefan
  • Page :
  • 1


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