LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does LabVIEW support Shared Memory File created by VC++?

Can LabVIEW program read and write online data stored in a Shared Memory File created by a VC++ application using Windows SDK Functions: CreateFileMapping, OpenFileMapping, MapViewOfFile ... when both programs are running? If yes, how? What vis? Any examples?

Thank you very much.
Stars
0 Kudos
Message 1 of 8
(3,890 Views)
Hello

LabVIEW doesnt have direct support for memory mapped files. The only way you would be able to set this up is via dll calls that call the functions. Check out the following manual for more information on how dll's work with LV.


Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 8
(3,890 Views)
I am having trouble trying to do this also. I have a c++ program that is creating and writing to a shared memory location. I know that it is working correctly becuase i read off that memory with several other apps. I tried writing a dll with the same read code, but Labview Crashes Everytime I run it.
Attached is a simple dll example i tried to trys to read one element out of and array.(The arrays has 40 elements.) Anyone have any suggestions? (This is just the read mind you.)
0 Kudos
Message 3 of 8
(3,890 Views)
Hi

You're in luck. Just a few weeks ago I created VI's to read and write memory
mapped files!

I've tested it with interaction between several LV applications (.exe) and
mixed it with several instances of LV, and that worked fine (see thread
"Communitating Between Built LV App.s"). The VI's are there to download.

The difficult part is to get LV to write into memory. If you only want to
write a string, it's easy, but for data (with \00 in it) it's a bit more
difficult. Anyway, the VI's already have that functionality.

The VI's are written to interact between LV applications, but everything to
interact with other applications is in there. Perhaps some things turn up,
but I'm sure they are all solvable.

Regards,

Wiebe.



"Stars" wrote in message
n
ews:50650000000800000058BF0000-1075935269000@exchange.ni.com...
> Can LabVIEW program read and write online data stored in a Shared
> Memory File created by a VC++ application using Windows SDK Functions:
> CreateFileMapping, OpenFileMapping, MapViewOfFile ... when both
> programs are running? If yes, how? What vis? Any examples?
>
> Thank you very much.
> Stars
0 Kudos
Message 4 of 8
(3,890 Views)
I am trying to find this thread but cannot find it with a search. Where exactly is it?? Thanks,
Dave
0 Kudos
Message 5 of 8
(3,890 Views)
Hi,

I accidentally send it as a new post, sorry for that. Here is the link to
the discussion:

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000005BC10000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=Communicating+Between+Built+LV+App&USEARCHCONTEXT_QUESTION_S=0

Regards,

Wiebe.



"dirtyb15" wrote in message
news:506500000005000000DD660100-1078497998000@exchange.ni.com...
> I am trying to find this thread but cannot find it with a search.
> Where exactly is it?? Thanks,
> Dave
0 Kudos
Message 6 of 8
(3,890 Views)

Is there any actual thrad with the vis?

 

thx

0 Kudos
Message 7 of 8
(3,164 Views)

I can't find the link. Can you re-post the link? 

0 Kudos
Message 8 of 8
(2,682 Views)