LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling one dll from two VIs

Solved!
Go to solution
Solution
Accepted by topic author Xinghe.W

Well comparing DDE with TCP/IP is about the same as comparing a Ford T model with a  moderate middle class car from today. 5MB through TCP/IP, especially if it is through localhost and isn't going to hit the network wire at all, is definitely achievable. If your supervisor claims otherwise he may not have done the right tests.

 

Shared data segments is a possible solution, but that is definitely not beginner programming. You're starting to dive into the depths of Windows here and will encounter problems on the way where your start problems about getting a C++ DLL to be callable from LabVIEW to work at all will look trivial in comparison. One of the problems you would also have to tackle is proper synchronization here. With shared data segments you create a huge global variable that you need to protect in some ways from being modified while your receiver is reading it or you end up reading inconsistent data. This synchronization not only requires performance itself but effectively will throttle whatever side of the data transfer happens to come later.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 11 of 14
(1,228 Views)

Do you have any tutorial or examples that I can learn the TCP/IP and DLL that I can learn from?

0 Kudos
Message 12 of 14
(1,182 Views)
Help> Find Examples. Several tcp/ip examples. This is where you should have learned to look after taking the LabVIEW training.
Message 13 of 14
(1,167 Views)

Thank you for your suggestions of using TCP/IP. I think it will be a very good solution, but I don't have enough time to change my plan.

 

I managed to use dll and its shared data segment to transfer data from a C++ program and Labview. It's actually not that hard. The data pool in the dll is in real time so there is always only one group of data in the data segment, and the synchronization is done in Labview by checking the value change of the shared data segment in a while loop.

0 Kudos
Message 14 of 14
(1,101 Views)