Problem OPC Tag and year

I tried to put in an OPC Tag the value 2015. This is a BYTE and address (working correctly) is:
[DEVICE_1]DB210, B26.

The data type is int2. When I try to enter 2015, I get 223.
This tag represents a year, as 2015.

Why? Do you have any solution?


A byte can only be between 0 and 255.

To expand on what Kevin is saying-- and explain why you’re seeing 223:

2015 : 0111 1101 1111 223 : 1101 1111

Since, a byte is only 8-bits long, you are getting the lower end.

You want a 16-bit integer type. This is often referred to as a SHORT (if signed, with a range of -32768 to 32767) or a WORD (if unsigned, with a range of 0 to 65535).