question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alarm and Condition with 2.1.1

See original GitHub issue

Hey andrew I’m a bit lost 😦. I’m trying to program an Client which can read all alarms from an OPC-UA Server. The NodeId is the right one because with UAExpert and the .Net-Legacy-Sample Client I get what I want. the following code snippet is what i tryed but i’m a bit stuck. I’m not sure what to put in the brackets after the token call.

` Console.WriteLine(“Step 5 - Add items to the subscription.”); var alarmitemsToCreate = new MonitoredItemCreateRequest[] { new MonitoredItemCreateRequest { ItemToMonitor = new ReadValueId { NodeId = NodeId.Parse(“…”), AttributeId = AttributeIds.EventNotifier }, MonitoringMode = MonitoringMode.Reporting, RequestedParameters = new MonitoringParameters { ClientHandle = 00001, SamplingInterval = -1, QueueSize = 0, DiscardOldest = true } }, };

            var itemsRequest = new CreateMonitoredItemsRequest
            {
                SubscriptionId = id,
                ItemsToCreate = alarmitemsToCreate,
            };

            var itemsResponse = await Channel.CreateMonitoredItemsAsync(itemsRequest);

           Console.WriteLine("Step 6 - Subscribe to PublishResponse stream.");
            token = Channel.Where(pr => pr.SubscriptionId == id).Subscribe(pr =>
            {???}

});

        }
             `

can you help me ? Is my attempt right or is it already wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
harishLinkEZcommented, Mar 31, 2021

@awcullen I really appreciate your work and I want to contribute back to the repository by adding basic samples for using siemens/sinumerik machines. This could help first timers save lot of bucks.

1reaction
awcullencommented, Mar 31, 2021

Hi HarishLinkEZ, @rebj1011 seems to say that there was an error in the EventHelper.Deserialize function below:

        foreach (var efl in enl.Events)
        {
            var ev = EventHelper.Deserialize<BaseEvent>(efl.EventFields);
            Console.WriteLine($"time: {ev.Time}, src: {ev.SourceName}, msg: {ev.Message}, sev: {ev.Severity}");
        }

Instead you can try:

        foreach (var efl in enl.Events)
        {
            Console.WriteLine(string.Join(", ", efl.EventFields.Select(e => e.GetValue())));
        }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 29: Single- And Multiple-Station Alarms and ...
A distinctive audible trouble signal occurs before the battery is incapable of operating the device(s) for alarm purposes. At the battery voltage at...
Read more >
Smoke and Heat Alarms
Smoke and heat alarms shall meet the requirements of 29.5.2.1.1 and be ... for at least 7 days in the normal condition, followed...
Read more >
Fire Protection Systems - 907.5.2 Alarm notification appliances
907.5.2.1 Audible alarms. · 1.Audible alarm notification appliances are not required in critical care areas of Group I-2 Condition 2 occupancies that are...
Read more >
UA Part 9: Alarms and Conditions 1.04 - OPC Foundation
OPC 10000-9: UA Part 9: Alarms and Conditions. Released 1.04 (Replaced by 1.05.02). 2017-11-22. This document is subject to the license terms described...
Read more >
907.5.2 Alarm notification appliances. - ICC Digital Codes
Audible alarm notification appliances are not required in critical care areas of Group I-2, Condition 2 occupancies that are in compliance with Section ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found