Jump to content

u90Ladder and Long Int


Recommended Posts

  • MVP 2014

In debugging some odd behaviour of the "Long Int" function in u90Ladder, I found that the use of constants as operands is a no-no. Even though SB82 is set prior to the function, if a constant is used as one of the operands, the result is only a 16-bit value. So, you must use MI values even if the value isn't gouing to change, and make sure that two MIs per value are allocated, even if the upper MI is zero.

It would be handly if this could be fixed, so a 16-bit constant was automatically padded with zeros to become a 32-bit value; but knowing the workaround is OK.

Link to comment
Share on other sites

Hello Simon,

You're 100% right - Special function "Long integer" operates only on MI. It doesn't accept constant numberts. This is not a bug - this si the way the function is operating and will not (cannot) be changed. If I'm not wrong, this point is stated in Help topic. If not - it will...

Link to comment
Share on other sites

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...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.