LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

code interface node to call library function conversion

Hello:

 

I have store bought (no source) VI that uses a code interface node that works fine with LV 7.1 upgrading to 2010 does not allow a code interface node. I read that I can use a call library function instead.  How would I convert my code interface node to a call library function ?  

 

Thank you!

0 Kudos
Message 1 of 7
(3,604 Views)

Without the CIN code, unfortunately, I think you're out of luck.  If you need a quick solution and you have LabVIEW 7.1 available, you could build a DLL in 7.1 that wraps the CIN functions, and then call that DLL from within your LabVIEW 2010 code.

0 Kudos
Message 2 of 7
(3,597 Views)

Hello:

 

So how would I do this?  I can generate the  template and know the parameters for the CIN

 

#include "extcode.h"

 

CIN MgErr CINRun(int32 *num_in, int32 *num_out);

 

CIN MgErr CINRun(int32 *num_in, int32 *num_out) {

/* ENTER YOUR CODE HERE */

return noErr;

}

 

The VI contains some Labview constructs feeding a CIN which I guess get replace by a library call once the DLL is built. 

What next?  Seperate the CIN to it own VI and build the DLL from this?

 

Thanks for the help

 

 

 

0 Kudos
Message 3 of 7
(3,576 Views)

Essentially, yes. You'd need to create individual exported functions for each VI that uses the CIN. Basically that means identifying the VIs that use the CIN and adding those to the list of exported functions in the DLL build spec. You may need to add other VIs to the list of dynamic VIs to ensure they get included into the LabVIEW DLL. In LV 2010 you'd be calling the LabVIEW DLL.

0 Kudos
Message 4 of 7
(3,573 Views)

Hello:

 

Can't build the dll in LV7.1.  I can build the dll in LV8.2 is this ok? 

 

Thank you!

0 Kudos
Message 5 of 7
(3,546 Views)

Sure - doesn't matter which version you use to build the DLL so long as it can successfully run your CIN.

0 Kudos
Message 6 of 7
(3,544 Views)

I should also add that if you plan to deploy this on another system, you'll need to install the run-time engine for the version you use to build the DLL, in addition to the version needed to run your program.  Install the older version of the run-time engine first; things don't always work right if you install the older version over the newer one.

0 Kudos
Message 7 of 7
(3,537 Views)