tlf30
Lifetime Supporting Member
Hello everyone,
I wanted to share my findings with getting the new OPC UA server working (I think you might be interested in this JeremyM )
Currently there is little documentation from Rockwell on how to make it work.
I do currently have a ticket open with Rockwell for more information, and will post my findings as I go.
I hope this is useful
~Trevor
I wanted to share my findings with getting the new OPC UA server working (I think you might be interested in this JeremyM )
Currently there is little documentation from Rockwell on how to make it work.
I do currently have a ticket open with Rockwell for more information, and will post my findings as I go.
Code:
OPC Notes
See TechNotes:
* QA67230 - Basic Information on OPC UA in v36
* QA67231 - Guide to enable OPC server/client
* QA67232 - Guide to using OPC client
The following notes are only for the OPC server, I have not started taking notes on the client side yet.
I have only done testing with the 1756-L81E and 1756-L82E. In my testing, and after a phone call to tech support, I think the 1756-L81E (and other variations that support 0 max OPC nodes) does not support OPC, but it does have the OPC CIP object.
CONNECTION INFORMATION
OPC Discovery URL: [url]http://address:4840[/url]
OPC TCP URL: opc.tcp://address:4840
Supported Connection Modes:
* Basic256Sha256 (Sign and Encrypt)
* None (No encryption or verification, Insecure)
Notes:
* From one of the sessions I was in while I was at Automation Fair, it sounds like the security information and certificate can (must?) be controlled via FactoryTalk Policy Manager. I have not attempted to do this yet.
TAG ADDRESSING
The controller tags are stored in namespace 6, and can be referenced by name.
Example, a controller tag with the name "TEST" will have an opc address of "ns=6;s=TEST"
Program tags are referenced with the prefix of "Program:" then the program name followed by a period then the tag name.
Exmaple, a program tag names "PROG_TEST" in the program "MainProgram" will have an OPC address of "ns=6;s=Program:MainProgram.PROG_TEST"
OPC SERVER CONFIG
You will need to message the controller to enable or disable the OPC server.
This will be maintained after a download, but I recommend using S:FS (First Scan Bit) to initiate the enable message. This will ensure that OPC gets enabled. By default the OPC server/client is disabled.
To send the message, you will need a struct with the configuration information. The source buffer of the message is an array of configuration information based on the number of TCP/IP instance objects that exist in the controller (AKA: The number of ethernet ports the controller has). This means that on the 1756-L8xE controllers you will only have a single configuration entry, and on the 5069-L3x controllers you will have two configuration entries (I have not tested on a compact yet, so I am unsure how it would handle setting the config info on the third TCP/IP instance used for DLR control.)
The OPC Config struct is:
[UINT] - TCP/IP Instance ID (This is the TCP/IP instance that you are enabling or disabling OPC support on)
[USINT] - OPC Server Enable (0 = DISABLE, 1 = ENABLE; This will enable or disable the OPC Server on the TCP/IP interface)
[USINT] - OPC Client Enable (0 = DISABLE, 1 = ENABLE; This will enable or disable the OPC Client on the TCP/IP interface)
Note:
* Currently TechNote QA67230 states that it is invalid to operate the controller as both a server and client
BUT: The message will throw Status 0x0009, Ext. Status 0x0000_2103 if both the server and client are not enabled and disabled together.
The message uses an array of these structs with a UDINT size prefix.
The message configuration is as follows
Service 0x10 (Set Attribute Single)
Class 0x3C1 (OPC)
Instance 0x01 (Default, and maybe only instance?)
Attribute 0x01 (OPC Configuration)
Source Buffer: (8bytes on ContolLogix, 12bytes on CompactLogix)
[UDINT] - OPC Config Struct Count
[OPC Configs] - Array of OPC Configs
Recv Buffer:
N/A
Message will return status 0x00 when config is valid.
Message will return status 0x0x10 ext. status 0x0000_2102 on 1756-L81E controllers as these controllers do not support OPC
Message will return status 0x0009 ext. status 0x0000_2103 on for an invalid OPC Server/Client conbination
NODE COUNTS
WARNING:
* If you excede the max nodes, then all nodes are removed from the controller!
Different Controllers support different numbers of nodes, each node is an OPC tag.
Every tag that has OPC enabled on it counts as a node.
Every element in an array also counts as a node, plus the base tag of the array
Every member in a struct also counts as a node, plus the base struct tag (this also applies to sub-structs and sub-struct base tags).
Control/Guard Logix 5580
1756-L81E = 0 nodes (OPC not supported)
1756-L81EP = 0 nodes (OPC not supported)
1756-L81ES = 0 nodes (OPC not supported)
1756-L82E = 600 nodes
1756-L82ES = 900 nodes
1756-L83E = 1200 nodes
1756-L83EP = 1200 nodes
1756-L83ES = 1500 nodes
1756-L84E = 10000 nodes
1756-L84ES = 15000 nodes
1756-L85E = 15000 nodes
Compact/Guard Logix 5380
5069-L306ER = 0 nodes
5069-L306ERS = 0 nodes
5069-L310ER = 300 nodes
5069-L310ERS = 300 nodes
5069-L320ER = 300 nodes
5069-L320ERS = 300 nodes
5069-L330ER = 300 nodes
5069-L330ERS = 300 nodes
5069-L340ER = 600 nodes
5069-L340ERS = 600 nodes
5069-L350ER = 600 nodes
5069-L350ERS = 900 nodes
5069-L380ER = 900 nodes
5069-L380ERS = 1200 nodes
5069-L3100ER = 2000 nodes
5069-L3100ERS = 4000 nodes
PERFORMANCE TESTS (1756-L82E, I don't have anything larger to test on)
Unsecured - Static Values (REAL) - 1 sec scan
Nodes Comm %
0 1
10 2
600 2
Unsecured - Moving Values (REAL) - 1 sec scan
Nodes Comm %
0 1
10 2
600 5
SignAndEncrypt - Moving Values (REAL) - 1 sec scan
Nodes Comm %
0 1
10 2
600 6
Notes:
* In these tests, I ensured that there were no other communications to the controller. Based on this, I imagine that when used with a standard CIP connection getting tag data, and on larger controllers with more supported nodes, performance may need to be closely monitored.
* TechNote QA67230 states that when the Comm % gets too high, CIP traffic will be prioritized over OPC, and the controller will drop OPC requests if necessary.
UNDOCUMMENTED MESSAGES:
Notes:
* From what I can tell, setting attribute 1 (config attribute) and getting any of the attributes can be done without a licensed connection and will not give a privielge viloation error when sent from a remote device.
* The controller webpage is using these CIP attributes in the OPC object to get this data. You can view the webpage under Diagnostics/OPC Unified Architecture Diagnostics.
Get current OPC configuration
Use a Get Attribute Single on Attribute 1 to get the same array of opc config structs that is used to set the config. This can be useful to verify the config on the controller.
Service 0x0E
Class 0x3c1
Instance 0x01
Attribute 0x01
Source Buffer: N/A
Destination Buffer: Array of OPC Config Structs (8bytes on ContolLogix, 12bytes on CompactLogix)
Get current used OPC nodes
This will indicate the used nodes, just like from the controller webpage.
Use a Get Attribute Single on Attribute 3, it will return a UDINT of used nodes.
Service 0x0E
Class 0x3c1
Instance 0x01
Attribute 0x03
Destination Buffer: UDINT of currently used OPC nodes
Get max OPC nodes
This will indicate max supported nodes on the controller, just like from the controller webpage.
Use a Get Attribute Single on Attribute 2, it will return a UDINT of max nodes.
Service 0x0E
Class 0x3c1
Instance 0x01
Attribute 0x02
Destination Buffer: UDINT of max nodes supported
Get nodes per second
This will indicate number of nodes being read from the controller per second, just like from the controller webpage.
Use a Get Attribute Single on Attribute 4, it will return a UDINT of nodes/sec.
Service 0x0E
Class 0x3c1
Instance 0x01
Attribute 0x04
Destination Buffer: UDINT of nodes/sec
I hope this is useful
~Trevor
Last edited: