1394TA IICP488 Specification For IEEE-488 Communications Using The Instrument & Industrial Control Protocol Over IEEE 1394
1394TA IICP488 Specification For IEEE-488 Communications Using The Instrument & Industrial Control Protocol Over IEEE 1394
1394TA IICP488
Specification for IEEE-488
Communications Using the Instrument &
Industrial Control Protocol over IEEE
1394
Specification 1.00
October 8, 1999
Sponsored by:
Instrumentation and Industrial Control Working Group (II-WG) of the 1394 Trade Association
Abstract:
This document describes the use of the 1394 Trade Association Instrument and Industrial
Protocol (IICP) to communicate IEEE 488.1 and IEEE 488.2 messages and command/control
sequences using the IEEE 1394 bus.
Copyright © 1998-1999 by the 1394 Trade Association. Permission is granted to members of the 1394 Trade Association
to reproduce this document for their own use or the use of other 1394 Trade Association members only, provided this
notice is included. All other rights reserved. Duplication for sale, or for commercial or for-profit use is strictly prohibited
without the prior written consent of the 1394 Trade Association.
1394 Trade Association Specifications are developed with Working Groups of the 1394 Trade
Association, a non-profit industry association devoted to the promotion of and growth of the market for IEEE
1394 computer products. Participants in working groups serve voluntarily and without compensation from
the Trade Association. Most participants represent member organizations of the 1394 Trade Association.
The specifications developed within the working groups represent a consensus of the expertise represented
by the participants.
Use of a 1394 Trade Association Specification is wholly voluntary. The existence of a 1394 Trade
Association Specification is not meant to imply that there are not other ways to produce, test, measure,
purchase, market, or provide other goods and services related to the scope of the 1394 Trade Association
Specification. Furthermore, the viewpoint expressed at the time a specification is approved and issued is
subject to change, brought about through developments in the state of the art and comments received from
users of the specification. Users are cautioned to check to determine that they have the latest revision of any
1394 Trade Association Specification.
Comments for revision of 1394 Trade Association Specifications are welcome from any interested party,
regardless of membership affiliation with the 1394 Trade Association. Suggestions for changes in
documents should be in the form of a proposed change of a proposed change of text, together with
appropriate supporting comments.
Interpretations: Occasionally, questions may arise about the meaning of specifications in relationship to
specific applications. When the need for interpretations is brought to the attention of the 1394 Trade
Association, the Association initiates action to prepare appropriate responses.
1394 Trade Association Specifications are adopted by the 1394 Trade Association without
regard to patents which may exist on articles, materials or processes or to other proprietary
intellectual property which may exist within a specification. Adoption of a specification by the
1394 Trade Association does not assume any liability to any patent owner or any obligation
whatsoever to those parties who rely on the specification documents. Readers of this
document are advised to make an independent determination regarding the existence of
intellectual property rights which may be infringed by conformance to this specification.
Introduction
There is a need to connect electronic instrumentation and control devices to the high-speed,
industry standard IEEE1394 interface. This document describes the operational details of a
controller and device using the 1394 bus to communicate with a paradigm similar to GPIB (IEEE
488.1 and IEEE 488.2).
Committee Membership
Table of contents
1. Overview ............................................................................................................................. 6
1.1 Scope........................................................................................................................... 6
2. Reference and related documents ....................................................................................... 7
3. Document definitions and notation ....................................................................................... 8
3.1 Word usage – shall, should, may, can........................................................................... 8
3.2 Terminology ................................................................................................................. 8
3.3 Explanation of figures ................................................................................................... 9
3.3.1 1394 packets with data payload ............................................................................. 9
3.3.2 Reserved fields...................................................................................................... 9
4. Configuration ROM for IICP488 devices..............................................................................10
IICP488 IICP_capabilities register ..........................................................................................10
4.2 IICP488 configuration ROM values ..............................................................................10
4.3 Interrupt_enable_reg_offset, Interrupt_handlr_reg_offset entries..................................10
5. Connection model (informative) ..........................................................................................11
5.1 IICP layer ....................................................................................................................11
5.2 IICP488 layer...............................................................................................................11
5.2.1 IICP plug data port use in IICP488 ........................................................................12
5.2.2 IICP plug control port use in IICP488 ....................................................................13
6. IICP488 required services...................................................................................................15
6.1 IICP488 open ..............................................................................................................15
6.2 IICP488 close ..............................................................................................................16
6.3 IICP488 write...............................................................................................................16
6.4 IICP488 read ...............................................................................................................16
6.5 IICP488 read status byte (IEEE 488.1 serial poll) .........................................................16
6.6 IICP 488 trigger mechanisms .......................................................................................16
6.7 Triggering of a single device ........................................................................................16
6.8 Triggering of a set of devices .......................................................................................17
6.8.1 Sending multiple TRG trigger packets ...................................................................17
6.8.2 Triggering a set of devices using asynchronous stream packet .............................17
6.9 IICP488 selected device clear......................................................................................19
6.9.1 Selected device clear operation for controller sending SDC...................................19
6.9.2 Selected device clear operation for device receiving SDC .....................................19
6.9.3 SDC and TRGPOLL packets.................................................................................20
6.10 IICP488 remote ...........................................................................................................20
6.11 IICP488 local ...............................................................................................................20
6.12 IICP488 ioctl ................................................................................................................21
7. GPIB interrupts (SRQ) and status reporting model ..............................................................22
7.1 MAV behavior..............................................................................................................22
8. IICP488 control mode message packet_id command values ...............................................23
9. IICP488 control mode message response status values......................................................24
List of Figures
List of tables
1. Overview
1.1 Scope
This specification was developed with the following goals:
• Define how to send and receive GPIB data mode messages.
• Define how to send and receive GPIB command mode messages.
• Minimize the effort of adapting an instrument currently equipped with the GPIB interface to
being a device capable of using 1394.
• Minimize the effort to make existing GPIB applications work with 1394 equipped instruments.
The word should is used to indicate that among several possibilities one is recommended as
particularly suitable, without mentioning or excluding others; or that a certain course of action is
preferred but not necessarily required; or that (in the negative form) a certain course of action is
deprecated but not prohibited.
The word may is used to indicate a course of action permissible within the limits of the
specification.
The word can is used for statements of possibility and capability, whether material, physical, or
casual.
3.2 Terminology
3.2.1 GPIB:
General Purpose Interface Bus. This may refer to IEEE 488.1 systems or IEEE 488.2 systems.
3.2.4 SCPI
Standard Commands for Programmable Instruments. The SCPI consortium, still active at this time, attempts
to define common commands and methods for programming instruments.
3.2.5 SRQ
Service Request. In IEEE 488, a device uses the SRQ line to indicate the need for attention. Typically, SRQ
indicates data is ready to be transmitted and/or an error condition exists.
transmitted first
destination_ID tl rt tcode pri
source_ID
destination_offset
data_length extended_tcode
header_CRC
...
data_CRC
transmitted last
488.2 cmgr
ccli
Configuration ROM variable for a unit Configuration ROM MACRO Value (Hex)
implementing IICP488
unit_spec_id 1394TA_SPEC_ID 00A02D16
command_set_spec_id 1394TA_SPEC_ID 00A02D16
unit_sw_version IICP_UNIT_SW_VERSION 4B661F16
command_set IICP488_COMMAND_SET C27F1016
command_set_details IIC488_COMMAND_SET_DETAILS The value is the version
of the IICP488
specification on the title
page of this document.
Table 1 – IICP488 configuration ROM constants
Note: there is no configuration ROM entry to indicate if a device communicates using SCPI or
some other language.
An IICP plug schematic, as used in IICP488, is shown below. Refer to the IICP document for
more details.
(Data mode
Computer IICP plug messages) IICP plug Instrument
Data c Data c Data
port port
p p
Control c c Control
port port
p Control p
(command
mode
messages)
The instrument sends data mode response messages, when appropriate, also using the data
port. The IICP service (IICP write data frame request) is used to send data mode messages and
responses.
An example data mode message is the IEEE 488.2 defined identification query, ASCII-coded
“*IDN?”. An example data mode response would, in this case, be the IEEE 488.2 required ASCII-
coded Manufacturer, Model, Serial number, and Firmware level or equivalent.
All SCPI messages and responses shall be sent using the data port.
The instrument sends command mode response messages also using the control port. The IICP
service (IICP write control frame) is used to send command mode messages and responses.
Command mode messages are used for reading the status byte, setting of remote/local,
triggering, sending of SRQ, and selected device clear. Most command mode messages require a
command mode response. For command mode message requests that require a command mode
message response, the response shall be sent within 1 second of receiving the request.
There shall be at most one outstanding command mode message (no command mode response
received yet) with the following exception - a selected device clear (SDC) message may be sent
even if a command mode message response has not been received. A selected device clear
shall not be sent if there is an outstanding SDC.
...
...
The message content shall include the complete logical message, from the first character through
the last character. For example, “*IDN?”, if sent as a small frame, shall consist of 5 bytes: ‘*’, ‘I’,
‘D’, ‘N’, ‘?’. A new-line character may be added after the ‘?’, but is not required. It is not
permissible to send a subset of a message as a small frame and then to send another subset of
the message as a subsequent small frame.
connectResponseOffset
cmgr_unique_ID (high)
cmgr_unique_ID (low)
connectedNode_unique_ID (high)
connectedNode_unique_ID (low)
reserved node_ID
reserved commandSet
connectionParameters (high)
connectionParameters (low)
The fields are defined in the IICP document. For IICP488, connectionParameters is defined as
shown below.
reserved in secondary address
reserved
IICP488 implementations shall create plugs when requested, so long as resources are available.
A connection manager may create any number of connections between the same two nodes.
Each connection is independent and autonomous. Only one connection shall be made to an IEEE
488.2 device when device is as defined in IEEE 488.2, section 3.1.
Note: a plug may be implicitly closed if a bus reset occurs and the IICP layer fails in an attempt to
reactivate the connection.
IICP488 devices shall return a command mode response packet after receiving a READSTB
command. The command mode response packet is shown below.
The format for a trigger command mode message is as shown in Figure 7, with packet_id =
TRG.
The device being triggered shall return a TRGRESP response packet when triggered. The format
for the TRGRESP response packet is as shown in Figure 8. A trigger response packet shall have
packet_id = TRGRESP and no additional message bytes.
Device 0 Triggered
Device 1 Triggered
...
Device N-1
Triggered
Device 0 Triggered
Device 1 Triggered
...
Device N-1
Triggered
reserved en channel
After receiving the GETCFG control packet, the device shall return a command mode response
packet when ready to be triggered. The format for the response packet is as shown in Figure 8. A
GETCFG response packet shall have packet_id = GETCFGRESP and no additional message
bytes.
If any of the devices to be triggered returns a GETCFGRESP packet with status != SUCCESS,
the device sending the trigger shall not use the asynchronous stream packet triggering
mechanism. Any previous devices configured for an asynchronous stream trigger packet shall be
sent a control packet to disable the anticipated trigger. The format for the packet is as shown in
Figure 14, with the en-bit set to zero. After receiving the GETCFG packet to disable the trigger,
the device sends a GETCFGRESP packet.
A selected device clear, SDC, shall disable any triggers set up via GETCFG packets.
header_CRC
reserved
data_CRC
Once triggered, the device shall ignore asynchronous stream triggers with the same channel
number until it is again set up to receive an asynchronous stream trigger.
reserved channel
• channel specifies the isochronous channel that was used to communicate the asynchronous
stream trigger event.
After receiving the TRGPOLL control packet, the device shall trigger, if it for some reason did not
trigger when the asynchronous stream packet was broadcast. A TRGPOLLRESP response
packet shall be sent as shown in Figure 8. A TRGPOLLRESP response packet shall have
packet_id = TRGPOLLRESP and no additional message bytes.
An instrument shall return a command mode response packet after receiving and processing to
completion a selected device clear command. The response packet is as shown in Figure 8. The
packet_id = SDCRESP, and there are no additional message bytes.
Guidelines for device behavior when an SDC packet is received is described in IEEE 488.2,
section 5.8.
Some implementations may have frames queued by lower level 1394 drivers, and an
implementation may not be able to prevent transmission of those frames. Once an SDC is
received, an implementation shall not add to this queue.
If an SDC is received and only part of a large frame is transferred, the device acting as a
producer shall write to the connected node LargeFrameConsumer register. The mode shall be set
to TRUNC and the count shall be set to the number of bytes sent.
If an SDC is received and a complete large frame has been transferred and the
LargeFrameConsumer register has not yet been updated, the device acting as a producer shall
write to the connected node LargeFrameConsumer register. The mode shall be set to LAST and
the count shall be set to the number of bytes sent.
An implementation shall send an SDCRESP packet after all frame content has either been
discarded or sent and if a large frame was in process, the LargeFrameConsumer register
updated.
llo reserved
An instrument shall return a command mode response packet after receiving and processing to
completion a remote command. The response packet is as shown in Figure 8. The packet_id =
REMOTERESP, and there are no additional message bytes.
An instrument shall return a command mode response packet after receiving and processing to
completion a LOCAL command. The response packet is as shown in Figure 8. The packet_id =
LOCALRESP, and there are no additional message bytes.
command
...
A response shall be sent with the packet format shown in Figure 8, with packet_id =
IOCTL_RESP.
In IICP488, there is no need for such an algorithm. An interrupting device communicates the
interrupt by sending a packet. Since a packet must be sent, the causes for the interrupt may as
well be sent also, in the same packet, at the same time. There is no need for a serial polling
algorithm.
Interrupts are enabled for IEEE 488.2 devices via programming of the Service Request Enable
Register. The Service Request Enable Register is programmed to a value that allows an interrupt
condition to be enabled.
Interrupts will be sent using the control port. The status_byte associated with the interrupt shall be
included in the packet. The figure below shows an IICP488 SRQ packet.
status_byte IICP488_command_set packet_id = SRQ reserved
After sending an SRQ control mode message the device shall behave as if the controller had
performed a serial poll. The intent is to circumvent any requirement of controllers to do the
equivalent of a serial poll. The act of sending an SRQ shall be equivalent to a GPIB SRQ event
and a GPIB serial poll event.
For efficiency, the controller sends no control mode response packet to an SRQ packet.
MAV shall be set TRUE when the first byte of message data becomes available to send. After
being set TRUE, MAV shall remain TRUE until the frame is completely sent. If the frame is sent in
large frame mode, MAV shall transition to FALSE when the last frame content is sent and before
the LargeFrameConsumer register is updated. In IICP488, MAV is not allowed to toggle TRUE to
FALSE to TRUE. In IICP488 systems, there is no need to toggle the MAV bit for polling or
interrupt purposes.