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

  1. rrpsys
  2. PLCnext Technology & PLCnext Controls
  3. Monday, 19 July 2021
Dear Sir/Madam,

I have a C++ code written to be used for Arduino. It's a very simple PID controller to be used for Cortex M4. I have a PLCnext 2152 and I need to program it with my C++ code using eclipse. My code, like a normal C++ code, has a header and function files (.cpp as well as .hpp). I was wondering to know if it's possible to use the code and compile it for use in my PLC? If yes, what is the instruction to use my code in Eclipse plugin?
Oliver PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
Hello rrpsys,
that depends if all the libraries you are using are already included in our SDK.
If not you will have to check if its possible to add them or if there are any conflicts with existing libraries.

You can try to simply include the header and CPP files in a eclipse plcnext project.
You will probably have to modify it so, that instead of a main() class you will be using a thread that is executing the code of your arduino.

Also note that using PINOUTS like on an arduino is not supported with a PLCnext Controll.
You have to go through GDS Variables and use some kind of bus AXIO, Inline, PN etc.

kind regards,
Oliver
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  • Page :
  • 1


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