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

  1. nazirlouis38
  2. PLCnext Engineer
  3. Monday, 07 June 2021
I wrote a c++ program that cycles that uses 192 variables that are meant to be used to give information to the outputs of an I/O module ( I just want it to tell its correspending output to either be on or off/ true or false) how would I go about doing this. I already built the program in eclipse and added the library to my PLCnext engineer program.
Accepted Answer
Martin PLCnext Team Accepted Answer Pending Moderation
The C++ program will need to include at least one Output port variable containing the output data - e.g. one array of booleans, or separate boolean variables for each output point.
In the PLCnext Engineer project, you will need to manually connect each individual boolean from the C++ program instance to the corresponding Input port (digital output) on the I/O module.
It would also possible to create one C++ Output port variable (array of booleans) for each I/O module, and just make one port connection per I/O module, to the ~DO port on the module. But this is a very hardware-dependent solution, which would not be so easy to change if the hardware arrangement changed for any reason.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support

There are replies in this post but you are not allowed to view the replies from this post.