export OPC UA Server alarm instances

0
I want to use opc ua as HMI connection and I am struggeling to use the program_alarms.  Alarms and Conditions are enabled in the HW-Config.  hwl.yml :  AlarmsAndConditionsAcknowledgeActive: True AlarmsAndConditionsEnable: True How is it possible to export the opc ua alarm instances, so that I can import them in the WinCC Unified Project?  Where can I find the NodeSet-XML ?    Thanks in advance!    Patrick    
asked
2 answers
1

Hi Patrick ...

 

Well, there is a lot we have to cover here ...

 

About PLC1500 Alarming in SIMATIC AX:

First it is important to understand that the PLC1500 can activate user-generated alarms via e.g. "Program_Alarm" function-block calls and system-alarms which are activated by the system-/diagnostics automatically. Both types will end up shown in the same alarm-server bucket (STD).

(S7-)Alarm-Clients, just like the alarm-view in a HMI for example can receive these alarms via its (S7-)HMI-connection. The information that will be shown there is dependent on wether the alarm-server of the PLC1500 will send the alarm to the client with or without the alarmtext.

CentralAlarmManagement: True

By activating the central-alarm management in TIAP and respectively in SIMATIC AX hardwareconfiguration ...  the PLC always will send the Alarms with its appropriate texts.

This is needed when loading the HMI project for example, if it is not fully integrated in the same development IDE like the controler project in order to "know" the actual texts (like the SIMATIC AX workflow atm.).

 

Receiving Alarms via an S7-HMI-Connection:

If you create a non-integrated (S7-)HMI-connection to that plc now via your wincc-unified project and add the alarm-view, you will receive the PLC1500 System- and UserAlarms via the (S7-)HMI-connection. These alarms are, thanks to the central-alarm-management activation, with the texts.

 

About OPC UA config in SIMATIC AX:

Beginning with SDK 2504 the behaviour changed for loading the opcua serverinterface and exporting its NodeSet-XML in SIMATIC AX. Instead of triggering seperate CLI commands for each via the OSCR tool it is now automated in the STC compile-step and SLD software loading step.

After ST compilation with exposed variables ...

    {S7.Extern = ReadWrite}
    {OpcUa.AccessLevel = ReadWrite}
    VAR_GLOBAL
        myExposedVariable : BOOL;
    END_VAR

(example of an opcua exposed variable)

 

there will be a file called "generated.xml" in the following project-path. (automatically)

/obj/opcua/generated.xml

DISCLAIMER: This path might be subject to change in an later release.

This file can be used for opcua-clients to import the plc-variable connection information (server). This file does not hold the alarm information of the plc.

 

Receiving Alarms via an OPCUA-Connection:

In order to make alarms available for an opcua-client with an opcua-connection to the opcua-server of the PLC1500, it is nessessary to activate its server first. This is done via the following hardware configuration properties:

AlarmsAndConditionsAcknowledgeActive: True
AlarmsAndConditionsEnable: True

This doublicates the active alarms from the standard alarm-server bucket of the plc to the newly activated opcua-alarmserver bucket. (from a PLC1500 point-of-view)

Once this is done follow the steps to access opcua-alarms on your opcua-client site.

 

I hope that helped understanding the system a little bit better.

 

Keep going & happy coding ...

🐱‍💻 BEEP, BOOP, BEEP, BEEP, BOOP 🐱‍🏍

 

 

answered
1

"One other thing is, the opcua folder is empty after an build. But the opcua server is active an accessible."

 

>> Make sure you expose at least one variable within your userprogram.

Therefore introduce these 2 pragmas above your desired variable declaration or variable-section. You can choose between different access values (Read/ReadWrite/Hidden)

{S7.Extern = ReadWrite}    

{OpcUa.AccessLevel = ReadWrite}

example:

    {S7.Extern = ReadWrite}
    {OpcUa.AccessLevel = ReadWrite}
    VAR_GLOBAL
        myExposedVariable : BOOL;
    END_VAR

 

 

"Just to be sure S7-HMI-Connection is right now not possible with Simatic AX?"

 

>> Right now there is no "integrated" way to configure a "specified" HMI-Connection, because of the disconnect of the both tool for doing hardware-configuration for plc (e.g. AX) and for hmi (e.g. TIAP).

In that case go for an "unspecified" HMI-Connection instead, which can be configured in the engineering tool of the hmi. Only IP setting and credentials for the "partner" (plc1500 loaded via AX) are needed in that case. Doing it that way will give you access to the S7 system information but challenge you to find the right address/symbol-name to the ax loaded plc variables.

Cause of that for the time being ... we recommend doing it via an opcua-connection instead (variable exchange granded via nodeset.xml).

 

answered