# C_Code_Integration **Repository Path**: hzqeric/C_Code_Integration ## Basic Information - **Project Name**: C_Code_Integration - **Description**: C Code Integration in MATLAB and Simulink to Control an External Interface. - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-08-27 - **Last Updated**: 2024-10-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **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** * [Download a free trial](https://www.mathworks.com/campaigns/products/trials.html?prodcode=ML) * [Download a free trial](https://www.mathworks.com/campaigns/products/trials.html?prodcode=SL) * [MATLAB App Designer](https://www.mathworks.com/products/matlab/app-designer.html) ### **Requires** - [MATLAB R2019b](https://www.mathworks.com/products/matlab.html) Copyright 2020 - 2020 The MathWorks, Inc.