1

I'm developing a project on a Siemens PLC and i'm wondering if I should use a Word or a UINT to store a 16-bit value. Is there any differences between the two?

relatively_random
  • 4,505
  • 1
  • 26
  • 48
jfpatenaude
  • 86
  • 1
  • 8
  • According to my brief googling, in this case, there is no difference between a `WORD` and a `UINT` on a Siemens PLC, they are both unsigned 16-bit data types. Generally, `INT` datatypes are as long as whatever the CPU can handle, so they could technically change. A `WORD` will always be 16 bits. – Cᴏʀʏ Jan 26 '16 at 17:01

2 Answers2

2

Generally there is no real difference between the two. The only time where it really matters is when the input type to a function block is either a WORD or UINT. Then it will matter.

Generally speaking, if you are choosing between a UINT or a WORD to store a numerical value the typical best practice is go ahead an use an UINT. If you are looking to store a hex value you would want to use the WORD.

mrsargent
  • 2,267
  • 3
  • 19
  • 36
0

Technically and theoretically there is no difference between WORD and UINT but UINT stores unsigned 16 bit values and WORD stores Hexadecimal Value

ROLO
  • 4,183
  • 25
  • 41