Showing posts with label MATLAB. Show all posts
Showing posts with label MATLAB. Show all posts

Tuesday, July 14, 2015

Connecting Matlab and C++ using UDP

Here is the code for connecting Simulink Desktop Real-Time™ and a C++ program using connectionless UDP. WinSock2 is used in C++.
https://github.com/mahyaret/Matlab-Real-Time

Friday, July 10, 2015

What is Real-Time?!

When the simulation clock reaches a certain time in real-time simulation, the same amount of time must have passed in the real world.


Real-Time Windows Target™ (now Simulink Desktop Real-Time™) and xPC Target™ (now Simulink Real-Time™) are no the same!

 Simulink® Real-Time™ lets you create real-time applications from Simulink models and run them on dedicated target computer hardware connected to your physical system. It supports real-time simulation and testing, including rapid control prototyping, DSP and vision system prototyping, and hardware-in-the-loop (HIL) simulation.

 Simulink® Desktop Real-Time™ provides a real-time kernel for executing Simulink models on a Windows® or Mac laptop or desktop. It includes library blocks that connect to a range of I/O devices. You can create and tune a real-time system for rapid prototyping or hardware-in-the-loop simulation with your computer.

Simulink Real-Time provides native I/O drivers and functions for target computer hardware purchased directly from the respective hardware manufacturer, which provides backward compatibility for target applications built with xPC Target™,  Simulink Desktop Real-Time™ provides a real-time kernel for executing Simulink® models on a laptop or desktop running Windows® or Mac OS X. It includes library blocks that connect to a range of I/O devices.

Friday, November 21, 2014

How to Use Solidworks Model in Matlab

Imagine that you have designed a part in Solidworks and you want to transfer the cloudpoints of its surface to Matlab (lets say their XYZ coordinates). In order to do that you have to first make a new static study in Solidworks Simulation Toolbox. Then start meshing the model with any intensity you need. Then right click on mesh and click on "List Selected":