HJTrost Posted March 27, 2023 Posted March 27, 2023 I am trying to set up a project in Power Pmac IDE in preparing to migrate from Turbo Clipper to Power Clipper controllers. I have let the Power Pmac IDE set up a basic project, adding 2 .pmh files with parameter settings and preprocessor macro definitions and three script PLCs. I am still telling the IDE that there is no device and them build the solution anyway so I can weed out bugs. The IDE has taken my pmh files and loaded pp_proj.h in the "C Language\Include" directory with definitions derived from mine, and then turns around to say that there are errors galore of the type #define directive XXXXXXXX is already defined in the file pp_proj. Some of the XXXXXXX are taken from my #define statements like #define PValWrite p601 and are transformed into #define PValWrite pshm->P[601] enum globalP { ... ,PValWrite=601, ... #define PValWrite 601 where these three are weaved into a modestly complex #if #else #if #else #endif #endif like structure such that only one of the should be alive under any circumstance. I also get multiple declarations of functions that I did not knowingly ask for anywhere void SetEnumGlobalVar(enum globalP var, double data) This also appears three times wedged into the same #if #else #endif structure. I have manually parsed the pp_proj.h file and don't understand where the claim of duplication comes from. The full structure is outlined in the attached file. IDE-Bugstructure.txt Quote
HJTrost Posted March 28, 2023 Author Posted March 28, 2023 The problem is apparently more fundamental. Do the following in the Power PMAC IDE on your host computer: Start Power PMAC IDE 4. Tell it there is no device. Click on File -> New -> Project... In the New Project pop-up, select "PowerPMAC with Ethernet/IP", set a "Name", e.g., "PowerPMAC5", and click on "OK". Click on Build -> Build Solution. The following will appear on the Output tab: ------ Build started: Project: PowerPMAC5, Configuration: Debug Any CPU ------ Please wait while Executing Project Script. Please wait while mapping Power PMAC variables. End of synchronizing the Database. Power PMAC variables mapped successfully. Error occurred while building. Project Building and Mapping total time = 4.811 sec ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ========== In the Solution Explorer window, expand "C Language", then "Include", and click on "pp_proj.h". This file will be displayed in the source window and as soon as you start to scroll down through it, the red marks for errors show up, with the errors saying #define directive XXXXXXXXXXX is already defined in the file pp_proj.h There are 36 of these, and there are also 12 warnings saying Variable YYYYYYYYYY is already defined in this scope. These warnings have also been seen by other people, like here: https://forums.automation.omron.com/topic/6347-unable-to-navigate-to-error/#comment-27257 I have originally used the IDE version 4.5.2.9 and am using now (freshly downloaded today) 4.6.0.14. The update made no difference whatsoever. What do I need to do to get around these bugs? Quote
steve.milici Posted March 29, 2023 Posted March 29, 2023 These are not “actual” errors in pp_proj.h. The syntax checking of the editor does not evaluate the preprocessor “#if ...#else ... #endif” directives. It only does “C” syntax checking. This is why you are seeing many red underlines indicating “errors”. Note that this file is automatically generated by the IDE’s compiler manager; it is considered an “internal” file not to be edited by the user. It contains many other definitions and declarations needed by the compiler, not necessarily from your code. Any “real” errors found in your code will be displayed in the “Output” tab of the IDE. These will also be contained in the error logs of the “Log” folder. If you get an error in the “Output” tab, a mouse double-click will take you to the error in the file where it exists. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.