Jump to content

Handling Warning F0189 in GX Works2: Converting Integers to Strings with INT_TO_STR and DINT_TO_STR Functions


Recommended Posts

Posted

Hello everyone,

I'm currently working with Mitsubishi GX Works2 and encountered a warning during compilation:MrPLC.com

Warning F0189: "In 'INT_TO_STR', set the ASCII code that ends with NUL(00H) code to the output destination only when SM701 is OFF."

This warning also appears for the DINT_TO_STR function.

Context:

I'm using the INT_TO_STR and DINT_TO_STR functions to convert integer values to strings within my program. However, upon compilation, I receive the aforementioned warning.

Questions:

Understanding the Warning: Could someone please explain why this warning occurs and what potential issues might arise if these functions are used when SM701 is ON (RUN mode)?

Best Practices: What are the recommended practices to handle string conversions in GX Works2 to avoid this warning?

Alternative Methods: Are there alternative functions or approaches that can be used for converting integers to strings without triggering this warning?


Posted (edited)

Never actually done a int to string but those warnings are just that, providing the conversion is as you expect you can suppress warnings or just ignore them in most cases

In the options tab you can ignore warnings by entering the code

If SM701 is not true then H00 is stored at the end if true then it is ignored, I think this only applies to communications for for special output instructions.

 

 

image.png

 

Edited by Parky

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...