OPC UA Variable Types

OPC UA supports multiple data types (variables) for various cases. The following table lists the current primitive variable types. You can use them to compose or derive other types of variables.

ID

Name

Nullable

Default

Description

1

Boolean

No

false

true or false

2

SByte

No

0

integer [−128, ..., 127]

3

Byte

No

0

integer [0, ..., 255]

4

Int16

No

0

integer [−32,768, ..., 32,767]

5

UInt16

No

0

integer [0, ..., 65,535]

6

Int32

No

0

integer [−2,147,483,648, ..., 2,147,483,647]

7

UInt32

No

0

integer [0, ..., 4,294,967,295]

8

Int64

No

0

integer [−9,223,372,036,854,775,808, ..., 9,223,372,036,854,775,807]

9

UInt64

No

0

integer [0, ..., 18,446,744,073,709,551,615]

10

Float

No

0

IEEE single precision floating point value (32 bit)

11

Double

No

0

IEEE double precision floating point value (64 bit)

12

String

Yes

null

sequence of Unicode characters

13

DateTime

Yes

DateTime.MinValue

An instance in time

14

Guid

Yes

All zeros

A 16-byte value that can be used as a globally unique identifier

15

ByteString

Yes

null

A sequence of octets

16

XmlElement

Yes

null

A sequence of Unicode characters that is an XML element

17

NodeId

Yes

All fields set to default

An identifier for a node in the address space of an OPC UA Server

18

ExpandedNodeId

Yes

All fields set to default

A NodeId that allows the namespace URI to be specified instead of an index

19

StatusCode

No

Good

A numeric identifier for an error or condition that is associated with a value or an operation

20

QualifiedName

Yes

All fields set to default

A name qualified by a namespace

21

LocalizedText

Yes

All fields set to default

Human readable text with an optional locale identifier

22

ExtensionObject

Yes

All fields set to default

A structure that contains an application specific data type that may not be recognized by the receiver

23

DataValue

Yes

All fields set to default

A data value with an associated status code and timestamps

24

Variant

Yes

Null

A union of all of the types specified above

25

DiagnosticInfo

Yes

No fields specified

A structure that contains detailed error and diagnostic information associated with a StatusCode