MathWorks ThingSpeak
ThingSpeakTM is an IoT platform from The MathWorks®, well known among other things for the software solutions MATLAB® and Simulink®.
The platform offers (apart from a REST API) an MQTT interface, via which the data from the TwinCAT runtime can be sent to ThingSpeakTM. ThingSpeakTM enables the collection, storage, analysis, visualization of and reaction to incoming data. An important point that sets it apart from other platforms is the option to write MATLAB® code in the web browser, which can be used for the analysis and visualization of the data. It is also possible to use existing licenses for toolboxes from the On-premis programming environment in ThingSpeakTM.
Functioning
The data ingest and the saving of data take place on the basis of so-called channels. Each channel has 8 fields that can be filled with incoming data. Apart from the 8 data fields there are further meta fields available such as latitude, longitude, altitude or a time stamp. Data published on a channel are stored in a database with the option of a data export (JSON, XML, CSV). The number of messages per time unit that can be sent to a channel depends on the stored ThingSpeakTM license. The MQTT interface is currently based on the sending of strings that are interpreted by the ThingSpeak channel.
Examples of possible actions on ThingSpeakTM:
- Send a message to Twitter
- Cyclic execution of Matlab analysis scripts
- Execution of a Matlab analysis script, triggered by channel conditions.
Applications
On account of the data rate – limited by the cloud service – that can currently be sent by the controller to ThingSpeakTM, a pronounced edge computing approach is a constructive strategy. MATLAB®/Simulink® models can be integrated in the TwinCAT runtime via the Beckhoff product TE1400 and algorithms for information densification in real time can be executed along with the various TwinCAT functions (Condition Monitoring, filter, etc.). Furthermore, processes with large time constants such as energy data management, building automation, etc. can be handled well with ThingSpeakTM.