The NI 5401 is warranted against defects in materials and workmanship for a period of one year from the date of shipment,
as evidenced by receipts or other documentation. National Instruments will, at its opt ion, repair or replace equipment that
proves to be defective during the warranty period . T his w arran ty i ncludes part s and l abo r.
The media on which you receive National Instruments software are warranted not to fail to execute programming
instructions, due to defects in materials and work man ship, for a peri od of 90 d ays from da te o f sh ipm ent, as evi denced
by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not
execute programming instructions if National Instruments receives noti ce of su ch defect s d uring th e warranty perio d.
National Instruments does not warrant that the op eration of t he soft ware shall b e uni nterrup ted or erro r free.
A Return Material Authorization (RMA) number must b e ob tain ed fro m th e facto ry an d clearl y mark ed on t he outsi de
of the package before any equipment wil l be accepted for warranty work. National Instruments will pay the shippi ng costs
of returning to the owner parts which are covered by warran ty.
National Instruments believes that the information in this document is accurate. The document has been carefully
reviewed for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves
the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The
reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for
any damages arising out of or related to th is d ocum ent o r th e in form ation con tained in i t.
XCEPT AS SPECIFIED HEREIN
E
ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE
CUSTOMER
OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF
National Instruments will apply regardless of the form of action, wh ether in con tract or tort , incl udin g n egli gen ce.
Any action against National Instruments must be brought within one year after the cause of action accrues. National
Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty
provided herein does not cover damages, defects, malfuncti ons, or s ervice failur es caused by own er’s fai lure to fol low
the National Instruments installation, operation, or maintenance instructions; owner’s modification of the product;
owner’s abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties,
or other events outside reasonable control.
ATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS
. N
ATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS
, N
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical,
including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without
the prior written consent of National Instruments Corporation.
USTOMER’S RIGHT TO RECOVER DAMAGES CAUSED
. C
. This limitation of the liability of
,
Trademarks
ComponentWorks™, CVI™, LabVIEW™, natinst.com™, PXI™, RTSI™, and VirtualBench™ are trademarks of
National Instruments Corporation.
Product and company names mentioned herein are trademarks or trade names of their respective companies.
WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS
National Instruments products are not designed with com ponent s and tes ting for a level o f reli ability suit abl e for use in
or in connection with surgical implants o r as cri tical co m ponent s i n any li fe su pp ort sy stem s wh ose fail ure t o pe rform
can reasonably be expected to cause s ignifi cant in ju ry to a hu m an. A ppli cations of Nation al In st rument s prod ucts
involving medical or clinical treatment can create a pot enti al for d eath or bod ily i njury caused b y p rodu ct fail ure, o r by
errors on the part of the user or application designer. Because each end-user system is customized and differs from
National Instruments testing platforms and because a user or application designer may use National Instruments products
in combination with other products in a m ann er no t ev alu ated or co ntem p lated b y N ati onal Ins trum ents , the user or
application designer is ultimately responsible for verifying and validating the suitability of National Instruments products
whenever National Instruments products are incorporated in a system or application, including, without limitation,
the appropriate design , pr ocess and safet y level of such syst em or ap plicat io n.
Conventions
The following conventions are used in this manual:
»The » symbol leads you through nested menu items and dialog box options
to a final action. The sequence File»Page Setup»Options directs you to
pull down the File menu, select the Page Setup item, and select Options
from the last dialog box.
♦The ♦ symbol indicates that the following text applies only to a specific
product, a specific operating system, or a specific software version.
This icon denotes a note, which alerts you to important information.
This icon denotes a caution, which advises you of precautions to take to
avoid injury, data loss, or a system crash.
This icon denotes a warning, which advises you of precautions to take to
avoid being electrically shocked.
boldBold text denotes items that you must select or click on in the software,
such as menu items and dialog box options. Bold text also denotes
parameter names.
italicItalic text denotes variables, emphasis, a cross reference, or an introduction
to a key concept.
monospaceText in this font denotes text or characters that you should enter from the
keyboard. This font is also used for the proper names of functions,
variables, and filenames and extensions.
monospace italic
Italic text in this font denotes text that is a placeholder for a word or value
that you must supply.
Contents
Chapter 1
Generating Functions
with the NI 5401
About Your NI 5401......................................................................................................1-1
National Instruments CorporationviiNI 5401 User Manual
Generating Functions
with the NI 5401
The NI 5401 User Manual describes the features, functions, and operation
of the NI 5401 arbitrary function generator. This device performs
comparably to standalone instruments while providing the flexibility of
computer-based operation.
About Your NI 5401
Thank you for buying a National Instruments NI 5401 arbitrary function
generator. The NI 5401 family consists of two different devices:
•NI 5401 for PCI
•NI 5401 for PXI
Your NI 5401 device has the following features:
•One 12-bit resolution output channel
•Up to 16 MHz sine and transistor-transistor logic (TTL) waveform
output
•Software-selectable output impedances of 50 Ω and 75 Ω
•Output attenuation levels from 0 to 73 dB
•Phase-locked loop (PLL) synchronization to external clocks
•Sampling rate of 40 MS/s
•Digital and analog filter
•32-bit direct digital synthesis (DDS) for standard function generation
•External trigger input
•Real-Time System Integration (RTSI) and PXI triggers
1
All NI 5401 devices follow industry-standard Plug and Play specifications
on both buses and offer seamless integration with compliant systems.
Detailed specifications for the NI 5401 are in Appendix A, Specifications.
National Instruments Corporation1-1NI 5401 User Manual
Chapter 1Generating Functions with the NI 5401
Connecting Signals
Figure 1-1 shows the front panels for the NI 5401 for the PXI and PCI
buses. The front panel contains three types of connectors: BNC, SMB, and
50-pin very high-density SCSI (VHDSCSI). The main waveform is
generated through the connector labeled ARB.
LOCK
ACCESS
ARB OUT
SYNC OUT
EXT TRIG
PLL REF
ARB
SYNC
PLL IN
PXIPCI
PATTERN OUT
Figure 1-1.
NI 5401 I/O Connectors
NI 5401 User Manual1-2www.natinst.com
ARB Connector
Chapter 1Generating Functions with the NI 5401
The ARB connector provides the waveform output. The maximum output
levels on this connector depend on the type of load termination. If the
output of your NI 5401 terminates into a 50 Ω load, the output levels are
±5 V , as sho wn in Figure 1-2. If the output of your NI 5401 terminates into
a high-impedance load (HiZ), the output levels are ±10 V. If the output
terminates into any other load, the levels are as follows:
R
L
V
out
------------------ -
RLRO+
10× V±=
where V
By default, R
Figure 1-2.
Note
Software sets the voltage output levels based on a 50 Ω load termination.
is the maximum output voltage level
out
R
is the load impedance in ohms, and
L
R
is the output impedance on the NI 5401.
O
= 50 Ω, but you can use your software to set it to 75 Ω.
O
NI 5401
ARB
50 Ω Load
RO =
Ω
50
R
50
Load
=
L
Ω
±5 V
NI 5401
ARB
RO =
50
High-Impedance Load
Output Levels and Load Termination Using a 50
For more information on waveform generation and analog output
operation, refer to Chapter 2, Function Generator Operation. For
specifications on the waveform output signal, see Appendix A,
Specifications.
Load
R
=
Ω
L
HiZ
Output Impedance
Ω
±10 V
SYNC Connector
The SYNC connector provides a TTL version of the sine waveform being
generated at the output. You can think of the SYNC output as a very
high-frequency resolution, software-programmable clock source for many
applications. You can also vary the duty cycle of the SYNC output on the
fly by software control, as shown in Figure 1-3. t
National Instruments Corporation1-3NI 5401 User Manual
is the time period of the
p
Chapter 1Generating Functions with the NI 5401
sine wave being generated and tw is the pulse width of the SYNC output.
The duty cycle is (t
ARB Output
SYNC Output
(50% Duty Cycle)
SYNC Output
(33% Duty Cycle)
For your NI 5401 for PCI, you can route the SYNC output to the RTSI lines
over the RTSI bus. For your NI 5401 for PXI, you can route the SYNC
output to the TTL trigger lines over the TTL trigger bus. The SYNC output
is derived from a comparator connected to the analog waveform and
provides a meaningful waveform only when you are generating a sine w ave
on the ARB output. For more information on SYNC output, see Chapter 2,
Function Generator Operation.
) × 100%.
w/tp
t
p
t
w
Figure 1-3. SYNC Output and Duty Cycle
PLL Ref Connector
The PLL Ref connector is a phase-locked loop (PLL) input connector that
can accept a reference clock from an external source and frequency lock the
NI 5401 internal clock to this external clock. The reference clock should
not deviate more than ±100 ppm from its nominal frequency . The minimum
amplitude levels of 1 V
reference clock frequencies of 1 MHz and 5–20 MHz in 1 MHz steps.
Note You can frequency lock the NI 5401 for PCI to other National Instruments devices
over the RT SI bus using the 20 MHz RTSI clock signal. You can frequency lock the
NI 5401 for PXI to other National Instruments devices using the 10 MHz backplane clock.
If no external reference clock is av ailable, the NI 5401 automatically tunes
the internal clock to the highest accuracy possible. For more information on
PLL operation, refer to Chapter 2, Function Generator Operation.
NI 5401 User Manual1-4www.natinst.com
are required on this clock. You can lock
pk-pk
Pattern Out Connector (PCI Only)
This connector is used on the NI 5401 for PCI to supply the external trigger
input to the board.
Connector Pin Assignments
Figure 1-4 shows the NI 5401 50-pin digital connector. Refer to Table 1-1
for a description of the signals.
National Instruments Corporation1-5NI 5401 User Manual
NI 5401 50-Pin Digital Connector Pin Assignments
Chapter 1Generating Functions with the NI 5401
Signal Descriptions
Table 1-1 shows the pin names and signal descriptions used on the NI 5401
digital output connector.
Table 1-1.
Signal NameTypeDescription
DGND–Digital ground
EXT_TRIGInputExternal trigger—The external trigger input signal is a
NC–Not connected.
RFU–Reserved for future use. Do not connect signals to this pin.
Digital Connector Signal Descriptions
TTL-level signal that you can use to start or step through a
waveform generation. For more information on trigger sources
and trigger mode, see Chapter 2, Function Generator
Operation.
SHC50-68 50-Pin Cable Connector
You can use an optional SHC50-68 50-pin to 68-pin cable for external
trigger input. The cable connects to the digital connector on the NI 5401.
Figure 1-5 shows the 68-pin connector pin assignments on the SHC50-68
cable.
Note
The SHC50-68 connector uses the same signals as the NI 5401 digital output
National Instruments Corporation1-7NI 5401 User Manual
Chapter 1Generating Functions with the NI 5401
Software Options for Your NI 5401
This section describes the NI-FGEN driver software and development tools
that you can use to create application software for your NI5401.
Software Included with Your NI 5401
Your NI5401 kit includes several VirtualBench soft front panels to help
you get up and running quickly with your waveform generator. These soft
front panels are an onscreen interface similar to standalone instruments. An
NI-FGEN instrument driver is also included, which you can use with a
wide variety of development tools to build applications for your NI 5401.
These software tools are discussed in the following sections.
VirtualBench
Similar to standalone instruments, VirtualBench acquires, controls,
analyzes, and presents data. However, since VirtualBench operates on your
PC, it provides additional processing, storage, and display capabilities.
VirtualBench loads and saves waveform data in a form that popular
spreadsheet programs and word processors can use. It can also generate
reports—a complement to the raw data storage—by adding timestamps,
measurements, user names, and comments. You can print the waveforms
and the settings of VirtualBench to a printer connected to thePC.
VirtualBench has two components—VirtualBench-FG and Waveform
Editor—that you can use with your NI5401. These components are
described in the following sections.
VirtualBench-FG
VirtualBench-FG transforms your PC into a fully featured function
generator that rivals desktop models by using the DDS capabilities of your
NI5401. VirtualBench-FG emulates benchtop function generators, so you
can quickly learn to use computer-based instruments.
With VirtualBench-FG, you can generate a variety of waveforms, including
five standard waveforms: sine, square, triangle, rising exponential, and
falling exponential. Using VirtualBench-FG, you load waveforms from an
ASCII text file and generate them repeatedly. You can generate these
waveforms with a resolution of approximately 10mHz and perform
frequency sweeps and shift-keying. As with all VirtualBench instruments,
you can load and save instrument settings.
NI 5401 User Manual1-8www.natinst.com
Chapter 1Generating Functions with the NI 5401
Waveform Editor
You use the Waveform Editor to create, sketch, and edit complex
waveforms that the VirtualBench-FG player can then generate. A library of
standard waveforms for creating complex waveforms is included, and you
can also write equations to create arbitrary waveforms and view the
waveforms in a time or frequency domain.
NI-FGEN Instrument Driver
To create your application, you need an industry-standard software driver
such as NI-FGEN to control your instrument. The NI-FGEN driver
includes a set of standard functions for configuring, creating, starting, and
stopping waveform generation. The instrument driver reduces your
program development time and simplifies instrument control by
eliminating the need to learn a complex programming protocol for your
instrument.
NI-FGEN is in a standard instrument driver format that works with
LabVIEW, LabWindows/CVI, and conventional programming languages
such as C, C++, and Visual Basic.
Refer to the NI-FGEN
instrument driver. This file can be launched from the
Start»Programs»National Instruments FGEN menu.
Note
An NI-FGEN Instrument Driver Quick Reference Guide is included in your NI 5401
kit. This reference guide helps you program your NI 5401.
readme.txt file for more details on the NI-FGEN
Additional National Instruments Development Tools
The following sections describe several additional tools that you can use to
develop complex applications for your NI 5401. The NI-FGEN instrument
driver exposes the Application Programming Interfaces (APIs) to these
development environments.
LabVIEW
LabVIEW is a graphical programming language for building
instrumentation systems. With LabVIEW, you quickly create front panel
user interfaces, giving you interactive control of your software system. To
specify the functionality, you assemble block diagrams—a natural design
notation for engineers and scientists. LabVIEW has all of the same
development tools and language capabilities of a standard language such
National Instruments Corporation1-9NI 5401 User Manual
Chapter 1Generating Functions with the NI 5401
as C, including looping and case structures, configuration management
tools, and compiled performance.
Note Use the NI-FGEN instrument driver to program and control your NI 5401 using
LabVIEW.
LabWindows/CVI
LabWindows/CVI is an interactive, ANSI C programming environment
designed for automated test applications.
LabWindows/CVI has an interacti ve drag-and-drop editor for building your
user interface and a complete ANSI C development environment for
building your test program logic. The LabWindows/CVI environment has
a wide collection of automatic code-generation tools and utilities that
accelerate your development process, without sacrificing any of the po wer
and flexibility of a language such as C. In addition, the LabWindows/CVI
run-time libraries are compatible with standard C/C++ compilers,
including Visual C++ and Borland C++ under Windows.
Note Use the NI-FGEN instrument driver to program and control your NI 5401 using
LabWindows/CVI.
ComponentWorks
ComponentWorks is a collection of 32-bit ActiveX controls for building
virtual instrumentation systems. ComponentWorks gives you the power
and flexibility of standard development tools, such as Microsoft Visual
Basic or Visual C++, with the instrumentation expertise of National
Instruments. Based on ActiveX technology, ComponentWorks controls are
easy to configure using property sheets and are easy to control from your
programs using high-level properties and methods. ComponentWorks
features instrumentation-based graphical user interface (GUI) tools,
including graphs, meters, gauges, knobs, dials, and switches.
Note Use the NI-FGEN instrument driver to program and control your NI 5401 using
ComponentWorks.
NI 5401 User Manual1-10www.natinst.com
Chapter 1Generating Functions with the NI 5401
Using the Soft Front Panels to Generate Waveforms
You use the VirtualBench soft front panels to interactively control your
NI 5401 as you would a desktop function generator.
Generating Standard Functions
If you need to generate standard waveforms such as a sine, square, ramp,
or DC signal, you can use the VirtualBench-FG soft front panel shown in
Figure 1-6. Launch the front panel by selecting Start»Programs»National Instruments FGEN»VirtualBench FG. You use this front panel to
control the frequency, amplitude, offset, and type of waveform generated.
The maximum sine frequency you can generate is 16 MHz. The maximum
amplitude is 5 V
the actual levels will be twice that shown on the front panel.
into a 50 Ω load. If the load is a high-impedance load,