Convert signed to unsigned int

Is there a way to convert the OPC integer from signed to unsigned?

Do you mean a SQLTag and its datatype? SQLTags doesn’t currently have any support for unsigned values.

What are you trying to accomplish?

I’m getting data back from the PLC that is interpreted by the OPC server as signed. Is there way to convert it to unsigned. I need to store data over 32K. The data in the PLC is 16 bit.

What driver are you using? (I assume you are using the Ignition OPC-UA server)

IOServer using Kingfisher series II protocol. In the Wonderware system, I just checked, the OPC path is appended by , uword. Need to look further into this. Just thouth that the Ignition could do the conversion.

Make your SQLTag datatype for that tag an Int4. If it’s still getting treated as a signed int you’ll need to convert it before it gets to Ignition. You’ll need the SQLTag to be Int4 in either case.

Ok it works now by changing it to I4 with uword. Is I4 4 bytes? I never got that straight.