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.

Wednesday, July 8, 2015

Sniffing 127.0.0.1 or localhost packets

Unfortunately this task is not possible in windows using SharkWire so the alternative is using RawCap. You can download it here: http://www.netresec.com/?page=RawCap