I know there are several posts about OPC tags and connections to a Siemens PLC, but I wanted to ask something slightly different:
- I have a S7-1200 Siemens PLC with OPC UA capabilities. Since it is a S7-1200 it only provides acting as OPC UA Server.
Therefore, what would be the best option (in terms of performance and computational resources) to carry out the connection between Ignition and the PLC?
Connect to a "Device" from Ignition gateway, as indicated in Siemens - Ignition User Manual 8.1 - Ignition Documentation. A big disadvantage of this is that The access level must be "full", what leaves the PLC unprotected.
Use Ignition as an OPC UA client to the OPC UA Server embedded in the PLC, as indicated in OPC UA Client Connection Settings - Ignition User Manual 8.1 - Ignition Documentation. Will I have access (read and write) to all the tags published in the PLC´s OPC UA Server easily? Are there any disadvantages or special considerations I am missing?
Other ways I am not aware now.
PS: Ignition is always running, but the PLC would be off during non-working hours. I am worried about "error" messages in the log or other issues that could affect. Something else I should consider?
Thanks in advance!
If you’re within the system limits of the S7-1200 using OPC UA should be fine, otherwise you might consider the driver instead. I think they are limited to 1,000 monitored items via the OPC UA interface.
thanks @Kevin.Herron ,
do you know if there are plans to implement the driver for protected PLCs?
Leaving the PLC unprotected is a risk for us now.
Any comments about what I said in "PS"?
The OPC connection won't spam the logs, the driver may be chattier. Doesn't matter either way unless it bothers you.
We've got plans to evaluate a 3rd party library... some day... and if that works out we'll build a new driver around it. If it doesn't work out for some reason, then no. Siemens doesn't document S7 or S7+ and their official stance on interoperability is to use OPC UA.
@Kevin.Herron sorry to disturb again.
I have implemented the PLC as an OPC UA Server and Ignition works as client.
But I am not able to read arrays from the PLC, please see images below:
The only way I got it working is selecting the individual elements of the array (and creating a "byte" tag for each element of the array):
Is there any configuration I am missing to directly read the whole array?
you shouldn't have any issues reading arrays from an OPC device, so it's really strange. An OPC connection to a Siemens S-1200/1500 PLC is usually pretty straightforward.
But let me understand why you have implemented a server interface in the PLC? Have you tried to read the same array via generic interface?
Hi @Davide_Bortolini ,
I have implemented a server interface because the PLC is acting as an OPC UA server, and it is the way to expose the tags to be accessed by clients. It is the only way I know to share tags when PLC is acting as an OPC UA server.
Do not really understand what you mean with "generic interface".
My bad, I've seen now that you're working on a S7-1200 that requires a Server Interface defined. On S7-1500 there's no need at first as you can enable the Generic Siemens Interface (that's what I was referring to).
I'm more familiar with 1500 family thus I'm not aware if there are some incompatibilities with OPC on 1200 platform.
As testing purpose, have you tried to access to the same NodeId with another client, eg UAExpert?
@Davide_Bortolini I tried with UaExpert and seems that the array itself does not have a dedicated NodeId, but each element of the array has a NodeId. Do not know if this is the reason that I cannot get the whole array into a tag in Ignition.
It will have a NodeId, but it may not be a Variable, in which case it does not have a Value attribute to subscribe to.
Look at that same Node in that Attributes pane of the normal view in UaExpert
Another thing I will mention, since I missed that this was a S7-1200, is that via the “Server Interface” mechanism Ignition will not be able to read whole structures, only individual exposed structure members. I can’t remember if the 1200 exposes these or not, but it’s not ideal performance-wise for the PLC.
This is because the 1200’s Service Interface mechanism only supports the newer DataTypeDefinition attribute, and not the older DataType Dictionary mechanism, that let’s clients learn about structured types in the server.
To sum up, I cannot access directly the whole array, right? I will have to access each element of the array.
It looks that way, but we can confirm that with more poking around in UaExpert.
@Kevin.Herron there you go:
Have you tried declaring a Companion specification with the help of SIOME ? https://support.industry.siemens.com/cs/document/109755133/siemens-opc-ua-modeling-editor-(siome)?dti=0&lc=en-CA
It is way more tedious but it enables you to specify string for the nodes ids which works way better in Ignition and especially with UDTs.
I've never had to deal with arrays from PLC to Ignition so can't tell but it might help you.
Looks like a Variable, but it has a Null value, so I assume the server does not intend for you to access it as a whole array.