Trying to get line data out of a CPU 1515-2 PN into a gateway that publishes to our broker. TIA V17. OPC UA server is activated in the CPU properties, runtime licence set to the medium one, port 4840.
UaExpert connects with security None and anonymous, for now. The address space has the PLC_1 node, under it DataBlocksGlobal, and that folder is empty. The DBs are there in the project, DB_Line with about 40 tags, and nothing shows up. I regenerated the server certificate and re-downloaded, thinking the client was being refused, and switched the security policy to Basic256Sha256 and back. Same empty folder either way.
I only need the read side working. What hides a DB from the OPC UA server? Is it something set on DB_Line itself rather than anything to do with the server?
V17 here as well. Is the server actually running on the CPU? Online & diagnostics, OPC UA, "Server status" should say running and the session count should go to 1 when UaExpert connects. And which interface is the server on, if the CPU has two?
Server status running, sessions 1 while UAExpert is on. Interface is X1, the one I'm connected to. Still nothing under DataBlocksGlobal. The certificate doesn't seem to be it, the session's fine. No luck there.
Is that the "Accessible from HMI" tick box thing? So if I've understood it, the DB has to be marked accessible, not just exist in the project?
Yes, that attribute. Open DB_Line in the editor and look at the columns "Accessible from HMI/OPC UA/Web API" and "Writable from HMI/OPC UA/Web API". If they are unticked the server hides the tag. There is also the same attribute on the DB itself in its properties, if that one is off the whole block is gone.
Tick what you need, compile, download. The server picks it up on the next download without a restart, as far as I have seen. Certificates give you a session error, not an empty folder, so you can stop looking there.
Longer version of the OPC UA side is here: https://plctr.com/introduction-to-opc-open-platform-communications-for-plc-integration/
Ticked. DB_Line had the accessible attribute off on the block itself, someone had unticked it when they tightened the HMI down, and every tag underneath inherited that. Ticked the DB attribute and the accessible column for the 40 tags, compiled, downloaded from V17, and UaExpert lists all of them now.
So the whole block was hidden from the server rather than the individual tags, and the tick box in the DB properties plus the column in the editor brought them all back.
Left the writable column off. Not sure whether the gateway needs it for the read subscription, it seems happy without. Thanks pnina and finn21.