OPC Nodes properties

Hi !

In the Ignition documentation I found an enum called AttrubuteType.
How can I use it ?

My purpose is to set some my node as ReadOnly, and Historized.
I suppose I should get the UANode and call writeAttribute, but I have found no example of how to do.

I tried on my own but only got exception.

Is this enum the way to change Node properties ?
If yes how to use it.
If this enum is not the way, how to have read-only and Historized Nodes ?

Thanks.

Benoit.

The time to set these attributes would be while you’re building the Node, using a builder from the NodeBuilderFactory provided by DriverContext.

The historized attribute is not going to do anything for you, however, as the server does not support any of the history services.

I’ll have a look at the NodeBuilderFactories, do have any example ?
I mainly built my module on the Weather module example.

If Historizing does nothing, how to have a value stored ?
I thought is was just my setting a property on an OPC node.

I need to have my values “historized” into an SQL table to have them plotted later.

The API you’re working with here is intended to create drivers for the OPC server, and the drivers exist to provide real time values for the nodes they manage.

History should be taken care of in Ignition. You can enable history on any tag once it has been added to Ignition or you can use the SQLBridge module to create a transaction group that logs values to a database. None of this has anything to do with whether or not a node has the historizing attribute set.

In the Modbus example you’ll find usage of the NodeBuilderFactory in the buildNode() function.

Hi !

I had a look at the Modbus example, but did not found where Build Node is called from.

It fact I do not understand where the modbus example creates OPC nodes.

I overrode buildNode in my own project
@Override
public void buildNode(String address, NodeId nodeId) throws AddressNotFoundException {
super.buildNode(address, nodeId);
}

And it is called from another thread than the thread I use to create my nodes…

So…
How the NodeBuilderFactory is to be used ?