nguyenlkdn / C_Code_Integration

C Code Integration in MATLAB and Simulink to Control an External Interface.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C Code Integration in MATLAB and Simulink to Control an External Interface

This example is focusing on the integration of C code in MATLAB and Simulink.

Overview

Goal: Show C code integration and C code generation out of MATLAB and Simulink algorithms for a parking meter application

Technique 1: MATLAB implementation with or without Stateflow and also with or without the App Designer

Technique 2: Simulink implementation with or without System Composer

End result: In all cases, the goal is first to be able to simulate the entire system by integrating the low-level C interface drivers and then to generate C code out of the algorithm and create a standalone executable automatically

Data used: PNG images have been created to graphically design the parking meter application

MATLAB Project: ParkingMeter.prj

MATLAB App: ParkingMeterGUI.mlapp

Steps

Step 1: To setup the project in MATLAB, double click on "ParkingMeter.prj"

Step 2: In the "project shortcut" tab on top, click on the option of your choice to either simulate/generate or run the code. The contents of the "project shortcut" tab depends on the selected implementation

Step 3: Each local "Readme.txt" file provides the needed steps to do to properly run the application

Summary

A C# interface is used for the front-end of the parking meter and it can be controlled with MATLAB and Simulink through a Windows shared memory interface

For more information

Requires

Copyright 2020 - 2020 The MathWorks, Inc.

About

C Code Integration in MATLAB and Simulink to Control an External Interface.

License:Other


Languages

Language:C 68.1%Language:MATLAB 26.9%Language:Makefile 4.9%Language:Batchfile 0.1%Language:Limbo 0.0%