PLCnext Engineer Crash often and problems with Ports when saving as uncompressed archive

Hi, PLCnext team 1. I have the 2020.0 version of PLCnext engineer. Somehow this software doesn’t seem very stable. I have in the past 2 weeks had 10+ crashes and mostly when changing ports (adding, deleting, renaming) in my c++ program and then going to PLCnext engineer to connect them to different programs/HMI block etc. I have also had a crash when restarting PLC by using the on/off switch. Is the above something you are aware of ? and working on fixing? Will it help me to go back to 2019.9 ? 2. Besides the above, I then tried to save the project as an uncompressed structure to be able to see in the *.XML files what is going on when I connect/disconnect ports. In the uncompressed format, I am simply not able to connect 3 of my ports that are using float32[5] array. In the compressed format, it is working perfectly + on the PLC. I have done nothing but saves an uncompressed archive I get the following warning from PLCnext engineer “DL0002: Invalid port connection! Please disconnect to remove invalid port (“controller_comp1 / controller_prog1 : Current.data”).” 3. When building my c++ project in eclipse I get the following warning from every Input/Ouput port when building. How can fix this warning. Its annoying when getting for each build. controllerLibrary.meta.cpp:14:113: warning: offsetof within non-standard-layout type ‘controller::controller_prog’ is conditionally-supported [-Winvalid-offsetof]controllerLibrary.meta.cpp:14:113: warning: offsetof within non-standard-layout type ‘controller::controller_prog’ is conditionally-supported [-Winvalid-offsetof][cmake]: static const FieldDefinition controller_controller_prog_in_current(“Current_sensor”, offsetof(::controller::controller_prog, in_current), DataType::Float32, “”, sizeof(float32), alignof(float32), { }, StandardAttribute::Input | StandardAttribute::Retain);

Hi Christian, We will look into points 1 and 2. For point 3, you can suppress these warnings using the -Wno-invalid-offsetof CMake parameter. ~ Martin.

Hi Martin, 1 + 2, sounds good that you will look into it, but were you already aware of the problems? 3. I will add that warning suppression. Could you just help with where to add this argument in Eclipse? I have one question I forgot related to the Input/Output ports in c++, let’s call it 4. I have the following. struct float_array { float32 data[5]; }; //#port //#port //#attributes(Input|Retain) //#name(Current_sensor) float_array in_current = 0; And the above work The dimension, 5 in this example, changes with my configuration/plant. But if I make 5 a variable like “const int array_size = 5 or #Define ARRAY_SIZE 5” The intermediate code generator doesn’t catch the 5 and makes it one-dimensionally. The problems is I have 20+ places where I need to exchange my 5 with another number whenever I want to change dimensions. Do you have a better solution then what I found?

Hi Christian, 1. Yes, you can see elsewhere in the Community that similar issues have been reported with PLCnext Engineer 2020.0. 2. This is the first I’ve heard of that problem, but I guess most people work with the (default) compressed format. It should be fairly easy to reproduce this from your description - we’ll let you know. 3. I think this parameter should be added to the build settings in the project properties window - see screen shot below. The exact text is: --configure -- -Wno-invalid-offsetof 4. No, I’m afraid that there is not a neat solution to this problem (sorry). The problem is discussed here. ================================= 10 01 2020 12 45 33

Hi, thanks for your replys. 3. i tested the “–configure – -Wno-invalid-offsetof” as you showed in the image. I can se the command is given to plcncli but it has no effect :frowning:. I still get all the warnings. cmd.exe /c ““C:\\Program Files\\PHOENIX CONTACT\\PLCnCLI_2020.0_LTS/plcncli.exe” build -p"G:/controller/controller” -b Release --configure – -Wno-invalid-offsetof"cmd.exe /c ““C:\\Program Files\\PHOENIX CONTACT\\PLCnCLI_2020.0_LTS/plcncli.exe” build -p"G:/controller/controller” -b Release --configure – -Wno-invalid-offsetof"Requested build for targets AXCF2152,20.0.0.24752Starting build for target AXCF2152,20.0.0.24752Checking if CMake needs to be reconfigured…Configuring CMake… 4. maybe you could do the precompile step and extract port infomation from that output, i think what would replace defines with number at the correct places ? Anyway im not into the details of how you create metadata, but please consider improving this. /Christian Veng

Hello Christian, the additional options as Martin supposed, are limited to cmake variables defined on the website https://cmake.org/cmake/help/v3.12/manual/cmake-variables.7.html To suppress the warning you have to add the following line to your project CMakeLists.txt

target_compile_options(NameOfYourLibrary PRIVATE $<$:-Wno-invalid-offsetof>) Replace NameOfYourLibrary with the name of your library. - Marcel

Hi Christian, I am really sorry for the delay getting back to you on this. On points 1 and 2 of your original post, please send PLCnext Engineer project(s) that demonstrate the errors to automation-service@phoenixcontact.com, or to the technical support people in your local Phoenix Contact subsidiary. Please include as much information as possible, for example:

                                               * a step by step discription of how to reproduce the error(s), with screenshots if possible.
                                               * stack trace information.

Apologies again for the delay. ~ Martin.