# What are the NodeIDs in simulator device?

**URL:** <https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237>\
**Category:** Ignition\
**Created:** [August 31, 2011, 2:16pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237 "2011-08-31T14:16:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oystein](https://avatars.discourse-cdn.com/v4/letter/o/7ab992/32.png) [@oystein](https://forum.inductiveautomation.com/u/oystein)\
**Post date:** [August 31, 2011, 2:16pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237/1 "2011-08-31T14:16:52Z")

</div>

I am new to OPC-UA and Ignition, and I try to learn how to read “tags” from Java using the Opc Foundation OPC-UA Java SDK.  
I am able to read the bult-in nodes in the Ignition Server, for instance node 2258, which gives me the current time.  
But I haven’t been able to find the correct nodeIds for a PLC device like Allen Bradley ControlLogix 5500 or the simulator device.  
I have added the simulator device to my Ignition test-server, and the web-based OPC Quick Client gives me this information when I click on [r] right to the READONLYSTRING1-node:

Read completed. [Ignition OPC-UA Server][simulator2]READONLY\READONLYSTRING1  
Status: StatusCode[Severity=Good, Subcode=NotSpecified, 0x00000000]  
Value: ABCDEFG  
Quality: StatusCode[Severity=Good, Subcode=NotSpecified, 0x00000000]  
Timestamp: 8/31/11 4:06:36 PM CEST

That looks good, but I am not able to read the same information from my Java test-client using the Opc Foundation OPC-UA Java SDK. Which nodeId should I use?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 31, 2011, 2:39pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237/2 "2011-08-31T14:39:11Z")

</div>

The NodeId in your example is “[simulator2]READONLY\READONLYSTRING1” without the quotes.

All of the device NodeId’s in Ignition begin with [DeviceName] and are followed by an address, the format of which is specific to the device.

---

<div class="post-metadata">

**Author:** ![oystein](https://avatars.discourse-cdn.com/v4/letter/o/7ab992/32.png) [@oystein](https://forum.inductiveautomation.com/u/oystein)\
**Post date:** [August 31, 2011, 3:28pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237/3 "2011-08-31T15:28:17Z")

</div>

Thank you for your quick reply!  
I tried the nodeID you proposed, but unfortunately I got a “Bad\_NodeIdUnknown” reply. This is my code:

```auto
/**
 * Based on ClientExample4 in Java OPC UA Stack
 */
public class OpcClientExample {

	public static void main(String[] args) throws Exception {
		Cert myClientCertificate = Cert.load( Example1.class.getResource( "ClientCert.der" ) );
		PrivKey myClientPrivateKey = PrivKey.loadFromKeyStore( Example1.class.getResource( "ClientCert.pfx"), "Opc.Sample.Ua.Client");
		KeyPair myClientApplicationInstanceCertificate = new KeyPair(myClientCertificate, myClientPrivateKey);
		Client myClient = new Client( myClientApplicationInstanceCertificate );
		SessionChannel session = myClient.createSessionChannel(new URI("opc.tcp://localhost:4096/Ignition%20OPC-UA%20Server"));
		session.activate("opcuauser", "password");
		
		readNode(new NodeId(0, 2258), session);
		readNode(new NodeId(0, "[simulator2]READONLY\\READONLYSTRING1"), session);
		
		session.close();
	}

	private static void readNode(NodeId nodeId, SessionChannel mySessionChannel) throws ServiceFaultException, ServiceResultException {
		ReadRequest request = new ReadRequest();
		ReadValueId readValueId = new ReadValueId(nodeId, Attributes.Value, null, null);
		request.setNodesToRead(new ReadValueId[] {readValueId});
		ReadResponse response = mySessionChannel.Read(request);
		for (DataValue result : response.getResults())
				System.out.println("NodeID = " + nodeId + ", statusCode.name = " 
						+ result.getStatusCode().getName() + ", value = " + result.getValue()); 
	}
}
```

The programs prints this in the console:

```auto
NodeID = i=2258, statusCode.name = GOOD, value = (class org.opcfoundation.ua.builtintypes.DateTime) 08/31/11 15:24:18.1090000 GMT
NodeID = s=[simulator2]READONLY\READONLYSTRING1, statusCode.name = Bad_NodeIdUnknown, value = (null)
```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 31, 2011, 3:41pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237/4 "2011-08-31T15:41:27Z")

</div>

The NamespaceIndex of all the device NodeIds is 1. It looks like you’re using 0, which is reserved for nodes in the OPC foundation’s namespace.

---

<div class="post-metadata">

**Author:** ![oystein](https://avatars.discourse-cdn.com/v4/letter/o/7ab992/32.png) [@oystein](https://forum.inductiveautomation.com/u/oystein)\
**Post date:** [August 31, 2011, 5:51pm UTC](https://forum.inductiveautomation.com/t/what-are-the-nodeids-in-simulator-device/3237/5 "2011-08-31T17:51:01Z")

</div>

You are abosolutely right! It worked now. Thanks!
