Siemens TIWAY 1 User Manual

Page 1
SIMA
TIC TIWAY 1
UNILINK Host Adapter
User
Manual
Order Number: PPX:TIWAY–8121–2 Manual Assembly Number: 2587871–0045 Second Edition
Page 2
CHAPTER 1
THE
UNILINK HOST ADAPTER

1.1 INTRODUCTION

The
UNILINK Host Adapter interface devices the “adapter” in this manual, is a hardware and software extension of the original
product that allows a host computer to operate and control secondary
on a TIWAY I network. The UNILINK Host Adapter
TIWAY I Host Adapter
, Figure
.
1–1 is a second generation host computer
, also referred to as
Figure 1–1 UNILINK Host Adapter
UNILINK HOST
USER MANUAL
ADAPTER1–1
Page 3
THE UNILINK HOST ADAPTER

1.2 FEATURES

The
hardware is composed of the UNILINK Adapter, shown in Figure 1–1, with a
plug-in Personality Interface Module (PIM) PPX:500–6224. in Figure 1–2, contains the software that causes the UNILINK Adapter to operate
as the UNILINK Host Adapter
.
Figure 1–2 Personality Interface Module (PIM)
The PIM, shown
Figure 1–3 illustrates the basic structure of the UNILINK Host Adapter. The corresponding physical features are shown in Figure 1–4. It includes an RS–232–C/RS–423–A compatible host port that supports the Non-Intelligent Terminal Protocol (NITP) used by the original TIWAY I Host Adapter, or the BDLC
protocol, an advanced, byte-oriented subset of the HDLC protocol. Also,
there are two TIWAY I interface ports and an external I/O point block.
UNILINK HOST
USER MANUAL
ADAPTER 1–2
Page 4
THE UNILINK HOST ADAPTER
Host
Computer
RS–232–C/RS–423A
Interface
Host
(Command Processor)
TIWA
Y I
Interface
TIWA
Y I
Input Point
External
Output Point
Network
Secondaries
Figure 1–3 UNILINK Host Adapter Block Diagram
UniLink Host Adapter
Host
PPX:500–711
Computer Port
TIWA
Port
1
Y I Ports
Port
2
Port
1, Dual Local Line media ports shown here.
3
Power Connections
Port
4
External I/O Points
Figure 1–4 UNILINK Host Adapter Physical Features
AC
GND
NEUTACLINE
1
2 3 4 5
I/O
UNILINK HOST
USER MANUAL
ADAPTER1–3
Page 5
THE UNILINK HOST ADAPTER
The
features of the UNILINK Host Adapter include:
The adapter is noise hardened for factory floor use.
There are internal diagnostics tests to check the internal operation
when
powered-up or reset, and during normal operation. There is also a
selectable
The adapter can be reset locally with an internal switch or remotely
with
test mode that is set locally
a host issued command.
.
The
The adapter is backward compatible with TIWAY I Host Adapter
The adapter includes an independent host communications port
This
The
The
The
adapter supports secondary-to-secondary communications without
complex
software
capable of serial communications at 38.4K baud. This port operates simultaneously
throughput and data integrity. This protocol also allows up to 32 UNILINK Host Adapters to be multidropped (via a modem) from the same
The adapter supports or provides the following TIWAY I features.
fault
devices
computer another request when using the advanced host communication protocol.
host software or additional hardware.
and drivers.
with the network ports.
host port provides an optional advanced host protocol for improved
host computer RS–232–C/RS–423–A port.
adapter supports the TIWAY I redundant media feature, providing
tolerant communications in case of a media failure.
adapter supports communication with multiple network secondary
concurrently for higher network throughput.
adapter supports concurrent network request processing. The host
does not have to wait
for a request to complete before issuing
UNILINK HOST
USER MANUAL
Commands are provided for background data collection. The adapter
can be configured to collect data for the host computer by storing the most current data values in internal memory. Another command then retrieves
ADAPTER 1–4
the data.
Page 6
THE UNILINK HOST ADAPTER
The adapter is configurable for a variety of applications needs and
includes multiple host computer support, allowing several host computers to communicate with the secondary devices on the same T I WAY
The adapter provides transaction statistics collection to aid network
performance

1.3 TYPICAL NETWORK APPLICATIONS

I network.
tuning.
Figure
1–5 illustrates
a typical single host network managing a process control application. The host computer application directs the secondary devices through
the UNILINK Host Adapter and the TIWAY I network. Commands are provided for downloading or uploading data from the host computer to the secondary
devices and for checking the status of an individual device.
Host
Computer
RS–232–C/RS–423–A Host Interface Cable
UNILINK
TIWAY
I
UniLink Host Adapter ( MHU)
Figure 1–5 Single Host Network
UNILINK HOST
USER MANUAL
ADAPTER1–5
Page 7
THE UNILINK HOST ADAPTER
The
flexibility of the UNILINK Host Adapter also provides for illustrated in Figure 1–6. In addition to the process control application, your main plant system can link to the same network to track work-in-progress, adjust
schedule loads for peak efficiency, and collect product cost data. W additional UNILINK Host Adapter, you can also add a personal computer workstation
to the network for statistical quality control or other uses.
multiple hosts as
ith an
Host
Computer
UniLink
Adapter (MHU)
Host
Computer
UNILINK
UniLink Host
Adapter (MHU)
Figure 1–6 Multiple Host Network
Host
UNILINK
UNILINK HOST
USER MANUAL
ADAPTER 1–6
Page 8
THE UNILINK HOST ADAPTER
1.4 TIWA
Y I SYSTEM CHARACTERISTICS
TIWAY I is a bus structure Local Area Network (LAN) designed for industrial environments. The TIWAY I network connects a series of Texas Instruments Programmable Controllers (P/Cs) and other devices to one or more host computers. W any
of the following Siemens products:
SIMATICTI520/SIMATICTI530/
SIMATICTI560/SIMATICTI565 P/Cs
IT–111, IT–121, IT–121A, IT150, and IT–160 Intelligent Tank
The P/Cs are connected to a TIWAY I network through Network Interface Modules (NIMs). The PM550 P/C can also be connected with a Computer Interface Module (CIM), but Secondary as
the following, to be connected to a TIWAY I network.
ith the network, you can obtain, modify or replace data stored in
SIMATICTI520C/SIMATICTI530C P/Cs
PM550/PM550C P/Cs 5TI, Series 102, 103 P/Cs
Transmitters
Adapter is a
(ITT
s)
it limits the configuration choices. The UNILINK
TIWAY I interface device that allows other devices, such
Robots
Computer numerical controlled machines
Non-SIMA
Intelligent instruments
Computer equipment
TIWAY I gateways are also available for connecting the Fisher, Foxboro, and Honeywell networks to TIWAY I. However, you cannot use a gateway and a UNILINK satisfy today’s factory requirements for acquiring data and controlling manufacturing network that uses an advanced data link protocol.
Series 500 controllers can be connected with PEERLINK for high speed transfer of small amounts of data between controllers. The PEERLINK is a solution for applications where one or more Series 500 controllers are dependent
Host Adapter in the same TIWAY I network. TIWAY I
on high speed transfer of data from another Series 500 controller
TIC programmable controllers
processes.
It is a noise-hardened serial binary communications
is designed to
.
UNILINK HOST
USER MANUAL
ADAPTER1–7
Page 9
THE UNILINK HOST ADAPTER
With
appropriate host software, an operator can program, monitor any P/C or other intelligent device on the TIWAY I network from a single location.
The importance of the UNILINK Host Adapter is that it provides a communication link between the TIWAY I network and one or more host computers. Figure 1–7 is a diagram representing the various host computers that
can be connected to a UNILINK Host Adapter
can
be controlled in a TIWAY I network.
IBM
DEC
Y
ICC 6000
CVU
5000
TIPC
DEC
PDP– 11
/
X
S E R T E S 1
, and the typical devices that
Other
M
IBM
PC/
XT/
AT
I
PC/
H
XT/ I
S
/
M
I C R
AT
O S
, and control
NIM
5TI
UniLink
Host
Adapter
Honeywell
Fisher
Gateways
Y I
TIWA
Secondary
Adapter
NIM
SIMATIC
TI520
PEERLINK
NIM
PM550
NIM
SIMATIC
TI560
PEERLINK PEERLINK PEERLINK
NIM
SIMATIC
TI565
NIM
SIMATIC
TI530/
TI530C
NIM
Int. Tank Xmtr.
Robots
CNC
Int. Scales
Figure 1–7 TIWAY I Network
You cannot use a UNILINK Host Adapter in a TIWAY I network that also contains Host Adapter. Chapter 4 provides information on interfacing the adapter to a TIWAY
a TIWAY I Gateway or Network Control Module (NCM) or a TIWAY I
I network.
Map
Foxboro
Other
Int. Devices
Others
UNILINK HOST
USER MANUAL
ADAPTER 1–8
Page 10
THE UNILINK HOST ADAPTER

1.5 INSTALLATION

Instructions for installing the UNILINK Adapter and the UNILINK Host Adapter PIM are given in the UNILINK Adapter Installation and Operation Manual (PPX:TIWAY–8106). It provides the electrical and mechanical installation
Chapter 2 discusses the different operational modes and how they are configured.
instructions and guidelines for the the UNILINK Host Adapter
.
Chapter dipswitches
Chapter your
1.6 TECHNICAL
If you need assistance with the installation an operation of this equipment, contact you States,
1.7 CUSTOMER
If you need assistance in placing an order, returning a product, or learning about product availability, contact your Siemens Industrial Automation, Inc. distributor or
3 discusses the host computer interface port, Port 3, and how to set the
to establish communications.
4 discusses the TIWAY I interface ports, Ports 1 and 2, and how setup
network.
ASSIST
your Siemens Industrial Automation, Inc. distributor or sales agent. If
need assistance in contacting your distributor or sales office in the United
call 800–964–41
SER
or sales agent. If you need
sales office in the United States, call 800–964–41
ANCE
14.
VICE CENTER
assistance in contacting your distributor
14.
UNILINK HOST
USER MANUAL
ADAPTER1–9
Page 11
CHAPTER
2
OPERA
TION AND APPLICA

2.1 INTRODUCTION

This
chapter provides an introduction to the UNILINK Host Adapter operation and how it can be used in typical applications. Y the
complete command syntax and to the Glossary for help with any unfamiliar terms. Network planning forms are located in Appendix E, Appendix F, and Appendix
G.
ou should refer to Chapter 5 for

2.2 COMMAND PROCESSING

The
UNILINK Host Adapter commands are a set of functional tools to help you direct network applications. Each command consists of a one-byte command code and one or more parameters as shown in Figure 2–1. Most parameters have
default values that network you can improve network needs. Figure 2–2 illustrates the relative performance and flexibility gained
and expand it with minimal software changes. As your network grows,
network efficiency by redefining the parameters to match your
with using additional commands.
were selected to help you quickly install an operational
TION
Command
Code
Parameter#1Parameter
#2
Figure 2–1 Command String Structure
Parameter
#n
UNILINK HOST
USER MANUAL
ADAPTER2–1
Page 12
OPERATION
AND
APPLICATION
Network Manager Commands
Performance and Applications Flexibility
Mode Independent Commands
Basic HIU Commands
Extended HIU Commands
Configure Adapter Commands
   
NUMBER OF COMMANDS
Figure 2–2 Performance vs Commands
Communications between the host computer and the UNILINK Host Adapter are
a series of commands and responses as illustrated in Figure 2–3. For every command sent, there will be a response. The response will be one of the following.
UNILINK HOST
USER MANUAL
An
ADAPTER 2–2
acknowledgment that the command was received A command response The ERROR RESPONSE
Page 13
OPERATION
AND
APPLICATION
Secondary
Secondary
Host Computer
Commands
UNILINK Host Adapter
Responses
Figure 2–3 Host Computer To UNILINK Host Adapter
Communications
Commands are checked for errors before they are executed. The ERROR RESPONSE is a special response that returns a code indicating the type of error. If an error is found, the command will not be executed and the ERROR RESPONSE network request does not complete within the host command timeout. The possible error codes that may be returned in the ERROR RESPONSE and corrective
will
be returned. The ERROR RESPONSE will also be returned if a
actions to take are listed in Chapter 6.
UNILINK HOST
USER MANUAL
ADAPTER2–3
Page 14
OPERATION
AND
APPLICATION

2.3 FUNCTIONAL ORGANIZATION AND OPERATING MODES

The
UNILINK Host Adapter is organized into two primary functions; the Host Interface Unit (HIU) function and the Network Manager (NM) function. An adapter form of
In addition to the above modes, there are two Emulate Host Adapter (EHA) modes
can be configured with one
a Master Host Interface Unit (MHIU). The MHIU, HIU, and NM are three
the six configurable operating modes.
and a Standalone Network Manager (SANM) mode.
of these functions or they can be combined to
2.3.1
Host Inter
The primary purpose of the Host Interface Unit (HIU) function is to establish communications between the host computer and the secondary devices on a TIWAY I network. The HIU uses the memory in the adapter for macro buffers and are
used to store connecting, delays
Commands the host requests are processed and queued to the Network Manager function for
routing to the appropriate secondary device. The Master Host Interface Unit
(MHIU)
face Unit Function
to store host-to-secondary statistics as shown in Figure
macro commands and responses. Macros provide a method for
disconnecting, or sending a Primitive
in host processing. Macros are discussed further in Paragraph 2.10.1.
are received from the host computer and checked for validity
mode combines the HIU function and the Network Manager function.
to a secondary device without
2–4. Macro buffers
. Then
UNILINK HOST
USER MANUAL
ADAPTER 2–4
Page 15
OPERATION
AND
APPLICATION
HIU
Establishes communications between the host computer and the secondary devices.
Uses memory for:
Macro Buffers
(Dynamically allocated)
Host–to–Secondary Statistics
Figure 2–4 Host Interface Unit Function
Part
of the statistics
issued
to
connect and disconnect secondaries, the specified secondary address is
added
or deleted from the Secondary Log and a network request is queued into
the
Network Manager
memory area is used for a Secondary Log. As commands are
.
In the background, the adapter is continuously collecting statistics on the number of commands processed, transactions completed on the network, and other items. Commands to retrieve these statistics do not require network transactions,
The following operating modes include the HIU function.
but return the information from the appropriate statistical area.
Master Host Interface Unit (MHIU) Host Interface Unit (HIU) Master Host Interface Unit/Emulate Host Adapter (MHIU/EHA) Host Interface Unit/Emulate Host Adapter (HIU/EHA)
UNILINK HOST
USER MANUAL
ADAPTER2–5
Page 16
OPERATION
AND
APPLICATION
2.3.2

