LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to share data between applications.

I'm trying to share data between LabVIEW v6.0 and another program (16 bit), both running on Windows95. At first DLL's seemed to be the answer but I would need to call 16 bit DLL's which I understand can be a problem. With my limited knowledge of C++ I've written a program (Borland C++4.2) which can access the data I need and save it to a file, this is then repeatedly read by LabVIEW, crude but it works. When I add code to do the same the other way I get occasional file sharing errors. I can't get either LabVIEW or C++ to trap these errors. As an alternative I thought I could write and read to a reserved portion of memory (less than 1K should be enough) using in port and out port. Is this viable, and if so how do I
reserve the memory in Windows 95 so that LabVIEW & my C++ program can access it?

Any suggestions?
0 Kudos
Message 1 of 4
(3,228 Views)
Ian wrote:

> I'm trying to share data between LabVIEW v6.0 and another program (16
> bit), both running on Windows95. At first DLL's seemed to be the
> answer but I would need to call 16 bit DLL's which I understand can be
> a problem. With my limited knowledge of C++ I've written a program
> (Borland C++4.2) which can access the data I need and save it to a
> file, this is then repeatedly read by LabVIEW, crude but it works.
> When I add code to do the same the other way I get occasional file
> sharing errors. I can't get either LabVIEW or C++ to trap these
> errors. As an alternative I thought I could write and read to a
> reserved portion of memory (less than 1K should be enough) using in
> port and out port. Is this viable, and if so how do I reserve the

> memory in Windows 95 so that LabVIEW & my C++ program can access it?
>
> Any suggestions?

May be TCP/IP or UDP interprocess communication will do? It shouldn't be
a problem via localhost. You can try separate VI server to handle
communication task from your vi with C++ socket.

--
Sergey Krasnishov
____________________________________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru
0 Kudos
Message 2 of 4
(3,228 Views)
Thanks for the reply.
I should have said that both applications are on the same computer.
0 Kudos
Message 3 of 4
(3,228 Views)
Ian wrote:

> Thanks for the reply.
> I should have said that both applications are on the same computer.

I've meant the same :). Localhost or 127.0.0.1 means the same machine.
My experience using TCP/IP at the same machine brings good benchmarks.

Cheers,
--
Sergey Krasnishov
____________________________________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru
0 Kudos
Message 4 of 4
(3,228 Views)