How to interact with a SLDRT (Kernel mode) simulation using TCP/IP
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hello everyone,
We have developed a hardware in the loop real time simulation with Simulink Desktop Real time and the model interfafces with the hardware using several serail com ports currently. We would also like to have the ability to interact with the model via TCP/IP to change certain parameter values during the runtime and we are not sure how to achieve this.
We have been using Simulink Real time (2015b) that runs an equivalent model on a target PC and our exsisting windows based application can interface with the model running on a xPC via TCP/IP. We were wondering if there is an easy way to use the existing windows application to interact with the new model that runs in SLDRT (Kernel mode).
We would ideally like to retrieve parameters from the model, change the values of certain parameters in real time etc.
Any help would be appriciated in this regard.
Thank you
0 commentaires
Réponses (1)
  Jan Houska
      
 le 10 Déc 2024
        Hello Howard,
Simulink Desktop Real-Time is designed in such a way that the real-time code runs on the same computer as MATLAB and Simulink. That is, the host and the target share the same computer hardware. If you prefer the host and the target to be two separate machines, please consider Simulink Real-Time instead.
That said, it is possible to communicate with a Simulink Desktop Real-Time model using TCP/IP. You can use the Packet Input or Stream Input block (or their Output variants), according to your data format preference. However the received data acts as a signal (as opposed to parameter) and you must design the model to respond to that signal. Also, the processing of the TCP/IP-sent and received data on the remote computer is entirely up to you, although you will be probably able to use App Designer to build an app for that.
Good Luck, Jan
0 commentaires
Voir également
Catégories
				En savoir plus sur Model Preparation for Real-Time Simulation dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

