Hello everyone! I am currently exploring the use of Wago's inbuilt functions for querying a MySQL database. However, I am encountering an error when I attempt to compile a project that utilizes these functions. The error seems to be related to a issue within the library itself, as indicated by the error messages: "C0032: Unable to convert the type 'POINTER TO BYTE' to 'UDINT'" and "C0032: Unable to convert the type 'UDINT' to 'POINTER TO BYTE'". Clicking on these errors directs you to the library manager. Has anyone successfully resolved a similar issue with Codesys before? Thank you for your assistance in advance!
To improve code quality and potentially catch compile errors, consider initializing input variables in the declaration statement. For example, try setting the variables for VARfbSQL_Login as follows: WagoAppSQL_MySQL.fbMySql_Login() := (sHost:='192.168.50.50', uiPort:=3306,.....);END_VAR. This small adjustment could help in identifying any potential issues before running the code.
When attempting to avoid compile errors, it is recommended to initialize input variables in the declaration phase. For example, try initializing the VARfbSQL_Login with the WagoAppSQL_MySQL.fbMySql_Login() module by setting parameters such as sHost to '192.168.50.50' and uiPort to 3306. However, despite these efforts, the same error persists.
Consider excluding the oStatus mapping and any output mapping in your declaration. Instead, focus solely on the inputs. Remember to manually trigger the function after initiating the PLC. This adjustment can streamline the process and potentially optimize the performance of your system.
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: These errors typically indicate a type conversion issue within the library itself or in the way it is being used within the CODESYS project. It may require troubleshooting and potentially modifying the library or the project code to resolve these type conversion conflicts.
Answer: Answer: To resolve errors related to Wago's MySQL library in CODESYS, you can try checking for any updates or patches for the library, ensuring compatibility with your CODESYS version, reviewing the library documentation for any specific requirements, and reaching out to the Wago support community for assistance.
Answer: Answer: Yes, there are cases where users have successfully resolved issues with Wago's MySQL library in CODESYS. It often involves thorough debugging, understanding the library's functionality and limitations, and seeking help from forums or support resources to address specific errors or compatibility issues.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.