Peer Stritzinger

Programming a Massively Scalable Garage Door Opener in Erlang

Founding Owner and Managing Director of Peer Stritzinger GmbH

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.

Talk objectives:

- 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!

Target audience:

- Language enthusiasts

- Embedded developers

- People interested in compilers written in Erlang

- People interested how PLC's work and what they are used for

- PLC programmers should there be any on the conference"

About Peer

Peer ported Erlang to Hard-Realtime Operating system RTEMS ( He developed the Hydraprog automotive control unit flashing device, which has been used successfully all over the world for over a decade. Since 2007 the firmware of the device is written mainly in Erlang - including protocol stacks for all existing automotive protocols. Peer is currently developing an industrial transport system controller with Erlang in a small embedded system.

Peer's previous experience ranges from low level device drivers to functional languages in industrial and automotive applications, he initially mastered in Physics at the Technical University Munich. He has been working self-employed as a developer since 1987 and also consulted in applied cryptography and protocol design and implementation.

He is currently living and working in the idyllic countryside west of Munich, Bavaria.

Twitter: @peerstr

Back to conference page