How-to register an input to read an OPC UA boolean
Prerequisites
These steps need to be completed before continuing
How to
Start by going to the menu: Hardware \ OPC server
![](../__attachments/562398878/image-20220602-151416.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
Select the OPC server and then click on the Open button
![](../__attachments/562398878/image-20220602-151504.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
On the left side of the dialog select the: Inputs alternative and the click on the Create button and select OPC server bool input
![](../__attachments/562398878/image-20220602-180903.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
Now we need to get the data from the OPC server in order to construct the complete address according to the construct:
nsu=[Full namespace name];[identifier type]=[Identifier]
A more complete guide on how the above address is configured is covered in the article about how to add a value input https://goodsolutionsrsp.atlassian.net/wiki/pages/resumedraft.action?draftId=562300762.
From the external OPC client (UaExpert), we get the following information to construct the the address for the OPC tag.
![](../__attachments/562398878/image-20220602-181916.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
NamespaceIndex: 4
IdentifierType: String (s)
Identifier: Demo.Static.Scalar.Boolean
Use the NamespaceIndex: 4 to check the complete namespace (nsu) using the namespace array:
![](../__attachments/562398878/image-20220602-170109.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
At index 4 the namespace is: http://www.unifiedautomation.com/DemoServer/
Building the complete address
nsu=http://www.unifiedautomation.com/DemoServer/;s=Demo.Static.Scalar.Boolean
Configuring the OPC value in RS Production
Field | Value | Field description |
---|---|---|
Name | On / Off signal | A good readable name what the value is about. |
OPC server | Demo OPC server | |
OPC Address | nsu=http://www.unifiedautomation.com/DemoServer/;s=Demo.Static.Scalar.Boolean | The complete address to the OPC tag / item |
Input mode | Subscription | The subscription mode updates automatically when the value is changes at the server. |
Refreshrate | 250 | Update frequency in milliseconds |
![](../__attachments/562398878/image-20220602-182653.png?inst-v=c92679f2-9954-435c-afc9-b386efcb8628)
Save and close