How to Set up Profinet Communication between Siemens S7-1200 and Codesys PLC

Question:

Hello everyone, I am currently working on setting up communication over Profinet between a Siemens S7-1200 PLC as an IO device and a Codesys PLC as an IO controller. Unfortunately, I am encountering an error regarding IO device failure. I would greatly appreciate any assistance on how to successfully establish this communication. Thank you in advance for your help.

Top Replies

Share images showcasing your progress thus far.

Raghu_k inquired about establishing communication over Profinet between a Siemens S7-1200 PLC as an IO device and a Codesys PLC as an IO controller. Despite encountering an IO device failure error, Raghu_k seeks assistance in the communication setup process. To resolve this issue, it is recommended to export the GSD/GSDML file from TIA Portal and import it into the Codesys IO Controller project. This action can help troubleshoot any configuration errors on the IO Controller side. Ensure that the Profinet settings of the S7-1200 controller are correctly configured: - Access the PROFINET interface in the controller properties and navigate to Operating Mode settings. - Confirm that the Operating Mode is set to "IO device." - Establish transfer areas (data map) as needed. - Look for the Export button in the settings to obtain the GSD file. Additionally, it is crucial to adjust the Real Time settings in the Operating Mode. Specifically, set the "IO Controllers outside the project with access to this I-Device" option to 1 or more to allow connections to IO Controllers outside the TIA Portal project. According to the TIA Portal help file, when configuring shared devices, it is important to set the number of project-external IO controllers at the PROFINET interface for proper communication load calculation and update times. Remember that the maximum permissible number of IO controllers for the shared device can be found in the GSD file of the device.

Thank you for the responses. It is recommended to ensure that the S7-1200 controller Profinet settings are correctly configured for optimal performance. This can be achieved by navigating to the controller properties and accessing the PROFINET interface, specifically the Operating Mode settings. Make sure to set the Operating Mode to "IO device" and configure the transfer areas (data map) accordingly. Additionally, don't forget to use the Export button to obtain the GSD file. In the Real Time settings of Operating Mode, there is an option to enable "IO Controllers outside the project with access to this I-Device". It is crucial to set this option to 1 or more to allow connections to IO Controllers outside the TIA Portal project. Despite following these steps, if you encounter the IO device failure error and the PLC is in an error state, please refer to the attached screenshots for clarity. Furthermore, after importing the GSD file from Siemens TIA Portal, you may encounter an RPC Blocked error on the IO controller side, potentially due to firewall settings. The attached screenshots provide more information on this issue. If you are still experiencing communication issues, please let us know the additional configurations required for successful communication.

Hello Raghu_k, as CoDeSys is the Profinet controller, it is important to ensure that the configuration is set up correctly on the controller's side and to investigate any error messages being reported by CoDeSys. If possible, connecting to CoDeSys using a VNC client to run Wireshark and obtain traces could offer further clarity and insights into the issue you are experiencing. This detailed analysis of the configuration and error reporting in CoDeSys will help in troubleshooting the problem effectively.

kdcui suggested referring to the TIA Portal help file for valuable insights on Shared Devices. Hi kdcui, could you please clarify why you recommended raghu_k to explore the "Shared Devices" documentation? The specific requirement for this scenario involves utilizing the S7-1200 as an "i-device" and CoDeSys as a Profinet IO controller. It is important to note that the S7-1200 and CoDeSys will not function simultaneously as controllers, where a third device would need to communicate with both. If there are any misunderstandings, please let me know.

Have you bothered to check your device names yet? I can recall having a somewhat similar issue before and the problem was that the device names on both ends were not identical. Make sure that in both the Codesys PLC and Siemens S7, the device names are exactly the same, with every detail including uppercase and lowercase characters. You might also want to recheck your GSD file and ensure that it's uploaded correctly to your Codesys project. Let me know if you've already done this and are still having issues, we can then troubleshoot further.

Hey there, it sounds like you're having quite a headache. Initially, I'd suggest double checking your network configuration; ensuring all IP addresses, subnet masks, and gateway settings are correctly configured on both sides. Additionally, you might want to review your Profinet GSD (General Station Description) files to confirm they match the hardware you're working with. Have you tried changing the Profinet device name on the Siemens PLC for testing? Sometimes, a fresh pairing can solve the issue. Lastly, there could be a chance of patch software/ firmware discrepancy, so it might be worth making sure that both PLCs are updated. Good luck, and let us know how it goes!

Hey there! It sounds like you've run into a common hurdle. Firstly, ensure that you've correctly assigned Profinet device names for both PLCs, as each device in a Profinet network requires a unique name. Also try updating the firmware of your Siemens S7-1200 PLC to the latest version - they often fix minor bugs and improve compatibility this way. If the error persists, you might want to double-check the communication parameters in the Codesys PLC, and try to match them with the Siemens S7-1200 to avoid any mismatch. Hope this helps!

Hey there, it sounds like you're dealing with a tricky issue. When configuring Profinet communication, a common issue could be the subnet configuration on both PLCs - they should match. You could also check whether the latest GSD files are loaded for the Siemens PLC. Additionally, Codesys has detailed diagnostic tools that you can use to pinpoint the exact cause of the IO device failure. Don't forget to double-check the addresses as well - they'll need to be correct on both IO controller and device. Hope this helps, let us know how you get on!

Hey! It sounds like you're facing a tricky issue with your Profinet setup. One thing to double-check is that both devices are on the same subnet and that their IP addresses are correctly configured. Also, ensure that the Codesys PLC is set to communicate with the S7-1200 as an IO device by correctly mapping the I/O configuration in both PLCs. Sometimes, a firmware update or reboot can resolve communication glitches too. If the error persists, reviewing the Profinet diagnostics in both environments might give you more insight into what's going wrong. 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 causing the IO device failure error when setting up Profinet communication between Siemens S7-1200 and Codesys PLC?

Answer: - The IO device failure error could be due to incorrect configuration settings, mismatch in Profinet device parameters, or network communication issues.

FAQ: 2. How can I troubleshoot the IO device failure error in Profinet communication between Siemens S7-1200 and Codesys PLC?

Answer: - You can troubleshoot by checking the Profinet configuration settings on both PLCs, ensuring proper addressing and device parameters, verifying network connectivity, and analyzing error logs for more specific information.

FAQ: 3. Are there any specific compatibility issues to be aware of when establishing Profinet communication between Siemens S7-1200 and Codesys PLC?

Answer: - It's important to ensure that both PLCs support Profinet communication and that the firmware versions are compatible. Additionally, verifying the Profinet device profiles and ensuring proper configuration is crucial for successful communication.

FAQ: 4. What are the key steps involved in setting up Profinet communication between Siemens S7-1200 and Codesys PLC?

Answer: - The key steps include configuring the Profinet parameters on both PLCs, setting up the IO device and controller roles, establishing network connections, and testing the communication to ensure proper functionality.

FAQ: 5. Where can I find detailed guides or resources to help me set up Profinet communication between Siemens S7-1200 and Codesys PLC?

Answer: - You can refer to

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  â†’