M
A few months ago on this list we discussed ladder logic editors. At the time I said that I thought it would be possible to create a ladder logic editor that would run in a standard web browser without using any plug-ins. I've written a basic editor and have it on line on my MBLogic project web site.
This is a direct link to the editor:
http://mblogic.sourceforge.net/techdemo/laddertest.xhtml
This is a direct link to some documentation on how to use it (see the additional links on that page for more help web pages with details.):
http://mblogic.sourceforge.net/techdemo/ladhelp/ladderhelp.html
The demo itself requires Javascript and SVG, so it will run in almost all modern web browsers (it won't run in MS IE however, as that program doesn't have SVG to allow dynamic display of graphics). I've tested it on Mozilla Firefox, Google Chromium, and Opera. It will probably work on Apple Safari as well (but I haven't tested that one).
It's not integrated into the MBLogic open source soft logic platform yet as I still have some work to do to integrate it into the system (some of the processing will be done on the MBLogic server). The demo web page just loads some "dummy" static data from a file to allow a single subroutine to be edited.
However, this sample demonstrates that the idea is practical. You can at present:
1) Add and delete rungs.
2) Edit individual rungs while adding and deleting contacts, coils, timers, etc.
3) Edit addresses.
4) Edit subroutine and rung comments.
Everything was done using bog standard AJAX web programming techniques. All the editing actions take place directly in the web page without reloading the page.
I plan to do another demo which will show how live on-line ladder status can be displayed in a web page by combining techniques used in this example with techniques used in the web based HMI that I wrote a while ago. Again, this would simply use well established and widely used standard AJAX web programming techniques.
I thought this might be of interest to other people as it shows what is possible. The ideas can be applied to more things that just my own MBLogic open source project.
While it isn't something that you could graft onto an existing conventional PLC (at least not easily), it is something that a conventional PLC maker could build into their own product if they wanted to (they would need their own version of it of course).
For example, I mentioned on-line monitoring of a ladder diagram in a web page. Wouldn't it be nice to be able to troubleshoot a PLC program by just connecting to the PLC CPU using a standard web browser? It's not actually that hard to implement, <i>if</i> you're the PLC manufacturer and can insert the (fairly simple) support logic into the system.
Also imagine, you wanted to do some quick and simple on-line editing of a program (as the demo shows). Again, it would be possible to do this <i>if</i> the PLC included the (relatively simple) support logic.
If anyone wants to discuss how the system works I would be happy to talk about it. I'm trying to use this to start off a discussion of how these concepts could be used in the automation industry. I would also appreciate some feedback on the demo itself. I think this technique is something the automation industry should be embracing. It doesn't necessarily render conventional programming packages obsolete, but it would offer some new and convenient options for people who have to operate and maintain equipment.
I will forestall a few comments though by pointing out that yes, I know the demo doesn't have cross referencing built in - that feature has already been built into MBLogic for a while and so isn't shown here. The same goes for creating and deleting subroutines, saving changes, etc. The sample web page is just intended to demonstrate actually editing ladder instructions.
This is a direct link to the editor:
http://mblogic.sourceforge.net/techdemo/laddertest.xhtml
This is a direct link to some documentation on how to use it (see the additional links on that page for more help web pages with details.):
http://mblogic.sourceforge.net/techdemo/ladhelp/ladderhelp.html
The demo itself requires Javascript and SVG, so it will run in almost all modern web browsers (it won't run in MS IE however, as that program doesn't have SVG to allow dynamic display of graphics). I've tested it on Mozilla Firefox, Google Chromium, and Opera. It will probably work on Apple Safari as well (but I haven't tested that one).
It's not integrated into the MBLogic open source soft logic platform yet as I still have some work to do to integrate it into the system (some of the processing will be done on the MBLogic server). The demo web page just loads some "dummy" static data from a file to allow a single subroutine to be edited.
However, this sample demonstrates that the idea is practical. You can at present:
1) Add and delete rungs.
2) Edit individual rungs while adding and deleting contacts, coils, timers, etc.
3) Edit addresses.
4) Edit subroutine and rung comments.
Everything was done using bog standard AJAX web programming techniques. All the editing actions take place directly in the web page without reloading the page.
I plan to do another demo which will show how live on-line ladder status can be displayed in a web page by combining techniques used in this example with techniques used in the web based HMI that I wrote a while ago. Again, this would simply use well established and widely used standard AJAX web programming techniques.
I thought this might be of interest to other people as it shows what is possible. The ideas can be applied to more things that just my own MBLogic open source project.
While it isn't something that you could graft onto an existing conventional PLC (at least not easily), it is something that a conventional PLC maker could build into their own product if they wanted to (they would need their own version of it of course).
For example, I mentioned on-line monitoring of a ladder diagram in a web page. Wouldn't it be nice to be able to troubleshoot a PLC program by just connecting to the PLC CPU using a standard web browser? It's not actually that hard to implement, <i>if</i> you're the PLC manufacturer and can insert the (fairly simple) support logic into the system.
Also imagine, you wanted to do some quick and simple on-line editing of a program (as the demo shows). Again, it would be possible to do this <i>if</i> the PLC included the (relatively simple) support logic.
If anyone wants to discuss how the system works I would be happy to talk about it. I'm trying to use this to start off a discussion of how these concepts could be used in the automation industry. I would also appreciate some feedback on the demo itself. I think this technique is something the automation industry should be embracing. It doesn't necessarily render conventional programming packages obsolete, but it would offer some new and convenient options for people who have to operate and maintain equipment.
I will forestall a few comments though by pointing out that yes, I know the demo doesn't have cross referencing built in - that feature has already been built into MBLogic for a while and so isn't shown here. The same goes for creating and deleting subroutines, saving changes, etc. The sample web page is just intended to demonstrate actually editing ladder instructions.