LabVIEW Embedded Development Module Target Distribution Guide Manual

LabVIEW Embedded Development Module Target Distribution Guide Manual
Pages 35
Views 304
Downloads : 3 times
PDF Size : 290.7 KiB

Summary of Contents

LabVIEW Embedded Development Module Target Distribution Guide Manual

  • Chapter 2Wrapping Drivers and Math Libraries© National Instruments Corporation2-3 1,Target Distribution 1, GuideUsing an Inline C Node in a SubVIIf the code to call is not a C-based function—for example, assembly code or a small algorithm—consider using an Inline C Node instead of a Call Library Function Node. You can use an Inline C Node for any C code, including assembly directives and #defines, that syntactically is between the curly braces. The concept is the same as using a Call Library Function Node in a subVI so end users can use your subVI in the same way they use other subVIs in LabVIEW.Right-click the left side of the Inline C Node and select Add Input from the shortcut menu for each input you want to add to the Inline C Node. Right-click the right side of the Inline C Node and select Add Output from the shortcut menu for each output you want to add. For each input you add, right-click the terminal and select Create»Control from the shortcut menu. For each output you add, right-click the terminal and select Create»Indicator from the shortcut menu.Refer to the Inline C Node topic in the LabVIEW Help for information about the Inline C Node.Using the Import Shared Library WizardYou can use the Import Shared Library Wizard to create wrapper VIs based on C functions. Refer to the Importing Functions from a Shared Library File topic in the LabVIEW Help for information about using the Import Shared Library Wizard. You must place a checkmark in the Shared library file is not on the local machine checkbox to create wrapper VIs for embedded targets.NoteThe Import Shared Library Wizard builds a connector pane and creates an icon for the VI by default, so the VI is ready immediately to use as a subVI.Modifying Funclist.dat to Replace a SubVIThe FuncList.dat file, located in the labview\CCodeGen directory, contains lines of code fragments that LabVIEW substitutes for a subVI call when the LabVIEW C Code Generator builds C code for the application. The code fragments can be anything but are usually function calls. Adding entries to FuncList.dat makes the application run faster because using FuncList.dat removes the overhead of calling a subVI that then calls the functions using a Call Library Function Node or Inline C Node.