1 / 17

JGrafchart – Graphical Domain-Specific Languages in Java

JGrafchart – Graphical Domain-Specific Languages in Java. Karl-Erik Årzén LUCAS & Automatic Control, LTH + Rasmus Olsson, Gert-Ola Carlsson. Domain-Specific Languages. Common in industrial automation/control IEC 61131-3 Function Block Diagrams (FBD) Sequential Function Charts (SFC)

uttara
Télécharger la présentation

JGrafchart – Graphical Domain-Specific Languages in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JGrafchart – Graphical Domain-Specific Languages in Java Karl-Erik Årzén LUCAS & Automatic Control, LTH + Rasmus Olsson, Gert-Ola Carlsson

  2. Domain-Specific Languages • Common in industrial automation/control • IEC 61131-3 • Function Block Diagrams (FBD) • Sequential Function Charts (SFC) • Ladder Diagrams (LD) • Instruction List (IL) • Structured Text (ST)

  3. Grafchart • Graphical programming language for sequential control applications • Based on Grafcet/SFC, Petri nets, object-oriented programming concepts • Steps with actions, transitions with conditions, macros, procedures • Developed at Automatic Control since 1991 (NUTEK, VINNOVA, SSF, EU)

  4. Recipe-Based Batch Control

  5. High-Level Grafchart • Tokens are objects with state • State can be modified from step actions • Transitions are enabled with respect to a certain token object • Tokens may have behavior • function charts • multi-dimensional function charts

  6. Implementation Platform • Grafchart implemented in G2 from • Object-oriented programming environment & run-time system • Powerful, but expensive and not widely spread • Financial problems

  7. JGrafchart • Grafchart in Java/Swing • Go – class package for graphical object editors from Northwoods Corp. • Three versions • Go++ – MFC and C++ • JGo – Swing and Java • Go.Net – .NET and C# • Similar APIs • Model - View - Controller metaphor

  8. JGo • Swing-based class package for interactive diagrams, network editors, connected graphs • Built in support for different shapes, texts, containers, connectors, orthogonal links, arrowheads, scrolling, zooming, selection, drag-drop, resizing, layers, undo-redo, … • AutoLayout package • Several large code examples (graphical editors) included • http://www.nwoods.com

  9. JGrafchart • Graphical editor & run-time environment • JavaCC - parser generator for transitions and actions • Encapsulation - macro steps & procedure steps • Lexical scoping based on workspaces • Serialization or XML as save format • Code generation possible

  10. JGrafchart Demo

  11. JGrafchart Possibilities • High-Level Grafchart Features • Code generation • Support for other 1131-3 languages, e.g., function block diagrams • Tighter Java integration • function charts as graphical Java methods • LUCAS ABB project - Torbjörn Ekman

  12. Master Thesis: Statechart Editor • Gert-Ola Carlsson at ABB Automation Products • Goals: • Add Statecharts as a 6th language to IEC 61131-3 • Interface to Control Builder within ControlIT • JGo-based graphical editor • 1131-3 Structured Text code generation • Transferred as XML to Control Builder

  13. Master Thesis: Statechart Editor

  14. Master Thesis: Statechart Editor

  15. Master Thesis: Statechart Editor

  16. Master Thesis: Statechart Editor

  17. Summary • Java and Swing a nice environment for development of graphical domain-specific programming languages • JGo easy to use and contains several large code examples • Good area for master theses: • ABB Automation Products • Botech

More Related