03-25-2011 12:17 PM
Greetings,
First off I must say that I am new to the board and new to labview. I have spent over an hour searching for the answer to my question and have come up empty handed.
I have written a "test" as a sub-vi in LV, which will be one of many "tests" called by a test executive which my partner is writing in CVI. He has compiled my sub-vi into a dll, and it runs properly and without errors when all of the inputs are hard-coded as constants inside my sub-vi. Our next step is to have him pass me these same constants through his test executive...but.
I have all of the inputs to my sub-vi bundled into a cluster, some of which are arrays of singles. The problem is that when my partner compiles this into a dll, these arrays only have one member ( ex: MyArrayName[1]). What I want to do in LV is the equivalent of declaring my input array size like "Single MyArrayName[100];" in C, but I do not know how to do this.
Any help would be greatly appreciated.
Thanks for your time folks.
Solved! Go to Solution.
03-25-2011 02:23 PM
Hi,
sorry that this is the answer for your first post - but you have chosen the wrong forum... This one is for LabWindows/CVI, the one for LabVIEW can be found here.
Good luck!
03-25-2011 04:49 PM
Wolfgang,
Thanks for your response. The reason that I posted in the CVI sub-forum was because this is a problem that would likely only become apparent when one tries to call a LV sub-VI from CVI.
To restate:
"I have written a "test" as a sub-vi in LV, which will be one of many "tests" called by a test executive which my partner is writing in CVI."
So your advice is that I would be more likely to figure out how to pass data from CVI into a labview sub-VI in the LV forums? My suspicion was that there are many more CVI experts that have had experience interfacing with LV than LV experts who have experience interfacing with CVI. I'll try posting in the other forum as well.
Thanks,
SHM
03-26-2011 03:17 AM
Hi SubstituteHallMonitor, by seraching NI site I have found some resources that can be of help in your task.
First of all, I point you to this whitepaper: Can LabVIEW C? that dicusses several aspects of interconnection between those environments. In Example 3 part of the whitepaper you can find this example that as far as I can understand covers your problem:
Calling a LabVIEW-built DLL in C to Acquire, Analyze, and Present Data
I am not very familiar with LabVIEW and its interaction with CVI, but it seems to me that these documents should help you in solving your problems.
03-28-2011 12:13 PM
Hi SubstituteHallMonitor,
You might also want to check out the following example.
Calling a LabVIEW DLL from C with an Array in a Cluster as a Parameter
Regards,
Brandon V.
Applications Engineering
National Instruments
03-29-2011 05:02 PM
Thanks much Kraken. Your help along with that of Mr. B exactly answered what I was looking for. It's great to know that this forum exists so that the Uber-Geeks can help us Knoobs out.
Thanks again,
SHM