OPC UA: Data Type vs. DataTypeDefinition


Terminology is always a killer. It seems that we humans have to use special words among our own kind that only we understand. It’s pervasive. Every group of people, not just technologists, have words that they use that have special meaning and that only their own people, the people on the inside can understand what the hell they are talking about.


Sometimes this is funny. Last year I went to an INC 500 conference. It was really cool. Really fun. I met some people that are into building small business culture and those contacts have been really valuable to me.


Well after the conference I am talking to a young woman in her 20s and told her that I just came back from the INC conference. She goes “Wow – I didn’t think you would be into that stuff”. I was puzzled. What did she mean? Well we talked a bit and what she heard as “I N K”, like Tattoo Ink. She thought I spent a week in California hanging out with a group of people talking about getting Tats, doing Tats and equipment for Tats. Unfortunately, when she figured out we weren’t talking about the same thing I became very uncool, very fast.


I thought about this the other day when I was at the M2M conference where they were all talking about CIP. CIP trunking and all sorts of stuff related to CIP. Well, of course, I am thinking about the Common Industrial Protocol (CIP) of EtherNet/IP and DeviceNet fame but they, of course, were talking about something completely different. They were talking about “S I P” which I figured out was a technology in the telecom industry.


Then the next morning I am studying the OPC UA spec again – for the 200th time and I get real confused. It turns out that an OPC UA Node has an Attribute called a DataType and a Reference to another node called a DataTypeDefinition. Of course, that confused me. You would think that the OPC UA DataType Attribute would be related somehow to the OPC UA DataTypeDefinition. No reason to have both right?


Well if you thought that, you’d be wrong. Very wrong. But it takes a few days of study to figure it out.


The DataType is the type of the value attribute in a Variable Type node. The type can be Boolean, UINT32, INT8 or one of many other predefined data types. What’s nice is that you can reference these types back to the OPC UA foundation where they are defined so that if two servers both use UINT32 there is no confusion as to which byte is the MSB and which is the LSB and that sort of thing. Each of those types is a predefined NodeID defined in a file on the OPC UA website. And you can always make your own if you have some complex data type that doesn’t already exist.


So what’s the DataTypeDefinition (DTD)? It turns out that this is a Reference (pointer) to a type description which defines the node. Nodes are things like Folder Objects, Data Variables and many other standard objects and variables. The DTD tells you what the standard type is for an object so that a Client device knows what to expect in terms of Node structure. And just like the DataType above, you can create your own node structure and have it contain a whole bunch of nodes if that floats your boat in a particular application.


So, I guess the lesson is, CLARITY, CLARITY, CLARITY. Use simple, non-jargon so that your listener (or reader) can understand.


So that’s it for today. AAYF, ADBB and BBL!




(OK, for clarities sake. AAYF is Always Your Friend, ADBB is All Done Bye Bye and BBL is Be Back Later.)