Skip to content

Dynamic libraries and Labview

Joshua Hoskins edited this page Oct 24, 2018 · 2 revisions

Motor Tracker Libraries

The EIO output frequency is determined by a rotational stepper motor. This motor is controlled and monitored using Labview. Within this controls vi are external tracking libraries that log the motor position and determine the conversion between rotational motor position and output frequency(motor-tracker and position-tracker). The following section explains how to implement dynamically linked libraries into Labview as functions.

Dynamically Linked Libraries in Labview

The motor tracker libraries are developed in c++ in Visual Studio for both x64 and x86 architectures. They are complied as dynamically linked libraries which can be imported into Labview and used as functions. For more information on how to do this in windows check out the Visual Studio 2017 developer documentaion.. Once your libraries have been created, they are included already in the repository, you can start adding them to Labview.

Once in Labview, right click on the block diagram area where you want to add the library. Go to Connectivity > Libraries & Executables > Call Library Function Node. Double click the new function node and locate the library you want to add in the Library name or path box. If your library was compiled properly you should see it in the drop down menu Function name as seen below.

Figure 1

You will notice that there is a function description that seems nonsensical in the Function prototype box. To fix this we need to define the input (output) parameters of the function. Go to the parameters tab and you will see a list of parameters that need to be added/configured. For each output and input parameter of your library you will need to add a name, type, and data type. Once this is done you can click OK and you should have a standard looking Labview function that can be wired like any other native Labview function.

Figure 2

Figure 3

Figure 4