LV-Link 3.0

Software Interface for LabVIEW®

Overview
LV-Link™ is a library of virtual instruments (VIs) thatenable LabVIEW® programmers to access the dataacquisition features of DT-Open Layers-compliant devices.
This library is consistent with the design and layout of theLabVIEW DAQmx VIs to speed development time andminimize learning curve issues.
LV-Link provides the ability to measure and control
analog I/O, digital I/O, quadrature decoders, andcounter/timer signals, and stream data at full-speed.
To get up and running quickly, numerous application
examples are provided with the software. The sourcecode for the examples is also included so you can easily
modify them to speed your development time.

DtAinContinuous.vi Block Diagram demonstrates how
to access the power of Data Translation DT-Open Layers
compliant devices using LabVIEW and LV-Link.

Key Features• Create test and measurement applications for DataTranslation DT-Open Layers compliant USB and PCI
hardware using LabVIEW®

• Integrate Data Translation and National Instruments
hardware in the same application• Measure and control analog I/O, digital I/O,
quadrature decoders, counter/timer signals• Stream data at full-speed• Numerous example programs to aid application

DtAinContinuous.vi Front Panel demonstrates how tocontinuously acquire data from an analog input channel.

development

Analog Input Tasks

Supported Operating Systems

LV-Link supports the following analog input tasks:• Windows® 10/8/7 (32/64-bit)• Single value – Acquires a single sample from a

A task in LabVIEW is a collection of one or more virtualchannels with timing, triggering, and other properties.
A task represents a measurement or output operation tobe performed using a specific subsystem of a device. The
following operations, or tasks, are supported in LV-Link:• Analog Input• Analog Output• Digital Input

single analog input channel and returns the value
immediately. Specify whether to return the data
either as a voltage or a raw count. Single-value
operations are the simplest to use but offer the least
flexibility and efficiency.

• Digital Output• Counter/Timer• Quadrature Decoder• Finite – Acquires a specified number of samples fromone or more analog input channels one time, and thenstops. Specify whether to return the data either involtage or raw counts. Depending on your device, youcan specify a sample clock to pace the operation, thenumber of samples to acquire, and a trigger to start
the acquisition. Some devices also allow you to acquire
the value of the digital input ports, counter/timers, andquadrature decoders using an analog input task.

LV-Link provides a number of example programs that
demonstrate how to perform these tasks using theLV‑Link VIs.

(508) 946-5100

1

info@mccdaq.com

mccdaq.com

• Continuous – Acquires multiple samples from one

Counter/Timer Tasks

or more analog input channels continuously. Specify
whether to return the data either in voltage or rawcounts. Depending on your device, you can specify asample clock to pace the acquisition of each sample,
the number of buffers to use (and their sizes), anda trigger to start the acquisition. Some devices also
allow you to continuously acquire the value of thedigital input ports, counter/timers, and quadrature
decoders using an analog input task.

LV-Link supports the following counter/timer tasks:• Event counting – Counts digital pulses from anexternal signal, which is connected to the counter/timer’s clock input source, when the counter/timer isenabled (determined by the counter/timer’s gateinput signal).

• Up/Down counting – Counts digital pulses from anexternal signal that is connected to the counter/timer’s clock input source. If the gate input signal of
the counter/timer is high, the count is incremented.
If the gate input signal of the counter/timer is low,
the count is decremented.

Analog Output Tasks
LV-Link supports the following analog output tasks:• Single value – Writes a single sample to a single• Frequency measurement – Measures the frequency,

analog output channel. Specify whether to output
the data as a voltage or a raw count. Single-value
operations are the simplest to use but offer the least
flexibility and efficiency.

in kHz, of an external digital signal that is connectedto the counter/timer’s clock input or gate input
source.
Note: Internally, the frequency of the signal iscalculated using two consecutive rising edges on thespecified input line. Therefore, to perform afrequency measurement task, your device must
support edge-to-edge measurement mode.

• Finite – Writes a specified number of samples to one

or more analog output channels one time, and thenstops. Specify whether to output the data in voltage or
raw counts. Depending on your device, you can specify
a sample clock to pace the operation, and/or a trigger
to start the operation. Some devices also allow you to
update the value of the digital output ports using ananalog output task.

• Period measurement – Measures the period, inmilliseconds, of a signal pulse from an external
digital signal that is connected to the counter/timer’s clock input or gate input source.
Note: Internally, the period of the signal is calculatedusing two consecutive rising edges on the specified
input line. Therefore, to perform a period
measurement task, your device must support edgeto-edge measurement mode.

• Continuous – Writes a single buffer or multiple buffers

to one or more analog output channels continuously.
Specify whether to output the data in voltage or raw
counts. Depending on your device, you can specify asample clock to pace the operation, and/or a trigger
to start the operation. Some devices also allow you tocontinuously update the value of the digital output ports
using an analog output task.

