Siemens UINT to SQL

I have a tag for a UInt16 (2 byte unsigned integer) in a Siemens PLC that I am trying to cross over to a SQL table correctly. I tried using all the integer types on the properties of the tag, and none of them change the value from being negative when greater than 32767. Does anyone know a fix for this?

I also tried to create an expression tag with this expression, but I have something wrong, and it gives me a Config error:
if({[~]ST102/Recipe Save/Last Edited By} >= 0,{[~]ST102/Recipe Save/Last Edited By},65536-{[~]ST102/Recipe Save/Last Edited By})

try:

{[~]ST102/Recipe Save/Last Edited By} & 65535

If you want to use UInt in Ignition, you must specify byte or word or doubleword in OPC Item Path:


If you put DB1,W2 , values are from 0 - 65536, if you put DB1,I2 , values are -32767 to 32767.

1 Like

Thanks so much! The “W” did the trick.