Network Manager Function

Acting as the network primary, the Network Manager function is responsible for
controlling the message traffic on the TIWAY I network as shown in Figure
2–5.
It
receives the requests from HIUs and stores them in a NM buffer
them
to the designated secondary devices, and returns the secondary response
to the HIU that issued the request. There can be only one adapter configured
the Network Manager function in any particular TIWAY I network.
with
This
function will only process Network Manager commands. These control and handle the background monitor and redundant media switching operations. All network requests and responses are queued in the Network Manager
the TIWAY I network operations, return network statistical information
buffers area.
, routes
commands
NM
Manages the message traffic on the TIWAY I network.
Uses memory for:
Network Buffers Network Stations
Figure 2–5 Network Manager Function
UNILINK HOST
USER MANUAL
ADAPTER 2–6
Page 17
OPERATION
The following operational modes include the NM function. However, the MHIU/EHA
mode does not provide access to the NM command set.
Master Host Interface Unit (MHIU) Network Manager (NM) Standalone Network Manager (SANM) Master Host Interface Unit/Emulate Host Adapter (MHIU/EHA)
AND
APPLICATION
2.3.3
The Master Host Inter
The Master Host Interface Unit (MHIU) is a combination of the HIU and NM functions communicate with secondary devices through the HIU function and control network a
TIWAY I network may have the NM function.
as shown in Figure 2–6. A host computer connected to an MHIU
performance
face Unit Mode
through the NM function. Remember
can
, only one adapter in
HIU NM
MHIU
Figure 2–6 Master Host Interface Unit Diagram
UNILINK HOST
ADAPTER2–7
USER MANUAL
Page 18
OPERATION
AND
APPLICATION
2.3.4 Typical
Both single and multiple host networks are supported by the UNILINK Host Adapter. Figure 2–7 illustrates a typical single host network which uses an MHIU
Network Applications
as the host interface and network manager
Host Com­puter
UNILINK
UniLink Host Adapter ( MHU)
RS–232–C/RS–4 23–A Host
Interface
Cable
TIWAY
.
I
Figure 2–7 Typical Single Host Network
Multiple operating modes as illustrated in Figure 2–8 and Figure 2–9. Since the NM function and HIUs can use the total memory resources of the adapters for their respective needs. This could be an advantage in large networks where the additional
host
networks can be configured with a variety of adapters in different
is not in the same adapter with the HIU function in Figure 2–9, the NM
memory for NM buffers will increase network performance.
UNILINK HOST
USER MANUAL
ADAPTER 2–8
Page 19
OPERATION
AND
APPLICATION
Host Com­puter
UniLink Host Adapter (MHU)
Figure 2–8 Typical Multiple Host Network
UNILINK
Host Com­puter
UNILINK
UniLink Host Adapter (MHU)
Host
Com-
puter
Host Com­puter
UNILINK
(HIU)
UNILINK
Figure 2–9 NM Network
Host Com­puter
UNILINK
(HIU)
UNILINK HOST
USER MANUAL
ADAPTER2–9
Page 20
OPERATION
AND
APPLICATION
2.3.5 The
There are two modes available that provide an emulation of the TIWAY I Host Adapter; the MHIU/EHA and the HIU/EHA. These modes are limited to the base command codes 01 through 08, 20, 21, and FC through FF. The POLL command, will operate with applications software written for the TIWAY I Host Adapter. The MHIU/EHA can directly replace the TIWAY I Host Adapter in single host network applications. However, the MHIU/EHA cannot be used in a multiple host software
2.3.6

The Standalone Network Manager Mode

The Standalone Network Manager mode operates independent of any host computer. It controls the TIWAY I network, but cannot accept any host commands to change any performance parameters. You can use this mode to implement TIWAY I Host Adapter. Only minor changes to the applications software are needed to process the adapter configuration command. A typical network is shown
Emulate Host Adapter Modes
code 03, is not available in the HIU/EHA mode. Both of these modes
network. The HIU/EHA provides the ability to use TIWAY I Host Adapter
applications in a multiple host network.
a multiple host network using applications software written for the
in Figure 2–10.
UNILINK
(SANM)
Host Com­puter
UNILINK
(HIU)
Host Com­puter
(HIU)
Figure 2–10 Standalone NM Network

2.4 TIWAY I HOST SOFTWARE SUPPORT

As mentioned in Paragraph 2.3.5, the MHIU/EHA and HIU/EHA modes will operate with the TIWAY I HOST SOFTWARE products. The MHIU and NM modes
will also work with this product; however
and
NM commands in the XP
AR subroutine.
, you must enclose the extended
UNILINK
UNILINK HOST
USER MANUAL
ADAPTER 2–10
Page 21
OPERATION
AND
APPLICATION
TIWAY I Host Software can be used with adapters in a However, CONFIGURE
you must define an HIU address using the XP
HIU command, and you cannot use the POLL command.
multiple host network.
AR subroutine and the
UNILINK HOST
USER MANUAL
ADAPTER2–11
Page 22
OPERATION
AND
APPLICATION

2.5 SETTING THE OPERATING MODE

Each adapter must be configured for one of the six possible operating modes. The mode is configured with the CONFIGURE ADAPTER command with the exception of the Standalone NM mode, which is chosen by setting Positions 9 and
10
of Dipswitch 1 down. The defaults and dipswitch settings are discussed further in Paragraph 2.5.1. There are three configuration commands; the CONFIGURE CONFIGURE
ADAPTER command, the NM command.
CONFIGURE HIU command, and the
2.5.1

Configuration Defaults and Dipswitch Settings

Most of the parameters associated with the configuration commands have default values chosen to help you install an operating host interface with a minimum amount of effort. As your network expands and you gain experience with
the advanced commands, you can change the defaults to tailor the network
performance The adapter has two 10-position dipswitch banks, located behind the front
access door as shown in Figure 2–11. Most of the settings on the dipswitches relate
to the parameters for the host and TIWAY I ports. However Position up, the adapter will default to an HIU/EHA and when Position 9 is down, the adapter
to your needs.
, the setting of
9 on Dipswitch 2 determines the default mode value. When Position 9 is
will default to an MHIU/EHA.
Number 1
2
LEDsResetNumber
2.5.2
UNILINK HOST
USER MANUAL
Figure 2–11 Dipswitch Positions
The
default mode will be chosen when you issue one before issuing the CONFIGURE ADAPTER command. In the later case, the adapter and issue or

The CONFIGURE ADAPTER Command

The first command your application software should send is the CONFIGURE ADAPTER
ADAPTER 2–12
assumes the
assumes the EHA mode. This means that after the adapter is reset, if you
any of commands 01 through 08, the adapter will assume the MHIU/EHA
HIU/EHA mode depending on the setting of Position 9.
command, code 20. The main function of this command is to set the
default mode from the setting of Position 9 on Dipswitch 2
of the Base HIU commands
Page 23
OPERATION
AND
APPLICATION
operating set with this command is the Standalone Network Manager (SANM), since it can not accept any host computer commands. Instead, the SANM mode is selected computer must send this command to its attached UNILINK Host Adapter(s). The mode remains in effect and can not be changed until the adapter is reset. The parameters for this command specify the HIU address, the maximum secondary
mode to the value specified. The only operating mode that can not be
by
dipswitch settings described in Chapter 3 and Chapter 4. Each host
device address, and the macro memory limit.
UNILINK HOST
USER MANUAL
ADAPTER2–13
Page 24
OPERATION
At
any
time, your applications software can retrieve the current values for these parameters code 21. In addition to those parameter values, this command will also return the values of the dipswitch settings and a flag that indicates whether the CONFIGURE
The physical network parameters for the HIU function of an MHIU are not used, but the CONFIGURE ADAPTER command must still be sent to enable the
HIUs network interface.
by issuing the REPORT ADAPTER CONFIGURA
ADAPTER command was previously processed.
AND
APPLICATION
TION command,
2.5.3
2.5.4

The CONFIGURE HIU Command

The CONFIGURE HIU command defines the network parameters for an HIU function and enables the HIUs TIWAY I interface for both an MHIU and an HIU.
The options and associated parameters can occur in the command string
in
any
order
, but they can not occur twice in the same command. This command can only be issued once and if successful, the command code, 11, will be returned.
The REPORT HIU CONFIGURATION command, code 12, will return the values of the dipswitches, HIU Options, and a flag indicating whether the configuration

The CONFIGURE NETWORK MANAGER Command

The CONFIGURE NETWORK MANAGER command, code 30, defines the operating parameters for the network ports in the NM and MHIU modes and specifies
Issue the REPORT NETWORK MANAGER CONFIGURATION command, code 31, to retrieve the dipswitch settings and the current values for the Network Manager parameters and to determine if the CONFIGURE NETWORK MANAGER command has been processed. In a multiprocessing environment, whether
has been performed.
network options such as auto redundant media.
the tasks can check the configuration processed flag to determine
or not they can begin issuing commands to the adapter
.
UNILINK HOST
USER MANUAL
ADAPTER 2–14
Page 25
OPERATION
AND
APPLICATION
2.5.5

Configuring the Standalone Network Manager

The
Standalone Network Manager (SANM)
dipswitch
settings. The
definition for some of the dipswitch positions is different
mode is configured completely with
for this operating mode as shown in Figure 2–12. The SANM mode is selected by defining the host command timeout as zero by setting Positions 9 and 10 of Dipswitch 1 down. The other positions of Dipswitch 1 define the TIWAY I network
parameters.
DIPSWITCH 1
1
2345678910
U P
MSB LSB
UP = SYNCHRONOUS DOWN = ASYNCHRONOUS
UP = FULL DUPLEX DOWN = HALF DUPLEX
UP = NRZI DOWN = NRZ
DEFAULTS TO NITP
HOST COMMAND
TIMEOUT = 0
TIWAY I BAUD RATE
TIWAY I
TIWAY I
TIWAY I
DIPSWITCH 2
1
2345678910
U P
UP = TEST MODE DOWN = RUN MODE
MSB
LSB
UP = HIU/EHA &
DOWN = MHIU/EHA
UNUSED
UP = AUTO
DOWN = NO REDUNDĆ
HIU/NM BUFFERS
UP = DISC DOWN = NO DISC
UP = AFTER CTS
DOWN = NO DELAY
IO LOOP TEST
REDUNDANT
MEDIA
ANT MEDIA
DELAY
Figure 2–12 Standalone Network Manager Dipswitch Settings
UNILINK HOST
USER MANUAL
ADAPTER2–15
Page 26
OPERATION
Since
the SANM cannot accept any NM commands, Positions 1–7
define
certain Network Manager function options normally configured with the
CONFIGURE
NETWORK MANAGER command.
When
Position 1 of Dipswitch 2 is
after
CTS is active. No delay is selected when the dipswitch is down.
When
Position 2 of Dipswitch 2 is up, all issue a network disconnect (DISC). This permission is granted by the NM function when it initializes the HIU. No HIUs will be given permission
to issue a DISC when the dipswitch is down.
AND
APPLICATION
of Dipswitch 2
up, it selects a one-half second delay
HIUs are given permission to
2.5.6
Positions of NM buffers to assign to an HIU when the HIU is initialized. The number selected significant bit and Position 6 is the least significant bit. The adapter will then
When Position 7 of Dipswitch 2 is up, the NM function will use the redundant communicate

Configuration Summary

