Sei sulla pagina 1di 41

Lesson 2

Configuring Your Hardware

TOPICS
A. Hardware Setup and Installation
B. Target Configuration
C. Input and Output Hardware Configuration
D. Connecting to the Target in LabVIEW

ni . com / traini
ng
Configuring Your Hardware

ni . com / traini
ng
A. Hardware Setup and
Installation
• Refer to the documentation for your target
hardware for hardware setup and
installation instructions
• Target hardware arrives pre-installed with
operating system
• Classroom systems have been pre-
installed and set up

ni . com / traini
ng
Hardware Setup and
Installation, cont.
• hidden slide – do not delete

ni . com / traini
ng
Host PC Setup and Installation

• Install the LabVIEW Real-Time Module on


the host computer
• Install necessary drivers for your hardware
on the host computer. Refer to the
documentation for your target hardware
for driver installation instructions

ni . com / traini
ng
Configuring Your Hardware

ni . com / traini
ng
B. Target Configuration
• Use one of the following connection
methods:
• Connect target and host computer to the
same local area network
• Connect target directly to host computer
using a CAT-5 crossover cable

ni . com / traini
ng 7
Detect the Remote Target
• Use the Measurement & Automation Explorer
(MAX) to detect and configure your RT target
systems
• Host computer must be on the same subnet to
configure the
RT Series target systems

ni . com / traini
ng 8
Configured and Unconfigured
Systems
• An unconfigured RT system will have an IP
address of 0.0.0.0.

ni . com / traini
ng
Target Configuration—do not
delete slide, used for notes

ni . com / traini
ng
Assign IP Address to Target

• IP Address – the unique address of a device.


−a set of four one- to three-digit numbers in the
range 0–255
−dotted decimal notation. The IP address
224.102.13.24 is an example of dotted
decimal notation.
• Subnet Mask – a code that helps the network
device determine whether another device is
on the same network. 255.255.255.0 is the
most common subnet mask.
• Gateway – address of a gateway server (a
connection between two networks).
ni . com / traini
• DNS Address – address of a device that storesng 11
Assign IP Address to Target
• Assign an IP address to your target using
one of these methods:

ni . com / traini
ng 12
Static IP – Network Settings
• Static IP Address Configuration for RT
Target
4

2
blank.
leave them 3
available,
not
and DNS are
If a Gateway
1

ni . com / traini
ng 13
Static IP – Crossover Cable

• Crossover Cable
requires
both PC and RT
Target to
use static IP
addresses
• Set PC to use static
IP address
−Control
Panel»Network
Connections
−Local Area
Connection» ni . com / traini
ng 14
Static IP – Crossover Cable

• Set host computer • Specify an IP address


to use a static IP • Subnet mask is
address optional

• No Gateway or DNS
ni . com / traini
Server ng 15
Assign IP Address – Automatic
IP
• Automatic IP Address Configuration for RT
Target
3
2

1
ni . com / traini
ng 16
Assign IP Address – Automatic
IP
Automatic IP Address from DHCP Server

• Automatically obtains an IP address from


the DHCP server on each reboot. New
address might not be the same. You
must check the address frequently.
− To avoid this, use a static IP.
• Some DHCP servers are not compatible.
Returns 0.0.0.0 after three failed
attempts.

ni . com / traini
ng 17
Add/Remove Software on
Target

ni . com / traini
ng 18
Exercise 2-1: Configure
Hardware

Configure the cRIO target systems and


the I/O hardware using MAX.


GOAL

ni . com / traini
ng
Configuring Your Hardware

ni . com / traini
ng
C. Input and Output Hardware
Configuration
• Use MAX to configure the remote I/O
hardware if necessary
• Refer to product-specific documentation
for assistance

ni . com / traini
ng
Demonstration

PXI Configuration in MAX

• Demonstrate the configuration of a PXI


system in MAX.
GOAL

ni . com / traini
ng
Configuring Your Hardware

