Use generated code from Simulink Model in Thingspeak

2 visualizaciones (últimos 30 días)
Artyom
Artyom el 24 de Oct. de 2019
Comentada: Peret Lopez el 8 de En. de 2020
Hello
I know, that it should be possible to use Simulink-generated code at the edge, which would work with ThingSpeak Data.
But is it possible to deploy generated code at the cloud (e.g. in Thingspeak) to receive a kind of cloud controller for IoT devices, which would receive sensor data, do analitics/control periodically or in response to some event and send commands back over MQTT to IoT devices?
I know this would be a very slow controller, but the main Idea to have it simulated in Simulink, rather than in MATLAB.
Thanks for feedback.

Respuestas (2)

Peret Lopez
Peret Lopez el 7 de En. de 2020
Very interesting question. I am wondering whether it is possible to publish to a MQTT server. I woul like to publish outputs from a MATLAB Analysis app. That is the way I have thought about to populate results from the MATLAB Analysis app.
  2 comentarios
Vinod
Vinod el 7 de En. de 2020
Peret: Once you install the MQTT in MATLAB addon, you can publish messages to any MQTT broker of your choice, including ThingSpeak.
Peret Lopez
Peret Lopez el 8 de En. de 2020
Can I install addons in ThingSpeak engine? That is my concern

Iniciar sesión para comentar.


Vinod
Vinod el 7 de En. de 2020
It is certainly possible to do, but requires some engineering of wrappers to expose the MATLAB code as a service.
Do you mind writing to vcherian <at> mathworks <dot> com with more details -- what kind of system are you simulating? How often does your device going to call the service? How many devices are going to be connected to the controller in the cloud at any given time? Are the control outputs for each device independent of the other devices? Does your controller need knowledge of previous state of the system?

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Categorías

Más información sobre ThingSpeak en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by