The general procedure for configuring the adapter follows in the list below
1.
Set the dipswitch positions.
2.
Issue the CONFIGURE ADAPTER command.
3. Issue or
a NM)
4. Issue the CONFIGURE HIU command. (If this adapter will be an MHIU
3–6 of Dipswitch
of NM buffers can range from 1 to 16. The actual binary value will range from 0000 to 1111 binary where Position 3 is the most
add 1 to the binary value to scale the actual range to 1–16.
media feature that uses both network ports, Ports 1 and 2, to
with the secondary devices.
the CONFIGURE NM command. (If this adapter will be an
or an HIU)
2 represent the binary value for the number
MHIU
.
UNILINK HOST
USER MANUAL
ADAPTER 2–16
Page 27
OPERATION
AND
APPLICATION

2.6 SPECIAL NETWORK MANAGER FEATURES

The adapter provides two special features in the MHIU and NM operating modes. channel switching. Second is the background monitor that will bring devices online
First is the redundant media channels with selectable automatic media
dynamically
.
2.6.1

Redundant Media Channels

The
adapter provides for two network media channels, Ports 1 and 2, described
in
more detail in Chapter 4 . Y specifying the command. Using redundant media increases the mission reliability of the network or the probability that the network will remain operational when a random Channel A or Port 1. Your applications software can then issue the SWITCH CHANNEL command at any time to change the operating channel for one, several, redundant media feature is not active; however, if it is active, the Network Manager Port
2 must be available or an ERROR RESPONSE will be returned when you try to issue this command. the
command code and the channel code.
The primary function of redundant media is to provide a second communications be used as a maintenance aid by switching all secondaries to the alternate channel so that the main channel can be maintained without completely shutting the network down. Remember, only one media or channel can be transmitting
appropriate value in the CONFIGURE NETWORK MANAGER
failure occurs. When first initialized, the adapter
or all secondary devices. The channel can be switched even if the
function will switch the channel back if a failure occurs. Channel B or
path in the event of a failure on the primary path. This can also
or receiving in a given instance.
ou may select to use only one channel or both by
will communicate on
auto
If the command is accepted, the adapter will return
The auto redundant media feature allows the Network Manager function to automatically switch a secondary device to the opposite channel if communications device will be switched if it fails to respond consecutively in maximum-retry-count times. The maximum retry count is specified in the CONFIGURE the secondary has been switched, the Network Manager function will attempt to
communicate again on the new channel up secondary responds, communications will continue on this channel. If the secondary fails to respond, the secondary will be logged as off-line and all associated macros will be disabled. All macro response status words will be updated to indicate that the secondary is off-line, and any network requests that
were pending will return the ERROR RESPONSE.
2.6.2 Backgr
Background monitor is a feature of the Network Manager that instructs it to periodically check the link status of each secondary device. This feature is active in the Network Manager function in all but the EHA modes and the SANM mode. The link status information includes for each channel and for each secondary, whether the secondary is online or
can no longer continue on the current channel. The
NETWORK MANAGER command and defaults to 3 times. Once
to the maximum retry count. If the
ound Monitor
the communications status
UNILINK HOST
secondary
ADAPTER2–17
USER MANUAL
Page 28
OPERATION
AND
APPLICATION
offline, through directives or responses. In addition, it will also select one secondary device address initially begins with secondary number one and continues with the next secondary address number until reaching the maximum secondary address specified in the CONFIGURE ADAPTER command. Background monitoring then
The current link status determines what action to take when monitoring a device. If the current link status for the selected secondary address is offline, the Network Manager will issue the initialization sequence. If there is no response, the Network Manager will assume that the device is not in the network and will not retry the message. If the device does respond, its status will time online.
and if the secondary is an HIU. The Network Manager normally cycles
the secondary device log and checks to see if there are any outstanding
per cycle to perform a
starts over again with address one.
be updated and if it is an HIU, buffers will be allocated. This means that any
that a valid secondary device is connected to the
link status check. The selected secondary address
network, it will be brought
UNILINK HOST
USER MANUAL
ADAPTER 2–18
Page 29
OPERATION
If the background monitor detects a secondary that went offline and the auto redundant media feature is active, the Network Manager will attempt to contact the secondary on the alternate channel as described in the Redundant Media
section above.
You can obtain peak performance by consecutively numbering your secondary devices and HIUs, starting with address 01, and by setting the largest secondary will keep the Network Manager from spending time on device addresses that will status code
device address value in
never exist on
information with the REPORT SECONDARY LINK STATUS command,
32.
the network. Y
AND
APPLICATION
the CONFIGURE ADAPTER command. This
our applications software can request the link
UNILINK HOST
USER MANUAL
ADAPTER2–19
Page 30
OPERATION
AND
APPLICATION

2.7 THE HIU AS A SECONDARY

The
HIU function appears as a special secondary device to the NM function. In addition to queuing network requests for the NM function to process, the HIU function will respond to TIWAY I Primitives 02 — Machine Status, 03 — Machine Type/Configuration, and 04 — Primitive Format Configuration. The TIWAY I Systems Manual provides more details on the format and use of Primitives.
2.7.1 Primitive
The Primitive 02 response will be returned as follows (spaces were added for clarity).
Where
Status is not available,
02 Response
LLLL
02 HH DD EE FF
LLLL is the Primitive length,
HH will be 00 indicating that it is operational and performing instruction execution,
DD will be 01 indicating that the Auxiliary Power Source
EE will be 00 indicating that the NIM is operational,
FF will be 00 and has no meaning for an HIU.
UNILINK HOST
USER MANUAL
ADAPTER 2–20
Page 31
OPERATION
AND
APPLICATION
2.7.2
2.7.3

Primitive 03 Response

The Primitive 03 response will be returned as follows.
LLLL 03 HH DDDD EEEE FFFF GGGG IIII JJJJ KKKKKKKK
Where

Primitive 04 Response

The Primitive 04 response will be returned as follows.
LLLL is the Primitive length,
HH will be 00 indicating that it is operational and performing instruction execution,
DDDD will be 007E indicating that the device type is an HIU,
EEEE, FFFF
KKKKKKKK will be 00000000.
LLLL 04 NNNN MM EE FF GG
, GGGG, IIII, JJJJ will be 0000,
Where
LLLL is the Primitive length,
NNNN will be 010E and indicates the maximum Primitive length supported,
MM, EE, FF
, GG will be 00.
UNILINK HOST
USER MANUAL
ADAPTER2–21
Page 32
OPERATION
AND
APPLICATION

2.8 MODE INDEPENDENT OPERATIONS

The
mode independent commands perform hardware and software resets, external I/O point operations regardless of the operating modes.
and
2.8.1

Reset Commands

There
are two reset commands that can be sent to the UNILINK Host Adapter regardless of the operating mode. The reset commands should be used cautiously because they clear all macros and configuration parameters, and discard any outstanding operations on the network. The first is the SOFT RESET command, code FE. This command causes the adapter to execute a software adapter will go into a startup state without performing power up diagnostics. The command code will be returned as a response and the reset will begin immediately should
The second reset command is the RESET ADAPTER command, code FF. The reset to the host. Your applications software should allow an additional five second delay
The polled when using the host BDLC protocol. Chapter 3 provides more information
reset operation. All current TIWAY I operations
after sending the response to the host. Y
not issue another command for at least 500 ms.
will begin within one second after the reset command response is returned
before issuing another command to allow the diagnostics to complete.
response to either reset command will not be returned until the adapter is
on host interface protocols.
will be aborted and the
our applications
software
UNILINK HOST
USER MANUAL
ADAPTER 2–22
Page 33
OPERATION
AND
APPLICATION
2.8.2 The Exter
The UNILINK Adapter provides a single external input point and a single external in a variety of applications like a remote “Adapter Good” indicator. For safety critical applications, any external alarms should be hard-wired independently of
the P/C.
Figure 2–13 External Input/Output Points Example Application
nal Input/Output Points
output point. These two points operate independently and can be
Panel Lamp
20 – 40 VDC 20 – 36 V (RMS)
AC
UNILINK Host Adapter
IN OUT
Remote “ADAPTER GOOD” Indicator
used
UNILINK HOST
USER MANUAL
ADAPTER2–23
Page 34
OPERATION
AND
APPLICATION
2.8.2.1 The
The input point latches a high level. The option parameter of the REPORT EXTERNAL external
Options 00 and 01 report whether the “on” condition ever occurred, but not report the instantaneous value of the input and should be used for time dependent applications. indicating that the input is on. The complete specifications for the input point are given in the UNILINK Adapter Installation and Operation Manual (TIWAY–8106).
2.8.2.2 The
The MODIFY EXTERNAL OUTPUT STATUS command either turns the external given in the UNILINK Adapter Installation and Operation Manual (TIWAY–8106). The command code FC, along with either 00 or 01 will respectively turn off or turn on the output point. The adapter will return the command after point by connecting it to a remote control center panel lamp so that when the host computer applications software issues the MODIFY EXTERNAL OUTPUT problem
Exter
nal Input Point
INPUT STATUS command determines when to reset and latch the
input. The values for the command option are:
00 = Read the input, do not reset the latch.
01 = Read the input, then reset the latch.
02 = Reset the latch, then read the input.
the current state of the external input point. Option 02, however, reports
The response will be either 00 indicating that the input is off, or
Exter
nal Output Point
output point ON or turns it OFF
code in
a reset or power
STATUS command to turn on the output point, the lamp will light. If a
occurs that causes the adapter to reset, the lamp will be extinguished.
response. The initial state of the External Output Point is zero
-up. A remote “Adapter Good” lamp can be set up using this
. The corresponding voltage levels are
01
UNILINK HOST
USER MANUAL
ADAPTER 2–24
Page 35
OPERATION
AND
APPLICATION

2.9 BASIC NETWORK OPERATIONS

The simplest network operations, in either a single or multiple host network, are performed using the Base HIU commands, codes 1–8. These commands allow you to bring secondary devices online and offline, send data to/from the secondaries, issue requests, meaning that the host application must wait for the network response to
process multiple outstanding transactions.
and retrieve basic statistics. However
before another command
can be issued. Paragraph 2.10 discusses how
, these commands are direct
2.9.1

Bringing Secondary Devices Online

Issue the CONNECT SECONDARY command to bring secondary devices online. This command logically connects one or more secondary devices and allows your applications software to selectively connect the secondary devices on the network. Memory space will be allocated for secondary device statistics the first time that the secondary is connected. This space will remain in use until
the adapter is reset.
The
address value FF hex or 255 decimal has been reserved as a global address
that
will connect all secondaries up to the largest address value, specified when the adapter was configured. You must be careful when requesting multiple secondary connections. If the responses are not received before the host command to issue the READ SECONDARY LOG command to determine which secondaries were connected before the timeout. A successful connection will return connected successfully be
the command code and a 00 address value.
timeout, the ERROR RESPONSE will be returned and you will have
the command code and a list of the secondary device addresses that were
. If no address in the list was connected, the response will
NOTE
The host computer must wait for the response to be returned for the CONNECT SECONDARY and READ
SECONDAR
Y LOG commands before
issuing another command, regardless of the adapter operating
mode. There can be
a long time delay when
using the special global address (FF hex).
UNILINK HOST
USER MANUAL
ADAPTER2–25
Page 36
OPERATION
AND
APPLICATION
2.9.2 Sending
After the secondary device is connected, your applications software can send TIWAY I Primitives to the secondary with the SEND NETWORK DATA command or the BROADCAST NETWORK DATA TRANSFER command. The TIWAY elements, controlling the operating mode, and testing the status and configuration
The SEND NETWORK DATA command transfers a TIWAY I Primitive to a specified secondary device. When completed, the adapter will return the command
Data To And Fr
I Primitives provide control functions such as reading and writing data
of the secondary devices.
code, the secondary address, and the Primitive response.
om Secondary Devices
NOTE
The host computer must wait for the response to be returned for the SEND NETWORK DATA and BROADCAST NETWORK DATA commands before issuing another command, regardless of adapter’s operating mode.
UNILINK HOST
USER MANUAL
ADAPTER 2–26
Page 37
OPERATION
The BROADCAST NETWORK DATA TRANSFER command will send the Primitive to all logically connected secondary devices on the network and is provided for backward compatibility with the original TIWAY I Host Adapter. The
Broadcast/Poll sequence is more efficiently handled with macros discussed in Paragraph 2.10. Unlike the SEND NETWORK DATA command, the responses accepted, the command code will be returned, then your applications software MUST issue a POLL command to each secondary to collect the Primitive response.
from the secondaries do not automatically return. If
AND
APPLICATION
the command is
CAUTION
You should not issue the BROADCAST NETWORK
DATA TRANSFER command if
your network contains Intelligent Tank Transmitters (ITTs) as secondary devices or you could loose responses. Also, sending a BROADCAST NETWORK DATA TRANSFER command when your adapter is configured as either an MHIU or an HIU will cause an network
HDLC error to be logged even though the information was received. This error will be included in the statistics from the READ SECONDARY DIAGNOSTICS, REPORT HIU STATUS, REPORT NETWORK MANAGER SECONDARY STATISTICS and the REPORT NETWORK MANAGER NETWORK STATISTICS commands.
The POLL command can only be used by an adapter configured as an MHIU/EHA, operating modes with macros. Example 2–1 is a typical sequence for the broadcast/poll
however
commands.
, the broadcast/poll sequence can be implemented in other
UNILINK HOST
USER MANUAL
ADAPTER2–27
Page 38
OPERATION
AND
APPLICATION
2.9.3 Retrieving
The UNILINK Host Adapter maintains network statistics for the logically connected secondaries on the network. This information is not essential for normal
operation, but can be useful for identifying problems.
02 0002 11 00 02 03 01 03 01 0002 11 01 03 02 03 02 0002 11 01 03 03
Issue Broadcast command Accepted response Poll address #1 Address #1 response Poll address #2 Address #2 response Poll remaining addresses
Example 2–1 BROADCAST/POLL Example
Secondary Statistics
The
first statistical command is the READ SECONDARY LOG command, code
06. When this command is received, the UNILINK Host Adapter will respond with
the command code followed by the list of secondary device addresses that
are
logically connected. If no secondaries are connected, the list will contain one
byte
with a value of 00.
The second command is the READ SECONDARY DIAGNOSTICS command. This command returns statistical counters for the network HDLC transmissions and errors. Along with the command code and secondary address, there is a reset statistics counters parameter. The counters are not automatically reset when their maximum value is reached. The reset parameter allows your applications software to reset the counters to start a baseline
measurement.
UNILINK HOST
USER MANUAL
ADAPTER 2–28
Page 39
OPERATION
AND
APPLICATION
2.9.4 T
2.9.5
aking Secondary Devices Of
The
DISCONNECT SECONDARIES of the CONNECT SECONDARIES command. The secondary devices listed after
the command code are logically disconnected and their addresses removed from the secondary log. Again, the special address code FF, instructs the UNILINK Host Adapter to attempt to disconnect all logically connected secondaries. You must be careful when disconnecting more than one secondary device. The command may be aborted if all secondaries are not disconnected before
the host command timeout expires and the ERROR RESPONSE will be returned. secondaries that disconnected properly connected,
The HIU function must have permission to issue a disconnect to a secondary before the secondary device will be removed from the secondary log, but will remain online. Option–09 of the CONFIGURE NETWORK MANAGER command defines addition, the ALLOCATE NETWORK MANAGER BUFFERS command can specify

Retrieving Adapter Statistics

The normal response returned will be the command code and a list
the response will be the command code and a 00 address value.
the secondary is actually taken offline. If the permission
the default for granting this permission by the background monitor
the permission.
f-line
command performs the opposite function
of
. If none of the addresses in the list were
is not granted,
. In
The READ ADAPTER DIAGNOSTICS command, code 08, is another aid to identifying processing problems. This command retrieves a list of counters indicating the number of times that each Base HIU command has been processed. often statistics, of
is reached.
This will help build a profile of which commands
and will indicate possible bottlenecks. Like the counters for the secondary
these counters are not automatically reset when the maximum limit
are processed most
UNILINK HOST
USER MANUAL
ADAPTER2–29
Page 40
OPERATION
AND
APPLICATION

2.10 EXTENDED NETWORK OPERATIONS

The Extended HIU (EHIU) commands provide several performance improvement
benefits through macros and bandwidth adjustments.
2.10.1
2.10.1.1
What Ar
Normally, when the host computer issues a network request to connect, disconnect, and send data to and from secondary devices, it must wait for the response to be returned. Macros are network requests that are stored and scheduled for independent processing by the HIU function. The HIU function will issue the network request at the proper time and store the response. This frees the host computer to issue other commands and retrieve request responses without the burden of real-time host computer control. The HIU function is free to schedule macro transmissions and collect responses, so that new macro requests can be issued to the NM function while waiting for older ones to complete processing in the secondary devices. This keeps the network efficient
Configuration Modes Supporting Macr
e Macr
and increases data throughput.
os?
os
Table 2–1 Configuration Modes Supporting Macros
Macros supported?
MHIU EHA
No
HIU EHA
No
MHIU
Yes
HIU
Yes
NM
No
NM SA
No
UNILINK HOST
USER MANUAL
The UNILINK Host Adapter must be configured as either a Master Host Interface Unit or a Host Interface Unit to use the macro feature. These two operating modes accept the extended host commands for defining macros and collecting macro responses. Macros are not supported in the Emulate Host Adapter
ADAPTER 2–30
modes.
Page 41
OPERATION
AND
APPLICATION
2.10.1.2
Repetitive and Non-Repetitive Macr
You specify in each macro definition whether the macro should be issued one time or repeated at regular time intervals. Non-repetitive macros are issued
and collect one macro response, functioning much like
once To reissue the non-repetitive macro, your applications software only needs to send the ENABLE/DISABLE MACRO EXECUTION command to enable it, saving the host-to-adapter communications overhead of sending the data
again.
Repetitive macros are issued at the specified time intervals with each new macro response replacing the previous response. The macro will be repeated until your applications software sends the ENABLE/DISABLE MACRO EXECUTION are
scheduled for processing by the HIU function.
The HIU function schedules the requests in the following order:
1.
2.
3.
4.
command to disable it.
Direct commands for a single secondary device Direct commands for multiple secondary devices Non-repetitive macros Repetitive macros
os
a direct command.
Primitive
Both repetitive and non-repetitive macros
The HIU function queues all requests except the direct commands for single secondaries. A single secondary direct command is given a higher priority and will
be sent to the NM function before any of scheme prevents the repetitive macros from using the entire network bandwidth.
When
the ENABLE/DISABLE MACRO EXECUTION command code is issued, the non-repetitive macros will be sent in the order listed in the command parameters. the non-repetitive macros. Repetitive macros can be used for background data acquisition, freeing the host computer application even further. Each new repetitive macro response is compared to its previous response and if a difference application the overhead of collecting and comparing the macro responses itself. A Freeze Exception option can be specified when defining the repetitive macros. This option will disable the macro execution when the exception is detected, and freeze
The provides a method for defining your own execution priority for
is detected,
can check the state of the exception flag and
the data that caused the exception.
the exception flag for that macro is set. The host computer
the queued requests. This priority
act accordingly without
UNILINK HOST
USER MANUAL
ADAPTER2–31
Page 42
OPERATION
AND
APPLICATION
2.10.2
The Parts of a Macr
o
MACRO HEADER
MACRO COMMAND BUFFER
MACRO RESPONSE BUFFER
Figure 2–14 The Parts of a Macro
Each
macro is stored in a variable length buffer by a unique buffer number assigned by the HIU function when the buffer is allocated. to 254 buffers can be allocated, depending on the size of each macro and the amount command and response buffers referenced by the same unique buffer number and command buffer and its corresponding macro response buffer in the ALLOCATE MACRO BUFFER command. Use the following formula to calculate
This buffer number ranges from 1 to 254 (01 hex to FE hex) so that up
of memory set aside for the macro buffers. Each macro
a macro header as shown in Figure 2–14. You specify the size of each macro
the number of bytes of memory required for each macro:
. The macro buffer is referenced
buffer consists of
Macro Memory = 22 Bytes + Macro Command + Macro Response
(Header)
If this total is an odd number of bytes, add one to make the total count even.
The
header is a storage area the Macro Response Status Word (MRSW). The MRSW is normally a counter that
holds the number of times a repetitive macro has if an error or exception occurs, a termination code indicating the cause of the error
will be stored there.
get
the MRSW
address
associated with the macro, and internally used pointers and flags.
value. The header also contains the Source Id and the secondary
for the macro operating parameters, one of which is
Send the GA
Buffer Length Buffer Length
been executed. However
THER MACRO RESPONSE command to
,
UNILINK HOST
USER MANUAL
ADAPTER 2–32
Page 43
OPERATION
AND
APPLICATION
The total macro memory requirements can be calculated by summing the memory for each individual macro. For example, suppose that you use one macro
to connect secondary #7, another macro to issue a Primitive 45 bytes long expecting #5.
a response 30 bytes
long, and another macro to disconnect secondary
The total memory required for these three macros is:
Macro #1, Connect Macro #2, Primitive Macro #3, Disconnect
T
otal Memory Required
= 22 = 22 = 22 + 45 + 30 = 22 = 22
= 97(+1) 22

142 Bytes
Example 2–2 Macro Memory Requirements
Host Computer
UNILINK
TIWAY
I
UniLink Host Adapter
22 98
Job Directory Job A Job B Job C
Figure 2–15 Host Computer Multiprocessing Application
Example
UNILINK HOST
USER MANUAL
ADAPTER2–33
Page 44
OPERATION
The UNILINK Host Adapter also supports multiprocessing in host computer applications through the host assigned Source Identification number. This number associates each host task with corresponding macros, preventing one task from interfering with another’s resources. Up to thirty-two independent host
tasks can be in use at any one time, each assigned a unique value, from 1 to
254. The Source ID can also be used in single task environments to group related
subtasks and gather their responses.
AND
APPLICATION
2.10.3
The Macr
Macros are defined and maintained with the following commands.
o Commands
ALLOCA ALLOCA
DEFINE MACRO
GA
ENABLE/DISABLE MACRO EXECUTION
INITIALIZE MACRO RESPONSE BUFFER
LINK MACRO
TE SOURCE ID TE MACRO STORAGE BUFFERS
THER MACRO RESPONSE
UNILINK HOST
USER MANUAL
ADAPTER 2–34
Page 45
OPERATION
AND
APPLICATION
2.10.4
Setting Up A Macr
Figure available memory are not included in the flowchart, but are described in the sections
2–16 flowcharts the steps for setting up macros. Commands for checking
that follow
o
.
Allocate A Macro Buf
Define the Macro
More Macros for the same source?
(START)
Allocate A Source ID
fer
Yes
No
(END)
Figure 2–16 Macro Setup Procedure
UNILINK HOST
USER MANUAL
ADAPTER2–35
Page 46
OPERATION
AND
APPLICATION
2.10.4.1 Allocate
Use the ALLOCATE SOURCE ID command, code 10, to specify a Source Identification number which can range from 1 to 254 (01 to FE hex). Only thirty-two unique Source Identification numbers can be used at any one time. Figure
2–17 illustrates the relationship between Source Ids and macro buffers.
Source (OE)
A Source Identification Number
ID #1
Macro Buf #1
Macro Buf #35
Macro Buf #63
Macro Buf #87
fer
fer
fer
fer
Source ID #2 (1A)
Macro Buf #2
Macro Buf #3
Macro Buf #80
Macro Buf #97
Macro Buf #109
fer
fer
fer
fer
fer
Source ID #32 (E5)
Macro Buf #4
Macro Buf #33
Macro Buf #60
fer
fer
fer
Up to 32 unique source IDs
Up to 254 Macro Buffers
Figure 2–17 Relationship Between Source Ids and Macro
Buffers
UNILINK HOST
USER MANUAL
ADAPTER 2–36
Page 47
OPERATION
If this command is accepted, the UNILINK Host Adapter will echo back this same command string, otherwise the ERROR RESPONSE will be returned. Source Ids can also be used to group network responses, such as the status of each device. Only one Source Identification number is allocated with each command
sent to the UNILINK Host Adapter
AND
APPLICATION
.
WARNING
All existing macro buffers for the Source Identification
number
will be cleared when the ALLOCATE SOURCE ID command is processed. This prevents a task that abnormally terminated from allocating additional resources while the original resources remain allocated, but unused. Make sure that your application programs use unique Source Identification numbers.
2.10.4.2 Allocate
Use the ALLOCATE MACRO STORAGE BUFFERS command, code 13, to define
and specify the length for both the macro command buffer and the macro response buffer. The UNILINK Host Adapter will return the buffer number assigned by the HIU. Store the buffer number in your application program later
reference. If you specify more than one buffer pair in the command, more than one buffer number will be returned in the response. Be sure to allocate a sufficient response buffer.
The Macr
length of memory
o Buf
fers
for
for both the macro command buffer and the macro
UNILINK HOST
USER MANUAL
ADAPTER2–37
Page 48
OPERATION
AND
APPLICATION
2.10.4.3
Define The Macr
the DEFINE MACRO command,
Use options. connect These and “disconnect” secondary macro types do not require any buffer storage to hold
14
Figure 2–18 shows the DEFINE MACRO command frame. Macros can
a secondary
three functions are the macro types as shown in T
the command, only 22 bytes for the header
Source Buffer Secondary Macro Options
o
code 14, to define the macro and the macro
, disconnect a secondary
Id # Address Type Byte
, or send a Primitive to a secondary
.
able 2–2. The “connect”
Minimum
Reissue
Delay
Primitive
Data
Figure 2–18 Macro Command Frame
T
able 2–2 Macro Types
Type
Code
Function Performed
.
01 02 03
The UNILINK Host Adapter will return the Command Code, the Source Identification number, and the buffer number to indicate that the command was accepted. However, this does not mean that the secondary was actually connected because macros are scheduled for later execution. When the “connect” connect type works just like the “connect” secondary type except that the secondary is disconnected rather than connected. Both the “connect” and “disconnect” secondary macro types are automatically enabled for execution when the command
secondary macro is executed, the MRSW will be set to indicate if the
was successful or if not,
is accepted from the host computer
Send Primitive to secondary Connect the secondary Disconnect the secondary
why it failed. The “disconnect” secondary macro
.
UNILINK HOST
USER MANUAL
ADAPTER 2–38
Page 49
OPERATION
The third macro type is “send Primitive” which is functionally equivalent to using the SEND NETWORK DATA command, but is far more flexible. This macro
begins with the same bytes as the two other types with the addition of a macro options byte, a minimum reissue delay time word, and the Primitive data. The macro options byte uses its five most significant bits to enable or disable
the following options.
AND
APPLICATION
The
The repetitive/non-repetitive option which defines how the macro will
The freeze option which selects whether to freeze the macro and
The
Unlike the two other macro types, the “send Primitive” macro type is not implicitly enabled for execution. You must set Bit 0 to a value of 1 or use the ENABLE/DISABLE scheduled first
macro response received for an exception. When the macro response buffer
is
first allocated, its contents are undefined which will cause the first response received to set the exception flag. Setting Bit 4 will prevent this exception, or you can initialize the contents of the macro response buffer with the INITIALIZE MACRO RESPONSE BUFFER command. Example 2–3 shows examples
auto enable option which specifies whether to automatically enable
the
macro for execution after choose this option, you can explicitly enable the macro with the ENABLE/DISABLE
be
executed.
response
flag
for execution. The last option, Bit 4,
of the bit coding for various combinations.
when an exception occurs.
set first on the first response.
exception option which selects whether to set the exception
MACRO EXECUTION command before the macro will
MACRO EXECUTION command.
definition is complete or not. If you do not
be
causes the HIU to not check the
UNILINK HOST
USER MANUAL
ADAPTER2–39
Page 50
OPERATION
MSB LSB Byte ACTIONS
(hex)
0
0 0 0 0 0 0 0 = 00 1 1 0 0 0 0 0 0 = C0 0 1 1 1 0 0 0 0 = 70
AND
APPLICATION
Non-repetitive, must be explicitly enabled, Repetitive, auto enabled, will not freeze exception Repetitive, must be explicitly enabled, will freeze exception data, will not check first response for an exception
Example 2–3 Macro Options Byte — Bit Coding
The minimum macro reissue delay time word or double byte specifies the number time ranges from 0 to 30,000 milliseconds in 10 millisecond increments. This option only specifies the minimum time to delay the macro and should not be used for time dependent applications. Heavy network loading could cause the macro
You can redefine a macro, but it must be disabled first with the ENABLE/DISABLE discard
of milliseconds to delay before reissuing a repetitive macro. The
to be delayed longer than this minimum delay
MACRO command, which will clear the exception flag
any outstanding responses.
.
delay
and
2.10.5
Checking The Macr
The GATHER MACRO RESPONSE command collects one or more macro responses. You can choose to retrieve the entire macro response buffer data along with the Macro Response Status Word (MRSW) or just the MRSW. You can also choose to retrieve all the buffers specified or just those with their exception flags set. In addition to the command code, specify the Source Identification
The response type byte can be either code 00, 01, or 02. Code 00 instructs the UNILINK Host Adapter to return all of the buffer data including the MRSW. Code
01 will return all of the buffer data, but only for the requested buffers
their
exception flags set. Code buffers reset 01;
that have their
each time that the buffer data is retrieved with response type codes 00
it is not reset with response code 02.
number
o Response and Macr
, the response type, and the buffer number or numbers.
02 will return only the MRSW
exception flags set. The macro response exception flag is
o Status
with
, for the requested
and
UNILINK HOST
USER MANUAL
ADAPTER 2–40
Page 51
OPERATION
You
can request more than one buffer at a time; however, be sure that the total combined length, into
The secondary address, MRSW, Primitive data length, and the Primitive data will condition. the buffer data for the first buffer that has its exception flag set. This allows your host
Table 2–3 describes the meaning for the different values of the MRSW. If the macro terminated abnormally, the exception flag will be set and the Termination macro host computer. Refer to Chapter 6 for a more detailed explanation of each termination
length of
or the ERROR RESPONSE will be returned. The Primitive data must fit
one host response I-Frame.
be returned for
Specifying buffer number 00 is a special case that ignores the value in
response type byte. In this case, the HIU will return the buffer number
application program to receive any exceptions as they occur
is explicitly disabled or the secondary device has been disconnected by a
code.
each buffer response does not exceed the maximum message
each buffer number requested that meets the response type
Code will reflect the error
AND
APPLICATION
and
.
. The exception flag will also be set if the
MRSW V
(hex)
0000
0001
to
7FFF 8000
to
FFFF
Table 2–3 MRSW Values
alues
Description
This macro has not been executed since the last time it was enabled.
The number of times a repetitive macro response has been updated.
T
ermination Code – the macro is disabled due to either an error exception, or an explicit disable.
, an
UNILINK HOST
USER MANUAL
ADAPTER2–41
Page 52
OPERATION
AND
APPLICATION
2.10.6 Enabling
The ENABLE/DISABLE MACRO EXECUTION command explicitly enables and/or
disables defined macros for execution. When this command is processed
the
exception flag will being enabled, or the MRSW set to the disabled Termination Code 8001 hex if the
macro is being disabled. Macros will only be enabled when their associated secondary for
that macro.
The adapter will return the ENABLE/DISABLE MACRO EXECUTION command bytes for each requested buffer number. The first byte in the pair is the requested buffer number and the second byte is the response code which indicates
2.10.7
Initializing the Macr
There are two ways to insure that only a valid exception will set flag.
The first way was shown in the DEFINE MACRO command. By setting Bit 3 in the macro options byte, the first macro response will be received, but not compared to the contents in the macro response buffer. Thereafter, the new responses
and Disabling Macr
be cleared and the MRSW reset to 0000 hex if the macro is
device is online, otherwise, the ERROR RESPONSE will be returned
code,
the Source Identification number
whether the requested action was successful.
o Response Buf
will be compared to that first response.
os
fer
, and a list containing a pair of
the
exception
The second way is to store a predefined value in the macro response buffer by using the INITIALIZE MACRO RESPONSE BUFFER command. A useful application is to define a macro that retrieves the status information from a secondary operating manual for the secondary device gives the exact Primitive response that should be returned for a status “OK”. Preload this value into the macro response buffer. Then, the exception flag will be set when the response is anything
The the Source Identification number, the buffer number, the Primitive response being preloaded, and an automatic enable byte. The macro must be disabled before sending this command. The automatic enable byte can then be used to enable the macro for execution after the response buffer is loaded without having to issue a separate ENABLE/DISABLE MACRO EXECUTION command.
device and sets the exception whenever the response is not “OK”. The
other than the “OK” status that was expected.
INITIALIZE MACRO RESPONSE BUFFER command
byte string includes
UNILINK HOST
USER MANUAL
ADAPTER 2–42
Page 53
OPERATION
AND
APPLICATION
2.10.8 Checking
There
is a will need to do for the flexibility provided by macros. Your programs should apply
the following rules.
Your
numbers.
Your
numbers are active at a time. This is easily accomplished by maintaining to assign another Source Id number and have already assigned 32 Source Ids, you can deallocate one number and allocate another. However, remember that deallocating a Source Id clears all macro buffers associated with that Source Id, so you should retrieve any outstanding
Your programs must keep track of the buffer numbers and the
associated by
Your programs must ensure that no more than 254 macro buffers are
allocated.
Memory Usage
certain amount of housekeeping that your host application programs
programs must assign and keep
programs must ensure that no more than 32 Source Identification
an
internal table in your applications program. If you need
responses before deallocating.
Source Identification number
maintaining an internal table in your applications program.
track of the Source Identification
. This can
also be accomplished
2.10.9
The
REPORT MEMOR items. When your program sends Command Code 18, the UNILINK Host Adapter the number of unallocated macro buffers, the number of unallocated Source Identification numbers, and a list of all Source Identification numbers currently
Linking Macr
In form Figure 2–19. Data types from one device will be retrieved from one secondary and then transferred to the other secondary without any further host intervention. The LINK MACRO command, code 1C, accepts a Source Id and two Id or an error will be returned. The first macro command buffer number represents the the trigger macro. When the trigger macro is enabled and completes processing, the second macro command buffer number or action macro
will return the Command Code, the number of memory bytes
active.
os
addition to the basic operations with macros, you can also link two macros
a “store and forward” link between two
macro command buffer numbers. Both macros must have the same Source
will be executed.
Y USAGE command will help your programs track these
available,
to
secondary devices as illustrated in
UNILINK HOST
USER MANUAL
ADAPTER2–43
Page 54
OPERATION
AND
APPLICATION
UNILINK Host Adapter Macro Response Buf
Macro Response Buf
Data Packet
fer #A
fer #B
Data Packet
Secondary #1
Secondary #2
Figure 2–19 Link Macro Store and Forward Operation
Both macros must be disabled before the LINK MACRO command will be accepted. the secondary device. The action macro must be a valid Primitive 30 or B0 to write the data read to the other secondary. All of the define macro options on each macro command buffer are valid until the link is established. When the link link
The trigger macro must be a valid Primitive 20 or A0 to read data from
is established, the action macro will be considered non-repetitive. When the
is terminated the original conditions will be valid again.
UNILINK HOST
USER MANUAL
The adapter will check the validity of the host supplied Primitives before linking starting addresses (AAAA field of the Primitive). You must insure that the number of TT types (NNNN field of Primitive) and the starting addresses are valid
Once The trigger macro behaves much like a non-linked macro, except that it is disabled while the action macro executes. Each time the trigger macro completes a read, the trigger macro is disabled, its data moved into the action macro the enabled
ADAPTER 2–44
them. The
for both secondaries involved.
the link
buffer to create a valid write Primitive
trigger macro receives an error from the secondary, the action macro is not
and the exception flag is set disabling the trigger macro.
Primitives must use the same TT type, but may use different
is established, just enable the trigger macro to begin the process.
and the action macro is enabled. If
Page 55
OPERATION
Once
the action macro has successfully completed, the trigger though trigger that
The exception flag of the action macro is only set when an error occurs for its secondary the secondary is macro will then execute as a non-linked macro. You will need to correct the problem, then execute a recovery subroutine that will perform the following steps.
the link never existed. If it is a repetitive macro, it will be enabled. The
macro’
it will not be set until the action macro has completed execution.
s exception flag is also set as though the link never existed except
device. If the action macro can not be executed for any reason, such as
offline, the link will be automatically terminated. The trigger
AND
APPLICATION
macro behaves as
2.10.10
2.10.10.1
1. Disable
2.
Reissue the LINK MACRO command.
3.
Enable the trigger macro to start executing the link again.
The link is not automatically terminated if the trigger macro fails.
Network Per
You
can improve the performance of your of the HIUs. The statistical commands will provide a picture of transaction bottlenecks that you can also adjust. One performance measure was already discussed
Network Bandwidth
The
Network Manager serves as the primary in a TIWAY I network. It handles all communications between HIUs and other secondaries. It uses Network Manager buffers to temporarily store requests and responses before they are forwarded to the appropriate devices. These buffers are divided between the HIUs on the network. The number of buffers assigned to a particular HIU its bandwidth. The more buffers allocated to the HIU, the more requests the Network
Manager function can simultaneously process for that HIU.
the trigger macro.
formance
networks by adjusting the bandwidth
in Paragraph 2.6.2.
UNILINK HOST
USER MANUAL
ADAPTER2–45
Page 56
OPERATION
AND
APPLICATION
2.10.10.2
NM Buf
These buffers are allocated implicitly with the background monitor function. However, the NM function in an adapter in the MHIU/EHA mode does not support background monitor or multiple hosts. The value specified for Option–09 of the CONFIGURE NETWORK MANAGER command will be allocated was buffers.
An with the ALLOCATE NETWORK MANAGER BUFFERS command when the number the NM function is enabled by the CONFIGURE NETWORK MANAGER command. The ALLOCATE NETWORK MANAGER BUFFERS command can only be issued by the host computer attached to the adapter functioning the Network are
The adapter will return the command code and the HIU address if the ALLOCATE NETWORK MANAGER BUFFERS command is accepted. Your applications software can issue the REPORT NETWORK MANAGER BUFFERS AV To use it, send the one byte command, code 35. The adapter will return the command available.
fer Allocation
to each HIU function as the NM function brings it online. If no value
specified for Option–09, the value will default to one fourth of the
amount other that the default number of buffers can be allocated explicitly
of buffers allocated by the background monitor is zero or if issued before
Manager and can only be issued once for each as HIU. After the
allocated, they will remain allocated until the NM or MHIU is reset.
AILABLE command to determine how many buffers are unused.
code, the total number of NM buffers, and the number of NM buffers
available
buffers
UNILINK HOST
USER MANUAL
ADAPTER 2–46
Page 57
OPERATION
AND
APPLICATION
2.10.10.3 Adjusting
The REPORT NETWORK BANDWIDTH ALLOCATION command, code 36, returns counters that reflect the relative network activity for a specific HIU. The counters do not reset after reaching their maximum value and must be explicitly
Although the HIUs on the network have no direct control over the number of Network are used with the ALLOCATE HIU BANDWIDTH command. This command defines macros and repetitive macros by specifying how many of the allocated buffers will NM buffers allocated to the HIU. This command also limits the number of outstanding requests for a single secondary device, preventing one secondary from dominating the entire bandwidth. The default for this parameter is the smaller the HIU. Both parameters are single bytes ranging from 00 to the number of NM buffers allocated to the HIU. The command code will be returned if the command than once in order to change the parameters to match the demands as they change.
Issue the buffer allocation and retrieve macro statistical counters. The statistical counter parameters are long words that must be explicitly reset when they reach and
how the buffers are to be divided between direct requests/non-repetitive
be used for repetitive macros. By default, repetitive macros
of two requests per secondary or the number of NM buffers allocated to
the REPORT HIU BANDWIDTH ALLOCA
their maximum values. The command
the optional reset counters code.
An HIUs Bandwidth
reset.
Manager buffers allocated to them, they
is accepted. Y
our applications software may issue this command more
string includes the command code
can control how those buffers
can use all of the
TION command to
determine
There are two sets of counters, one for repetitive macros and the other for non-repetitive macros. The first counter in each set counts the number of I-Frame set counts the number of I-Frame bytes sent by the macro type. The third counter in each set counts the number of I-Frame bytes received by the macro type. These counts do not include any HDLC overhead or communications counts between the NM and the HIU. Reset these counters by sending the command string 1A 01. The adapter will return the command code 1A if accepted.
pairs sent and received by the macro type. The second counter in each
UNILINK HOST
USER MANUAL
ADAPTER2–47
Page 58
OPERATION
AND
APPLICATION
2.10.10.4 Performance
The REPORT NETWORK MANAGER SECONDARY STATISTICS and REPORT NETWORK MANAGER NETWORK STATISTICS commands are provided as network diagnostic aids for locating bottlenecks or faulty secondaries. The REPORT NETWORK MANAGER SECONDARY STATISTICS command, code 37, returns statistics for a specific secondary device. Network
Each transaction will update the counters until their maximum value is reached. to reset the counters before beginning the diagnostic period so that the counts start
The second command, REPORT NETWORK MANAGER NETWORK STATISTICS — code 38, returns statistical counters for an specific media channel. secondary not incremented after reaching their maximum value and must be reset explicitly
The and statistics on network performance. The statistics are counts for Network Manager their
These statistics are counters reflecting the communications between
Manager and the secondary
Then the command must be issued to reset the counters. You may want
at the zero baseline.
The counts reflect the activity between
addresses. Like the secondary statistics counters,
with the special command sequence.
REPORT HIU STATUS command returns the connection status of the HIU
to HIU communications. The counters are not
maximum value and must be explicitly reset.
Statistics
the
.
the Network Manager and all
these counters are
updated after reaching
UNILINK HOST
USER MANUAL
ADAPTER 2–48
Page 59
CHAPTER
3
CONFIGURING
HOST COMPUTER POR

3.1 THE HOST COMPUTER INTERFACE

The
UNILINK Host devices through a serial binary data interface using EIA RS–232–C control signals and EIA RS–423–A drivers as illustrated in Figure 3–1. This port is configurable for baud rates up to 38.4K bits per second; synchronous or asynchronous A
choice of two data link protocols are available; Protocol (NITP) or BDLC, a byte-oriented subset of the ANSI X3.66 standard protocol.
Adapter communicates with a wide range of host computer
modem operation; full or half duplex; and even, odd, or no parity
the Non–Intelligent T
Host
UNILINK
RS–232–C/RS–423–A
Computer
THE
T
.
erminal
Figure 3–1 Host Computer Interface
UNILINK HOST
USER MANUAL
ADAPTER3–1
Page 60
CONFIGURING THE HOST COMPUTER PORT
3.2 RS–232–C/RS–423–A PHYSICAL INTERFACE
Port 3 on the UNILINK Host Adapter, shown in Figure 3–2, is a serial communications interface which implements a subset of RS–232–C control, data, and timing signals using RS–423–A drivers and receivers. It is a 25-pin female to Type “D” pin assignments as listed in Table 3–1. Any pins not listed should remain vacant in order to prevent damage to the host computer or the UNILINK
“D” connector wired
as Data T
erminal Equipment (DTE) for connection
Data Communications Equipment (DCE). This connector uses the RS–232–C
Host Adapter
.
Port
1
Host
Port
2
Communications Port
Port
3
Figure 3–2 Host Communications Port
Port
AC
4
GND
NEUTACLINE
I/O
1
2 3 4 5
A000654
UNILINK HOST
USER MANUAL
ADAPTER 3–2
Page 61
CONFIGURING THE HOST COMPUTER PORT
T
able 3–1 RS–232–C/RS–423–A “D” Connector Pin
Assignment
3.2.1
Interchange
Circuit
AA 1 101 AB BA
BB CA CB CC CD
CF DB DD
Since
the adapter will typically be operating in noisy industrial environments,
it is recommended that the cable length not exceed 50 feet.

Connection to DCE Equipment

Port
3 is configurable for synchronous or asynchronous modem operation, even,
odd,
or no parity
are
configured using the two dipswitch banks shown in Figure 3–3. The actual
settings
are described in more detail in Paragraph 3.3.1.1.
, and baud rates up to 38.4K bits per second. These parameters
Connector
Pin No.
7 2 3 4 5 6
20
8 15 17
CCITT Description
Protective Ground 102 103 104 105 106 107
108/2
109
114 115
Signal Ground
T
ransmitted Data Recieve Data Request To Send Clear To Send Data Set Ready Data Terminal Ready Recieve Line Signal
ransmitter Signal
T Reciever Signal
Element Element
Detector
Timing Timing
Number 1
2
LEDsResetNumber
Figure 3–3 Dipswitch Locations
UNILINK HOST
USER MANUAL
ADAPTER3–3
Page 62
CONFIGURING THE HOST COMPUTER PORT
When the synchronous modem operation is selected, the adapter expects the modem to provide the clocking signals on pins 15 (DB) and 17 (DD). Selecting synchronous modem operation does not mean that you have selected a synchronous data link protocol such as the bisynchronous data link protocol. The
adapter supports two asynchronous data link protocols which are described
in
further in Paragraph 3.3.
3.2.2

Connection to DTE Equipment

You can also connect a host computer that has a DTE port, such as a microcomputer, to Port 3 for asynchronous communications by using a null modem cable. A null modem cable uses 25-pin type “D” connectors and RS–232–C cable wired as shown in Figure 3–4. Both the adapter and the attached host see that each is connected to a DCE device. The attaching cable should distributor
not exceed 50 feet in length. Y
(P/N;VPU–200–3605).
Attached
DTR
Device
DTE
1
GND
25
TxD RxD RTS CTS DSR
GND
DCD RxCLK–No connection
ou may order
UNILINK Host Adapter
GND
TxD RxD RTS CTS
DSR
GND
DCD
this cable from your Siemens
DTE
1
25
DTR
UNILINK HOST
USER MANUAL
TxCLK–No connection
14
13
13
14
Figure 3–4 Cable For Connecting To DTE Equipment (Null
Modem)
ADAPTER 3–4
I002378
Page 63
CONFIGURING THE HOST COMPUTER PORT
The
IBM PC/A
modem
cable diagram for the IBM PC/A
Tr uses
a 9-pin “D” connector for its serial interface
T port is shown in Figure 3–5.
IBM PC/AT 9–Pin UNILINK Host Adapter 25–Pin
port. A null
13
1
25
14
RI CTS RTS DSR
9
6
1
DTR SD
RD DCD
TxD RxD
RTS CTS DSR
GND DCD
GND
5
Figure 3–5 IBM PC/AT 9-Pin Null Modem Cable Diagram
UNILINK HOST
USER MANUAL
ADAPTER3–5
Page 64
CONFIGURING THE HOST COMPUTER PORT
3.2.3 Multidrop
You can multidrop up to 32 adapters using modems in a multipoint circuit as shown
in Figure 3–6. This allows the networks; however, each adapter must use the BDLC protocol. Each adapter must be assigned a unique address with dipswitches. The BDLC protocol uses the addresses to route messages to the correct network. A multipoint circuit represents the network layer of the Open Systems Interconnection model described further in Reference 4 in the Preface and in the TIWAY I Systems Manual
(PPX:TIW
Host
Computer
4-wire leased line
or equivalent wire
Host Inter
Modem Modem
face Cir
AY–8101).
cuit
host computer to control multiple TIWAY I
Modem
Modem
UNILINK
Host Adapter
UNILINK
Host Adapter
UNILINK
Host Adapter
TIWAY1
Network #1
TIWAY1
Network #2
TIWAY1
Network #3
UNILINK HOST
USER MANUAL

Figure 3–6 Multidrop Host Interface Circuit

You should select half-duplex operation for the modems
when you
multidrop to prevent the network
modems from simultaneously raising the carrier.
ADAPTER 3–6
NOTE
Page 65
CONFIGURING THE HOST COMPUTER PORT
3.2.4 XON/XOFF
XON/XOFF flow control is provided at Port 3 to accommodate host computers with
small input buffers. This is achieved with the XON and XOFF flow characters sent from the host computer. Transmission will stop within four characters characters must be sent as the 8-bit hexadecimal characters 11 and 13, respectively, with the eighth bit set to zero. For NITP, the XON and XOFF characters must be sent as 7-bit ASCII characters 11 and 13 with the parity matching the host computer parity. This flow control will operate with either the NITP or BDLC protocols, but the adapter must be set for Full Duplex communications
The adapter will recover from host computer failures by resetting the flow control frame
If host device that implements XON/XOFF flow control with the BDLC protocol, the If device, as a convenience for the host devices; the adapter will not try to stop a host transmission
when
will be discarded and must be retransmitted by the host computer
you are using a Network
BDLC data values 1
possible, you should deselect the XON/XOFF flow control on the NIU or host
or select the NITP
Flow Contr
after XOFF is received from the host. For BDLC, the XON and XOFF
by setting Position 3 of Dipswitch 2 up.
the starting delimiter of the next frame is received. However
with XOFF
ol
control
, that
.
Interface Unit (NIU); i.e., Ethernet, Sytek, etc., or a
1 and 13 hex may inadvertently trigger the flow control.
protocol on the adapter
.
. Flow control is only provided
UNILINK HOST
USER MANUAL
ADAPTER3–7
Page 66
CONFIGURING THE HOST COMPUTER PORT

3.3 HOST PORT COMMUNICATIONS

The UNILINK Host Adapter provides a choice of two data link layer protocols for ensuring data integrity through the physical link; the Byte–oriented Data Link Control (BDLC) protocol and the Non–Intelligent Terminal Protocol (NITP). checking functions. In addition, the BDLC protocol provides for link disconnection and sequence control. The protocol and other host port parameters are selected with dipswitches. Several factors are important in deciding
Both protocols include link establishment, message
which protocol to use.
framing, and error
3.3.1
Choosing a Host Pr
The NITP protocol was designed to be simple and still provide data integrity. The
major features of NITP are listed below
It
works in a point-to-point circuit, connecting the host computer to the adapter. have
the ability to address individual adapters.
Messages are transmitted in a frame that includes beginning and
ending
otocol
.
NITP
cannot be used in a multipoint circuit because it does not
delimiters, message character count, and a checksum.
:
Character
Count
Message
Body
ECC
;
Figure 3–7 NITP Message Structure
UNILINK HOST
USER MANUAL
ADAPTER 3–8
Page 67
CONFIGURING THE HOST COMPUTER PORT
The
It is designed to work with a wide range of ASCII host devices, from
It
It is easier to implement than the BDLC protocol, but it is also much
More detailed specifications are given in Appendix A.
host computer must wait for the adapter response issued, before another command can be sequence, the
ASCII
supports a subset of the ASCII character set, The semicolon delimiter and the next beginning colon delimiter computer
slower bytes
illustrated in Figure 3–8,
command.
terminals to intelligent workstations.
adapter
for each data value. For example, the hexadecimal value:
will ignore all other ASCII characters between the ending
can use these characters for routing control.
since the data is transmitted as ASCII characters requiring two
0E hex

/ \ becomes
30
45 (ASCII characters “0” and “E”)
issued. This command/response
ensures that the response matches
“:”, “;”, “0–9”, and “A–F”.
for the command
, so the host
Host
Computer
UNILINK
Host
Adapter
NITP Host Command
Network Response
Figure 3–8 NITP Command/Response Sequence
UNILINK HOST
USER MANUAL
ADAPTER3–9
Page 68
CONFIGURING THE HOST COMPUTER PORT
The BDLC protocol is a byte–oriented subset of the ANSI X3.66 standard protocol, BDLC
similar to the ISO standard
protocol are listed below
It provides a higher level of data integrity and throughput
improvements
It uses send and receive counts in a control field for improved data
integrity.
Throughput is improved by transmitting the data as eight-bit binary
values or hexadecimal, making this protocol approximately twice as fast as NITP. However, you will have to write and/or install the BDLC protocol
over NITP
driver software on your host computer
HDLC protocol. The major features of the
.
, but it is also more complex to implement.
.
Additional
outstanding transaction capability, illustrated in Figure 3–9. This allows the host computer applications software to continue issuing commands can issue a network request to secondary device #1, then another to secondary from
It uses an address to distinguish individual adapters in a multipoint
host
More detailed specifications are given in Appendix B.
throughput improvements are gained by using the multiple
before the network response is returned. The host computer
device #2, followed by the command to retrieve the
secondary device #1.
interface circuit as described in Paragraph 3.2.3.
response
UNILINK HOST
USER MANUAL
ADAPTER 3–10
Page 69
CONFIGURING THE HOST COMPUTER PORT
Host
Computer
UNILINK
Host
Adapter
BDLC Host Command
RR, “Message Received”
BDLC Host Command
RR, “Message Received”
RR, “Poll”
First Network Response
RR, “Poll”
Second Network Response
Figure 3–9 BDLC Multiple Outstanding Transactions
Another consideration is that of the six configurable modes described in Chapter 2, two of those modes emulate the original TIWAY I Host Adapter, meaning that they require the NITP protocol. If you plan to use either the Master you must also use the NITP protocol because these modes do not support commands for configuring network parameters and the dipswitch used to define
Host Interface Unit (MHIU) or Host Interface Unit (HIU) in EHA mode,
the BDLC address is used to define those network parameters.
Another factor to consider is the type of secondary devices that will be on your network. If you will be connecting Computer Interface Modules (CIM) or Intelligent Tank Transmitters (ITT) in CIM mode, you must configure the adapter used
as an MHIU/EHA
in the TIWAY mode without the above restriction.
which requires the NITP protocol. ITT
s may also be
UNILINK HOST
USER MANUAL
ADAPTER3–11
Page 70
CONFIGURING THE HOST COMPUTER PORT
     
The host port communication parameters are configured with two 10-position dipswitches NITP as the operating protocol, set position 1 of Dipswitch 1 up as shown in Figure
located at the front of
3–10.
the adapter as shown in Figure 3–3. T
o select
DIPSWITCH 1
12345678910
U P
UP=NTP
DIPSWITCH 2
1
2345678910
U P
MSB LSB
UP = SYNCHRONOUS DOWN = ASYNCHRONOUS
UP = FULL DUPLEX DOWN = HALF DUPLEX
KEY
UP DOWN
HOST COMMAND
TIMEOUT
UP = TEST MODE DOWN = RUN MODE
UP = HIU/EHA &
DOWN = MHIU/EHA
HOST PORT BAUD RATE
IO LOOP TEST
HOST PORT
HOST PORT
UNILINK HOST
USER MANUAL
UP = EVEN PARITY DOWN = ODD PARITY
UP = PARITY ENABLED DOWN = PARITY DISABLED
Figure 3–10 NITP Dipswitch Settings
The host port parameters specify the physical layer protocol parameters and do not imply that the data link protocols can be either asynchronous or synchronous.
Both the BDLC and NITP protocols are
asynchronous data link layer protocols.
ADAPTER 3–12
HOST PORT
HOST PORT
NOTE
Page 71
CONFIGURING THE HOST COMPUTER PORT
Next set the positions on Dipswitch 2 to correspond with the communication parameters set for the host computer. The adapter the
host computer using seven data bits, one start bit, and
rate
settings for Positions 5–8 of Dipswitch 2 are shown in T
Position 1 of Dipswitch 2 enables or disables parity bit generation and checking.
Position 2 of Dipswitch 2 selects even or odd parity when parity generation
Position 3 of Dipswitch 2 selects full duplex or half duplex operation.
and checking is enabled.
always communicates with
one stop bit. The baud
able 3–2.
Position communications. the TxCLK (DD) and RxCLK (DB) RS–232–C control signals. The adapter will not process synchronous control characters from synchronous
4 of Dipswitch 2 selects synchronous or asynchronous modem
Selecting synchronous only enables the
data link protocols such as BiSync.
adapter to use
Table 3–2 Host Port Baud Rates
Dipswitch 2
Switches
MSB LSB
5678
100
0
1
0
0
1
0
1
0
0
1
0
1
0
1
0
1
1
1
1
1
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
0
1
0 = Down 1=Up
Baud Rate
110 150 300 600
1200 2400 4800
9600 19200 38400
UNILINK HOST
USER MANUAL
ADAPTER3–13
Page 72
CONFIGURING THE HOST COMPUTER PORT
U P
DIPSWITCH 1
1
2345678910
MSB LSB
Position be
9 on Dipswitch 2 is for selecting the adapter’s operational mode and will
discussed in more detail in Chapter 2. Position 10 should be down for normal operation. The other switch positions on Dipswitch 1 define the TIWAY I network
To
parameters and are discussed in more detail in Chapter 4.
select the BDLC protocol as the operating protocol, set position 1 of Dipswitch 1 down as shown in Figure 3–11. With BDLC, the host port parameters are configured with both dipswitches. Since the data is transferred as 8-bit bytes, there
is no parity bit selection.
DIPSWITCH 2
1
2345678910
U P
MSB LSB
UP = SYNCHRONOUS DOWN = ASYNCHRONOUS
UP = FULL DUPLEX DOWN = HALF DUPLEX
UNUSED
UP = TEST MODE DOWN = RUN MODE
UP = HIU/EHA &
DOWN = MHIU/EHA
HOST PORT BAUD RATE
IO LOOP TEST
HOST PORT
HOST PORT
UP DOWN
HOST COMMAND
TIMEOUT 00 = STANDALONE
NM MODE 01 = 10 SEC. 10 = 20 SEC. 11 = 40 SEC.
BDLC ADDRESS
UNUSED
UNUSED
DOWN = BDLC
PROTOCOL
KEY
UNUSED
Figure 3–11 BDLC Protocol Dipswitch Settings
UNILINK HOST
USER MANUAL
ADAPTER 3–14
Page 73
CONFIGURING THE HOST COMPUTER PORT
T
able 3–3 BDLC Protocol Address
Dipswitch 1
Address
45678
Positions
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 1 2 3 4 5 6 7 8 9
00000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0
0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 = Down
Set
the adapter’s BDLC protocol address using T positions on Dipswitch 2 to correspond with the communication parameters of the
host computer Dipswitch 2 defines the adapter’s operational mode (discussed further in Chapter Dipswitch 1 define the Host Command timeout value discussed in Paragraph
3.4.
2). Position 10 should be down for normal operation. Positions 9–10 of
. The baud rate settings are shown in T
1 = Up
able 3–3 as a guide
able 3–2. Position 9 of
UNILINK HOST
and set the
ADAPTER3–15
USER MANUAL
Page 74
CONFIGURING THE HOST COMPUTER PORT

3.4 HOST COMMAND TIMEOUT

The
Host Command T a response from the adapter will be returned within that limit. If the adapter has not received a response from the secondary device before this time period expires, This time-out
Note any host commands since the timeout occurs immediately. When the Host Command Timeout is set to 0, the adapter is configured in the Standalone Network
the adapter will return the ERROR RESPONSE to the host computer
time-out
that a timeout value of 0 seconds signifies that the adapter will not accept
function operates with either host communication protocol for the
values shown in T
Manager (SANM) mode.
The adapter must be reset before any dipswitch changes are recognized.
imeout is the user
able 3–4.
NOTE
-selectable time
period that guarantees
.
Table 3–4 Host Command Timeout Dipswitch Settings
DIPSWITCH 1
Position
9
Down
Down Up Up
10
Down
Up Down Up
Description
0 sec
Accepts No
Host Commands
(SANM Mode) 10 sec 20 sec 40 sec
Timeout Timeout Timeout
UNILINK HOST
USER MANUAL
ADAPTER 3–16
Page 75
CHAPTER
4
THE
TIWAY I NETWORK POR

4.1 NETWORK PORTS

The UNILINK Adapter offers a choice of two physical interfaces for network communications; the model numbers and the type of interfaces in each.
the Local Line
or Modem interfaces. The following table lists
Table 4–1 UNILINK Adapter Models
Model Number PPX:500–7111
PPX:500–7112 PPX:500–7113 PPX:500–7114
More information on the media types can be found in the TIWAY I Systems Manual (PPX:TIWAY–8101) and in the UNILINK Adapter Installation and Operation
Manual (PPX:TIW
Network Port Dual Local Line
Dual RS–232–C/423 Dual Local Line Dual RS–232–C/423
AY–8106).
Supply V 120 V
AC
120 V
AC
240 V
AC
240 V
AC
oltage
TS
UNILINK HOST
USER MANUAL
ADAPTER4–1
Page 76
THE TIWAY I NETWORK PORTS
4.1.1
Local Line Inter
face
Port 1Port 2 Port 3 Port 4
I/O
12345
Local Line Interface Ports
Figure 4–1 Local Line Interface Ports
The Local Line interface to TIWAY I is a female 9-pin “D” connector shown as Ports
1 and 2 in Figure 4–1. Port 1 is the primary network port. support for redundant media transmission when Ports 1 a redundant twisted pair cable network (discussed further in Paragraph 4.2 ). The
pin assignments for these ports are given in T
and 2 are connected to
able 4–2.
Port 2 provides
Table 4–2 Local Line Connector Pin Assignments
Pin
Name
1 2
3
Sheild 4 5 6
LLM+ 7 8 9
LLM–
Description
Reserved Reserved
Cable shield and signal common Reserved Reserved Positive biased signal line Reserved Reserved Negative biased signal line
UNILINK HOST ADAPTER 4-2
USER MANUAL
Page 77
THE TIWAY I NETWORK PORTS
The
TIWAY I Local Line interface has the advantage of being more economical
than
the modem interface since Belden 9860 or Belden 9271. Figure 4–2 shows the the
network trunkline cable, which can generally extend up to 25,000 feet droplines cable
up to 100 feet in length. Figure 4–3 is a chart showing the
distances compared to the number of stations on the TIWAY I network.
PM550 CIM users should refer to Appendix C for different media length factors.
Host
Computer
the media is shielded twisted pair cable, such as
TIWAY I bus structure with
maximum
NOTE
RS–232–C/RS–423–A Host Interface Cable
with
UNILINK
UniLink Host Adapter ( MHU)
Figure 4–2 TIWAY I Bus Structure
TIWAY
I
UNILINK HOST
USER MANUAL
ADAPTER4–3
Page 78
THE TIWAY I NETWORK PORTS
30 25 20
15 10
8 7 6 5 4
3
Cable Distance (1000’s of feet)
2
1
19.2
k bps
38.4 k bps
57.6 k bps
1
15.2 k bps
1
15.2 k bps or lower
Cable
10 50 100 250
205
Unit Loading (Number of Stations)
Figure 4–3 Number of Local Line Secondaries vs.
Cable Distance
Belden 9860
Belden 9271
I003648
Signals are coupled between the transmission line and the transmit/receive circuits to provide a level of rejection to normal AC power frequency interference twisted 600,
1200, 2400, 4800, 9600, 19.2K, 38.4K, 57.6K, and 1 half-duplex mode and NRZI encoding. The Local synchronous
and other noise sources. Information is transferred on the TIWAY I
pair media asynchronously at user selectable data rates of 110, 150, 300,
15.2K bits per second, in
Line interface does not support
operation or NRZ.
UNILINK HOST ADAPTER 4-4
USER MANUAL
Page 79
THE TIWAY I NETWORK PORTS
4.1.2
Modem Inter
face
Port
Interface
1
Ports
Port
2
Port
3
Port
AC
4
GND
NEUTACLINE
1
2 3 4 5
Figure 4–4 RS–232–C/RS–423–A Modem Interface Ports
The

modem interface

EIA
RS–232–C standard that uses EIA RS–423–A drivers. This interface uses a
female
25-pin “D” type connector on both Ports 1 and 2 These two ports support redundant media transmission when connected to redundant modem networks. The pin assignments shown in Table 4–3 are supported. caused
All other pins should be left vacant to prevent damage which may be
by non-standard pin usage.
is a standard “T
ype E” DTE configuration as defined in the
as shown in Figure 4–4.
I/O
A000654
UNILINK HOST
USER MANUAL
ADAPTER4–5
Page 80
THE TIWAY I NETWORK PORTS
Table
The line drivers and receivers meet the requirements for the RS–423–A and RS–232–C standards. The modem interface is user–selected for either asynchronous or synchronous operation at data rates of 110, 150, 300, 600, 1200,
Modem interface circuits can be longer than the 25,000 feet limit of the Local Line interface. This interface must be used for cross-building or cross-town circuits. Non-intelligent refers to the class of modems that do not have an internal command have meet modems data necessary because TIWAY I uses the bit-oriented HDLC protocol to transfer information provide
4–3
Interchange
2400, 4800, 9600, 19.2K, 38.4K, 57.6K, and 1
The modems used must be non-intelligent and
an
internal command set and should not be used. Generally
the Bell 103, 202, and 208 specifications will work, but the Bell 212A class
will not. In addition to being non-intelligent, the modems must support
transparency which means no start bits, no stop bits,
data transparency
RS–232–C/RS–423–A “D” Connector Pin Assignment
Circuit
AA 1 101 AB BA
BB CA CB CC CD
CF DB DD
set. Modems such as the Hayes Smartmodemand
between devices.
Connector
Pin No.
7 2 3 4 5 6
20
8 15 17
Most short haul modems are non–intelligent and
.
CCITT Description
102 103 104 105 106 107
108/2
109
114 115
Protective Ground Signal Ground T
ransmitted Data Receive Data Request To Send Clear To Send Data Set Ready Data Terminal Ready Recieve Line Signal
Detector
T
ransmitter Signal
Element
Reciever Signal
Element
15.2K bits per second.
have data transparency
and no parity
Timing Timing
compatibles
, modems that
do
. This is
.
UNILINK HOST ADAPTER 4-6
USER MANUAL
Page 81
THE TIWAY I NETWORK PORTS
You also have a choice of using either NRZ or NRZI encoding with the modem interface.
A special Clear-to-send (CTS) to transmit timing delay has been provided for use There is also an RTS/CTS timeout. These delay values are set through configuration
NRZI is recommended because of its self-clocking properties.
with radio link modems, ranging from 0 ms to 1,000
commands described in Chapter 2 and Chapter 5.
ms in 10 ms increments.
4.1.3
Runaway T
The UNILINK Host Adapter is equipped with a timeout or runaway transmitter recovery mechanism which ensures that the transmitter does not remain turned on longer than twice the time required to send the maximum length a
hardware reset, discarding all macro buffers and any outstanding directives.
ransmitter Recovery
message. If the transmission exceeds this limit, the adapter will
perform
NOTE
The hardware reset restores the adapter to the initialized or power-up state. At this point, the adapter
will have to be reconfigured and the network
restored to its operating state.
UNILINK HOST
USER MANUAL
ADAPTER4–7
Page 82
THE TIWAY I NETWORK PORTS

4.2 REDUNDANT MEDIA TRANSMISSION

Most TIWAY I conformant devices support a redundant media scheme which provides Should access to a device fail on one channel, communications can be automatically or manually switched to the alternate channel. This type of a circuit is illustrated in Figure 4–5. Examples of the software commands are given
active access to a device over one of two independent media
in Chapter 2.
channels.
UNILINK
Bus
(main trunk)
Drop
Cables
Secondary Bus (alternate trunk)
Up to 254 Secondaries
Figure 4–5 Redundant Media Circuit
NOTE
Redundant mission reliability. However
media is
provided to improve a network’
, the adapter cannot use the dual media ports to access two independent networks.
s
UNILINK HOST ADAPTER 4-8
USER MANUAL
Page 83
THE TIWAY I NETWORK PORTS

4.3 TIWAY I HDLC NETWORK PROTOCOL

The TIWAY I network uses the HDLC protocol in the unbalanced, normal response mode (UNRM) for transmission of commands and responses. In this mode a single Network Manager (primary) controls the flow of messages between secondary devices. Information flows between the primary and secondaries inside HDLC I-Frames or information frames. The destination of the
frame is specified by the address field, the nature of the frame by the field, and any data specified by the information field. The TIWAY I primitive requests and responses are encapsulated inside HDLC I-Frames according to the
format shown in Figure 4–6.
Flag Address Control Information FCS Flag
Figure 4–6 HDLC Frame
control
UNILINK HOST
USER MANUAL
ADAPTER4–9
Page 84
THE TIWAY I NETWORK PORTS

4.4 SETTING THE NETWORK PORTS PARAMETERS

The
network ports must be explicitly enabled with the CONFIGURE HIU and CONFIGURE NETWORK MANAGER commands. The syntax for these commands these
The choice of the host port protocol also determines whether network port parameters can be defined on the dipswitches or through internal constants. The BDLC protocol uses both dipswitches to define the host port parameters and
will use these internal constants for network defaults:
D
is given in Chapter 5. The network parameters specified explicitly in
commands overrides the default values set by the dipswitches.
Local Line media — d 1
15.2K baud,
d
half duplex,
d
asynchronous, and
d NRZI
D
RS–232–C/RS–423–A media —
d
9600 baud,
d
full duplex,
d
synchronous, and
d NRZ
The NITP protocol uses the values defined on Dipswitch 1 as the defaults as shown
in Figure 4–7. The network parameters are then set with Positions 2–8 of Dipswitch given in Table 4–4. These settings should match the settings for any other T IWAY
1 as illustrated in Figure 4–7. The applicable baud rate settings are
I network devices.
UNILINK HOST ADAPTER 4-10
USER MANUAL
Page 85
THE TIWAY I NETWORK PORTS
DIPSWITCH 1
1
2345678910
U P
MSB LSB
UP = SYNCHRONOUS DOWN = ASYNCHRONOUS
UP = FULL DUPLEX DOWN = HALF DUPLEX
UP = NRZI DOWN = NRZ
UP = NITP
HOST COMMAND
TIMEOUT
TIWAY I BAUD RATE
TIWAY I
TIWAY I
TIWAY I
Figure 4–7 Network Port Dipswitch Settings
NOTE
The Local Line interface will always be asynchronous, half duplex, and use NRZI encoding regardless of the setting of these dipswitches.
Table 4–4 Network Port Baud Rates
MSB LSB
5678 0
100 1
0
0 0 0 1 1 1 1 1 1 111
1 1 0 0 0 0 1 1
1
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
0
1
1
0
1
1
01= Down
= Up
Network
Baud Rate
110 150 300 600
1200 2400 4800
9600 19200 38400 57600
115200
UNILINK HOST
ADAPTER4–11
USER MANUAL
Page 86
CHAPTER
5
HOST
COMMAND SET REFERENCE

5.1 INTRODUCTION

This chapter presents the syntax for each command. The command syntax
5.1.1
descriptions at 00 to FE hexadecimal). The command syntax conventions are defined in Paragraph 5.1.1. Certain network address values have special meanings and are
described in Paragraph 5.1.3.
Paragraph 5.8 provides a summary of the command syntax including both the command and response syntax. Paragraph 5.9 provides a list of the command codes
and descriptions, listed in numerical order and Paragraph
similar

