Beruflich Dokumente
Kultur Dokumente
Agenda
Description, History, Technologies, and Future of
GPIB VXI CompactPCI/PXI
About GPIB communication and configuration About LabVIEW instrument drivers How to use instrument driver VIs About Virtual Instrument Software Architecture
Types of Instruments
1.Conventional Instruments[Standalone] - Manual Control - No Communication Interface 2.Programmable Instruments - Controlled by Instrument specific commands. PC Serial - Remote controlled. Port
RS-232 Cable RS-232 Instrument
Difference
Card Based Instruments reside inside PC/Controller cabinet. Control software is the face of the instrument Must.
Programmable Instruments with conventional Front Panel are desktop based. Control software is optional manual control is also possible.
Virtual Instrument
VI is Software face of the programmable instrument. User takes control over the underlying hardware my manipulating VI Software.
Modular buses : incorporate the interface bus into the instrument itself Eg : PCI,PXI,VXI
GPIB
The General Purpose Interface Bus (GPIB) is one of the most common I/O interfaces available in standalone instruments. Originally designed by Hewlett Packard GPIB is a digital, 8-bit parallel communications interface with data transfer rates of up to 8 Mb/s. The bus provides one system controller for up to 14 instruments, and cabling is limited to less than 20 m.
1 13
12 24
DIO5 DIO6 DIO7 DIO8 REN GND (TW PAIR W/DAV) GND (TW PAIR W/NRFD) GND (TW PAIR W/NDAC) GND (TW PAIR W/IFC) GND (TW PAIR W/SRQ) GND (TW PAIR W/ATN) SIGNAL GROUND
Max cable length between devices = 4 m (2 m average) Max cable length = 20 m Max number of devices = 15 (2/3 powered on)
OBJECTIVE
Use MAX to examine the GPIB board settings and communicate with an instrument.
Serial Communication
Popular means of communication between computer and peripheral device
RS-422
DCE or DTE 8-pin
RS-485
Multidrop
Serial Communication
Terminology Baud rate bits per second Data bits inverted logic and LSB first Parity optional error-checking bit Stop bits 1, 1.5, or 2 inverted bits at data end Flow control hardware and software handshaking options
Serial VIs and functions also work with parallel port communication
Initialize the serial port settings Write commands to the device Read device response Check for errors
Exercise
Serial Write & Read VI
OBJECTIVE
Exercise
Using the Instrument I/O Assistant
OBJECTIVE
Use the Instrument I/O Assistant to communicate with the NI Instrument Simulator.
VXI
www.ni.com
VXI Mainframes
Maximum of 13 slots Same sizes as VXI Modules (A, B, C, D) Adapt smaller modules to larger mainframes
Slot 0 Controller
VXI Instr.
VXI Instr.
Local Bus
VXI Instr.
VXI Instr.
Growth challenged by
Cost of VXI Vendor production of new instruments Need for faster test times Smaller instrument solutions Ease of multi-instrument integration New platforms such as PXI and CompactPCI
CompactPCI
PXI and CompactPCI for Measurement and Automation
Price
Desktop PC
Te mp erat ure Flow Co Pr es ntro l Pa ne su l re Alar m Co nd itio ns
ST
OP
Performance
PCI bus
CompactPCI
Eurocard packaging
Better IEC Connectors
CompactPCI
bus
PCI
Electrical Extensions
PXI timing and triggering improves performance:
Star Trigger 10 MHz CLK Star Trigger Controller System Controller Peripheral Peripheral Peripheral
Local Bus
www.picmg.org
Systems Alliance
Charter of this group is to:
- Promote PXI - Ensure Interoperability - Control the PXI Specification
www.pxisa.org
GTE-ERS Innovative Integration KineticSystems LeCroy MAC Panel MEN Mikro Elektronik Talon Instruments
MXI-3 Benefits
Tem pe ratu re Flo w Con Pre ss trol Pan el ure Ala
rm
Con
ditio
ns
ST
OP
More slots for PCs and PXI/CompactPCI Very high performance serial link Easy to integrate software transparent Short and L O N G distances Low cost
VXI or VME
GPIB
MXI
CompactPCI
Modules Modules
bus
Leverages computing technology 32-bit data transfers at 33 MHz (132 Mbytes/sec) Reduced measurement time
PCI/PXI Transfer Width (bits) Theoretical Peak Throughput (Mbytes/s) Relative System Price 32 132 $
VXI 32 or 64 40 or 80 $$$
Serial
GPIB
VXI
PXI
Platform independent VISA is the backbone of the IVI and Plug & Play Instrument Drivers
Interface independent Must know SCPI command set to program directly with VISA
VISA Terminology
ResourceInstrument, Serial Port, or Parallel Port
SessionConnection to a Resource
Instrument DescriptorResource location Format: Examples: Interface Type::Address::INSTR
VISA Functions
Exercise 3
Programming with VISA
OBJECTIVE
To build a VI that reads and writes information from the NI Instrument Simulator using VISA functions.
Instrument Drivers
More than 1200 LabVIEW Instrument drivers Programming simplified to highlevel API
Instrument Drivers
Test Program
Instrument Driver
Low-Level I/O:
- set:vert_div:0.001 Instrument - init:trig:armDriver: etc - ReadWaveform
instrument addressing command string building range checking memory storage data scaling response string parsing
Action/Status
Data
Utility
Close
Instrument Drivers
Instrument drivers have a similar hierarchy
HP34401A Initialize.vi
Error cluster
Error Clusters
Exercise 4
Function Generator VI
OBJECTIVE
To build a VI that uses the Function Generator instrument driver VIs to Generate Output waveforms.
Instrument Drivers
Issues
Performance Inconsistent structure/quality
Additional Expectations
Instrument interchangeability Instrument simulation Simplification of instrument programming Multithreading/parallel testing
Instrument Drivers
Test Program
Summary
LabVIEW can communicate with any instrument that connects to your computer if you know the interface type Use the Measurement & Automation Explorer (MAX) to detect, configure, and test your GPIB interface and instruments An instrument driver eliminates the need for your to have detailed knowledge of the specific strings used by an instrument Instrument Library more than 1600 instruments supported Instrument driver VIs share a common hierarchy and come with an example to help you get started VISA a standard protocol for using multiple types of I/O and instrument driver development Serial library contains functions for serial communication You need to know the format of the returned data string in order to convert it to the correct values
Conclusions
GPIB is a defacto standard here to stay