Use generated code from Simulink Model in Thingspeak
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (2)
Peret Lopez
on 7 Jan 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 Comments
Vinod
on 7 Jan 2020
Peret: Once you install the MQTT in MATLAB addon, you can publish messages to any MQTT broker of your choice, including ThingSpeak.
Vinod
on 7 Jan 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?
0 Comments
Communities
More Answers in the ThingSpeak Community
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!