I’m looking for a way to embed a single page style web application into an industrial pc that’s running TwinCAT 3 plc to control an automation system. The hmi on this system is already written in c# using the beckhoff ads dll. What I’m having trouble with is how to embed the server that’s reading and writing data to my plc instance and the web page front end into one application. I’m looking to use c# or python as those are the languages that I have experience in. I would like to be able to log into this webpage by the up address of the Pc and get a page on a phone or laptop that allows elements on the screen to be interacted with like buttons and a joystick style control for creating motion on the machine.
Which OS is the PLC running on? If WinCE, its a bit trickier. You'll need VS2008 to compile against the NET35CF for C#.
With a "full" version of windows, things become simpler - you can use whichever version of .NET will fit on the controller, or whichever version of Python supports the python ADS library.
After that, create your connections into the PLC as per the Beckhoff ADS examples when required by your web page.
Of course you will need to manage the web server accordingly. Some Beckhoff PLCs already use IIS for basic diagnostics, so you would have to set up an appropriate route to your page to avoid conflict.
Related
I have created a windows form application that is a face recogniser using EMGU CV. I also have a website which is locally hosted on my laptop, made using ASP.NET MVC4. I want a link on my website which ,upon clicking, opens the facial recognition software. Is it possible to do it? Do I have to create a setup of application and install it to do this or is there any other way?
The effort involved to do what you are asking for is almost certainly much higher than you are willing to take on. I'm only aware of two possible approaches. The first is to use the Microsoft Click-Once technology, which streams binaries through to the client. However, the binaries arrive at the client very untrusted, so you need to do quite a bit of work on the client to set up the appropriate permissions. The other approach is to associate your image recognition form with one of the safe MIME types, and then stream out a file of that MIME type. If your application is the default application for that type, it will be called to handle that file.
I have MyDotNet4.dll that user installs as application on machine. In my case this is components that will take care of interfacing with TWAIN scanner.
I also have my Silverlight application with elevated permissions (SL4 OOB or SL5 in/out of browser)
I want to somehow invoke methods of MyDotNet4.dll using Silverlight code. Is that possible? How? Any pointers or sample code?
My idea is to have Silverlight app and if user needs scanning - I will let him download and install real windows app and than I would like to somehow talk to this app from Silverlight.
It may not work, but have a look at this blog, http://netfxharmonics.com/2008/12/Reusing-NET-Assemblies-in-Silverlight, see The Assembly-Level Technique section if (as your question suggests) you do not have the source code for the dll in question. I have faint recollection that I used that method as a test a long while back, but since I had the source I ended up going with the file level approach to share common code between a dll referenced by my Silverlight project and my console app project
Silverlight does have local messaging but that works only between two silverlight apps. See the following for LocalMessaging
Msdn page.
Silverlight OOB and mutiple windows - LocalMessaging
From this similar SO post: Communicating with a Silverlight 4 LocalMessageReceiver from a Desktop Application and this other thread here on the silverlight forums seems you're out of luck and you will have to implement your own communication scheme.
I'm assuming your SL app needs to invoke the scanning app and get the image. You could run your scanning app like this and then have the app drop the picture in a know directory which your SL app can then pick.
I need to write VoIP/SIP Soft Phone in C# using WPF interface with Audio support only.
I need to have call transfer, call conference, and recording of conversations in mp3.
I've looked at VoIP SDK from ABTO LLC, but it is slow at application startup (30 seconds to start application, I think it's related to loading activex part of this sdk).
I've also looked at SIP.Net, but it's only for SIP and doesn't contain components for voice data transfer.
I have very limited time only 2 months from zero to fully working app.
What SDK can I use to accomplish this task?
Windows 7 must be supported.
We have done this using SipekSDK. It's written on top of famous pjSIP open source SIPClient project. It does all the operations you have mentioned in the question.
https://sites.google.com/site/sipekvoip/
What is the Sip server you are going to use ? If its not asterisk, you can have a look of microsoft's Lync here.
You can download the Lync SDK and start exploring. Not just the audio call, Microsoft Lync has features like video call, chat, presence, conference etc.... and ofcourse connectivity to landline/pstn through voip providers
Another interesting article explaining the different SDKs for unified communications can be found here
Edit: If its for Asterisk, Sipek is the only available free opensource but we had lot of problems in installing in clients system like
C folder access
Poor device
support
Port conflict- If any
other voip app like qutecom runs on
5060, then Sipek wont run as the
port is being used already.
I struggled with this exact issue and eventually came across ABTO LLC.
They have an SDK available that supports Win 7, Win XP and can be used in WPF.
We did ask them though to build a separate SDK example for us as we are using ClickOnce for our deployments and so registering external libraries is impossible, but they graciously did it and i think have integrated into their SDK, if not then ask them to give it to you.
We are using a FreeSwitch SIP Server combined with ABTO's library and it is working like a dream. We are doing VoIP, Video and Conferencing and have had no issues at all.
The application I added the VoIP functionality to is a WPF 4 app.
I hope you can help!
In brief, what I need is something like a cross platform web browser, with little or no chrome, that is easily distributable and allows the (local and remote) HTML pages running in it to receive messages (JavaScript?) when system global hotkeys are pressed.
I'm developing a desktop application which will utilise an existing web-based REST API. I would like this app to be cross-platform (Windows, Mac OS and Linux) and have a consistent interface across all platforms. The app runs in the system tray and uses global hotkeys for convenient access to a lot of it's functions without having to open the main UI window.
I have already written a rough initial version of the app using C#/Windows Forms, but there are a few issues. It currently uses unmanaged Win32 code to provide support for global hotkeys, which is not cross-platform even if I ported it to Mono. Plus, it's really not very pretty...
Ideally, I'd like to build the UI using traditional web technologies like XHTML/CSS and use JavaScript/AJAX to communicate with the remote API, which is why I thought Adobe AIR would be a good solution—but unfortunately it still doesn't support global hotkeys. I've also looked at XULRunner but I'm not sure I properly understand what that's intended for.
So the basic requirements for whichever combination of tools I will use are:
Allow me to create the user interface in XHTML/CSS/JavaScript
JavaScript to remotely communicate with the web API via AJAX
Allow the app to show—and be accessible via—a tray icon (in whatever OS it's running on)
Allow the app to respond to global hotkeys (again, in whatever OS it's running on)
Does anyone have any advice for me on this? I'm open to any suggestions and examples, no matter the language or tool.
Edit: I just stumbled across Nokia's Qt Toolkit, does anyone have any experience with this?
I think AIR application is a good solution. For the global hotkeys there are some "alternatives" Can I assign a global hotkey to an Adobe AIR app?
Today we have a windows application that, using an OCX, creates a web page (visible by a WebBrowser control in a small .NET WinForm application) and communicates through COM to the main application/client. (not relevant but this is Pascal)
I'm currently responsible to re create this application in a web environment so we can have the same functionality shared through Web as the user can see the same in a Web Browser.
The Windows application has almost 4 years on it and I need to re create everything from scratch, and all the bugs/features find in the future in the Windows Application I have to re create them again in the Web...
Ohh well, you can see where this will end.
I was thinking... is there any way I can create a Wrapper, even using 3rd party commercial objects, to:
Communicate with the COM Object
Can expose the content of the OCX
(this in my most confortable language, ASP.NET C#, but other are welcome)
I was thinking out loud, can this be accomplish with a Java Applet? Silverlight 4?
Any ideas or any point to the right road will be appreciated.
You may want to consider using Silverlight 4. Although it's not fully baked (Microsoft announced it as Release Candidate status yesterday or today) it has COM support but will run in a web enabled way.
The fact that your previous application is Windows/OCX tells me that the chief weakness of this approach, which would be platform neutrality, is less of an issue.