Mittwoch, 25. Februar 2015

A Node.js based PLC Emulator

I just uploaded an old project of mine to Github:

Many thanks to my girlfriend Franziska for drawing Mr. Ripley above.

Some years back a tried to get my head around Javascript and Node.js in particular. The latter one was quite new and you would read about it everywhere.

Based on some ideas from work I started implementing an idea I had for a long time: In a production environment their are many Programmable Logic Controller (PLCs) which communicate with a background system. To test the background systems logic it is common to replace the PLC with an emulation software. This software is than acting like the PLC (sending messages, receiving messages...).

At the time I was in charge of the background system including the required programming. Since the emulation software is complex we always required a separate emulation programmer for testing. My idea was create an alternative emulator which was configurable by a config file and which could cover 80% of the usual emulation cases.

I had good fun implementing my idea, working with Node.js went reasonable well. However, by the time when I finished I had a much better idea which is in use now: instead of impersonating a PLC I found out is much easier to write integration scripts on the background system itself which would trigger the same actions as the PLC emulator would have triggered.

Those scripts follow the xUnit style of programing tests and are way more broader and flexible.

The github repository is where Ripley is now laid to rest.

Keine Kommentare:

Kommentar veröffentlichen