LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Call Library Function Node into exisiting vi

Hi I am looking for a little help.  We are going to implement a call library function node for a .dll that is being written.  This area is new to me, and don’t really understand the correct way to implement this.  Is there somewhere I can read up on this, or an example?  Basically what I am trying to implement is, use the call library function node to send and receive commands via Labview to and from the .dll that is controlling an external controller.  At the same time we will be recording analog voltage channels via Labview (pressure, temp, ect) and saving all the data to a spreadsheet.  The VI is already complete for recording analog voltages and saving to a spreadsheet.  We are just trying to implement the call library function node so we can send and receive commands from the controller via LabVIEW, at the same time we are reading the analog data and write everything to spreadsheet.  Any help would be greatly appreciated.

0 Kudos
Message 1 of 3
(2,609 Views)
Hi TMDATA,
      Here's a good place to start.  Note the link to how to build the DLL!  Try to constrain function parameters to numeric data-types.  Don't try to pass Cluster/Structure parameters unless you like debugging.  Know your parameter data-type byte-widths on both the LabVIEW and DLL-code side.  If you want the DLL to modify a value passed as an input parameter, allocate the value in LabVIEW and use "pass by reference"!  So, if the DLL writes to an array-input, the array needs to be pre-allocated in LabVIEW.
 
By starting with simple DLL prototypes and showing attention to detail, you'll find using Call Library Function is a piece of cake!
 
Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 3
(2,602 Views)
Well I am making headway.  Now I want to put the data that I am grabbing from the external controller via the call library function, and add these five additional data columns, to the last column of the 13 AI data channels that DaqMX  is gathering and write everything to a spreadsheet file using DaqMX Write Spreadsheet File.  Should I be using insert into array function to add this data to the exisiting 2D array that DaqMX is getting?  Its giving me an error saying I am connecting two different data types.  Thanks
0 Kudos
Message 3 of 3
(2,591 Views)