LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

repeatly passing data to and from external program

I'm looking for some help to get me started.  I'm willing to bet the info is here I'm just not sure what to look for and my searches aren't reveiling anwsers. 

Background: I'm trying to take control of a device that is comunicating through the PCI bus.  The device has a set of API dll's that I can access through C++, but not directly in LabVIEW.  So wish to creat a wrapper program that will give LabVIEW indirect access to the dlls.  

Problem: I've breifly read up on CINs and Libaray call functions and have found one underlying problem with both.  I have not found a way to pass data back and forth between the external code and LabVIEW once the external code is running.  I require an interactive conection between the two. 

Any sugestions of what to search for would be greatly appreatiated, or even how to resolve my problem.

Thank you.

Don't get even, get odd!
0 Kudos
Message 1 of 4
(2,756 Views)
Hi Bac,

I'm not sure if what you're mentioning is a limitation in LabVIEW. Can you please shed more light on what you mean by "...once the external code is running..."? Will you be having a continuously running executable or DLL function. Will the DLL function calls that access the running code be seperate than the running code? Please let me know exactly where in the documentation you see that LabVIEW is limited in this area, thanks.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 4
(2,743 Views)
I need to poll the extermal hardware to check for value updates.  I have example code (in C++) that creates two threads, which run mutally exclusively, in which the hardware read/write buffers  are accessed.  Since I am unable to access the buffers directly with the provided API DLL from LabVIEW, I was hoping to use the C++ example as template from creating a wraper program. 
Don't get even, get odd!
0 Kudos
Message 3 of 4
(2,721 Views)
If the data buffers are owned by the driver and are updated asynchronously, you should expose that buffer to LabVIEW as a handle (simple int32 for the pointer to the buffer). This can then be passed to the wrapper code and checked (implements your polling). Remember that handling tasks in LV that should run in parallel is different from C++ however - you don't create threads, instead you should simply set up independent loops.
 
I'm not sure what else to suggest since I don't fully understand what the API does or what the HW is doing, so feel free to post more information if you want more suggestions 🙂
Message 4 of 4
(2,706 Views)