Hi all,
When I try to run a PLM C++ project on the AXCF 3152 simulation environment, the PLC goes into a fail state the moment the project is done uploading. (The RUN LED flashes green and the FAIL LED turns on)
When I upload the same project to a physical AXCF 3152 it works fine, as well as when uploading to the AXCF 2152 simulation.
The AXCF 3152 simulation does not enter a fail state when I remove the C++ component from my PLCNext Engineer project.
After the upload, the following message can be seen in the Online Log of the controller Any help would be appreciated
Hi Erhard,
can you check the Notification Logger in PLCnext Engineer? It displays the PLCs (also simulations) log file. Maybe the error message contained in the log helps to understand what’s wrong.
Hi Erhard,</p>can you check the Notification Logger in PLCnext Engineer? It displays the PLCs (also simulations) log file. Maybe the error message contained in the log helps to understand what’s wrong.</p>[https://forum.plcnext-community.net/uploads/DFCNT3D9X0BO/image.png</a></p>Best regards</p>DivisionByZero</p>
Hi DivisionByZero
Here is the output of the Notification Logger image.pngThere does not seem to be an error, only warnings and info.
I see the firmware version of the simulation is 2023.0.4 and the version of the SDK I’m using is 2023.0.2. Maybe there is a compatibility issue between the two versions?
I see the firmware version of the simulation is 2023.0.4 and the version of the SDK I’m using is 2023.0.2. Maybe there is a compatibility issue between the two versions?There shouldn’t be a difference between these two versions that would cause a crash like this.
The simulated controller does not include all the features of the physical controller, and that might be the root cause of the issue in this case.
There may be more information in this file on the simulated controller:
/opt/plcnext/logs/Output.log
If not, then it would be interesting to know if a minimum C++ program also displays the same behaviour and, if not, what part of the C++ program is causing this issue.
[https://forum.plcnext-community.net/discussion/comment/13648#Comment_13648</a></p>Hi DivisionByZero</p>Here is the output of the Notification Logger</p>[https://forum.plcnext-community.net/uploads/C69IA64WB89U/image.png</a></p>There does not seem to be an error, only warnings and info. </p>I see the firmware version of the simulation is 2023.0.4 and the version of the SDK I’m using is 2023.0.2. Maybe there is a compatibility issue between the two versions?</p>
I compiled the project with SDK version 2022.0.5 and it seems to be running fine now. I think SDK V2023.0.2 is not compatible with FW V2023.0.4, or I broke my SDK installation somehow. However, reinstalling it does not fix the issue.
I see the firmware version of the simulation is 2023.0.4 and the version of the SDK I’m using is 2023.0.2. Maybe there is a compatibility issue between the two versions?</p>There shouldn’t be a difference between these two versions that would cause a crash like this.</p>The simulated controller does not include all the features of the physical controller, and that might be the root cause of the issue in this case.</p>There may be more information in this file on the simulated controller:</p>/opt/plcnext/logs/Output.log</p>If not, then it would be interesting to know if a **minimum </strong> C++ program also displays the same behaviour and, if not, what part of the C++ program is causing this issue.</p>
Hi Martin,
Here is the process I followed to create a minimum C++ project. image.pngimage.pngimage.pngimage.pngimage.pngAfter this I created a new PLCNext Engineer (V2024.6) project and added the library and component. image.pngAfter compiling and uploading the simulation still crashes.
Here is the output of the log file after trying to upload image.png
Ok, that screen shot helps a lot, thanks.
It turns out that this problem is known, and it was discussed here: Forum - PLCnext CommunityPLCnext Technology from Phoenix Contact is a unique, open ecosystem for modern automation that is capable of meeting all the challenges of the IoT world. You can see from that other discussion that (a) this will be fixed in Simulation version 2024.0 (if/when that appears), and (b) a work-around can be applied by editing the CMakeLists.txt file to exclude the Profibus library from the build.
I don’t know why this is not mentioned in the list of known issues in the PLCnext Info Center. I will ask for this to be added.
Ok, that screen shot helps a lot, thanks.</p>It turns out that this problem is known, and it was discussed here:</p>[https://www.plcnext-community.net/forum/#/discussion/3429/plcnext-simulation-issues-with-missing-libarp-io-profibus-so-with-axcf3152-2023-lts-simulation</a></p>You can see from that other discussion that (a) this will be fixed in Simulation version 2024.0 (if/when that appears), and (b) a work-around can be applied by editing the CMakeLists.txt file to exclude the Profibus library from the build.</p>I don’t know why this is not mentioned in the list of known issues in the PLCnext Info Center. I will ask for this to be added.</p>
The simulation is running fine again after applying the workaround.
Thank you Martin.