<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342</link>
    <title>MATLAB Central Newsreader - exchange data betwwen matlab and VB2005</title>
    <description>Feed for thread: exchange data betwwen matlab and VB2005</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 08 Oct 2007 19:34:28 -0400</pubDate>
      <title>exchange data betwwen matlab and VB2005</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342#395653</link>
      <author>Vincent </author>
      <description>Can someone give me an example on how to send data between &lt;br&gt;
a matlab program and a Vb2005 program.&lt;br&gt;
&lt;br&gt;
I want to be able to send a simple string ( let's say &lt;br&gt;
&quot;hello world&quot; ) from a matlab script to a running program ( &lt;br&gt;
a visual basic 2005 program )&lt;br&gt;
&lt;br&gt;
I also want to read back a string from that visual basic &lt;br&gt;
program.&lt;br&gt;
&lt;br&gt;
There used to be DDe but that seems to have gone away.&lt;br&gt;
&lt;br&gt;
I have a Vb program that handels access to custom &lt;br&gt;
testhardware. I need to be able to read and write data to &lt;br&gt;
that vb program from a matlab script.&lt;br&gt;
&lt;br&gt;
I googled but can;t find a real example. ( both matlab &lt;br&gt;
script and the Vb code.)&lt;br&gt;
if i can pass strings between the program's that is all i &lt;br&gt;
need. i can do the rest.</description>
    </item>
    <item>
      <pubDate>Mon, 08 Oct 2007 20:45:22 -0400</pubDate>
      <title>Re: exchange data betwwen matlab and VB2005</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342#395666</link>
      <author>Dan Haeg</author>
      <description>&quot;Vincent &quot; &amp;lt;nospan.vincent.himpe@st.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fee0o4$qqm$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Can someone give me an example on how to send data between &lt;br&gt;
&amp;gt; a matlab program and a Vb2005 program.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to be able to send a simple string ( let's say &lt;br&gt;
&amp;gt; &quot;hello world&quot; ) from a matlab script to a running program ( &lt;br&gt;
&amp;gt; a visual basic 2005 program )&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I also want to read back a string from that visual basic &lt;br&gt;
&amp;gt; program.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; There used to be DDe but that seems to have gone away.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a Vb program that handels access to custom &lt;br&gt;
&amp;gt; testhardware. I need to be able to read and write data to &lt;br&gt;
&amp;gt; that vb program from a matlab script.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I googled but can;t find a real example. ( both matlab &lt;br&gt;
&amp;gt; script and the Vb code.)&lt;br&gt;
&amp;gt; if i can pass strings between the program's that is all i &lt;br&gt;
&amp;gt; need. i can do the rest.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
search this site for matlab.execute</description>
    </item>
    <item>
      <pubDate>Fri, 15 Feb 2008 03:47:01 -0500</pubDate>
      <title>Re: exchange data betwwen matlab and VB2005</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342#415225</link>
      <author>Vincent </author>
      <description>Sorry, that's not what i am looking for.&lt;br&gt;