• Edge-to-edge measurement – Measures the time, in• Waveform – Writes a waveform to a single analog output

milliseconds, between a specified start edge andstop edge of the counter/timer’s clock or gate input
signal, then stops. The start edge and the stop edge
can occur on the rising edge of the gate input signal,the falling edge of the gate input signal, the risingedge of the clock input signal, or the falling edge ofthe clock input signal.

channel once or continuously.

Digital I/O Tasks
LV-Link supports the following digital I/O tasks:• Single value digital input – Reads the value of asingle digital input port once and returns the value
immediately. The port is configured with the default
resolution specified by the device.

• Continuous edge-to-edge measurement – Measure
the time, in milliseconds, between a specified startedge and stop edge of a counter/timer’s clock orgate input signal, then automatically restart the nextmeasurement. The start edge and the stop edge canoccur on the rising edge of the gate input signal, thefalling edge of the gate input signal, the rising edgeof the clock input signal, or the falling edge of theclock input signal.

• Single value digital output – Updates the value of asingle digital output port immediately. The port isconfigured with the default resolution specified by thedevice.

(508) 946-5100

2

info@mccdaq.com

mccdaq.com• One-shot – Outputs a single pulse for a specified

LV-Link VIs

duration (in milliseconds) the first time that thedevice detects a trigger (determined by the counter/timer’s gate input signal).

• Repetitive one-shot – Outputs a single pulse for aspecified duration (in milliseconds) each time thatthe device detects a trigger (determined by thecounter/timer’s gate input signal).

• Rate generation – Generates output pulses
continuously at a specified frequency (in Hz) when
the counter/timer is enabled (determined by thecounter/timer’s gate input signal).

Quadrature Decoder Tasks
Some devices support quadrature decoder operations.
A quadrature decoder accepts signals (A, B, and Index)
from a quadrature encoder as inputs and converts thesesignals into a clock output whose pulses are counted by
the decoder.

DtOLClockSets and returns information pertaining to
the clock source of a device

DtOLCloseTask

Stops the task and releases all associatedresources

DtOLConfig

Configures the specified task

DtOLCreateTask

Creates virtual channels and configures thetasks with specified settings

DtOLGetBoard

Returns information about device,including board name, driver name, driverrevision, and device name

DtOLGetBoardNames

Returns the name of all DT-Open Layerscompliant devices that are installed

DtOLGetChanList

Returns information about the channelgain list

DtOLReadReads samples from the virtual channels ofa task you specify

DtOLReStart

Restarts a task

DtOLSetChanGain

Sets the gain for a virtual analog channel

DtOLSetChanOptions

Specifies the sensor gain and offset, and if
IEPE inputs are supported, the excitation
current source and input coupling type fora virtual analog channel

DtOLStart

Either starts a task explicitly or groups
two tasks so that they can be started
simultaneously.

DtOLStop

Stops a task and returns it to its originalstate

DtOLSubsystem

Sets and returns information about thesubsystem of the device

DtOLTiming

Specifies the timing- or clock-related
attributes of an analog input or analog
output task

DtOLTrigger

Specifies trigger-related attributes ofanalog input or analog output task

DtOLTriggerSource

Sets and returns information pertaining tothe trigger source of a device

DtOLWaitUntilDone

Waits for a specified task to complete orfor the timeout interval to elapse before
stopping

DtOLWaveformGenerate

Creates one cycle of a sine, triangle, square,or sawtooth wave with a specified numberof samples, frequency, and amplitude percycle

DtOLWrite

Outputs samples to the virtual channels ofa task you specify

LV-Link VIs
LV-Link provides VIs for developing data acquisition
applications that work with DT-Open Layers-compliant
PCI and USB devices.

(508) 946-5100

3info@mccdaq.com

mccdaq.com

Utility VIs

ExamplesUtility VIs are used to perform specific operations whenused with other VIs in LV-Link.

DtAinGainPerChAn

Demonstrates how to set up different
gains and acquire data from multiple
analog input channels

DtAinRawContinuous

Demonstrates how to continuously
acquire raw counts from analog input
channels

DtSetChanOptions

Demonstrates how to set up analog
input options, including the sensor
gain and offset, and, if IEPE inputs
are supported, the current excitation
source and the input coupling type for a
specified analog input channelDtAinSingle

Demonstrates how to acquire a single
value from an analog input channel
repetitively in a loop

LV-Link VIs
DtInitDACBuffers

Initializes the values in the buffers
used by analog output tasks

DtOLCheckStatus

Calls LV-Link to determine whether
an error has occurred

DtOLErrorParser

Converts error codes from DT-Open
Layers into LV-Link error codes for use
with LabVIEW's error handler Vis

