Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Calling Code Written in Text-Based Programming Languages

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info
Calling Code Written in Text-Based Programming Languages



Concepts

Using External Code in LabVIEW

Calling Code in Various Platforms
Using CINs versus Call Library Function Nodes

Calling Shared Libraries

Configuring the Call Library Function Node
Calling External APIs
Example 1: Call a Shared Library That You Built
Example 2: Call a Hardware Driver API
Example 3: Call the Win32 API
Unicode Versions and ANSI Versions of Functions
Additional Windows Examples of LabVIEW Calls to DLLs
Debugging DLLs and Calls to DLLs
Troubleshooting Calls to DLLs Checklist
Module Definition Files
Using Arrays and Strings in the Call Library Function Node

CINs

Supported Languages for Compiling CINs
Resolving CIN Multithreading Issues
LabVIEW Manager Routines
Debugging External Code
CIN Function Errors

Programming Issues for CINs

Passing Parameters to CINs
Passing Fixed-Size Data to CINs
Passing Variably-Sized Data to CINs

LabVIEW Manager Overview

LabVIEW Manager Data Types
Memory Manager
File Manager
Support Manager

Advanced CIN Applications

CIN Routines
CIN Data Spaces and Code Resources
One Reference to the CIN in a Single VI
Multiple References to the Same CIN in a Single VI
Multiple References to the Same CIN in Different VIs
Code Globals and CIN Data Space Globals

Importing Shared Libraries

Supported Data Types for the Import Shared Library Wizard
Using the Import Shared Library Wizard

How-To

Using the Flatten To String Function
Building a Shared Library to Call from LabVIEW
Building a Function Prototype in LabVIEW
Completing the .c File
Making LabVIEW Recognize a CIN as Thread Safe
Using C Code That is Thread Safe
Creating a CIN
Setting Input and Output Terminals for the CIN
Wiring Inputs and Outputs to the CIN
Creating a .c File
Compiling the CIN Source Code
Loading the CIN Object Code
Debugging CINs
Creating a CIN That Multiplies Two Numbers
Creating a CIN That Compares Two Numbers
Creating a CIN That Concatenates Two Strings
Creating a CIN That Computes the Cross Product of Two Arrays
Creating a CIN to Work with Clusters
Importing Functions from a Shared Library File
Example: Importing Functions from a Shared Library File (Windows Only)
Troubleshooting the Import Shared Library Wizard


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit