LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How is LabView interfaced to a C++ application?

Ok, I have taken a quick peak at the library. It seems the shared library actually supports read/write opertion for the Open Pipe VI. However the control on the front panel doesn't reflect this. So if you add a third entry "R/W" to the mode enum with the value 2 you should be able to open the pipe for bidirectional access. You also need to modify the case structure inside the VI to select one of the cases for the third entry. This case is really just an addition that allowed a quick test mode, so you could even remove it completely. It's purpose is to use a predfined named pipe in case of a relative pipe name.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 18
(1,085 Views)

Hi,Rolf:

 

         Thank yor for your quick reply. Could you help us to upgrade OGlib_pipe to support bidirectional access(write and read)? Thanks for your help in advance.

0 Kudos
Message 12 of 18
(1,079 Views)

This should be all that was required to make it work.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 18
(1,063 Views)

Dear Rolf,

 

        Thanks a lot for your kindly help, Now the OGpipe toolkit can write and read pipe correctly. please see attached picture with my project. this project should conrtol the spectrometer software to do spectral measurement then get the lumen,x,y from this software, the purpose is make the LC LED color calibration full-automatically.

        Otherwise, the open VI work correctly after I delete add1 in OGPIPE_Open_Pipe__ogtk.vi. see attached picture.

Download All
0 Kudos
Message 14 of 18
(1,054 Views)

I'm a litte confused! Do you say that the increment must be removed to work correctly? That was not what my tests here showed and the C source for the shared library certainly says otherwise too. In the shared library the mode input uses 1 for Read, 2 for Write and 3 for Read/Write. The reason being that it is actually a bit flag. Since we start in LabVIEW always with 0 for an enum, the increment is needed to make the values match up between the LabVIEW enum and the C bitflag.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 15 of 18
(1,035 Views)

Ye, the increment must be removed in labview, see attached picture. you can try to test with pipeServer. possible the previous mode input uses 0 for Read, 1 for Write, So 2 for RW is correctly.

 

the current pipes.dll in my conputer is 0.9.0.0

0 Kudos
Message 16 of 18
(1,029 Views)

Ye, the increment must be removed in labview, see attached picture. you can try to test with pipeServer. possible the previous mode input uses 0 for Read, 1 for Write,

So 2 for RW is correctly.

0 Kudos
Message 17 of 18
(1,028 Views)

@ronke wrote:

 

the current pipes.dll in my conputer is 0.9.0.0


That explains it. The latest version is 1.0 and the change to that mode value was in fact made together with various other changes and a version bump to 1.0. I'll see if I can make a new package one of these days. with the most actual code so far.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 18 of 18
(1,016 Views)