ni . com / traini
ng
D. Connecting to the Target in
LabVIEW
For LabVIEW to connect to the RT target

you must configure the target in a project.


1.Create a project
2.Create a real-time target
3.Connect to the target
4.Add VIs to the target

ni . com / traini
ng
LabVIEW Projects

• Projects manage files


and targets
• Projects allow you to
build executables or
use source control
• Targets represent
systems that can run
VIs
−Host computer
−Real-time systems
−FPGA systems
ni . com / traini
−PDA systems ng
Adding Folders to a Project
• Virtual folder
− Organizes project items and does not
represent files on disk
• Auto-populating folder
− Adds a directory on disk to the project
− LabVIEW continuously monitors and updates
the folder according to changes made in the
project and on disk

ni . com / traini
ng
Project Explorer Views

• Items view • Files view

ni . com / traini
ng
Project Libraries

• Group a set of VIs,


controls, and
variables
−Libraries create a
namespace
−Items can be
public/private
L−ib
Allra ry variables
shared
must be in a library

ni . com / traini
ng
Creating a Project
• Select File»New
Project to open
the Project Explorer
window
• Project starts with
the
My Computer
Target
− Add VIs that run on
the
host computer to
the
ni . com / traini
My Computer ng
Creating a Real-Time Target
• Right-click the project
in the Project
Explorer window and
selecting
New»Targets and
Devices
• Select the type of RT
target
• Select a device

ni . com / traini
ng
Connecting to a Target
• Ways to connect to
a target:
• Right-click the RT
target and select
Connect
• Run a VI on the
target

ni . com / traini
ng
Adding VIs to a Target
• Any VIs added to the
target become
targeted to that
system
− Right-click to
create new VIs or
add existing VIs
− Drag VIs from
Windows Explorer
or other project
folders
• Targeted VIs
ni . com / traini
automatically ng
Running VIs on a Target
• When you run an RT VI, the compiled code
for the VI downloads to the RT target
• The compiled code on the RT target and the
VI on the RT host exchange data through
front panel communication

Host PC RT Target
ni . com / traini
ng
Closing a Front Panel
Connection Without Closing
VIs
• Selecting File»Exit while a
VI runs results in the dialog
box at right:
• Right-click the target and select
Disconnect
− RT VIs continue to run on the target, but
no longer exchange front panel
communication or debugging information
with the host
− Reconnecting to the target automatically
opens and
re-establishes a connection with any
ni . com / traini
ng
Exercise 2-2: Targeting
Real-Time Hardware

Create a LabVIEW project and an RT


target to use for the project exercises in


GOAL

the course.

ni . com / traini
ng
Summary – Quiz

1.Which of following are methods for


connecting target and host
computers?
a.Connect target and host
computers to the same local
area network
b.Connect target computer directly
to host computer using a CAT-5
crossover cable
c.Both a & b

ni . com / traini
ng
Summary – Quiz Answer

1.Which of following are methods for


connecting a target and host
computer?
a.Connect target and host computer
to the same local area network
b.Connect target directly to host
computer using a CAT-5
crossover cable
c.Both a & b

ni . com / traini
ng
Summary – Quiz

2.True or False? If your target is configured


to obtain an IP address automatically
from a DHCP server, the target will
have the same IP address every time it
boots up.

ni . com / traini
ng
Summary – Quiz Answer

2.True or False? If your target is configured


to obtain an IP address automatically
from a DHCP server, the target will
have the same IP address every time it
boots up.
3.
• False

ni . com / traini
ng
Summary – Quiz

3.For LabVIEW to connect to and run VIs on


the RT target, you must create a
________.
a.DHCP server
b.Local Area Network
c.LabVIEW Project

ni . com / traini
ng
Summary – Quiz Answer

3.For LabVIEW to connect to and run VIs on


the RT target, you must create a
________.
a.DHCP server
b.Local Area Network
c.LabVIEW Project

ni . com / traini
ng

Potrebbero piacerti anche