Use generated code from Simulink Model in Thingspeak

2 次查看(过去 30 天)
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.

回答(2 个)

Peret Lopez
Peret Lopez 2020-1-7
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 个评论
Vinod
Vinod 2020-1-7
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 2020-1-8
Can I install addons in ThingSpeak engine? That is my concern

请先登录,再进行评论。


Vinod
Vinod 2020-1-7
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?

社区

更多回答在  ThingSpeak Community

类别

Help CenterFile Exchange 中查找有关 ThingSpeak 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by