Solved

Data exchange

Posted on 2003-12-03
8
313 Views
Last Modified: 2010-04-01
Dear all,

Does someone want to help me on how to communicate between executable program written in VisualC++ and another executable program written in Matlab communicate by using DDE (Dynamic data exchange) to exchange data to each other? As I know that Matlab.exe is able to act as DDE server or DDE client, but I have never done it before.  So, may someone please give me an example?

I'm also trying to establish a communication between Matlab and external software, written in Fortran and C languages. The data should be exchanged every a defined time, e.g. 200ms, to each other (data alter from the first program to the second and from the second require passing back to the first). But, I'm not quite sure if it's possible to use DDE. So, is it possible? and how?

Thanking you in advance for your reply,
Azzedine
0
Comment
Question by:azzedine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 9868431
0
 

Author Comment

by:azzedine
ID: 9869305
Sorry I forot to mention that I want to communicate Matlab.exe and C++.exe over UNIX environment. I'm not sure but I think it's not possible to use DDE (Dynamic data exchange) under UNIX. So, does someone want to help and tell me how I can communicate Matlab.exe and C++.exe under UNIX?

Thanking you again in advance for your reply,
Azzedine
0
 
LVL 86

Expert Comment

by:jkr
ID: 9869329
>> I think it's not possible to use DDE (Dynamic data exchange) under UNIX

That's correct. On UN*X, you will have to resort to calling applications from MATLAB as described on http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/ch03crea.shtml#calling_from_matlab ("Calling C and Fortran Programs from MATLAB")
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Assisted Solution

by:RJSoft
RJSoft earned 50 total points
ID: 9874945
In Unix communication between exe's is easy using environment variables. Create a script that creates the environment variables and then start your exe's.

RJ
0
 

Author Comment

by:azzedine
ID: 9875967
Dear Everyone,

Thank you very much for your answers. It may help me if you would like to tell me more on how to create a script using communication between environment variables. Could you please give me an example?

As I have seen that the use of intermidiate file is slow. I want to use another communication option simple but faster than using file. Is that possible?

Thank you again for you reply,
Azzedine
0
 
LVL 86

Expert Comment

by:jkr
ID: 9876000
>>how to create a script using communication between environment variables

This is a one-way communication - you cannot return anything using env. variables.
0
 
LVL 5

Expert Comment

by:migoEX
ID: 10364827
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between jkr and RJSoft.

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

migoEX
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C language IDE – Compilers installation 14 89
Getting IP address 8 121
Move constructor only called if marked noexcept? 6 119
object oriented programming comparison 5 92
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question