LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to used shared memory in LabVIEW. I think I can do it using a DLL in C.

I think I can use shared memory with a DLL in C. But, Can I use some utility included in LabVIEW to do that, without include my DLL?
0 Kudos
Message 1 of 8
(3,556 Views)
Hello Lidia

I am not sure if this is what you ask, but when you create dlls by using LV, you can share memory between two dlls e.g. by means of global variables. You can write to global variable in one dll and read it in other.
This is probably because LV will run one session for all dlls executed from one source (but I am not sure if it is correct). The fact is that I tried that and it works.

regards
Pawel
0 Kudos
Message 2 of 8
(3,556 Views)
Thanks Pawel.
But what I want is to write and read fron a block of memory. I want use this because I need that diferents process, that are running at the same time, could acces to the information store there. In language C, I can do it, But I need do the same in LabView. I think I can do that using a DLL in C, but I want to know if there is posible to do it with some tool include inLabView.
0 Kudos
Message 3 of 8
(3,556 Views)
Hello again

I am not sure what do you mean, so I do not think I can help more.

kind regards
Pawel
0 Kudos
Message 4 of 8
(3,556 Views)
Hello Lidia,

this can be achieved. I made 2 years ago a communication path between 2 processes (one of them was LabVIEW the other was an ADA application).
The source of how this can be done is here and in the Windows SDK documentation. Basically what you need to do is a file-mapping for the memory that will be shared between the processes.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000006A1D0000&ECategory=LabWindows%2FCVI


Hope this helps,

JorgeM
0 Kudos
Message 5 of 8
(3,556 Views)
lidia wrote:

> I think I can use shared memory with a DLL in C. But, Can I use some
> utility included in LabVIEW to do that, without include my DLL?

There is no built in shared memory function in LabVIEW. A DLL is the way
to go here. There have been posts in the past by a collegue here on
Developer Exchange about this and he provided a DLL and VI library
already to do that. Search here for it.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 8
(3,556 Views)
Hello,

here's the info. It works.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000006A1D0000&UCATEGORY_0=_318_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=build+cvi+shared+dll&USEARCHCONTEXT_QUESTION_S=0

Regards,

JorgeM.
0 Kudos
Message 7 of 8
(3,556 Views)
Jorge M. wrote:
> Hello,
>
> here's the info. It works.
>
> http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000006A1D0000&UCATEGORY_0=_318_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=build+cvi+shared+dll&USEARCHCONTEXT_QUESTION_S=0

Another one:

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

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 8
(3,556 Views)