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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...