03-08-2006 05:09 PM
03-09-2006 01:30 AM - edited 03-09-2006 01:30 AM
Hi,
The vi I use returns a pointer to a block of data Can you show how a VI returns a pointer
Message Edited by K C on 03-09-2006 08:31 AM
03-09-2006 02:17 AM
03-09-2006 03:59 AM
Hi Balakumar,
> The vi I use returns a pointer to a block of data.
If by "pointer" you mean a memory address, then I think you're DLL idea is right on track. You could efficiently cast (sort of) the pointer into an array.
The attached .zip contains some VIs that may give you some ideas. In LabVIEW, open the application builder and load CVTDLL.bld. It compiles CVTDLL.vi into CVTDLL.dll. CVTDLLCaller calls the DLL - passing it the pointer and returning an array. The magic will happen in the way the pointer parameter is passed from the VI to the DLL. I think we need the CLF to think it's supposed to be passing a U32 value, where the DLL thinks it receiving a pointer to an array. Then it's just a matter of passing the data back out. There are a bunch of forum contributors who could get this right the first try - "smercurio" and "RolfK" come to mind.
I hope this isn't yet another case where I'm way off track!
03-13-2006 01:56 PM
03-13-2006 04:25 PM
03-13-2006 10:08 PM
Hi Bala,
Thanks for the follow-up.
Looking at the posted VI, "GetMemory_byPtr.vi" looks like the one.(?) It's missing on my machine, but you've provided plenty of search info - I'm gonna chase this down to see how it's done. That's quite a time savings!
Thanks/Cheers.
03-14-2006 01:01 PM
03-15-2006 11:21 PM