When I created a new project in CODESYS using the "Standard Project" template and then added a Visualization, I was receiving the C0138 error during compilation. This issue persisted even with a new, completely empty project.
A Quick and Effective Solution (My Method):
After many attempts, I solved the problem as follows:
From the File -> New Project menu, I selected the "HMI Project" template directly, instead of the "Standard Project" template. After creating the project with this template, I added my POUs, Tasks, and programs (e.g., Ladder, ST).
Using this method, the project compiled successfully without any errors.
So, my question is: are there any other solutions besides this method?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I created a new project in CODESYS using the "Standard Project" template and then added a Visualization, I was receiving the C0138 error during compilation. This issue persisted even with a new, completely empty project.
A Quick and Effective Solution (My Method):
After many attempts, I solved the problem as follows:
From the File -> New Project menu, I selected the "HMI Project" template directly, instead of the "Standard Project" template. After creating the project with this template, I added my POUs, Tasks, and programs (e.g., Ladder, ST).
Using this method, the project compiled successfully without any errors.
So, my question is: are there any other solutions besides this method?