Initial draft of machinetalk’s software architecture

With machinetalk we want to bridge the gap between embedded systems and web technologies – think of machinetalk as a babel fish bridging this gap. Which means translating JavaScript to any required machine language and vice versa.
In order to tackle this issue, we thought about various architecture for the software framework of machinetalk. Finally, we came up with a framework comprising three logical compartments: the core, modules, and applications

Core of machine talk

How does it work? The core takes care of hardware communication, protocols (e.g. CAN bus, EtherCAT, FlexRay, I2C, websockets, …) and the interplay of modules and applications. If an application requests e.g. a CAN bus connection to a machine, the core establishes the appropriate connection and guarantees the transfer of messages to and from the machine.

Modules

Modules implement all control and communication options provided by a specific machine. For example, a Cartesian portal system (as shown in our last blog post) comes up with control commands setting the X and Y position, the acceleration and the velocity of motion. Other devices may provide other functionality and with it other control commands. In a module, each command is implemented for each protocol that is supported by the machine. The following code snippet shows exemplarily the implementation for a websocket connection:

Applications

It is worth mentioning that most users of machinetalk won’t get in touch with module implementation, because a module for a machine will be implemented only once. Whereas with an existing module you are able to built an unlimited number of application for a machine. And all of this can be done using JavaScript without the need to worry about all the low level communication- and protocol-specific stuff.

As machinetalk is based on Node.js, writing an application is quite easy. First require the core of machinetalk and the module of your machine. Set up the communication protocol and parameters – and run the machine. That’s all. The following snippet shows a small application running a Cartesian portal system:

Join us

To wrap up: one core – numerous modules – unlimited applications. If you are looking for a solution to control and programm your machine with machinetalk – get in touch with us. Share your ideas and help to make machinetalk better.

Leave a Reply