I am testing a device via SPI using an Aardvark (USB-SPI). The Aardvark's API is a single-threaded DLL.
I want to interface 2 (or more) programs across that SPI channel. For example, one program is an automatic test sequencer, and the second program is a manual register debugger.
If I run both programs from the development environment, everything works. The programs share the API handle, and calls from either program will go out to the device.
If I create an EXE from both programs, the two programs run as separate Windows applications, so they can't share the API handle, so only one program can use the device. Switching ownership means closing the handle in one, opening in the other, and re-initializing.
What are some approaches to make this DLL accessible from both applications when they're built as an EXE?
Solved! Go to Solution.
create a 4rd tool acting as server. This server tool will handle all the API access and provide it's service using network communication.
You other tools ("clients") can send send requests to the server and get the responses sent by the server…
Thanks, that sounds workable. If you've done this before, is there a problem with overhead/performance of the approach? I'm not familiar using LabVIEW as a server. Do you mean 1 server program is hosting TCP/IP on localhost, and both client programs connect to it? Or does LabVIEW have other mechanisms to connect applications?
Do you mean 1 server program is hosting TCP/IP on localhost, and both client programs connect to it?
You can also use UDP, if this ok for you…
Or does LabVIEW have other mechanisms to connect applications?
Like said before UDP, but also other things like NetworkSharedVariables or NetworkStreams. On VIPM you also find implementations like STM…
That's exciting, I will research these more and try to implement one to solve my problem. Thanks for all your help!
On the surface, that's definitely easiest. But the automated test sequencer is quite large. Some users only need the sequencer, some only need the debugger, and some need both. So I'm hoping to keep the programs as independent tools. That way I can modify & release the smaller debug tool without touching the validated test sequence.