12-16-2011 01:54 AM
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.
12-16-2011 02:25 AM
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.
12-16-2011 04:07 PM - edited 12-16-2011 04:10 PM
This should be all that was required to make it work.
12-16-2011 09:41 PM
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.
12-17-2011 03:51 AM
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.
12-17-2011 04:16 AM - edited 12-17-2011 04:23 AM
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
12-17-2011 04:17 AM
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.
12-17-2011 06:09 AM
@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.