hit counter script
Siemens SIMATIC TIWAY 1 User Manual
Siemens SIMATIC TIWAY 1 User Manual

Siemens SIMATIC TIWAY 1 User Manual

Unilink host adapter
Hide thumbs Also See for SIMATIC TIWAY 1:

Advertisement

Quick Links

SIMATIC TIWAY 1
UNILINK Host Adapter
User Manual
Order Number: PPX:TIWAY–8121–2
Manual Assembly Number: 2587871–0045
Second Edition

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC TIWAY 1

  • Page 1 SIMATIC 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, Figure 1–1 is a second generation host computer interface product that allows a host computer to operate and control secondary devices on a TIWAY I network. The UNILINK Host Adapter, also referred to as the “adapter”...
  • 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. The PIM, shown in Figure 1–2, contains the software that causes the UNILINK Adapter to operate as the UNILINK Host Adapter.
  • Page 4 THE UNILINK HOST ADAPTER Host Computer RS–232–C/RS–423A Host Interface (Command Processor) TIWAY I Interface Input Point TIWAY I Network Secondaries Figure 1–3 UNILINK Host Adapter Block Diagram Host Computer Port Port Port TIWAY I Ports PPX:500–7111, Dual Local Line media ports shown here. Figure 1–4 UNILINK Host Adapter Physical Features 1–3 UniLink...
  • 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 test mode that is set locally.
  • 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 TIWAY I network. The adapter provides transaction statistics collection to aid network performance tuning.
  • Page 7 THE UNILINK HOST ADAPTER The flexibility of the UNILINK Host Adapter also provides for multiple hosts as 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.
  • Page 8 Programmable Controllers (P/Cs) and other devices to one or more host computers. With the network, you can obtain, modify or replace data stored in any of the following Siemens products: SIMATIC TI520 /SIMATIC TI530 / SIMATIC TI520C /SIMATIC TI530C P/Cs...
  • Page 9 THE UNILINK HOST ADAPTER With appropriate host software, an operator can program, monitor, and control 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.
  • Page 10 1.6 TECHNICAL ASSISTANCE If you need assistance with the installation an operation of this equipment, contact your Siemens Industrial Automation, Inc. distributor or sales agent. If you need assistance in contacting your distributor or sales office in the United States, call 800–964–4114.
  • Page 11 OPERATION AND APPLICATION 2.1 INTRODUCTION This chapter provides an introduction to the UNILINK Host Adapter operation and how it can be used in typical applications. You should refer to Chapter 5 for the complete command syntax and to the Glossary for help with any unfamiliar terms.
  • Page 12 OPERATION AND APPLICATION Performance Applications Flexibility Basic HIU 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.
  • Page 13 OPERATION AND APPLICATION Commands Host Computer 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.
  • 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 can be configured with one of these functions or they can be combined to form a Master Host Interface Unit (MHIU).
  • Page 15 OPERATION AND APPLICATION 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 memory area is used for a Secondary Log. As commands are 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.
  • 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, routes them to the designated secondary devices, and returns the secondary response to the HIU that issued the request.
  • Page 17 OPERATION AND APPLICATION 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) 2.3.3 The Master Host Interface Unit Mode The Master Host Interface Unit (MHIU) is a combination of the HIU and NM...
  • Page 18 OPERATION AND APPLICATION 2.3.4 Typical Network Applications 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 as the host interface and network manager. Host Com- puter UniLink Host Adapter ( MHU)
  • Page 19 OPERATION AND APPLICATION Host Com- puter UNILINK UniLink Host Adapter (MHU) Figure 2–8 Typical Multiple Host Network Host Com- puter Host UNILINK Com- puter Figure 2–9 NM Network 2–9 Host Com- puter UNILINK UniLink Host Adapter (MHU) Host Com- puter UNILINK UNILINK (HIU)
  • Page 20 OPERATION AND APPLICATION 2.3.5 The Emulate Host Adapter Modes 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, code 03, is not available in the HIU/EHA mode.
  • Page 21 OPERATION AND APPLICATION TIWAY I Host Software can be used with adapters in a multiple host network. However, you must define an HIU address using the XPAR subroutine and the CONFIGURE HIU command, and you cannot use the POLL command. 2–11 UNILINK HOST ADAPTER USER MANUAL...
  • 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.
  • Page 23 OPERATION AND APPLICATION operating mode to the value specified. The only operating mode that can not be 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 by dipswitch settings described in Chapter 3 and Chapter 4.
  • Page 24 OPERATION AND APPLICATION At any time, your applications software can retrieve the current values for these parameters by issuing the REPORT ADAPTER CONFIGURATION command, 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 ADAPTER command was previously processed.
  • Page 25 OPERATION AND APPLICATION 2.5.5 Configuring the Standalone Network Manager The Standalone Network Manager (SANM) mode is configured completely with dipswitch settings. The definition for some of the dipswitch positions is different 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.
  • Page 26 OPERATION AND APPLICATION Since the SANM cannot accept any NM commands, Positions 1–7 of Dipswitch 2 define certain Network Manager function options normally configured with the CONFIGURE NETWORK MANAGER command. When Position 1 of Dipswitch 2 is up, it selects a one-half second delay after CTS is active.
  • Page 27 OPERATION AND APPLICATION 2.6 SPECIAL NETWORK MANAGER FEATURES The adapter provides two special features in the MHIU and NM operating modes. First is the redundant media channels with selectable automatic media channel switching. Second is the background monitor that will bring devices online dynamically.
  • Page 28 OPERATION AND APPLICATION offline, and if the secondary is an HIU. The Network Manager normally cycles through the secondary device log and checks to see if there are any outstanding directives or responses. In addition, it will also select one secondary device address per cycle to perform a link status check.
  • Page 29 OPERATION AND APPLICATION 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 device address value in the CONFIGURE ADAPTER command.
  • 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 —...
  • Page 31 OPERATION AND APPLICATION 2.7.2 Primitive 03 Response The Primitive 03 response will be returned as follows. LLLL 03 HH DDDD EEEE FFFF GGGG IIII JJJJ KKKKKKKK Where 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,...
  • Page 32 OPERATION AND APPLICATION 2.8 MODE INDEPENDENT OPERATIONS The mode independent commands perform hardware and software resets, and external I/O point operations regardless of the operating modes. 2.8.1 Reset Commands There are two reset commands that can be sent to the UNILINK Host Adapter regardless of the operating mode.
  • Page 33 OPERATION AND APPLICATION 2.8.2 The External Input/Output Points The UNILINK Adapter provides a single external input point and a single external output point. These two points operate independently and can be used 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.
  • Page 34 OPERATION AND APPLICATION 2.8.2.1 The External Input Point The input point latches a high level. The option parameter of the REPORT EXTERNAL INPUT STATUS command determines when to reset and latch the external input. The values for the command option are: 00 = Read the input, do not reset the latch.
  • 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, and retrieve basic statistics.
  • Page 36 OPERATION AND APPLICATION 2.9.2 Sending Data To And From Secondary Devices 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 I Primitives provide control functions such as reading and writing data elements, controlling the operating mode, and testing the status and configuration of the secondary devices.
  • Page 37 OPERATION AND APPLICATION 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.
  • Page 38 OPERATION AND APPLICATION 02 0002 11 00 03 01 03 01 0002 11 01 03 02 03 02 0002 11 01 03 03 Example 2–1 BROADCAST/POLL Example 2.9.3 Retrieving Secondary Statistics The UNILINK Host Adapter maintains network statistics for the logically connected secondaries on the network.
  • Page 39 OPERATION AND APPLICATION 2.9.4 Taking Secondary Devices Off-line The DISCONNECT SECONDARIES command performs the opposite function 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.
  • 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 What Are Macros? 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.
  • Page 41 OPERATION AND APPLICATION 2.10.1.2 Repetitive and Non-Repetitive Macros 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 once and collect one macro response, functioning much like a direct command. 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 Primitive...
  • Page 42 OPERATION AND APPLICATION 2.10.2 The Parts of a Macro 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. The macro buffer is referenced by a unique buffer number assigned by the HIU function when the buffer is allocated.
  • 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 a response 30 bytes long, and another macro to disconnect secondary #5.
  • Page 44 OPERATION AND APPLICATION 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.
  • Page 45 OPERATION AND APPLICATION 2.10.4 Setting Up A Macro Figure 2–16 flowcharts the steps for setting up macros. Commands for checking available memory are not included in the flowchart, but are described in the sections that follow. Figure 2–16 Macro Setup Procedure (START) Allocate A Source ID...
  • Page 46 OPERATION AND APPLICATION 2.10.4.1 Allocate A Source Identification Number 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.
  • Page 47 OPERATION AND APPLICATION 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.
  • Page 48 OPERATION AND APPLICATION 2.10.4.3 Define The Macro Use the DEFINE MACRO command, code 14, to define the macro and the macro options. Figure 2–18 shows the DEFINE MACRO command frame. Macros can connect a secondary, disconnect a secondary, or send a Primitive to a secondary. These three functions are the macro types as shown in Table 2–2.
  • Page 49 OPERATION AND APPLICATION 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.
  • Page 50 OPERATION AND APPLICATION LSB Byte 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 Example 2–3 Macro Options Byte — Bit Coding The minimum macro reissue delay time word or double byte specifies the number of milliseconds to delay before reissuing a repetitive macro.
  • Page 51 OPERATION AND APPLICATION You can request more than one buffer at a time; however, be sure that the total combined length of each buffer response does not exceed the maximum message length, or the ERROR RESPONSE will be returned. The Primitive data must fit into one host response I-Frame.
  • Page 52 OPERATION AND APPLICATION 2.10.6 Enabling and Disabling Macros The ENABLE/DISABLE MACRO EXECUTION command explicitly enables and/or disables defined macros for execution. When this command is processed the exception flag will be cleared and the MRSW reset to 0000 hex if the macro is being enabled, or the MRSW set to the disabled Termination Code 8001 hex if the macro is being disabled.
  • Page 53 OPERATION AND APPLICATION 2.10.8 Checking Memory Usage There is a certain amount of housekeeping that your host application programs will need to do for the flexibility provided by macros. Your programs should apply the following rules. Your programs must assign and keep track of the Source Identification numbers.
  • Page 54 OPERATION AND APPLICATION UNILINK Host Adapter Macro Response Buffer #A Macro Response Buffer #B Figure 2–19 Link Macro Store and Forward Operation Both macros must be disabled before the LINK MACRO command will be accepted. The trigger macro must be a valid Primitive 20 or A0 to read data from the secondary device.
  • Page 55 OPERATION AND APPLICATION Once the action macro has successfully completed, the trigger macro behaves as though the link never existed. If it is a repetitive macro, it will be enabled. The trigger macro’s exception flag is also set as though the link never existed except that it will not be set until the action macro has completed execution.
  • Page 56 OPERATION AND APPLICATION 2.10.10.2 NM Buffer Allocation 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 to each HIU function as the NM function brings it online.
  • Page 57 OPERATION AND APPLICATION 2.10.10.3 Adjusting An HIUs Bandwidth 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 reset.
  • Page 58 OPERATION AND APPLICATION 2.10.10.4 Performance Statistics 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. REPORT NETWORK MANAGER SECONDARY STATISTICS command, code 37, returns statistics for a specific secondary device.
  • Page 59: Configuring The

    CHAPTER 3 CONFIGURING THE HOST COMPUTER PORT 3.1 THE HOST COMPUTER INTERFACE The UNILINK Host Adapter communicates with a wide range of host computer 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;...
  • 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 “D”...
  • Page 61 CONFIGURING THE HOST COMPUTER PORT Table 3–1 RS–232–C/RS–423–A “D” Connector Pin Interchange Connector Circuit Since the adapter will typically be operating in noisy industrial environments, it is recommended that the cable length not exceed 50 feet. 3.2.1 Connection to DCE Equipment Port 3 is configurable for synchronous or asynchronous modem operation, even, odd, or no parity, and baud rates up to 38.4K bits per second.
  • Page 62 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 not exceed 50 feet in length. You may order this cable from your Siemens distributor (P/N;VPU–200–3605).
  • Page 63 CONFIGURING THE HOST COMPUTER PORT The IBM PC/ATr uses a 9-pin “D” connector for its serial interface port. A null modem cable diagram for the IBM PC/AT port is shown in Figure 3–5. IBM PC/AT 9–Pin Figure 3–5 IBM PC/AT 9-Pin Null Modem Cable Diagram UNILINK Host Adapter 25–Pin 3–5 UNILINK HOST ADAPTER...
  • Page 64 CONFIGURING THE HOST COMPUTER PORT 3.2.3 Multidrop Host Interface Circuit You can multidrop up to 32 adapters using modems in a multipoint circuit as shown in Figure 3–6. This allows the host computer to control multiple TIWAY I networks; however, each adapter must use the BDLC protocol. Each adapter must be assigned a unique address with dipswitches.
  • Page 65 CONFIGURING THE HOST COMPUTER PORT 3.2.4 XON/XOFF Flow Control 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 control characters sent from the host computer. Transmission will stop within four characters after XOFF is received from the host.
  • 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).
  • Page 67 CONFIGURING THE HOST COMPUTER PORT The host computer must wait for the adapter response for the command issued, before another command can be issued. This command/response sequence, illustrated in Figure 3–8, ensures that the response matches the command. It is designed to work with a wide range of ASCII host devices, from ASCII terminals to intelligent workstations.
  • Page 68 CONFIGURING THE HOST COMPUTER PORT The BDLC protocol is a byte–oriented subset of the ANSI X3.66 standard protocol, similar to the ISO standard HDLC protocol. The major features of the BDLC protocol are listed below. It provides a higher level of data integrity and throughput improvements over NITP, but it is also more complex to implement.
  • Page 69 CONFIGURING THE HOST COMPUTER PORT Host Computer BDLC Host Command BDLC Host Command RR, “Poll” RR, “Poll” 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.
  • Page 70 CONFIGURING THE HOST COMPUTER PORT 3.3.1.1 Setting the Host Port Parameters The host port communication parameters are configured with two 10-position dipswitches located at the front of the adapter as shown in Figure 3–3. To select NITP as the operating protocol, set position 1 of Dipswitch 1 up as shown in Figure 3–10.
  • 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 always communicates with the host computer using seven data bits, one start bit, and one stop bit. The baud rate settings for Positions 5–8 of Dipswitch 2 are shown in Table 3–2.
  • Page 72 CONFIGURING THE HOST COMPUTER PORT Position 9 on Dipswitch 2 is for selecting the adapter’s operational mode and will be 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 parameters and are discussed in more detail in Chapter 4.
  • Page 73 CONFIGURING THE HOST COMPUTER PORT Table 3–3 BDLC Protocol Address Address 0 = Down Set the adapter’s BDLC protocol address using Table 3–3 as a guide and set the positions on Dipswitch 2 to correspond with the communication parameters of the host computer.
  • Page 74 CONFIGURING THE HOST COMPUTER PORT 3.4 HOST COMMAND TIMEOUT The Host Command Timeout is the user-selectable time period that guarantees 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, the adapter will return the ERROR RESPONSE to the host computer.
  • Page 75 THE TIWAY I NETWORK PORTS 4.1 NETWORK PORTS The UNILINK Adapter offers a choice of two physical interfaces for network communications; the Local Line or Modem interfaces. The following table lists the model numbers and the type of interfaces in each. Table 4–1 UNILINK Adapter Models Model Number PPX:500–7111...
  • Page 76 THE TIWAY I NETWORK PORTS 4.1.1 Local Line Interface Port 1 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. Port 2 provides support for redundant media transmission when Ports 1 and 2 are connected to a redundant twisted pair cable network (discussed further in Paragraph 4.2 ).
  • 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 the media is shielded twisted pair cable, such as Belden 9860 or Belden 9271. Figure 4–2 shows the TIWAY I bus structure with the network trunkline cable, which can generally extend up to 25,000 feet with droplines up to 100 feet in length.
  • Page 78 THE TIWAY I NETWORK PORTS Figure 4–3 Number of Local Line Secondaries vs. Signals are coupled between the transmission line and the transmit/receive circuits to provide a level of rejection to normal AC power frequency interference and other noise sources. Information is transferred on the TIWAY I twisted pair media asynchronously at user selectable data rates of 110, 150, 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K, 57.6K, and 115.2K bits per second, in half-duplex mode and NRZI encoding.
  • Page 79 THE TIWAY I NETWORK PORTS 4.1.2 Modem Interface Port Port Port Port NEUT LINE 1 2 3 4 5 Interface Ports A000654 Figure 4–4 RS–232–C/RS–423–A Modem Interface Ports The modem interface is a standard “Type E” DTE configuration as defined in the EIA RS–232–C standard that uses EIA RS–423–A drivers.
  • Page 80 THE TIWAY I NETWORK PORTS Table 4–3 RS–232–C/RS–423–A “D” Connector Pin Assignment Interchange Circuit 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, 2400, 4800, 9600, 19.2K, 38.4K, 57.6K, and 115.2K bits per second.
  • Page 81 THE TIWAY I NETWORK PORTS You also have a choice of using either NRZ or NRZI encoding with the modem interface. NRZI is recommended because of its self-clocking properties. A special Clear-to-send (CTS) to transmit timing delay has been provided for use with radio link modems, ranging from 0 ms to 1,000 ms in 10 ms increments.
  • Page 82 THE TIWAY I NETWORK PORTS 4.2 REDUNDANT MEDIA TRANSMISSION Most TIWAY I conformant devices support a redundant media scheme which provides active access to a device over one of two independent media channels. Should access to a device fail on one channel, communications can be automatically or manually switched to the alternate channel.
  • 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.
  • 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 is given in Chapter 5. The network parameters specified explicitly in these commands overrides the default values set by the dipswitches.
  • Page 85 THE TIWAY I NETWORK PORTS DIPSWITCH 1 = SYNCHRONOUS DOWN = ASYNCHRONOUS = FULL DUPLEX DOWN = HALF DUPLEX = NRZI DOWN = NRZ = NITP Figure 4–7 Network Port Dipswitch Settings NOTE Local Line interface asynchronous, half duplex, and use NRZI encoding regardless of the setting of these dipswitches.
  • Page 86 HOST COMMAND SET REFERENCE 5.1 INTRODUCTION This chapter presents the syntax for each command. The command syntax descriptions begin in Paragraph 5.2 and are listed in numerical order (starting at 00 to FE hexadecimal). The command syntax conventions are defined in Paragraph 5.1.1.
  • Page 87 HOST COMMAND SET REFERENCE All codes and parameters are separated by spaces. Optional parameters are surrounded by parentheses, like (aa bb). Parameter sequences that may be repeated are surrounded by brackets, like [aa bb]. Certain letters designate a specific parameter type used throughout the command syntax descriptions for easier identification.
  • 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 are CONFIGURATION This command is used to configure the adapter for operation.
  • Page 89 HOST COMMAND SET REFERENCE The cycle at power-up or reset is shown in Figure 5–2. Configuration Initiation Operation Performance Termination Figure 5–2 Command Usage Cycle 5.1.3 Secondary Addresses Secondary addresses are one byte in length and range from 1 to 254. The addresses 0 and 255 are reserved for special functions as indicated in Table 5–1.
  • Page 90 HOST COMMAND SET REFERENCE Decimal Address 1–254 5.1.4 Active Command Codes In Each Mode 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.
  • 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 dddd (aa) Parameters: dddd Error codes. All error codes and corrective actions are given in Chapter 6.
  • Page 92: Table Of Contents

    HOST COMMAND SET REFERENCE 5.3 BASE HIU COMMANDS The Base HIU commands are backward compatible with the original commands for the TIWAY I Host Adapter. These commands cause a direct network request to be issued to connect and disconnect secondaries, send data to and from secondaries, and read secondary statistics.
  • Page 93: Send Network Data

    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.
  • Page 94: D Broadcast Network Data

    HOST COMMAND SET REFERENCE 5.3.2 Broadcast Network Data Transfer — 02 The BROADCAST NETWORK DATA TRANSFER command sends the Primitive data to all online secondary devices. The secondary device log contains only those secondary devices in the network that are online. However, this type of information transfer does not use the full TIWAY I HDLC integrity checks to ensure message delivery.
  • Page 95 HOST COMMAND SET REFERENCE should NETWORK DATA TRANSFER command if your network 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.
  • 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 command or a SEND NETWORK DATA command that timed out in the Network Manager (NM). This command is only valid for an adapter configured as an MHIU in EHA mode.
  • Page 97: Connect Secondaries

    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.
  • Page 98: Disconnect Secondaries

    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, setting their MRSWs to the appropriate Termination Code. If the HIU processing this command was given permission to issue a DISC on the network 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.
  • Page 99: Read Secondary Log

    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: 06 [aa] Usage: OPERATION Modes: MHIU/EHA, HIU/EHA, MHIU, HIU Parameters: The secondary addresses currently connected to the HIU.
  • Page 100: Read Secondary Diagnostics

    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.
  • Page 101 HOST COMMAND SET REFERENCE hhhh This value will always be zero. iiii The number of times the secondary has been initialized as a direct request by the HIU. UNILINK HOST ADAPTER USER MANUAL 5–16...
  • Page 102: Read Adapter Diagnostics

    HOST COMMAND SET REFERENCE 5.3.8 Read Adapter Diagnostics — 08 The READ ADAPTER DIAGNOSTICS command returns statistics for the entire network related to the issuing HIU. With the exception of the number of I–Frames transmitted to and from the secondaries and the number of various commands issued to the HIU, the statistics counters do not represent an exact count of the events and are intended only to show trends that may indicate problems.
  • Page 103 HOST COMMAND SET REFERENCE jjjj The number of valid RESET ADAPTER commands processed. kkkk The number of polls transmitted to secondaries. llll The number of TIWAY I HDLC I–Frames transmitted to secondaries. mmmm The number of network errors including CRC errors, timeouts, aborts, and the loss of RS–232–C/RS–423–A control signals.
  • Page 104 HOST COMMAND SET REFERENCE 5.4 THE EXTENDED HIU COMMANDS The Extended HIU commands enhance the original TIWAY I Host Adapter command set by providing improved performance and operation. Some of the functions provided by these commands are the definition and operation of macros, HIU bandwidth adjustment, and the reporting of network status and statistical information.
  • Page 105 HOST COMMAND SET REFERENCE 5.4.1 Allocate Source Id — 10 The ALLOCATE SOURCE ID command establishes a source identification number that maintains the independence of task resources. This number is the link between the host applications task and the associated macro resources. This command can be issued at anytime after the Configure Adapter command, code 20, has been processed.
  • Page 106 HOST COMMAND SET REFERENCE 5.4.2 Configure HIU Command — 11 The CONFIGURE HIU command enables the HIU function/TIWAY I network interface. It also configures the TIWAY I network parameters. This command can only be issued once, after the adapter is reset or powered–up and the mode configured, and must be issued before the HIU function can begin communications.
  • Page 107 HOST COMMAND SET REFERENCE Figure 5–4 CONFIGURE HIU Command — Option 01 Bit Map UNILINK HOST ADAPTER USER MANUAL 10 12 13 14 15 Not Used Baud Rate (Bit 4 is MSB) Not Used 0 = NRZ, 1 = NRZI 0 = Half Duplex, 1 = Full Duplex 0 = Asynchronous, 1 = Synchronous Table 5–2 Baud Rates...
  • Page 108 HOST COMMAND SET REFERENCE Option–02 = The maximum allowable delay between the assertion of the RTS signal and the activation of the CTS signal by the network modem. The delay is specified in milliseconds ranging from 0 to 1000 (0000 hex to 03E8 hex) in increments of 1 ms. This parameter is only used for RS–232–C/RS–423–A media and will default to 1000 ms CONFIGURATION command will return 0000 hex for this...
  • Page 109 HOST COMMAND SET REFERENCE 5.4.3 Report HIU Configuration — 12 The REPORT HIU CONFIGURATION command reports the values for the HIU options specified with the CONFIGURE HIU command. Command: Response: 12 dddddddd ff 01 vvvv 02 vvvv 03 vvvv Usage: CONFIGURATION Modes: MHIU, HIU...
  • Page 110 HOST COMMAND SET REFERENCE 5.4.4 Allocate Macro Storage Buffers — 13 The ALLOCATE MACRO STORAGE BUFFERS command allocates buffers for macro storage. This command can be repeatedly issued, and the HIU will continue to add buffers until the HIU memory is either used or a total of 254 macro buffers have been allocated.
  • Page 111 HOST COMMAND SET REFERENCE In addition to the bytes specified, 22 bytes will be added for header information. If this total count is an odd number of bytes, one byte will be added to make the count even, so that all macro buffers begin and end on word boundaries.
  • Page 112 HOST COMMAND SET REFERENCE 5.4.5 Define Macro — 14 The DEFINE MACRO command defines or redefines a macro command in the specified macro buffer. Macros must be disabled and unlinked before they can be redefined. The macro command can be redefined by reissuing this command, and the new macro will replace the old and all outstanding responses will be discarded.
  • Page 113 HOST COMMAND SET REFERENCE 02 = Connect Secondary. This macro type performs the CONNECT SECONDARY function for the single secondary device in the background mode. When the connect attempt is complete, the MRSW will be set to 8004 hex and the exception flag will be set.
  • Page 114 HOST COMMAND SET REFERENCE The macro options byte, which is bit mapped as follows: 0 = Set Exception Flag On First Response 1 = Do Not Set Exception Flag On First Response 0 = Do Not Freeze Macro and Response On Exception 1 = Freeze Macro and Response On Exception 0 = Non–repetitive Macro...
  • Page 115 HOST COMMAND SET REFERENCE eeee This parameter defines the minimum reissue delay time in milliseconds. Values range from 0 to 30,000 (0000 hex to 7530 hex) in increments of 10 ms. Values not an increment of 10 will be rounded down to the next lower 10 ms increment. This option only specifies the minimum time to wait before reissuing the macro command.
  • Page 116 HOST COMMAND SET REFERENCE 5.4.6 Gather Macro Response — 15 The GATHER MACRO RESPONSE command returns one or more macro responses to the host computer. You can choose to retrieve the entire macro response buffer data along with the MRSW or just the MRSW. You can also choose to retrieve all the buffers specified or just those with their exception flags set.
  • Page 117 HOST COMMAND SET REFERENCE MRSW Values llll The length of the Primitive field in bytes. This value also includes the Primitive length field as defined in the TIWAY I Systems Manual (PPX:500–8101–x). This field will be 0000 when the MRSW is 0000 and for connect and disconnect macro types.
  • Page 118 HOST COMMAND SET REFERENCE 5.4.7 Enable/Disable Macro Execution — 16 The ENABLE/DISABLE MACRO EXECUTION command processes a list of macro buffer numbers to either enable or disable the specific macros for execution. The exception flag is cleared for each valid macro buffer number regardless of whether the macro is being enabled or disabled.
  • Page 119 HOST COMMAND SET REFERENCE 05 = the macro buffer specified has not been defined yet. Issue the DEFINE MACRO command and then reissue this request. 06 = the macro buffer specified is the trigger macro in a link macro pair which cannot be explicitly enabled at this time because the action macro response has not returned.
  • Page 120 HOST COMMAND SET REFERENCE Example: 01 C3 00 3E 01 Example 5-1 ENABLE/DISABLE MACRO EXECUTION Command 00 C3 00 3E 07 Example 5-2 ENABLE/DISABLE MACRO EXECUTION Response Bytes 7 & 8, Enable Buffer #3E Bytes 5–6, Disable Buffer #C3 Bytes 3–4, Enable Buffer #03 Byte 2, Source Identification Number Byte 1, Command Code –...
  • Page 121 HOST COMMAND SET REFERENCE 5.4.8 Initialize Macro Response Buffer — 17 The INITIALIZE MACRO RESPONSE BUFFER command sets the MRSW to the value specified. This will cause the exception flag to be set only when the response differs from this defined response. The macro must be disabled and the exception flag cleared before this command will be accepted.
  • Page 122 HOST COMMAND SET REFERENCE 5.4.9 Report Memory Usage — 18 The REPORT MEMORY USAGE command returns the number of bytes of memory available for macro storage, the number of unused macro buffers, the number of Source Id numbers remaining of the 32 limit, and a list of the active Source Id numbers.
  • Page 123 HOST COMMAND SET REFERENCE 5.4.10 Allocate HIU Bandwidth — 19 The ALLOCATE HIU BANDWIDTH command allows an adapter configured as an HIU to control how the NM buffers allocated for its use will be used. The Network Manager allocates a fixed number of NM buffers for the HIU’s use, which is the HIU’s bandwidth.
  • Page 124 HOST COMMAND SET REFERENCE 5.4.11 Report HIU Bandwidth Allocation — 1A The REPORT HIU BANDWIDTH ALLOCATION command returns the HIU bandwidth allocation defined in the ALLOCATE HIU BANDWIDTH command. It also returns the number of I–Frame pairs and the number of data bytes sent and received by each type of macro.
  • Page 125 HOST COMMAND SET REFERENCE 5.4.12 Report HIU Status — 1B The REPORT HIU STATUS command returns the status of the HIU and statistics on network performance. The statistics for the HIU are those associated with the Network Manager to HIU communication. The counters are not incremented after reaching their maximum value and must be explicitly reset.
  • Page 126 HOST COMMAND SET REFERENCE ffff The number of times the HIU has been issued a SNRM by the Network Manager. gggg The number of times the HIU has been issued a DISC by the Network Manager. When set to 01, this parameter indicates that the Network Manager reinitialized configuration.
  • Page 127 HOST COMMAND SET REFERENCE 5.4.13 Link Macro — 1C The LINK MACRO command links two macros together to form an “unconditional store and forward” command sequence that enables host initiated secondary-to-secondary communications. The first macro reads data from a secondary device and stores it in the second macro buffer. It then triggers the second macro to write the response to another secondary.
  • Page 128 HOST COMMAND SET REFERENCE will be set, disabling the trigger macro. Once the action macro has successfully completed, the trigger macro behaves as any non-linked macro. If the trigger macro is repetitive or the freeze option detected no change, it will be enabled. The trigger macro’s exception flag will be set if a change occurred, but not until the action macro completes processing.
  • Page 129 HOST COMMAND SET REFERENCE 1. Allocate two macro buffers. The trigger response buffer will be at least eight bytes in length for Primitive 20 and at least ten bytes for Primitive A0. The action macro command buffer must be greater than or equal to the size of the trigger macro response buffer plus 2 for Primitive 20 or plus 4 for Primitive A0.
  • Page 130 HOST COMMAND SET REFERENCE Define macro 01 as a repetitive send Primitive 20 to read a block of data from secondary 05 — Command: 14 21 01 05 01 50 03E8 0006 20 01 0008 0001 Define macro 02 as send Primitive 30 to write the block of data to secondary 06 —...
  • Page 131 HOST COMMAND SET REFERENCE 5.5 ADAPTER CONFIGURATION COMMANDS The following commands explicitly define the adapter’s operating mode and will report the configuration status back to the host computer. Configure Adapter Report Adapter Configuration UNILINK HOST ADAPTER USER MANUAL 5–46...
  • Page 132 HOST COMMAND SET REFERENCE 5.5.1 Configure Adapter — 20 The CONFIGURE ADAPTER command defines the operating mode and specifies the initial configuration parameters for the UNILINK Host Adapter. This command may be issued only once after the adapter is reset or powered up. Notice that you must include Option 01 to select the operating mode.
  • Page 133 HOST COMMAND SET REFERENCE should be unique. HIUs function like other secondary devices and will use one of the available addresses as assigned. Address 00 is only valid for the default for an MHIU and cannot be specified. Option–03 = This parameter defines the maximum secondary address for the network, offering a way to save memory by not allocating storage for secondary device statistics.
  • Page 134 HOST COMMAND SET REFERENCE 5.5.2 Report Adapter Configuration — 21 The REPORT ADAPTER CONFIGURATION command returns the values specified in the CONFIGURE ADAPTER command. All parameters will be returned, even the defaults. Command: Response: 21 dddddddd ff 01 vvvv 02 vvvv 03 vvvv 04 vvvv Usage: PERFORMANCE Parameters:...
  • Page 135 HOST COMMAND SET REFERENCE 5.6 NETWORK MANAGER COMMANDS The Network Manager commands define and operate the Network Manager function of an MHIU or a Network Manager. Additional commands return statistical data as a diagnostic aid. Configure Network Manager Report Network Manager Configuration Report Secondary Link Status Switch Channel Allocate Network Manager Buffers...
  • Page 136 HOST COMMAND SET REFERENCE 5.6.1 Configure Network Manager — 30 The CONFIGURE NETWORK MANAGER command configures the network parameters and enables the Network Manager for operation. This command can only be issued once. Command: 30 [(oo vvvv)] Response: Usage: CONFIGURATION Modes: Parameters: The option number ranging from 01 to 0E.
  • Page 137 HOST COMMAND SET REFERENCE The adapter will automatically recognize which media type is installed. The parameters are bit mapped as shown in Table 5–4 with the baud rate selections given in Table 5–5. The Local Line interface will always be NRZI and asynchronous regardless of the values in Option–01 or the dipswitch settings.
  • Page 138 HOST COMMAND SET REFERENCE Table 5–5 Baud Rates * Not available on host port. Option–02 = This parameter defines the Channel A RTS/CTS delay or the maximum allowable delay between the assertion of RTS and the activation of CTS by the network modem. The value is specified in milliseconds and ranges from 0 to 1,000 ms (0000 hex to 03E8 hex) in increments of 1 ms and will default to 1,000 ms.
  • Page 139 HOST COMMAND SET REFERENCE Option–04 = The number of milliseconds to delay transmission over Channel A (Port 1) after the CTS signal becomes active. This parameter is required for transmission over some radio links. The delay is specified in milliseconds ranging from 0 to 1000 (0000 hex to 03E8 hex) in increments of 1 ms.
  • Page 140 HOST COMMAND SET REFERENCE Option–09 = This parameter defines the number of Network Manager buffers to allocate to an HIU that is brought online after being detected by the background monitor feature. Bits 1 to 15 represent the binary value for the number of Network Manager buffers to allocate as shown in Figure 5–9.
  • Page 141 HOST COMMAND SET REFERENCE Option–0B = This parameter defines the Poll period or the minimum delay between polls for a Primitive response. The delay is used to space out polls after the initial delayed poll specified by the poll delay option.
  • Page 142 HOST COMMAND SET REFERENCE 5.6.2 Report Network Manager Configuration — 31 The REPORT NETWORK MANAGER CONFIGURATION command returns the values for all the options specified in the CONFIGURE NETWORK MANAGER command, including default values. Command: Response: 31 dddddddd ff [oo vvvv] Usage: PERFORMANCE Modes:...
  • Page 143 HOST COMMAND SET REFERENCE 5.6.3 Report Secondary Link Status — 32 The REPORT SECONDARY LINK STATUS command returns the communications link status and connect status for all secondary device addresses up to the maximum secondary address specified during the adapter configuration.
  • Page 144 HOST COMMAND SET REFERENCE Not used 1 = HIU Allocated NM Buffers 0 = HIU Has Not Been Alocated NM Buffers 1 = Secondary Is An HIU 0 = Secondary Is Not An HIU 1 = Secondary Has Been Identified 0 = Secondary Has Not Been Identified 1 = Secondary Is On–Line 0 = Secondary Is Off–Line...
  • Page 145 HOST COMMAND SET REFERENCE 5.6.4 Switch Channel — 33 The SWITCH CHANNEL command explicitly specifies the channel to be used for communicating with each secondary when redundant media is used. One, several, or all secondaries may be switched to the alternate media channel at any time.
  • Page 146 HOST COMMAND SET REFERENCE 5.6.5 Allocate Network Manager Buffers — 34 The ALLOCATE NETWORK MANAGER BUFFERS command specifies the number of Network Manager buffers to allocate to a specific HIU when the HIU is brought online. This command can be issued for any HIU at any time if the number of Network Manager buffers allocated by the background monitor is set to zero.
  • Page 147 HOST COMMAND SET REFERENCE 5.6.6 Report Network Manager Buffers Available — 35 The REPORT NETWORK MANAGER BUFFERS AVAILABLE command returns the total number of Network Manager buffers and the number of buffers available for allocation to HIUs. Command: Response: 35 bbbb cccc Usage: PERFORMANCE Modes: NM Parameters:...
  • Page 148 HOST COMMAND SET REFERENCE 5.6.7 Report Network Bandwidth Allocation — 36 The REPORT NETWORK BANDWIDTH ALLOCATION command returns the relative amount of network bandwidth being used by a specific HIU. The counters stop incrementing when they reach their maximum value and must be explicitly reset.
  • Page 149 HOST COMMAND SET REFERENCE 5.6.8 Report Network Manager Secondary Statistics — 37 The REPORT NETWORK MANAGER SECONDARY STATISTICS command returns statistical information for a specified secondary device. The statistics reflect the network activity between the secondary and the Network Manager, which includes transactions from one or all HIUs on the network.
  • Page 150 HOST COMMAND SET REFERENCE 5.6.9 Report Network Manager Network Statistics — 38 The REPORT NETWORK MANAGER NETWORK STATISTICS command returns statistics for the entire network. The statistics reflect the network activity between the Network Manager and all secondary addresses. The counters are not incremented after reaching their maximum value and must be explicitly reset.
  • Page 151 HOST COMMAND SET REFERENCE eeee The number of TIWAY I HDLC errors, including command rejects (FRMR), invalid HDLC responses, and sequence errors. This number may reflect errors logged because a BROADCAST NETWORK DATA TRANSFER command was issued. These errors are logged because the POLL command is not available to clear the outstanding frame.
  • Page 152 HOST COMMAND SET REFERENCE 5.7 MODE INDEPENDENT COMMANDS The following commands may be issued at any time to a UNILINK Host Adapter configured in any of the operating modes, except the Standalone Network Manager mode. These commands control miscellaneous aspects of the adapter operation.
  • Page 153 HOST COMMAND SET REFERENCE 5.7.1 Modify External Output Status — FC The MODIFY EXTERNAL OUTPUT STATUS command controls the external output point provided by the UNILINK Adapter. Command: FC cc Response: Parameters: Output status action: 00 = Turn the output off. 01 = Turn the output on.
  • Page 154 HOST COMMAND SET REFERENCE 5.7.2 Report External Input Status — FD The REPORT EXTERNAL INPUT STATUS command reads the status of the external input point provided by the UNILINK Adapter. Several options are available for reading and resetting the input latch. Command: FD cc Response:...
  • Page 155 HOST COMMAND SET REFERENCE 5.7.3 Soft Reset Command — FE The SOFT RESET COMMAND command forces the UNILINK Host Adapter to execute a software reset. All TIWAY I communications will be aborted, all macros cleared, and the adapter will branch to the beginning of normal operating routines.
  • Page 156 HOST COMMAND SET REFERENCE 5.7.4 Reset Adapter — FF The RESET ADAPTER command forces the UNILINK Host Adapter to execute a hardware reset. The reset will begin within one second after the response has been returned to the host computer. Your applications software should allow a minimum of 2–3 seconds for the reset to complete.
  • Page 157 HOST COMMAND SET REFERENCE 5.8 COMMAND SYNTAX QUICK REFERENCE ERROR RESPONSE Response: 00 dddd (aa) BASE HIU COMMANDS Send Network Data Command: 01 aa pppp... Response: 01 aa pppp... Broadcast Network Data Transfer Command: 02 pppp... Response: 02 Poll Secondary Command: 03 aa Response: 03 aa pppp...
  • Page 158 HOST COMMAND SET REFERENCE THE EXTENDED HIU COMMANDS Allocate Source Id Command: 10 ss oo Response: 10 ss oo Configure HIU Command Command: 11 ([oo vvvv]) Response: 11 Report HIU Configuration Command: 12 Response: 12 dddddddd ff 01 vvvv 02 vvvv 03 vvvv Allocate Macro Storage Buffers Command: 13 ss [xxxx rrrr] Response: 13 ss ([bb])
  • Page 159 HOST COMMAND SET REFERENCE Report HIU Bandwidth Allocation Command: 1A (rr) Response: 1A (hh ll nn [iiiiiiii ssssssss rrrrrrrr]) Report HIU Status Command: 1B (rr) Response: 1B (jj kk bbbbbbbb cccccccc dddd eeee ffff gggg hh ii) Link Macro Command: 1C ss b1 b2 oo (vvvv...) Response: 1C ss b1 b2 ADAPTER CONFIGURATION COMMANDS Configure Adapter...
  • Page 160 HOST COMMAND SET REFERENCE Report Network Manager Secondary Statistics Command: 37 aa (rr) Response: 37 aa (bbbb cccc dddd eeee ff) Report Network Manager Network Statistics Command: 38 cc (rr) Response: 38 cc ([bbbbbbbb cccccccc dddddddd eeeeeeee ffff]) MODE INDEPENDENT COMMANDS Modify External Output Status Command: FC cc Response: FC...
  • Page 161 HOST COMMAND SET REFERENCE 5.9 COMMAND CODES REFERENCE (NUMERICAL ORDER) Command Code Description 00 Error Response 01 Send Network Data 02 Broadcast Network Data Transfer 03 Poll Secondary 04 Connect Secondaries 05 Disconnect Secondaries 06 Read Secondary Log 07 Read Secondary Diagnostics 08 Read Adapter Diagnostics 10 Allocate Source Id Configure HIU...
  • Page 162 HOST COMMAND SET REFERENCE 5.10 COMMAND CODES REFERENCE (BY FUNCTION) Configuration and Reset Commands Configure HIU 12 Report HIU Configuration 20 Configure Adapter 21 Report Adapter Configuration 30 Configure Network Manager 31 Report Network Manager Configuration FE Soft Reset FF Reset Adapter Secondary Directives 01 Send Network Data 02 Broadcast Network Data Transfer...
  • Page 163 HOST COMMAND SET REFERENCE 36 Report Network Bandwidth Allocation 37 Report Network Manager Secondary Statistics 38 Report Network Manager Network Statistics Input Point/Output Point Commands FC Modify External Output Status FD Report External Input Status UNILINK HOST ADAPTER 5–78 USER MANUAL...
  • Page 164 ERROR CODES AND DIAGNOSTICS 6.1 ERROR RESPONSE CODES The following lists the possible error codes that will be returned with the ERROR RESPONSE when an error occurs. Macro response errors are listed in Paragraph 6.3. CODE DESCRIPTION AND SOLUTION 0001 The command was timed out by the HIU function.
  • Page 165 ERROR CODES AND DIAGNOSTICS 000E An uneven number of bytes was received from the secondary. 0010 Lost Data Carrier Detect (DCD) from the TIWAY I interface port(s). 0011 Lost Clear To Send (CTS) from the TIWAY I interface port(s). 0084 The command processor found an unrecognized command code in the command string.
  • Page 166 ERROR CODES AND DIAGNOSTICS 008D One of the ASCII characters between the beginning and ending delimiters was not in the NITP character set. Valid NITP characters are the ASCII values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Retry the message at least three times.
  • Page 167 ERROR CODES AND DIAGNOSTICS 2009 The device addressed in the command string was not an HIU. 200A There is not enough memory for the number of secondary devices specified with the maximum secondary address parameter. The maximum secondary address defaults to 254. If you will not be using this many devices, you can save memory space by specifying a value equal to the number of devices in your TIWAY I network plus a few for growth.
  • Page 168 ERROR CODES AND DIAGNOSTICS 2019 The exception flag was set on this macro. 201A Too much data was requested in the GATHER MACRO RESPONSE command. 201B The action macro is enabled. 201C The action macro Primitive must be either Primitive 30 or Primitive B0. 201D The data types in the trigger macro do not match the data types defined in the action macro.
  • Page 169 ERROR CODES AND DIAGNOSTICS 6.2 PRIMITIVE ERRORS The HIU function will respond to the 02, 03, and 04 TIWAY I Primitives, just like Network Interface Modules (NIMs). The following Primitive response errors will be returned to any device sending an invalid Primitive. The responses to valid Primitives are defined in Paragraph 2.7.
  • Page 170 ERROR CODES AND DIAGNOSTICS 6.3 MRSW TERMINATION CODES The following lists the Macro Response Status Word (MRSW) termination codes that will be set when a macro has completed execution either successfully or by an exception. The adapter will optionally return the MRSW when you issue the GATHER MACRO RESPONSE command, code 15.
  • Page 171 ERROR CODES AND DIAGNOSTICS 8017 This macro is disabled because the host issued a disconnect to its HIU and an exception occurred prior to the disconnect. 8020 The macro response was too large to fit into the buffer. 8021 The wrong secondary address was in the macro response. 8023 Received the wrong TIWAY I Primitive in the link action response.
  • Page 172 ERROR CODES AND DIAGNOSTICS 6.4 DIAGNOSTIC TESTS The UNILINK Host Adapter provides both selectable and continuous diagnostic tests to insure proper operation. The pattern shown on the six LEDs, shown in Figure 6–1, will indicate whether the adapter is operating normally or if an error has occurred.
  • Page 173 ERROR CODES AND DIAGNOSTICS 6.4.1 The LEDs Only the Adapter Good LED is visible through the door during normal operation. The Adapter Good LED will remain lit when the adapter is operating properly. The remaining LEDs assume the meanings shown in Figure 6–2 during normal operation.
  • Page 174 If the same error is continually displayed, the adapter will need to be repaired. Contact your Siemens Industrial Automation, Inc. distributor or sales agent. If you need assistance in contacting your distributor or sales agent in the U.S., call 800–964–4114.
  • Page 175: Led Error Codes

    ERROR CODES AND DIAGNOSTICS 6.4.3 LED Error Codes Figure 6–4 shows the pattern that can be displayed on the LEDs when you run any of the diagnostic tests. If an error does occur, the Adapter Good LED will flash two times each second and one of the error codes shown below will be displayed.
  • Page 176 ERROR CODES AND DIAGNOSTICS 6.4.4 External I/O Loopback Test There is a special diagnostic test for the Input/Output Points. This test is active when Positions 9 and 10 of Dipswitch 2 are up. To run this test, perform the following steps. 1.
  • Page 177 APPENDIX A USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.1 CHARACTERISTICS NON–INTELLIGENT TERMINAL PROTOCOL The Non-Intelligent Terminal Protocol (NITP) is a simple, character-oriented method of data link communications using standard 7-bit ASCII codes. Both command and response messages consist of starting and ending delimiters, a character count or message length field, the body of the message, and an error-checking code field as illustrated in Figure A–1.
  • Page 178 USING THE NON-INTELLIGENT TERMINAL PROTOCOL ASCII characters other than those in the NITP character set, such as a carriage return or line feed, may be sent between the ending delimiter and the next beginning delimiter to control special network devices. The adapter will ignore these characters. Hexadecimal values must be translated into two ASCII codes or characters so that: UNILINK HOST ADAPTER...
  • Page 179 USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.1.2 Message Delimiters A colon ( : ) marks the beginning of a message and a semicolon ( ; ) marks the end of a message. Any characters between a colon and the next semicolon are interpreted as a valid message, while any characters between a semicolon and the next colon are ignored.
  • Page 180 USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.1.5 Error-Checking Code Following the message body is an ASCII four-character error-checking code (ECC) in the form of a 16-bit hexadecimal number that is included at the end of the message just before the semicolon terminator. The ECC is a checksum computed by both the sending and receiving stations as follows: 1.
  • Page 181 USING THE NON-INTELLIGENT TERMINAL PROTOCOL Then insert the character count at the beginning of the message body as “00182001000202000E”. The ECC is given by: Two’s complement of (0018 + 2001 + 0002 + 0200 + 0E00) = CFE5 (ECC) so that the complete message is the character string: ASCII 3A 30 30 31 38 32 30 30 31 30 30 30 32 30 32 30 30 30 45 43 46 45 35 3B CODES...
  • Page 182 USING THE NON-INTELLIGENT TERMINAL PROTOCOL Figure A–2 illustrates how a TIWAY I Primitive is enclosed in the adapter command string which is enclosed in the NITP message structure. Primitive Descriptor Data Unit Length Code Field(s) Field(s) TIWAY I Primitives Secondary Command Code Network Data Address...
  • Page 183 USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.2 NITP Protocol Operation Setting Position 1 of Dipswitch 1 up selects NITP as the communication protocol between the host computer and the adapter. Messages in the form of adapter commands are composed and framed by the host computer and transmitted to the adapter.
  • Page 184 USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.2.1 Errors and Error Recovery The following ERROR RESPONSE codes from Chapter 6 relate to NITP data link errors: 0086 HOST FRAME TOO LONG — the frame exceeded 590 bytes in total length. Remember that the message body is composed of two ASCII characters for each hexadecimal message byte.
  • Page 185 USING THE NON-INTELLIGENT TERMINAL PROTOCOL A.2.2 Response Timeouts The adapter will respond with ERROR RESPONSE 0001 if the network response has not returned within the Host Command Timeout period set on Dipswitch 1. The secondary device failed to return the data either because it has gone offline or it could not respond within that time frame.
  • Page 186 USING THE BDLC PROTOCOL The BDLC protocol is a subset of the ANSI X3.66–1979 Advanced Data Communication Control Procedure (ADCCP). BDLC provides a data link between the host computer and one or more UNILINK Host Adapters. The data link is responsible for establishing and terminating logical connections between the host computer and the adapters, to handle data transfers between them, and to ensure message integrity in those transfers.
  • Page 187 USING THE BDLC PROTOCOL B.1 BDLC CONFIGURATION BDLC is an unbalanced configuration meaning that there is one primary station (the host computer) and one or more secondary stations (UNILINK Host Adapters) as illustrated in Figure B–1. The primary is responsible for setting each secondary to the normal response mode and for controlling the information exchange.
  • Page 188 USING THE BDLC PROTOCOL B.2 BDLC PROTOCOL FRAME STRUCTURE Information is transferred in single frames without any blocking. Each frame includes the destination address, the BDLC control field, the information, and the block checksum as shown in Figure B–2. Rather than using ASCII codes to indicate where one field begins and ends, BDLC uses positional significance, meaning that the position of the bits in the frame have a particular meaning.
  • Page 189 USING THE BDLC PROTOCOL B.2.2 Address Field The address field is eight bits in length and specifies the address of the UNILINK Host Adapter which is to receive the message. Up to 32 adapters may be multidropped on the same host network as discussed in Paragraph 3.2.3. The address is a unique value ranging from 0 to 31 and is set on the adapter with dipswitches as described in Paragraph 3.3.1.1.
  • Page 190 USING THE BDLC PROTOCOL B.2.5 Block Checksum Field This two-byte field is the Block Checksum (BCS) calculated by the transmitter and checked by the receiver to detect transmission errors. The calculation is a 16-bit one’s complement Fletcher Checksum. The BCS is calculated using all bytes in the transmitted frame except the starting and ending flags (DLE-STX and DLE-ETX), the BCS bytes, and any inserted DLEs.
  • Page 191 USING THE BDLC PROTOCOL B.3 BDLC PROTOCOL CONTROL FIELD STRUCTURES I–Frame Format Supervisoty Frame Format Unnumbered Frame Format Where: N(S) is the transmitting station send sequence number. N(R) is the transmitting station recieve sequence number. Figure B–4 BDLC Protocol Control Field Structures The control field will be one of three formats as shown in Figure B–4.
  • Page 192 USING THE BDLC PROTOCOL The Unnumbered frame format is used to extend the number of supervisory control functions. Frames transmitted using this format do not increment the sequence counts either Commands/Responses of this type may or may not contain an Information field. Valid control field values are value SNRM command...
  • Page 193 USING THE BDLC PROTOCOL B.4 COMMANDS AND RESPONSES The following subset of the ANSI X3.66 standard is supported by the UNILINK Host Adapter: SNRM — The Set Normal Response Mode command is issued by the host computer to logically activate the adapter’s host interface and/or to reset the send and receive sequence counts.
  • Page 194 USING THE BDLC PROTOCOL RNR — The Receive Not Ready command is used by the adapter to indicate that its input buffer is full and the host should stop transmitting I-Frames and poll with RRs until the adapter responds with an RR or an I-Frame. REJ —...
  • Page 195 USING THE BDLC PROTOCOL B.5 ERRORS AND ERROR RECOVERY BDLCs design includes methods for detecting and correcting transmission errors so that message integrity is assured. Methods are provided for busy condition, N(S) and N(R) sequence errors, BCS errors, invalid commands, and timeouts.
  • Page 196 USING THE BDLC PROTOCOL B.5.4 BCS Error When the Block Checksum calculated by the receiver does not match the BCS in the I-Frame, the receiving station completely ignores the message. This is because with an incorrect checksum, there is no guarantee that the address field contains the correct address.
  • Page 197 USING THE BDLC PROTOCOL B.5.7 FRMR Recovery The FRMR response is returned by the adapter when it receives a frame with an invalid command, a frame of excessive length, or when the N(R) does not match. This response includes a three-byte information field in the format shown in Figure B–5, with Byte 0 transmitted first.
  • Page 198 USING THE BDLC PROTOCOL B.6 ILLUSTRATIVE BDLC SEQUENCES Example B–1 illustrates an error-free BDLC sequence between the host computer and the adapter. This sequence shows how information is efficiently transferred, since acknowledgements are part of the control subfield and does not require a separate transmission.
  • Page 199 USING THE BDLC PROTOCOL The host computer issues a SNRM to initialize the adapter and the adapter responds with a UA. The host computer then sends an I-Frame. The sequence both zero since the SNRM was issued previously. The adapter does not have any information to return, so it responds with an RR that acknowledges the I-Frame.
  • Page 200 USING THE BDLC PROTOCOL The next example, Example B–2, illustrates errors in sequence counts, invalid commands, and timeouts. Example B–2 BDLC Error Sequences Host Computer (1) I–Frame, N(S)=1, N(R)=0, P SNRM I–Frame, N(S)=0, N(R)=0, P (2) FRMR (3) I–Frame, N(S)=3, N(R)=2, P ...
  • Page 201 USING THE BDLC PROTOCOL B.7 BLOCK CHECKSUM GENERATION AND CHECKING To calculate the BCS: 1. Zero both BCS field bytes. 2. Begin with the address field byte. 3. Add the byte to the most significant BCS byte including any carry bit generated.
  • Page 202 USING THE BDLC PROTOCOL Example B–3 Block Checksum Transmitter Calculation DLE–STX Address Control 1002 “SNRM” (Note: All values are in hexadecimal notation.) Frame Byte Complement the MSB The BCS is then D595 Information DLE–ETX 1003 10 12 13 14 15 B–17 UNILINK HOST ADAPTER USER MANUAL...
  • Page 203 USING THE BDLC PROTOCOL The receiver checks the BCS by adding all the received frame bytes excluding the starting and ending flags, and any inserted DLEs. The procedure is: 1. Zero the two calculation registers. 2. Begin with the address field byte. 3.
  • Page 204 Appendices C and D not available in electronic form.
  • Page 205 CONFIGURATION WORKSHEET Network Name Location Cable Diagram Reference Adapter Configuration Parameters Adapter Mode MHIU MHIU/EHA HIU Address Macro Memory Requirements HIU/EHA SANM Maximum Secondary Address 16 kbytes 24 kbytes As much as possible E–1 APPENDIX E UNILINK HOST ADAPTER USER MANUAL...
  • Page 206 CONFIGURATION WORKSHEET Host Computer Port Parameters Baud Rate 19,200 38,400 Channel A Channel B (Port 1) (Port 2) Baud Rate 115,200 Half Duplex UNILINK HOST ADAPTER USER MANUAL Synchronous Full Duplex Parity 1200 2400 Protocol 4800 9600 BDLC Address Network Ports Parameters Media Type Auto Redundant Media...
  • Page 207 MACRO DEFINITIONS FORM Table F–1 is a worksheet for planning macro buffer requirements. The labels at the top match the macro definitions with the particular network and adapter. They are: Network Enter the name used to describe the network with this Name adapter.
  • Page 208 MACRO DEFINITIONS FORM Freeze Check this box if the data causing the exception is to be frozen. Check this box if the first exception is to be bypassed. Execp. Minimum Enter the time in milliseconds to wait before reissuing a Reissue repetitive macro.

Table of Contents