Jump to content
CarlosMDC

Full Double Word Operand Behaviour Question

Recommended Posts

Hello fellow users,

I'm quite new to Unitronics so please have some patience. I am in the process of re-purposing an old PLC implementation.

I wanted to know how the Vision 130-33-TA24 PLC handles a full, 32 bit double word operand when it tries to increase past it maximum value. I am currently using this operand to count the pulses of an analog flow meter to log the accumulated m3 of water.

Do I have to reset the operand to 0 in the ladder logic before the max is reached or will it reset itself ? or will it show an error that it can't increase past its max value?

I must admit I can't seem to figure out how to search for this condition in the help guide.

Share this post


Link to post
Share on other sites

Are you talking about a DW or an ML operand? The value when the register overflows is slightly different (the ML will go to the max negative value since it is a signed 32-bit integer, and will count up from there). In either case, no error will be generated.

−2,147,483,648 to 2,147,483,647 is the range for an ML (32-bit signed integer)

0 to 4,294,967,295 is the range for a DW (32-bit unsigned integer)

  • Like 2

Share this post


Link to post
Share on other sites

Alternatively do some maths before your overflow condition is reached, with the "tipping point" then adding 1 to another DW which is the count for the much larger amount, and then resetting the primary count to 0.  Depending on how quickly this all happens, sometimes you even cascade this sort of thing down through a series of DWs.

I arrange the maths so that the cascaded DWs etc are all in simple to work with numbers, like exactly 1,000,000,000.  Each time this condition is met at the primary count, the +1 addition is done to the next DW and the primary count is reset to 0 and starts again.  So you might end up with primary of 984,455,654 and the next one in line being 123,456 which means your total count is 984,455,654 + (1,000,000,000 X 123,456) = 123,456,984,455,654.

The final maths is done in whatever external program is used to monitor the results, but doing things the way I have said above also makes it easy to do things in your head if necessary.

cheers, Aus

  • Like 1

Share this post


Link to post
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...