Troubleshooting datatype mismatch error when adding Modbus Master dB to mb_db port during TIA v17 implementation

Question:

I encountered an issue when attempting to add the Modbus Master dB name in the mb_db port of the Modbus comm load during TIA v17 implementation. The error displayed indicates a mismatch in datatype, which is puzzling to me. Most tutorials suggest that adding the master block to the mb dB is possible, but I am facing an error in my case. Any assistance in resolving this issue would be greatly appreciated.

Top Replies

While I have not utilized the library block before, it seems like you have successfully identified the issue at hand with the error message "data type does not match." To resolve this, consider what the correct data type should be and compare it with the current data type being used. Best of luck in resolving this issue!

To access the MB_DB element within the DB instance, you must establish a connection.

In order to resolve the issue, connect to the MB_DB element within the DB instance. Thank you for your help, brother. Issue solved.

Enggshab expressed gratitude to their brother for resolving a previous issue, which involved connecting to the MB_DB element in the instance DB. However, they are currently encountering a new problem - they are not receiving any signal despite no errors being reported. The status displays #7000 and 7002 when the request bit is set to 1. Enggshab verified that data is being received from the field by checking with modscan. They observed the Tx blinking on the cm module, but the Rx led remains off.

It sounds like you might be dealing with a type inconsistency between your master block and the mb_db. I recommend double checking the specified data type in your master block and compare it to your mb_db. Remember, in Modbus communication including TIA v17, even slight variances between datatypes can trigger error messages. If that doesn't work, maybe try recreating the db, sometimes an unseen corruption can occur. Hope this helps!

It sounds like your issue could be arising from trying to link your DB to your Modbus in a different instance data block (IDB). The Modbus Master needs to be in the same IDB as your DB. Alternatively, you could be trying to link a non-existent DB or there could be inconsistencies in your data format (you might be using a real instead of an int, or vice versa). I'd recommend double-checking all of these details in your TIA programming environment.

It sounds like you could be dealing with an incompatibility issue. TIA Portal sometimes has specific requirements for the order in which different blocks are created or added. Try creating and configuring the Modbus Master block first before adding it to the mb_db port, if you haven't done so already. Additionally, ensure that the data types of all variables in the DB match those in the Modbus Master. If you're still encountering the problem, I'd recommend contacting Siemens' support team - they're usually quite helpful with these types of issues.

It sounds like you’re running into a common datatype mismatch issue that can be tricky to troubleshoot. Double-check that the datatype of your Modbus Master block aligns precisely with what the mb_db port expects; even small discrepancies, like float vs. integer, can cause errors. Additionally, ensure that your Modbus Master block parameters are configured correctly and that there aren’t any conflicting types in the declaration. Sometimes, re-creating the block from scratch can also help clarify the issue if you're stuck. Good luck, and I hope you sort it out soon!

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. Why am I getting a datatype mismatch error when adding a Modbus Master dB to the mb_db port in TIA v17 implementation?

Answer: Answer: The datatype mismatch error occurs when there is an inconsistency in the data types being used. This could be due to incompatible data types between the Modbus Master dB and the mb_db port configuration.

FAQ: 2. Are there specific steps to follow when adding a Modbus Master dB to the mb_db port in TIA v17?

Answer: Answer: Yes, there are specific steps to ensure compatibility between the Modbus Master dB and the mb_db port. Following the correct configuration and data type settings is crucial to avoid datatype mismatch errors.

FAQ: 3. How can I troubleshoot and resolve the datatype mismatch error in TIA v17 when adding a Modbus Master dB?

Answer: Answer: To troubleshoot and resolve the error, you can double-check the data types used in the Modbus Master dB and the mb_db port settings. Ensure that they match and are compatible with each other to avoid datatype mismatch issues. You may also refer to the TIA v17 documentation for guidance on resolving such errors.

FAQ: 4. Is adding a master block to the mb_db port common in TIA v17 implementation, despite encountering errors?

Answer: Answer: Yes, adding a master block to the mb_db port is a common practice in TIA v17 implementation for Modbus communication. While errors like

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