CodeMesh 2014 – Peer Stritzinger – Programming a Massively Scalable Garage Door Opener in Erlang
Programming a Massively Scalable Garage Door Opener in Erlang
Programmable Logic Controllers (PLCs) are widely used to control from a simple garage door to everything in factories. There are legions of specialized PLC programmers who make those machines do their work. A set of textual and graphical programming languages is standardized in IEC-61131. In order to add some programmability to control machinery in a embedded system written in Erlang (running on RTEMS) we picked one of those languages, Structured Text and implement a compiler for it in Erlang targeting BEAM (via Core Erlang).
There is even a recent extension for distributed PLCs standardized in IEC-61499, which we implement. These extensions fit naturally on Erlang processes and messages which makes distributed PLC applications overlaid on distributed Erlang embedded application work very well.
There are plans to get hard realtime behaviour for the IEC 61131/61499 subsystem which can be a testbed for a extended subset of Erlang for the hard realtime parts of embedded systems which until now still have to be written in C.
– Getting a short overview of standardized programming languages used in PLC.
– Showing how OTPs built in tools leex and yecc can be used to implement a compiler for one of the languages. Showing how to map PLC languages which have some inherent concurrency on Erlang processes and messages. Explaining the internal Core-Erlang language that is used as target.
– Demo a distributed PLC application on networked embedded nodes: there will be real Hardware!