ABB OPC client


Thread Starter

Santosh Tiwari

I am running OPC client in one PADO PC to get data from ABB OPC server (OPC TenoreNT.1). All the analog tags I get are fine, but with digital tags, true value is -1 and false value is 0. The true value should be 1. Even metricon OPC client is getting digital tag true value as -1 from ABB OPC server. There must be some setting in OPC server side. Please help me in this regard.

Santosh Tiwari
santosh_ntpc [at]
santoshtiwari [at]
Actually, -1 is correct.

More accurately, false is when all bits of the byte or word are 0, true is when all bits of the byte or word are set to 1. In a 2's complement notation, this translates to -1

The generally accepted convention is however, False is zero, true is any non zero value.
All OPC Compliant COM Servers must return such digital "tags" (OPC items) in a Microsoft COM Variant of type VT_BOOL. For a VT_BOOL, FALSE is encoded as 0 and TRUE is encoded as -1. The ABB Server is behaving as all compliant OPC Servers must behave. Your issue is one to take up with your OPC Client vendor. Only the simplest test clients typically display the raw -1 value. Most "real" clients would display something more useful like TRUE and FALSE or be configurable.