Parallel Interfaces for DAQ Systems

download Parallel Interfaces for DAQ Systems

of 20

Transcript of Parallel Interfaces for DAQ Systems

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    1/20

    GPIB tutorial(according to Agilent and National Instruments sources)

    Jn aliga

    Technical University of KoiceSlovak Republic

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    2/20

    Parallel interfaces in DAQ

    GPIB (tutorial according to Agilentand National Instruments sources)

    Parallel port

    Non-standard interfaces (seelectures on multifunction plug-inboards)

    System and computer busses PCI,VXI, ... (see lectures on plug-inboards)

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    3/20

    History

    1965 Hewlett-Packard designsHP-IB forinstrumentation systems

    1975 HP-IB becomes IEEE 488standard 1987 IEEE 488.2 adopted; IEEE 488-

    1978 becomes IEEE 488.1-1987 1992 SCPI Specification introducedfor

    IEEE 488 instruments 1990 IEEE 488.2 Standard revised 1993 National Instruments proposes

    high-speed extensions to IEEE 488.1called HS488

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    4/20

    Basic characteristics

    Any instrument can be used Each instruments (up to 15) has its unique

    address within range 0-31 in basicaddressing mode

    Linear or star cable configuration 24/25 wires 3 types of connectors (Amphenol CHAMP or

    Cinch Series 57 MICRO RIBBON type)

    Total length of cable 20m, max. 4m perinstrument

    TTL levels, negative logic, drivers: 3-stateor open collector (NDAC, NRFD, SRQ)

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    5/20

    Types of GPIB messages

    Communication is based on variousmessages:

    Device-dependent messages related

    (mainly) to the instrument measuringfunctions

    Interface messages (commandmessages commands as some device

    dependant messages accordingIEEE488.2) related to thecommunication (interface) functions

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    6/20

    Main communication functions

    System Controller and Active Controller controls communication, send interfacemessages, e.g. monitors bus activities,addresses (enables) instruments, etc.

    Listener receives the device -dependentmessages

    Talker sends the device -dependentmessages

    Simple system does not need controller the device work always in the modes talk-only and listen-only

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    7/20

    Interface Signals and Lines

    Data bus (8 lines)similar to anycomputer data bus:commands/data

    Handshaking lines =asynchronous controlof transfer on DIO

    Interface management

    lines = control ofsome interfacefunctions

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    8/20

    Handshaking (HS) lines

    NRFD (Not Ready for Data) Acceptor of HS NDAC (Not Data Accepted) Acceptor of HS DAV (Data Valid) Source of HS

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    9/20

    Interface Management Lines ATN (Attention) - controller drives ATN true when

    it uses the DIO to send commands, and falsewhen a Talker can send data messages.

    EOI (end or identify) two purposes: Talker: to mark the end of a message string, Controller: to tell devices to identify their response in a

    parallel poll. IFC (interface clear) The System Controller

    drives the IFC line to initialize the bus andbecome CIC.

    REN (remote enable) The System Controllerdrives the REN line to place devices in remote orlocal program mode.

    SRQ (service request) Any device can drive theSRQ line to asynchronously request service fromthe Controller.

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    10/20

    IEEE 488.2 and SCPI

    488.1 (1975) missing mainly: definitionof data formats, status reporting, messageexchange protocol, common configurationcommands, device-specific commands,etc.

    488.2 (1987) arisen from 488.1(compatible), software oriented, increasesdata format compatibility, status reportingand error handling

    SCPI device-specific commands comingfrom generalized instrument model

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    11/20

    Comparison of IEEE 488.1 488.2

    and SCPI

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    12/20

    IEEE 488.2 Mandatory Controller Seq.Description Control Sequence

    Send ATN-true commands SEND COMMAND

    Set address to send data SEND SETUP

    Send ATN-false data SEND DATA BYTES

    Send a program message SEND

    Set address to receive data RECEIVE SETUP

    Receive ATN-false data RECEIVE RESPONSE MESSAGE

    Receive a response message RECEIVE

    Pulse IFC line SEND IFC

    Place devices in DCAS DEVICE CLEAR

    Place devices in local state ENABLE LOCAL CONTROLSPlace devices in remote state ENABLE REMOTE

    Place dev. in remote with local lockout state SET RWLS

    Place devices in local lockout state SEND LLO

    Read IEEE 488.1 status byte READ STATUS BYTE

    Send group execution trigger (GET) message TRIGGER

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    13/20

    IEEE 488.2 Controller Protocols

    Keyword Name Compliance

    RESET Reset System Mandatory

    FINDRQS Find Device RequestingService

    Optional

    ALLSPOLL Serial Poll All Devices Mandatory

    PASSCTL Pass Control Optional

    REQUESTCTL Request Control Optional

    FINDLSTN Find Listeners OptionalSETADD Set Address Optional, but requires

    FINDLSTN

    TESTSYS Self-Test System Optional

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    14/20

    IEEE 488.2 Instruments

    Minimal set of interface capabilitiesof each device: To send and receive data (T5, T6, TE5,

    TE6, L3, L4, LE3, LE4, AH1, SH1) To request service (SR1) To respond to a device clear (DC1)

    + other capabilities are optional:RL0/RL1; PP0/PP1; DT0/DT1; E1/E2;C0/C in some version.

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    15/20

    IEEE 488.2 Common Commands

    Mnemonic Group Description*IDN? System Data Identification query

    *RST Internal Operations Reset

    *TST? Internal Operations Self-test query

    *OPC Synchronization Operation complete

    *OPC? Synchronization Operation complete query

    *WAI Synchronization Wait to complete

    *CLS Status and Event Clear status

    *ESE Status and Event Event status enable

    *ESE? Status and Event Event status enable query

    *ESR? Status and Event Event status register query

    *SRE Status and Event Service request enable

    *SRE? Status and Event Service request enable query

    *STB? Status and Event Read status byte query

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    16/20

    IEEE 488.2 Device Status Model

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    17/20

    SCPI Instrument Model

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    18/20

    Parallel port IEEE1284

    Primary 8-bits interface forconnecting printers (Centronics)

    1994 the first standard IEEE 1284:

    Standard (centronics compatible)parallel port (SPP): one way data lines+ 3-wire handshaking + additionalstatus, control lines very simple:transfer fully controlled by software(microprocessor)

    EPP ECP

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    19/20

    Enhanced parallel port

    Bidirectional data lines

    Similar to microcontroller buscommunication (addressing registersin printer and in PC, then datatransfer)

    Transfer rate up to 10MB/s

    Data transfer partially controlled byPC hardware

  • 7/28/2019 Parallel Interfaces for DAQ Systems

    20/20

    Extended capabilities parallel port

    Bidirectional data transfer fullysupported by PC hardware (data andaddress written to the register in PC

    are automatically send to the printer Networking (daisy chain: input =

    host and output =pass troughconnectors)

    Parallel port is used for some low costDAQ devices