I have Siemens panel TP1200 Comfort in which there are many alarms.
I have used UAExpert to connect to the server, and I can navigate through the tags, but I am not able to see the way the to navigate to do it through the alarms.
My idea it is if I could subscribe to the alarms, so if I implement a OPC UA client with C#, I could handle it, send some email or save the data in a database.
For the client, I am trying to use the library from OPC Fundation: https://github.com/OPCFoundation/UA-.NETStandard.
Thanks.
Yes it is possible. The UAExpert can e.g. subscripte to events and alarms.
You can find the doc here
I think the .net stack also can do it because its the reference implementation in C# but I could not found an example.
Edit: Here is an Example for AlarmConditions UA-.NETStandard Alarm Condition Sample
Related
I'm facing a task which is to extract historical data from an OPC system, and then store these data into a standalone database for our BI team.
Although I'm a experienced developer, but I never use OPC UA before. I found the latest library provided by OPC Foundation here:
https://github.com/OPCFoundation/UA-.NETStandardLibrary
There is a sample console client app in this repo. However, I didn't find any clue for HDA (Historical Data Access). So, could anyone help out?
Also, I'm actually the only IT background person in my company. The manager told me that there is another guy who is maintaining the OPC system using some 3rd party application, so that I assume that it is not necessary to implement anything about the OPC server. In other words, I suppose I just need to implement an OPC client connecting to some URLs which can be found in that OPC application. Does my assumption correct?
To sum up, there are two questions:
How to implement an OPC UA Client to extract historical data with OPC UA-.NETStandardLibrary
Given that the current OPC system is running on top of a 3rd party application, does that mean I don't need to code anything about the "Server"?
Any help will be appreciated.
Unless you actually need to support .NET Standard, you should rather be looking at a different GitHub project: https://github.com/OPCFoundation/UA-.NET . Under SampleApplications/Samples/HistoryClient you should find what you need.
And yes, if the OPC UA server is in place, configured and running, your development task should be just to write an OPC UA client. You need to "know" about what data the server presents to you through OPC (or browse for it from the code), but you need not to know about the internal implementation of the server (its code).
I am trying to develop a DISPLAY SYSTEM (PIS:Passenger Information System).Let me explain the problem .
The system includes LCDs that is located in Stations of Metro.The passenger can see the graphically movement of the trains .the sensors sense the train and send the information to our database .this information should be displayed on the LCD and the passengers can see the trains location and arrival time on the LCD,but where is my problem ?!!my project manager said to me the information should be displayed on the LCD using Adobe Flash .but my problem is how can send the information to SWF file .i googled it and i found i can use webservices but in fact i couldn't find any useful article about this could you please give me some help and method about this .
I should display the movement of trains of lcd ,so i should send the an array to swf.
You have a variety of options
Using URLLoader, which is basically AJAX sending text. You'd have to poll to the server though regularly. Any backend should be fine for this.
You could use AMF, which works similar to the option above. But binary data is send over HTTP, so it's more efficient, but the backend has to understand AMF as well.
You could use sockets, providing a simple two communication. The backend needs of course to be a socket server.
You could use web-sockets, which is basically the new cool way for full duplex communication. The backend has to implement the websockets protocol though. I used ws in the passed and was quite satisfied.
You can use SOAP based web services, but that is way to heavy and requires using Flex, if you want to use them out of the box.
My suggestion would be a simple REST server which gets accessed via URLLoader. In the ActionScript language reference, you find examples, which are sufficient for the client development.
On the other hand ... if the backend is already set up, ask the backend guys how to access the data - I mean the protocol - and implement the client with regards to the protocol being provided.
I want to develop a program in c# that can target and application or port's traffic and tries to view that traffic.For example,I select example.exe program in my application and it gives me it's network traffic data.
Is it possible?If so,give me some directions.
I'm trying not to use airPcap or winPcap or anything like these,because these libraries target the network card and I don't know what type of interface card the user might be using.
You have to either capture packets where you receive a duplicate from the NIC (pcap), or route requests through your own application so you can inspect the live packet flow (proxy-like).
For a WinPcap implementation in C#, take a look at SharpPcap. For a proxy, see here.
winPcap is a very good library for what you want to do.
If you choose to do it yourself, you will only be reinventing the wheel, and might not be able to support as many network cards as it does.
If you only want to see the traffic, you would have to use a proxy in between.
But I believe you are not looking to build something like, fiddler for example,
that sits in between and allows you to monitor the traffic.
If I understand you correctly you want make a c# app where you select from a list of running applications and display the network traffic to/from that app. You could do this with c# but you would have to make calls to the Windows API to get the information you need. In addition you will need non-c# library for packet capture sucgh as WinPcap. Windows has a new NetMon API that does pcap like things. I have not used it, but you probably way better off with pcap and the SharpPcap lib that CodeCaster posted.
I always wondered how to make an instance chat using ajax ! Ideas !? articles ?!
Thank you .
You basically just use AJAX to "subscribe" to messages pushed by a chat server. Then the client "publishes" messages which the server pushes to any clients subscribed to that channel.
NodeJS is great for instant ajax stuff like facebooks live feed or chat (Check out this open source example).
You can also give a look at the AjaxIM project which has a chat bar like facebook and has a NodeJS server and a PHP server (I suppose you could port that over to ASP.Net). I'd reccomend going with the NodeJS server and just use the javascript library to connect to it from your project.
A friend of mine released a project for helping to write the backend of such a feature, it's called the LiveChat Starter Kit and is available on CodePlex. I never tried it so can't comment on its use, but it have gathered some attention there. I think it's more curtailed to commercial websites for providing online support tough.
All that happens is that the javascript on the client uses ajax to send outgoing chat to the server, and the server uses ajax to send incoming chat to the client.
Of course there are a lot of different pieces involved but if you have questions about those, you should ask them.
I would suggest to use XMPP as it an open standard and quite a few implementations also available, following are some links which may help:
Ajax jabber/XMPP client recommendations (real experience only please) !
http://xmpp.org/
http://www.jabber.org/
I want to write an app that sends an SMS to users, and when the recipients texts back, I receive that response, including the originating phone number, and my program can react to that response.
I've googled "Interactive SMS" but didn't find anything that was clearly a fit. Has anyone else done this, got any recommendations for a paid service that provides this kind of functionality?
Alternatively, do you have any other recommendations for how to build this service into my app, which will probably be written in C#?
Find an SMS service provider that gives you an API you can use (e.g. an HTTP API). Then read their documentation.
You need to learn about SMPP (short message peer to peer) protocol. Is the protocol usually used to communicate with carrier's SMSC (Short Message Service Center). Here's a blog entry summarizing the actual status of some C# SMPP libraries. If you don't want to use an existing .NET library, you can always write your own. SMPP is not a very complex protocol after all.
An alternative might be attach your application to a cell phone, and if that cell phone provides you with an API, use it to send and receive texts. The problem here is that it won't scale if your application expects to send and receive hundreds of thousands of text messages per day.
Yet another alternative will be to use a CARRIER AGGREGATOR company that provides you with an API for your application. There are some out there, but I don't know if they will be able to offer you a short code and the possibility to receive texts in your application. Depending on the market you are targeting, you should do a little bit of research on how other VAS companies do it over there.
You can use the TextMarks API for this. It's REST-based and super simple to use. So simple that Harvard uses it to teach new students how to use APIs. Docs here.
Messages routed to you from a user are called MO messages (Mobile Originated) and most 3rd party SMS gateways implement simple api's whereby they will simply HTTP post you incoming messages (including the originators msisdn and home network).
For example http://www.clickatell.com/products/two_way.php
Search the site for SMS Gateways for others.
Check SMS Studio - guys have done a lot on that subject and maybe you can use of-the-shelve software or customize it a little to suit your needs.
If not, at least you can find some good keywords for googling.
Anyway, you will have a choice - either go with SMS gateway, or for low volume SMS traffic, you can go with GSM Modem and handle it manually, though it's not recommended.