News:

  • April 29, 2026, 01:46:03 PM

Login with username, password and session length

Author Topic: Alternative to 32bit UDINT type  (Read 10605 times)

rockhead

  • Newbie
  • *
  • Posts: 5
Alternative to 32bit UDINT type
« on: March 05, 2025, 09:53:11 AM »
There doesn't seem to be any data type for 32bit unsigned word in the DoMore PLC. I am replacing a 205 that has several double word (32bit) registers being used to accumulate lifetime machine cycles, part counts etc. This 205 PLC is connected to a corporate data collection system that expects to see unsigned 32 bit word values. As it is used the machine will be long gone and I long retired before the most significant bit is ever set so I can get away with using the signed double word data type.

It did make me wonder why there is no UDINT in DoMore and what alternative could be used where you need a value between 2 and 4 billion? I think a real would work as long as the actual bit values are not important. First time running into something like this and some expert advice would be appreciated.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Alternative to 32bit UDINT type
« Reply #1 on: March 05, 2025, 11:14:23 AM »
There doesn't seem to be any data type for 32bit unsigned word in the DoMore PLC. I am replacing a 205 that has several double word (32bit) registers being used to accumulate lifetime machine cycles, part counts etc. This 205 PLC is connected to a corporate data collection system that expects to see unsigned 32 bit word values. As it is used the machine will be long gone and I long retired before the most significant bit is ever set so I can get away with using the signed double word data type.

It did make me wonder why there is no UDINT in DoMore and what alternative could be used where you need a value between 2 and 4 billion? I think a real would work as long as the actual bit values are not important. First time running into something like this and some expert advice would be appreciated.

Because Do-more is strongly typed and all math operations are implied by data type rather than specific instructions like DL, the math stack needed to be two's complement for all integer operations. We considered it a small price to pay to gain the dramatic improvements in math. We will eventually be doing a 64 bit controller, but that is still a couple of years off.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO