Troubleshooting Compile Error in TIA Portal V17 with S7-1200 for Stepper Motor Control

Question:

Hello everyone, I am currently working on a project utilizing an S7-1200 and TIA Portal V17 for stepper motor control of an SMD23E2 motor. I have been implementing a library of function blocks and tags from AMCI's website. The website provides a variety of resources for integrated stepper motor controller drives that are commonly used in automation projects. As of now, I have developed a basic program with functionalities such as home, relative move, and jog commands. However, when attempting to compile the program for uploading, I encountered an error message stating "Block ____ that is accessed has not been compiled." Unfortunately, no further information was provided to explain the issue. I noticed that the sample projects available from AMCI are tailored for an S7-1500, specifically the 1516-3 CPU. Could this be a possible compatibility issue with the CPU? This is the only explanation I can come up with at the moment. For reference, a screenshot of the error message is included below. Any insights or guidance on resolving this issue would be greatly appreciated. Thank you.

Top Replies

To compile specific PLC_1 modules in your project, simply right-click on it in the Project Tree and select the [Compile ...] option. Choose from "only changes", "rebuild all", or "rebuild all blocks" to compile the desired modules. Keep in mind that if you've asked the compiler to only compile the OB1 block, it may not recognize the data blocks (such as AMCI_...) referenced in OB1.

Drbitboy shared a helpful tip: To compile your PLC program in TIA Portal, simply right-click on PLC_1 in the Project Tree on the left, select [Compile ...], and choose one of the available [Software ...] options such as "only changes," "rebuild all," or "rebuild all blocks." It's important to note that when compiling, the compiler needs to have information about all the data blocks (e.g. AMCI_...) used by the OB1 block you want to compile. The compile button in the toolbar is context sensitive, meaning it will only compile the highlighted object (or the last active object). For instance, if Main [OB1] is highlighted in the Project Tree like in your screenshot, the compiler will only compile that specific block. Pay attention to the wording of your compile results to ensure everything was compiled correctly.

If you encounter the error mentioned, it could be due to errors in your database. One possible reason is leaving a "STRUCT" blank, intending to return later to fill it in. When attempting to Compile -> Software (rebuild all), this error may arise, ultimately directing you to the problematic block in the database.

In order to compile your PLC program, right-click on PLC_1 in the Project Tree and select the option to [Compile ...]. You can choose from one of the [Software ...] options such as "only changes," "rebuild all," or "rebuild all blocks." It's important to note that if you're focusing on compiling just the OB1 block, the compiler may not recognize the data blocks (AMCI_...) linked to OB1. Remember to expand your project for successful compilation. Thank you for your guidance, drbitboy.

Hi there! I've encountered similar issues while working with TIA Portal. Sometimes, it could be as simple as a programming error. Try checking if the block that is indicating the error in your program has been properly declared and implemented. Another thing is there could definitely be a compatibility issue as the sample programs are designed for the S7-1500. Perhaps it may be worth investing time in comparing the user manuals for the S7-1200 and S7-1500 to identify any discrepancies in their programming structure. If this doesn't clear up the problem, consider reaching out to AMCI's support. They could provide more specific insights since the libraries are from their site. Don't forget to share your findings here. Good luck!

Hi there, it's impressive that you've progressed so far in your project! The error could indeed be due to incompatibility. The S7-1200 and S7-1500 are drastically different in terms of capabilities and programming methodologies. Try rechecking the AMCI library to see if there are dedicated function blocks or resources specifically for an S7-1200. Additionally, you could also consider revisiting the program’s structure in TIA Portal, ensuring each block referenced is compiled without errors. You can do this manually by right-clicking each individual block and selecting "Compile". Remember, the sequence is as important as the process itself. Lastly, try to reach out to AMCI's support team– they might have encountered this issue before and could provide a fix or workaround. Keep pushing, you're almost there!

Hey there, it does sound like you're dealing with a compatibility error between the S7-1200 and the AMCI function blocks designed for the S7-1500 CPU. If possible, I'd recommend running your project using the same platform as the AMCI sample projects. Another aspect I'd suggest scrutinizing is the firmware version of your S7-1200 CPU. Compatibility issues might arise if there's a mismatch with the requirements of the AMCI function blocks. Also, ensure all blocks that you've used in your project are properly defined and compiled. A missing or improperly compiled block could throw that kind of error. Lastly, try reaching out to the AMCI technical support, they may have insights into marrying their software with different hardware setups. Good luck!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. What could be the possible cause of the compile error message "Block ____ that is accessed has not been compiled" in TIA Portal V17 when working with an S7-1200 for stepper motor control?

Answer: Answer: The error message might indicate that a required block has not been compiled, possibly due to missing or incomplete function blocks or tags in the project. It is essential to ensure all necessary components are properly integrated and compiled.

FAQ: 2. How can I troubleshoot a compile error in TIA Portal V17 when using AMCI's resources for stepper motor control with an S7-1200?

Answer: Answer: Verify the compatibility of the provided resources from AMCI with the S7-1200 CPU model being used. Ensure that the function blocks and tags are correctly implemented and compiled for the specific hardware configuration.

FAQ: 3. Is the compatibility issue with the CPU, specifically using an S7-1200 instead of the S7-1500 referenced in the sample projects from AMCI, a likely reason for encountering compile errors?

Answer: Answer: Incompatibility between the sample projects designed for S7-1500 and the S7-1200 CPU could potentially lead to compile errors. It is recommended to adapt the code and configurations accordingly to suit the hardware being utilized.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’