Chris, I started doing some work in this area a while back (2006), but real work got in the way and it fell by the wayside. It started with Classic Ladder and simply wanting a user interface separate from the ladder executive, just as a program loader is separate from the PLC. But with greater aspirations, in the sense of being able to do HAL configurations as FBDs (function block diagrams) or even enabling any of the other IEC 61131-3 "programming languages" (see http://en.wikipedia.org/wiki/IEC_61131-3).
My thought was to use XML as the means of encapsulating (storing) any of these languages, and I did a preliminary definition (dtd), included at the bottom of this email. It should probably be converted to a schema, but I did not really understand them at the time. The XML would then be used to generate both the configuration (HAL) on the EMC side, and to render the representation on the user interface side. The user interface would then communicate with EMC over a socket interface. That portion already basically exists in halrmt. Communicating over halrmt would then "animate" any of the representations with the live component pin, signal or parameter values. You can see this interface by adding the line: loadusr halrmt To one of the HAL files in your configuration. You can then use telnet to communicate with it as follows: On the same machine: telnet localhost 5006 Just type 'help', and it will list the interface and syntax. To log in, enter: hello EMC <client> <version> Where client is any string, but typically the network name of the client, and version is 1.0. "EMC" is the password to enable the interface. The interface also only allows a single session to be "enabled" to change values at any one time. To become the enabled session, enter: set enable EMCTOO The rest you should be able to get from the help. I also wrote a really crude program loader application to render and edit ladder diagrams. It currently runs only on Windows, as I did not know any visual design tools on Linux. For the prototype I used Borland Delphi because there were issues with the Internet controls (indy) under Free Pascal (http://www.freepascal.org/) / Lazarus (http://www.lazarus.freepascal.org/). Delphi is Windows only, however Free Pascal / Lazarus is multi-platform, including both windows and linux among others. If you are interested, I can send you what I have in an email. Regards, Eric Yes I would like to see it. I have no experience with any other ladder programs or devices. I would like a GUI based editor for HAL as I am more visual oriented. I understand the need for powerful command line interfaces but for most testing and less complicated things I would much prefer point and click as would newbies coming from Windows. What we are talking about , I think is a window IDE for HAL. I can not build such a GUI program as I don't have the skills (I am slowly learning). I think the biggest stumbling block is how do you represent such complex information clearly. I toyed with the idea for Classicladder to display all current HAL signals, pins, modules and to be able to set pins but though it would be convenient for me, Classicladder is for PLC programming not HAL programming, though when one is creating a ladder program one has to program HAL at the same time. IEC 61131-3 DTD follows ---------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!-- ============================================================================ = HAL IEC 61131-3 compliant process control representation DTD Version 0.7.0 (pre-alpha) Unpublished work. Copyright (c) 2006 Eric H. Johnson All rights reserved. NOTICE: THIS IS A PRELIMINARY PROOF OF PRINCIPLE, AND IS SUBJECT TO CHANGE. IT IS NOT FOR USE IN PRODUCTION. ANY USE IS AT YOUR OWN RISK ============================================================================ = This definition is free; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU General Public License as published by the Free Software Foundation. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA THE AUTHORS OF THIS LIBRARY ACCEPT ABSOLUTELY NO LIABILITY FOR ANY HARM OR LOSS RESULTING FROM ITS USE. IT IS _EXTREMELY_ UNWISE TO RELY ON SOFTWARE ALONE FOR SAFETY. Any machinery capable of harming persons must have provisions for completely removing power from all motors, etc, before persons enter any danger area. All machinery must be designed to comply with local and national safety codes, and the authors of this software can not, and do not, take any responsibility for such compliance. This code was written as part of the EMC HAL project. For more information, go to www.linuxcnc.org. ============================================================================ = --> <!ELEMENT Module (LadderDiagram | FunctionBlock | StructuredText | InstructionList | SequentialFunctionChart)+> <!ATTLIST Module ModuleName CDATA #REQUIRED Version CDATA #REQUIRED Description CDATA "" Author CDATA "" CreateDate CDATA "" ChangeDate CDATA ""> <!-- ============================================================================ = Ladder Logic Definitions (RLL) ============================================================================ = --> <!ELEMENT LadderDiagram (Rung*)> <!ATTLIST LadderDiagram DiagramName CDATA "" DiagramId CDATA "" DiagramType (Main | Subroutine) #REQUIRED DiagramComment CDATA "" MaxCompsPerRung CDATA "10" InternalBits CDATA "128" InternalInts CDATA "32" InternalFloats CDATA "0" Counters CDATA "8" Timers CDATA "8"> <!ELEMENT Rung (SubRung+)> <!ATTLIST Rung RungId CDATA #REQUIRED RungComment CDATA ""> <!ELEMENT SubRung (Component*)> <!ATTLIST SubRung SubRungID CDATA #REQUIRED LeftPos CDATA #REQUIRED RightPos CDATA #REQUIRED> <!ELEMENT Component (Connection+, (Contact | Coil | Timer | Counter | Math)?)> <!ATTLIST Component Name CDATA #REQUIRED CompId CDATA #REQUIRED CompType CDATA #REQUIRED XPos CDATA #REQUIRED YPos CDATA #Required> <!ELEMENT Connection EMPTY> <!ATTLIST Connection Name CDATA #REQUIRED Side (Left | Right) #REQUIRED ConnectedTo CDATA #REQUIRED> <!ELEMENT Contact EMPTY> <!ATTLIST Contact InputId CDATA #REQUIRED> <!ELEMENT Coil EMPTY> <!ATTLIST Coil OutputID CDATA #REQUIRED> <!ELEMENT Timer EMPTY> <!ATTLIST Timer TimerId CDATA #REQUIRED TimeBase CDATA #IMPLIED Preset CDATA #IMPLIED> <!ELEMENT Counter EMPTY> <!ATTLIST Counter CounterId CDATA #REQUIRED Preset CDATA #IMPLIED> <!ELEMENT Math EMPTY> <!ATTLIST Math Operand1 CDATA #IMPLIED Operand2 CDATA #IMPLIED> <!-- NOTICE - THE REMAINING REPRESENTATION TYPES ARE CURRENTLY ONLY PLACE HOLDERS, TO BE FILLED IN AS THEY ARE DEFINED AND IMPLEMENTED. --> <!-- ============================================================================ = Function Block Definitions ============================================================================ = --> <!ELEMENT FunctionBlock EMPTY> <!-- ============================================================================ = Structured Text Definitions ============================================================================ = --> <!ELEMENT StructuredText EMPTY> <!-- ============================================================================ = Instruction List Definitions ============================================================================ = --> <!ELEMENT InstructionList EMPTY> <!-- ============================================================================ = Sequential Function Chart Definitions ============================================================================ = --> <!ELEMENT SequentialFunctionChart EMPTY> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
