Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Getting data from a C++ program into simulink

Subject: Getting data from a C++ program into simulink

From: Jean

Date: 28 Oct, 2009 03:49:04

Message: 1 of 1

Hi,

I wrote a program in C++ that connects to Microsoft Flight Simulator and retrieves some data from a flight simulation. More specifically I am retrieving 3 accelerations and 3 angular velocities (xyz).

I would like to take those values from the c++ program and feed them as inputs into a simulink model I constructed. In other words, I would like the c++ program to be part of the simulation as a data source for the model.

I tried using the S-Function builder but it wont compile the c++ program. The code I wrote runs perfectly in Visual C++ 2008 Express and I specified the proper compiler using the "mex -setup" command.

Is there any way to accomplish this?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us