Command Syntax Conventions

begin in Paragraph 5.2 and are listed in numerical order (starting
list that groups the commands according to their use.
Command
Code
Parameter#1Parameter
#2
5.10 provides a
Parameter
#n
Figure 5–1 Command String Structure
Command strings contain the one-byte command code and may include one or more parameters as defined by each command’s syntax. All values in the command string are in hexadecimal notation. The selected host interface protocol, transferred in binary format or converted to ASCII characters. The following conventions are used to define the command syntax used in the succeeding sections:
discussed in Chapter 3, will determine whether the command string is
D The most significant bit, labeled Bit 0, is the left most bit in the byte,
word,
or long word.
D All command code numbers are one byte, hexadecimal values and will
always
D Each letter in a command parameter indicates a nibble (four bits) so
that
d
d
d
be the first byte in the command string.
a: byte is represented as aa word is represented as aaaa and a long word is represented as aaaaaaaa
D Parameters containing more than eight nibbles (long word) are
represented
as aaaa...
UNILINK HOST
USER MANUAL
ADAPTER5–1
Page 87
HOST COMMAND SET REFERENCE
D
All codes and parameters are separated by spaces.
D
Optional parameters are surrounded by parentheses, like (aa bb).
D Parameter sequences that may be repeated are surrounded by
brackets,
like [aa bb].
D Certain
command
d
d
d
d oo — the option code. Commands may have one or more option
d pppp...
letters designate a specific parameter type
syntax descriptions for easier identification. These are: aa — the secondary device address. ss — the Source Identification number rr — the reset counters code.
codes.
— a TIWAY I Primitive.
.
used throughout the
UNILINK HOST
USER MANUAL
ADAPTER 5–2
Page 88
HOST COMMAND SET REFERENCE
5.1.2

Usage Description

A usage description is included with each command reference to give an indication of when the command should be used. The meaning of the usage descriptors
CONFIGURATION
INITIATION
OPERATION
PERFORMANCE
TERMINATION
are
This command is used to configure the adapter for operation. This command can only be issued once to each adapter after they have been reset or powered up.
This command is used to initialize the network devices.
This command is used for ongoing communications between the host computer and the network devices.
This command is used to gather statistical performance or status information on the adapter and the network devices, and to redefine certain operating parameters to improve network performance.
This command is used to shut down or terminate network devices.
UNILINK HOST
USER MANUAL
ADAPTER5–3
Page 89
HOST COMMAND SET REFERENCE
The cycle at power
Figure 5–2 Command Usage Cycle
-up or reset is shown in Figure 5–2.
Configuration
Initiation
Operation
Performance
Termination
5.1.3 Secondary
Secondary addresses are one byte in length and range from 1 to 254. The addresses Normally the address 255 is used as a shorthand method to indicate that the command should be processed for all secondary devices on the network. Care must
be
used with this shorthand method because a host command timeout may
occur
before the response has been gathered from all of the secondaries.
Your network will operate more efficiently if you number your secondary devices remaining
and HIUs beginning with address
Addr
esses
0 and 255 are reserved for special functions as indicated in T
“1” and consecutively numbering the
devices.
able
5–1.
UNILINK HOST
USER MANUAL
ADAPTER 5–4
Page 90
HOST COMMAND SET REFERENCE
Table 5–1 Secondary Addresses
5.1.4 Active
Figure 5–3 is a decision tree illustrating the command codes that are active in each configurable mode. In addition to mode, the command tree asks whether the
major components have been configured with their associated configuration
commands.
Intended Mode
MHIU EHA
Decimal Address
0
1–254
255
Hexadecimal
Address
00
01–FE
FF
Command Codes In Each Mode
Adapter Configured (Command 20)
YES
NO
HIU Configured (Command 1 and Initialized by Network Manager
1)
Usage
Reserved for special functions, refer to individual commands.
A
vailable for secondary device
addresses. Reserved for special functions,
normally used to indicate all secondary devices are to be ef
fected by the command.
Active
Network
Manager Configured (Command 30)
1–8, 21, FC–FF 1–8, 20–21. FC–FF
Command Codes
Power
up
HIU EHA
NM
MHIU
HIU
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
Figure 5–3 Active Command Tree
1, 2, 4–8, 21,FC–FF 20, 21,FC–FF
21, 31–38, FC–FF 21, 30–32, 34–38, FC–FF
20, 21 FC–FF 1–2, 4–10, 12–1C, 21, 30–32, 31–38, FC–FF 6–8, 10–1C, 21, 30–32, 34–38, FC–FF
6–8, 10–1C, 21, 31–38, FC–FF 6–8, 10–1C, 21, 30–32, 34–38, FC–FF
1–2, 4–10, 12–1C, 21, FC–FF 6–8, 10–1C, 21, FC–FF
20, 21, FC–FF
UNILINK HOST
ADAPTER5–5
USER MANUAL
Page 91
HOST COMMAND SET REFERENCE

5.2 ERROR RESPONSE

An ERROR RESPONSE, rather than the normal command response, will be returned
when the host request is invalid.
Response: 00
Parameters:
dddd Error codes. All error codes and corrective actions are given in
aa The secondary address associated with the error code. This
dddd (aa)
Chapter
parameter
6.
is only included if applicable.
UNILINK HOST
USER MANUAL
ADAPTER 5–6
Page 92
HOST COMMAND SET REFERENCE

5.3 BASE HIU COMMANDS

The
Base HIU commands are backward
for
the TIWAY I Host Adapter to be issued to connect and disconnect secondaries, send data to and from secondaries, and read secondary statistics. Your applications software must wait for a response to be returned before issuing another command if you are using
the NITP protocol. If you are using the BDLC protocol, you can have up to two outstanding transactions before the adapter will return the Receiver Not Ready
(RNR) BDLC control frame. These commands are listed below
Send Network Data — 01
Broadcast Network Data — 02
Poll Secondary — 03 (Available only in MHIU/EHA mode)
Connect Secondaries — 04
Disconnect Secondaries — 05
Read Secondary Log — 06
. These commands cause a direct network request
compatible with the original commands
.
Read Secondary Diagnostics — 07
Read Adapter Diagnostics — 08
These commands will not be accepted by either the hosted or the stand-alone Network
Manager modes.
UNILINK HOST
USER MANUAL
ADAPTER5–7
Page 93
HOST COMMAND SET REFERENCE
5.3.1
Send Network Data — 01
The SEND NETWORK DATA command sends a specified host Primitive to a network secondary via the Network Manager. Once the Primitive has been received by the secondary, the Network Manager polls the secondary for the Primitive response and returns it to the issuing HIU. The HIU then forwards the
Primitive response to the attached host computer
Command:
Response:
Usage: OPERATION
Modes:
Parameters:
aa pppp The TIWAY I Primitive data (command or response). This
01 aa pppp...
01 aa pppp...
MHIU/EHA, HIU/EHA, MHIU, HIU
The secondary address to receive the Primitive data.
parameter
begins with the length field of the Primitive.
.
UNILINK HOST
USER MANUAL
ADAPTER 5–8
Page 94
HOST COMMAND SET REFERENCE
5.3.2 Br
The BROADCAST NETWORK DATA TRANSFER command sends the Primitive data to all online secondary devices. The secondary device log contains this checks
If the adapter is configured as an MHIU in EHA mode, the host applications software must issue a POLL command for each secondary device to collect the responses include a data element that is set in the secondary with the broadcast and checked by the host applications software by sending a SEND NETWORK DATA element can also be checked by the secondary devices program to cause it to perform a programmed process. This function can be more efficiently handled in
oadcast Network Data T
only those secondary devices in the network that are online. However
type of
non-MHIU/EHA networks by using macros for data acquisition.
information transfer does not use the full TIWAY I HDLC integrity
to ensure message delivery
or some responses may be lost. In any other configuration, you should
command to determine if the broadcast message was received. The
ransfer — 02
.
NOTE
Before the data is broadcast, all pending TIWAY I I–Frames from all HIUs will be processed. Then no further directives will be processed until the broadcast completes. This could have a serious impact on the response time for normal network operations and should be used carefully.
,
data
The
following are typical uses for this command. Time synchronization for all secondary devices. This could be used to
signal all secondaries to reset their counters at the beginning of a production
Data collection via a snapshot read. The broadcast could signal the
secondaries to move data to a designated area in the secondary device which command.
period.
will be retrieved later with a POLL or SEND NETWORK DA
UNILINK HOST
TA
ADAPTER5–9
USER MANUAL
Page 95
HOST COMMAND SET REFERENCE
CAUTION
You should not issue the BROADCAST NETWORK network contains Intelligent Tank Transmitters (ITTs) as secondary devices, or you could lose responses. Also, sending a BROADCAST NETWORK DATA TRANSFER command when your adapter is configured as either
an MHIU or an HIU will cause a network HDLC error to be logged even though the information was received. This error will be included in the statistics from the READ SECONDARY DIAGNOSTICS, REPORT HIU STATUS, REPORT NETWORK MANAGER SECONDARY STATISTICS and the REPORT NETWORK MANAGER NETWORK STATISTICS commands.
DATA TRANSFER command if
your
Command: 02
Response: 02
Usage: OPERATION
Modes:
Parameters:
MHIU/EHA,
pppp
pppp...
The TIWAY I Primitive request. This parameter begins with the length field of the Primitive.
HIU/EHA, MHIU, HIU
UNILINK HOST
USER MANUAL
ADAPTER 5–10
Page 96
HOST COMMAND SET REFERENCE
5.3.3
Poll Secondary — 03
The POLL SECONDARY command is issued to collect the responses to the broadcast the Network Manager (NM). This command is only valid for an adapter configured
Command: 03
Response: 03
Usage: OPERATION
Modes:
Parameters:
command or a SEND NETWORK DATA command that timed out
as an MHIU in EHA mode.
aa
aa pppp...
MHIU/EHA
aa The pppp The TIWAY I Primitive data response. This parameter begins
secondary address being polled.
with
the length field of the Primitive.
in
UNILINK HOST
USER MANUAL
ADAPTER5–11
Page 97
HOST COMMAND SET REFERENCE
5.3.4
Connect Secondaries — 04
The CONNECT SECONDARIES command logically connects one or more secondaries to the network. Each host computer must issue this command for the
secondary devices that it will be communicating with.
Trying
to connect many secondary devices at the same time could cause the host command time-out to expire if the secondary devices do not respond in that time limit.
If this occurs, the error response will be returned and the host computer will have to retrieve the secondary log to determine which secondary devices were
connected.
Command: 04 [aa]
Response: 04 [bb]
Usage: INITIATION
Modes:
Parameters:
MHIU/EHA,
aa The
will
HIU/EHA, MHIU, HIU
secondary addresses to be connected. Specifying
attempt to connect all secondaries.
address FF
bb The
none
secondary addresses that
of the secondaries addressed were connected.
connected properly
. If bb is 00 hex,
UNILINK HOST
USER MANUAL
ADAPTER 5–12
Page 98
HOST COMMAND SET REFERENCE
5.3.5
Disconnect Secondaries — 05
The DISCONNECT SECONDARIES command removes the specified secondaries from the secondary log and automatically disables associated macros, processing when it was initialized, then this command also issues a DISC directive that logically disconnects (possibly causing the secondary device to perform a hardware reset) the specified secondary from the network. This does not prevent another HIU or the background monitor from reconnecting the secondary. Once a secondary device is logically disconnected, it will appear offline the
Trying address FF hex, could cause the host command timeout to expire if the secondary RESPONSE secondary
Command: 05 [aa]
Response: 05 [bb]
setting their MRSWs to the appropriate T
this
command was given permission to issue a DISC on the network
to all HIUs on
exception flag and MRSWs for any macros associated with that secondary
to disconnect many secondary devices at the same time, using the global
devices cannot respond in that time limit.
will be returned
log to determine which secondary devices were disconnected.
the network, causing the remaining network HIUs to set
and your applications software should retrieve the
ermination Code. If the HIU
If this occurs, the ERROR
.
Usage: TERMINATION
Modes:
Parameters:
MHIU/EHA,
aa The secondary addresses to be disconnected. Specifying address
FF will attempt to disconnect all secondary devices listed in the secondary
bb The secondary addresses that disconnected properly. If bb is 00
hex,
HIU/EHA, MHIU, HIU
log.
none of the secondaries addressed were disconnected.
UNILINK HOST
USER MANUAL
ADAPTER5–13
Page 99
HOST COMMAND SET REFERENCE
5.3.6
Read Secondary Log — 06
The READ SECONDARY LOG command returns the list of secondaries that are
logically connected to the HIU.
Command: 06
Response:
Usage: OPERATION
Modes:
Parameters:
aa The secondary addresses currently connected to the HIU. If no
06 [aa]
MHIU/EHA,
secondaries
HIU/EHA, MHIU, HIU
are connected, the value returned will be 00.
UNILINK HOST
USER MANUAL
ADAPTER 5–14
Page 100
HOST COMMAND SET REFERENCE
5.3.7
Read Secondary Diagnostics — 07
The READ SECONDARY DIAGNOSTICS command returns statistics for the specified secondary device. Only counts related to the issuing HIU are returned. With the exception of the number of I–Frames transmitted to and from the secondary, these counters do not represent an exact count of events and
are intended only to show trends that may indicate problems. The will not be updated for offline secondaries or after reaching their maximum value
of FFFF
this
command with the reset counter code.
Command: 07
Response: 07
Usage: PERFORMANCE
Modes:
Parameters:
aa The
. The host computer must explicitly reset the counters by issuing
aa (rr)
aa (bbbb cccc dddd eeee ffff gggg hhhh iiii)
MHIU/EHA,
reset code parameter is set to 01, the statistics counters for all secondaries will be reset. The special address cannot be used to return
HIU/EHA, MHIU, HIU
secondary address. If the special address FF is used and the
the statistics counters for all secondaries simultaneously
counters
.
rr The reset statistics counters code. This optional parameter was
added to the original TIWAY I Host Adapter command to allow the
counters to be reset.
00 = Return the statistics counters for the specified secondary, but
do not reset the counters.
01
= Reset the statistics counters for the specified secondary and do not return any counts. Only the address field the
command code when this option is selected. bbbb cccc The number of TIWAY I HDLC I–Frames successfully
dddd The number of network errors including CRC errors, timeouts,
eeee ffff gggg The number of TIWAY I HDLC errors, including command
The number of polls successfully transmitted to the secondary
transmitted
aborts, The number of TIWAY I HDLC I–Frames received. This value will always be zero.
rejects (FRMR), invalid HDLC responses, and sequence errors. This number may reflect errors logged because a BROADCAST NETWORK DATA TRANSFER command was issued in a network that contains Intelligent Tank Transmitters (ITTs) as secondary devices. These errors are logged because the ITT returned
to the secondary
and the loss of RS–232–C/RS–423–A control signals.
a REJ even though the information was received.
.
is returned with
.
UNILINK HOST
USER MANUAL
ADAPTER5–15
Loading...