Let me detail.&lt;br&gt;
&lt;br&gt;
on the SAME computer 2 programs are running&lt;br&gt;
- Matlab&lt;br&gt;
- A program written in VB 2005 and COMPILED to an &lt;br&gt;
executable.&lt;br&gt;
&lt;br&gt;
I want to be able to write a script in matlab that can send &lt;br&gt;
information to the running VB program.&lt;br&gt;
&lt;br&gt;
The MAtlab script is in control !&lt;br&gt;
&lt;br&gt;
My question are the following&lt;br&gt;
&lt;br&gt;
- how do i expose internal functions and procedures from &lt;br&gt;
the VB program to matlab ?&lt;br&gt;
&lt;br&gt;
For eaxmple the VBprogram has the following 2 functions&lt;br&gt;
&lt;br&gt;
Public sub Write (address as data32,data as int32)&lt;br&gt;
public function Read(address as int32) as int32&lt;br&gt;
&lt;br&gt;
What do i need to specify so these functions become visible &lt;br&gt;
to the outside world ?&lt;br&gt;
&lt;br&gt;
Then the other part is : What do i write in matlab to 'call &lt;br&gt;
these functions ?&lt;br&gt;
&lt;br&gt;
Keep in mind that the VB program is running on the machine.&lt;br&gt;
The matlab script needs to be able to detect that the &lt;br&gt;
program is running ( if its not running the matlab script &lt;br&gt;
should stop and give a warning ), hook into it and call the &lt;br&gt;
functions and pass data ( mostly int32 int64 , double and &lt;br&gt;
single. i don't pass complex constructions like arrays. its &lt;br&gt;
all simple, single values.</description>
    </item>
    <item>
      <pubDate>Fri, 15 Feb 2008 10:12:01 -0500</pubDate>
      <title>Re: exchange data betwwen matlab and VB2005</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342#415261</link>
      <author>Atrish Mukherjee</author>
      <description>&quot;Vincent &quot; &amp;lt;nospan.vincent.himpe@st.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fp31vl$mfp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Sorry, that's not what i am looking for.&lt;br&gt;
&amp;gt; Let me detail.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; on the SAME computer 2 programs are running&lt;br&gt;
&amp;gt; - Matlab&lt;br&gt;
&amp;gt; - A program written in VB 2005 and COMPILED to an &lt;br&gt;
&amp;gt; executable.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to be able to write a script in matlab that can send &lt;br&gt;
&amp;gt; information to the running VB program.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The MAtlab script is in control !&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My question are the following&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - how do i expose internal functions and procedures from &lt;br&gt;
&amp;gt; the VB program to matlab ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For eaxmple the VBprogram has the following 2 functions&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Public sub Write (address as data32,data as int32)&lt;br&gt;
&amp;gt; public function Read(address as int32) as int32&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What do i need to specify so these functions become visible &lt;br&gt;
&amp;gt; to the outside world ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Then the other part is : What do i write in matlab to 'call &lt;br&gt;
&amp;gt; these functions ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Keep in mind that the VB program is running on the machine.&lt;br&gt;
&amp;gt; The matlab script needs to be able to detect that the &lt;br&gt;
&amp;gt; program is running ( if its not running the matlab script &lt;br&gt;
&amp;gt; should stop and give a warning ), hook into it and call the &lt;br&gt;
&amp;gt; functions and pass data ( mostly int32 int64 , double and &lt;br&gt;
&amp;gt; single. i don't pass complex constructions like arrays. its &lt;br&gt;
&amp;gt; all simple, single values.&lt;br&gt;
&lt;br&gt;
first of all you have to write matlab functions instead of&lt;br&gt;
script. then use matlab combuilder to build the com&lt;br&gt;
files(dll) for that function or functions. Then add the com&lt;br&gt;
file as a reference in your vb project. you will be able to&lt;br&gt;
call the matlab functions from visual basic as simple&lt;br&gt;
functions. You can pass parameter to those functions and can&lt;br&gt;
receive their output to use further in visual basic project.&lt;br&gt;
You need to run MCR installer running on the machine if you&lt;br&gt;
dont have matlab installed on that machine wher you want to&lt;br&gt;
run that application.&lt;br&gt;
I think this information will help you..</description>
    </item>
    <item>
      <pubDate>Fri, 15 Feb 2008 13:03:01 -0500</pubDate>
      <title>Re: exchange data betwwen matlab and VB2005</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157342#415290</link>
      <author>John reilly</author>
      <description>Vincent,&lt;br&gt;
&lt;br&gt;
Does your VB side need to be an executable?  You could write&lt;br&gt;
yourself a little COM object in VB.NET, instantiate it in&lt;br&gt;
your MATLAB code and just call the Read/Write methods.  I&lt;br&gt;
did it in C# and it was fairly painless.&lt;br&gt;
&lt;br&gt;
If it does need to be an executable, the only thing I can&lt;br&gt;
suggest is a TCP or UDP socket.&lt;br&gt;
&lt;br&gt;
hth.&lt;br&gt;
&lt;br&gt;
reilly.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Vincent &quot; &amp;lt;nospan.vincent.himpe@st.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fp31vl$mfp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Sorry, that's not what i am looking for.&lt;br&gt;
&amp;gt; Let me detail.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; on the SAME computer 2 programs are running&lt;br&gt;
&amp;gt; - Matlab&lt;br&gt;
&amp;gt; - A program written in VB 2005 and COMPILED to an &lt;br&gt;
&amp;gt; executable.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to be able to write a script in matlab that can send &lt;br&gt;
&amp;gt; information to the running VB program.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The MAtlab script is in control !&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My question are the following&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - how do i expose internal functions and procedures from &lt;br&gt;
&amp;gt; the VB program to matlab ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For eaxmple the VBprogram has the following 2 functions&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Public sub Write (address as data32,data as int32)&lt;br&gt;
&amp;gt; public function Read(address as int32) as int32&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What do i need to specify so these functions become visible &lt;br&gt;
&amp;gt; to the outside world ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Then the other part is : What do i write in matlab to 'call &lt;br&gt;
&amp;gt; these functions ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Keep in mind that the VB program is running on the machine.&lt;br&gt;
&amp;gt; The matlab script needs to be able to detect that the &lt;br&gt;
&amp;gt; program is running ( if its not running the matlab script &lt;br&gt;
&amp;gt; should stop and give a warning ), hook into it and call the &lt;br&gt;
&amp;gt; functions and pass data ( mostly int32 int64 , double and &lt;br&gt;
&amp;gt; single. i don't pass complex constructions like arrays. its &lt;br&gt;
&amp;gt; all simple, single values.</description>
    </item>
  </channel>
</rss>

