Read additional attributes from SimaticConditionAlarmType|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Read additional attributes from SimaticConditionAlarmType
Avatar
Marco Handl
Member
Members
Forum Posts: 4
Member Since:
01/25/2022
sp_UserOfflineSmall Offline
1
05/31/2022 - 19:51
sp_Permalink sp_Print

Hello, my fellow OPC brothers and sisters,

I come to you with great sorrow ;).

I try to read the alarms from a S7-1500. The alarm type is a SimaticConditionAlarmType (ns=3;s=1805 / ns=3;s=1804). This is a descendant of the AlarmConditionType so they say.

As template I use from the Sample-Application/UA Quickstart Application/ the AlarmCondition Client.

The good things first I receive messages, but I don't receive the additional attributes which are specified in the Siemens typ.
I looked already with wireshark if these attributes get send from the controller, negative. In the combination with wireshark an UaExpert I found out I have to tell the Controller, somehow, that I'm interested in this Attributes. As soon I check them in my filter the Attributes get send.

So, it looks to me I have to add my interests to my Subscription/Filter somehow. I found the promising Methode ConstructSelectClauses in the FilterDefinition class. But with all combination I added I failed.

Does anybody know how can I do this? 
Big thanks in advance!

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/31/2022 - 21:54
sp_Permalink sp_Print

If an event has custom properties you need to specify the additional properties in the select clause of the filter.

The select clause takes a sequence of browse names starting from the type.

Note that the browse names include a namespace index which will be different for the custom properties.

Try using UAExpert and verify that you can get the custom properties in UAExpert to make sure there is not a server problem.

Avatar
Marco Handl
Member
Members
Forum Posts: 4
Member Since:
01/25/2022
sp_UserOfflineSmall Offline
3
05/31/2022 - 22:59
sp_Permalink sp_Print sp_EditHistory

Hello Randy,

thanks for your quick reply. I checked it already with UaExpert and there it is working.

[Image Can Not Be Found]

With UaExpert I found out that the NodeID of the SimaticAlarmConditionType ist (ns=3;i=1805)

[Image Can Not Be Found]

Thats why I tried to add this nodeId to the filter

[Image Can Not Be Found]

private FilterDefinition m_filter;

...

// must specify the fields that the form is interested in.
m_filter.SelectClauses = m_filter.ConstructSelectClauses(
     m_session,
     NodeId.Parse("ns=2;s=4:2"),
     NodeId.Parse("ns=2;s=4:1"),
     NodeId.Parse("ns=3;s=1805"),   //<-- This one I added
     ObjectTypeIds.DialogConditionType,
     ObjectTypeIds.ExclusiveLimitAlarmType,
     ObjectTypeIds.NonExclusiveLimitAlarmType);

// create a monitored item based on the current filter settings.
m_monitoredItem = m_filter.CreateMonitoredItem(m_session);

Have you any Idea what else I have to adjust?
Hope I don't have to create a own ObjectTypeIds.SimaticAlarmConditionType const. and have to alter the Framework or derive the relevant classes.

No clue how this image upload works, looks everything a bit 90s here.
I trust in your imagination and the relevant code I wrote directly in.

thanks in advance!

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
06/01/2022 - 17:38
sp_Permalink sp_Print

You need a sequence of BrowseNames - not a NodeId.

Avatar
Marco Handl
Member
Members
Forum Posts: 4
Member Since:
01/25/2022
sp_UserOfflineSmall Offline
5
06/01/2022 - 19:33
sp_Permalink sp_Print

Randy Armstrong said
You need a sequence of BrowseNames - not a NodeId.

  

Okok,

Could you please give me an example.

Would be reeaaly kind, of you.

Thx.

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
06/02/2022 - 01:19
sp_Permalink sp_Print

The code should automatically browse the types and add the browse paths to the custom properties.

You need to inspect the the SelectClauses returned and verify that the browse paths show up.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Joe Tyler, Oleksandr Omelchenko
Guest(s) 32
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1349
Posts: 4577