DtAinTrig

Demonstrates how to continuously
acquire data when an analog trigger
threshold is detectedDtOLWriteTwoChannelSingle

Outputs a single sample, formatted
as a 64-bit floating-point number, totwo virtual channels of a task youspecify

DtAoutRawSingle

Demonstrates how to write a single
raw count to an analog output channel
repetitively in a loop

DtAoutSingle

Demonstrates how to write a single
voltage value to an analog output
channel repetitively in a loop

LV-Link includes a number of example programs that
illustrate how to perform data acquisition operations on
DT-Open Layers-compliant devices. You can easily modify
these examples to speed your development time.

DtAoutTwoSingle

Demonstrates how to write a single
voltage value to two analog output
channels repetitively in a loop

DtAoutWaveform

Demonstrates how to output awaveform from an analog output
channel repetitively in a loop

DtCtrEvents

Demonstrates how to count digitalpulses from an external signal

DtCtrFreq

Demonstrates how to measure thefrequency of an external digital signal

DtCtrOneShot

Demonstrates how to generate a single
output pulse for a specified durationDtCtrOneShotRepeat

Demonstrates how to output a single
pulse for a specified duration each time a
trigger is detected

DtCtrPeriod

Demonstrates how to measure theperiod of an external digital signal

DtCtrRate

Demonstrates how to generate anoutput pulse at a specified frequency
when the C/T is enabled

DtCtrTwoEdgeTiming

Demonstrates how to measure the time
between a specified start and stop edge

DtCtrUpDown

Demonstrates how to count digitalpulses from an external decremented
signal that is connected to the C/T input
source. If the gate input signal of theC/T is high, the counter is the gate input
signal of the C/T is low, the count isincremented.

ExamplesDtDinSingle

Demonstrates how to continuously
acquire data from an analog input
channel and continuously output thedata to an analog output channel

Demonstrates how to read a single value
from a digital input port repetitively ina loop

DtDoutSingle

DtAinAoutSimultaneous

Demonstrates how to start an analog
input and analog output operation atthe same time

Demonstrates how to write a single value
from a digital output port repetitively ina loop.

Quadrature

Demonstrates how to read the value of aquadrature decode, repetitively in a loop

DtAinContinuous

Demonstrates how to continuously
acquire data from an analog input
channelExamplesDtAinAoutContinuous(508) 946-5100

4

info@mccdaq.com

mccdaq.com

Building and Distributing an Executable

Ordering Summary

If you want to create a stand-alone executable of a VI that you havecreated, you need LabVIEW’s Application Builder. The Application Builder
is included as part of the LabVIEW Professional Development System andis also available as a separate option that you can purchase from National
Instruments.
The Application Builder creates executables from user-specified files (suchas VIs, libraries, documentation, data files, and so on) and saves individual
build settings as part of the project file.

Porting Code from LV-Link 2.0 to LV-Link 3.0
Where LV-Link 2.0 is based on the DT-Open Layers for .NET Class Library, LVLink 3.0 is based on the DT-Open Layers DataAcq SDK.
If you have a LabVIEW application that was written using LV-Link 2.0 and
you want to port that application to use LV-Link 3.0, keep the following
information in mind:

LV-LINK 3.0• SP0811-CD – LV-Link, is available fordownload from our web site at www.
mccdaq.com/Data-TranslationSoftware.aspx.
SYSTEM REQUIREMENTS
Before using LV-Link, make sure that you haveinstalled the following:• LabVIEW 8.5.1 or greater for 32-bit support,
or LabVIEW 2009 or higher for 64-bit or
32-bit support. Refer to your LabVIEW
documentation for details• LV-Link 3• One or more DT-Open Layers-compliantdevices, including the software for thedevices• All of the top-level VIs in LV-Link 3.0 have been renamed.
• Some terminals and data types have been changed for the top-level Vis
in LV-Link; application modifications will be required to appropriately
deal with these changes.

• New VIs have been added to LV-Link 3.0 to replace the .NET interface.
These low-level VIs call directly into the entry points of the DLL ofthe DataAcq SDK and are used by the higher level VIs. To access theDataAcq SDK directly, use the new Vis in your application. Some
LV‑Link 2 VIs have been removed and no longer exist.

Documentation
A comprehensive help file is included with LV-Link.

Technical Support
Application engineers are available by phone and email during normal
business hours to discuss your application requirements. Extensive productinformation, including drivers, example code, pinouts, a searchable
Knowledge Base, and much more, is available 24 hours a day on our website at www.mccdaq.com/Support.aspx.

(508) 946-5100		
LV-Link-Datasheet		

5

info@mccdaq.com

mccdaq.com
May 2017. Rev 3© Measurement Computing Corporation