Home
Siemens SIMATIC TIWAY 1 User's Manual
Contents
1. 2 4 O K2 o o re Cc os 2 a Q D oy O N N N Belden 9271 SS Pai X 5 10 20 50 100 250 Cable Unit Loading Number of Stations 1003648 Figure 4 3 Number of Local Line Secondaries vs Cable Distance 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 TI WAY 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 The Local Line interface does not support synchronous operation or NRZ UNILINK HOST ADAPTER 4 4 USER MANUAL THE TIWAY NETWORK PORTS 4 1 2 Modem Interface AC GND LINE AC NEUT 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 This interface uses a female 25 pin D type connector on both Ports 1 and 2 as shown in Figure 4 4 These two ports support redundant media transmission when connected to redundant modem networks The pin assignments shown in Table 4 3 are supported Al
2. B 11 UNILINK HOST ADAPTER USER MANUAL 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 First bit transmitted DEE MSB LSB Byte 0 Rejected Control Field Byte 1 N R o N S Figure B 5 FRMR Infomation Feld Format The Rejected Control Field is the control field from the command frame that is being rejected N R is the adapter s current receive count N S is the adapter s current send count Bit Z is set to one when the control field in the frame received contained an invalid N R number Bit Y is set to one when the information field received exceeds the maximum length of 290 bytes Bit X is set to one when the control field in the frame received is invalid because the frame contained an information field and the control field command does not permit an information field Bit W is set to one when the control field in the frame received is invalid or not implemented UNILINK HOST ADAPTER B 12 USER MANUAL B 6 USING THE BDLC PROTOCOL 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 acknowledgemen
3. Command Timeout is set to 0 the adapter is configured in the Standalone Network Manager SANM mode NOTE The adapter must be reset before any dipswitch changes are recognized Table 3 4 Host Command Timeout Dipswitc h Settings DIPSWITCH 1 ee Description Down Down 0 sec Accepts No Host Commands SANM Mode UNILINK HOST ADAPTER 3 16 USER MANUAL CHAPTER 4 THE TIVAY 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 Network Port Supply Voltage PPX 500 7111 Dual Local Line 120 VAC PPX 500 7112 Dual RS 232 C 423 120 VAC PPX 500 7113 Dual Local Line 240 VAC PPX 500 7114 Dual RS 232 C 423 240 VAC More information on the media types can be found in the TIWAY Systems Manual PPX TIWAY 8101 and in the UNILINK Adapter Installation and Operation Manual PPX TI WAY 8106 4 1 UNILINK HOST ADAPTER USER MANUAL THE TIWAY NETWORK PORTS 4 1 1 Local Line Interface Port 1 Port 2 Port 3 Port 4 as EE as Local Line Interface Ports Figure 4 1 Local Line Interface Ports The Local Line interface to TIWAY 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 redundan
4. code 38 returns statistical counters for an specific media channel The counts reflect the activity between the Network Manager and all secondary addresses Like the secondary statistics counters these counters are not incremented after reaching their maximum value and must be reset explicitly with the special command sequence The REPORT HIU STATUS command returns the connection status of the HIU and statistics on network performance The statistics are counts for Network Manager to HIU communications The counters are not updated after reaching their maximum value and must be explicitly reset UNILINK HOST ADAPTER 2 48 USER MANUAL CHAPTER 3 CON AG URING THE HOSTCOMPUTER 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 synchronous or asynchronous modem operation full or half duplex and even odd or no parity A choice of two data link protocols are available the Non I ntelligent Terminal Protocol NITP or BDLC a byte oriented subset of the ANSI X3 66 standard protocol UNILINK RS 232 C RS 423 A Figure 3 1 Host Computer Interface 3 1 UNILINK HOST ADAPTER USER MANUAL CONFIGURING THE HOST COMPUTER PORT 3 2 RS 232 C RS 423 A PHYSICA
5. the adapter remains in the test mode If an error occurs the LEDs will belit ina pattern that defines the particular test that failed NOTE You must install the loopback connectors provided with the adapter on Ports 3 and 4 torun the test mode diagnostics The Local Line ports 1 and 2 perform an internal loopback and do not require loopback connectors More details about these connectors and their installation are given in the UNILINK Adapter Installation and Operation M anual PPX T1 WAY 8106 x If any of the tests fail recheck your power connections and the loopback connectors if installed then rerun the test Note that if the Host Adapter PIM is not installed you will get the PIM Checksum Error These diagnostic tests will stop at the first error that occurs Even though you make connection changes the original error may be corrected but another may be displayed 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 6 11 UNILINK HOST ADAPTER USER MANUAL ERROR CODES AND DIAGNOSTICS 6 4 3 LED Enor Codes Figure 6 4 shows the pattern that can be displayed on the LE Ds 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 belo
6. MSB LSB 0 1 2 3 4 5 6 7 Bits 4 7 Are Unused 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 1 Repetitive Macro 0 Leave Macro Disabled 1 Automatically Enable For Execution Figure 5 7 Macro Options Byte Bit O when set to a one will automatically enable the macro for execution and will reset the MRSW to zero When Bit 0 is set to zero the MRSW will be set to 8001 hex indicating that the macro is disabled If you set Bit 0 to one auto enable and the associated secondary device is not in the secondary log the ERROR RESPONSE will be returned indicating that the secondary is offline Bit 1 when set toa one defines the macro to be repetitive and when set to a zero defines the macro to be non repetitive Repetitive macros are automatically reissued by the HIU as long as they are enabled Each new response is compared to and stored in place of the previous response If a difference is found between the two responses the macro s exception flag is set Non repetitive macros are only issued once after they are enabled When the macro response is received the non repetitive macro sets its exception flag and automatically disables itself 5 29 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE Pppp UNILINK HOST ADAPTER USER MANUAL Bit 2 w
7. ND GND Son DCD RxCLK No connection O TxCLK No connection O OO000 7 ol O OO0O000000000 O En A ai wo 1002378 Figure 3 4 Cable For Connecting DIE Equipment Null Modem UNILINK HOST ADAPTER 3 4 USER MANUAL CONFIGURING THE HOST COMPUTER PORT ThelBM PC AT 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 UNILINK Host Adapter 25 Pin GND DTR SD RD DCD M oa 5 oH O 6d00 ae MOOO0O0O0000 BO 00000 k Figure 3 5 IBM PC AT9 Pin Null Modem Cable Diagram 3 5 UNILINK HOST ADAPTER USER MANUAL 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 TI WAY 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 Systems Manual PPX TIWAY 8101 UNILINK TIWAY1 Host Adapter Network 1 UNILINK TIWAY1 Host Host Adapter Network 2 Computer 4 wire leased line U
8. and a checksum Character Message Sasi Mage eco i Figure 3 7 NIIP Message Structure UNILINK HOST ADAPTER 3 8 USER MANUAL CONFIGURING THE HOST COMPUTER PORT e Thehost 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 e t is designed to work with a wide range of ASCII host devices from ASCII terminals to intelligent workstations e t supports a subset of the ASCII character set 0 9 and A F The adapter will ignore all other ASCII characters between the ending semicolon delimiter and the next beginning colon delimiter so the host computer can use these characters for routing control e Itis easier to implement than the BDLC protocol but it is also much slower since the data is transmitted as ASCII characters requiring two bytes for each data value For example the hexadecimal value OE hex becomes 30 45 ASCII characters 0 and E More detailed specifications are given in Appendix A Host UNILINK Computer Host Adapter NITP Host Command Network Response Figure 3 8 NNP Command Response Sequence 3 9 UNILINK HOST ADAPTER USER MANUAL 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 protoc
9. 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 The first set of counters corresponds to the counts for all HIUs and the second set for the specified HIU The ratio of the HIUs counts to the counts for all HIUs gives a relative indication of the HIUs bandwidth Command 36 aa rr rrreeeerennnn Usage PERFORMANCE Modes NM Parameters rr The reset counters code 00 Do not reset the counters 01 Reset all HIU counters and the sum HIU counters but do not return any data Only the command code 36 is returned aa The HIU address iii The number of TIWAY HDLC I Frame pairs sent and received by the HIU The term Frame pair refers to the fact that every Primitive has an Frame command and response pair This count does not include the I Frames required for Network Manager to HIU communication SSSS The number of TIWAY HDLC I F rame bytes sent by the HIU to the secondaries This count only contains the data bytes of the l F rame and not the HDLC overhead rrrr The number of TIWAY HDLC l Frame bytes received by the HIU from the secondaries This count only contains the data bytes of the I F rame and not the HDLC overhead mmmm Thetotal number of NM buffers currently allocated to all HIUs nnnn The number of NM buffers allocated to the specified HIU 5 63 UNILINK HOST ADAPTER USER MANUAL HOST COM
10. secondary devices These errors are logged because the ITT returned a REJ even though the information was received UNILINK HOST ADAPTER 5 40 USER MANUAL HOST COMMAND SET REFERENCE ffff The number of times the HIU has been issued a SNRM by the Network M anager gggg The number of times the HIU has been issued a DISC by the Network M anager hh When set to 01 this parameter indicates that the Network Manager has reinitialized the HIU with a different configuration This will happen whenever the Network Manager is reset causing it toreinitialize each HIU on the network This parameter will not be cleared by the rr reset option ii This parameter indicates whether the HIU has been granted permission to issue a DISC 00 DISC permission not granted 01 DISC permission granted 5 41 UNILINK HOST ADAPTER USER MANUAL 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 The two macros are referred to as the trigger macro and the action macro respectively As long as a link exists between the two macros the action macro is only executed when the trigger macro is enabled a
11. you can also link two macros to form a store and forward link between two secondary devices as illustrated in 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 macro command buffer numbers Both macros must have the same Source 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 be executed 2 43 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION Data Packet Secondary 1 UNILINK Host Adapter Macro Response Buffer A Macro Response Buffer B Secondary Data Packet 2 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 AO to read data from the secondary device The action macro must be a valid Primitive 30 or BO 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 is established the action macro will be considered non repetitive When the link is terminated the original conditions will be valid again The adapter will check the validity of
12. 001E 0000 0000 UNILINK HOST ADAPTER 5 26 USER MANUAL 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 The exception flag is reset each time this command is processed Command 14 ss bb aa tt 00 eeee pppp Response 14 ss bb Usage OPERATION Modes MHIU HIU Parameters SS The Source Id number bb The buffer number to store this macro command in This number was previously assigned with the ALLOCATE MACRO STORAGE BUFFERS command aa The secondary device address to send the macro command to tt This parameter defines the macro type from the following values 01 Send Primitive This macro type sends the TIWAY Primitive data stored in the macro command buffer to the secondary and gathers a response in the background mode The optional parameters following the tt are only used with this macro type 5 27 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE UNILINK HOST ADAPTER USER MANUAL 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 h
13. 21 30 32 34 38 FC FF 0 1C 21 31 38 FC FF 0 1C 21 30 32 34 38 FC FF 0 1C 21 FC FF FC FF Figure 5 3 Active Command Tree 5 5 UNILINK HOST ADAPTER USER MANUAL 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 aa The secondary address associated with the error code This parameter is only included if applicable UNILINK HOST ADAPTER 5 6 USER MANUAL HOST COMMAND SET REFERENCE 5 3 BASE HIU COMMANDS The Base HIU commands are backward compatible with the original commands for the TIWAY 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 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 e Send Network Data 01 e Broadcast Network Data 02 e Poll Secondary 03 Available only in MHIU EHA mode e Connect Secondaries 04 e Disconnect Secondaries 05 e Read S
14. Enable the trigger macro for execution Example Allocate Source Id 21 Command 10 21 00 Allocate two macro buffers Command 13 21 0010 0020 0030 0010 Response 13 21 01 02 UNILINK HOST ADAPTER 5 44 USER MANUAL 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 03E 8 0006 20 01 0008 0001 Define macro 02 as send Primitive 30 to write the block of data to secondary 06 Command 14 21 02 06 01 00 0000 0006 30 01 0008 0000 Setup the link between macro 01 and 02 Command 1C 21 01 02 01 Enable macro 01 the trigger Command 16 21 01 01 The information will be transferred between secondary 05 and 06 at one second intervals To stop the transfer disable macro 01 Command 16 21 01 00 and terminate the link Command 1C 21 01 02 00 5 45 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 5 5 ADAPTER CONAGURATION COMMANDS The following commands explicitly define the adapter s operating mode and will report the configuration status back to the host computer e Configure Adapter e Report Adapter Configuration UNILINK HOST ADAPTER 5 46 USER MANUAL 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 issue
15. HIU command enables the HIU function TIWAY network interface It also configures the TI WAY 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 Command 11 00 vvvv Response 11 Usage CONFIGURATION Modes MHIU HIU Parameters 00 The option number ranging from 01 to 03 These options may be specified in any order but may only occur once Any options not specified will assume the default values VVVV The parameter value The following describes the options and associated parameter values Option 01 Defines the HIU network parameters The HIU automatically determines the type of media card so the host computer only needs to specify the values discussed below If this option is not specified the HIU will assume its parameters from the values on Dipswitch 1 when using NITP and by default values when using the BDLC protocol This option is only required if the adapter is configured as an HIU When the BDLC protocol is selected the network port defaults are 115 2K baud half duplex asynchronous and NRZI for Local Lines or 9600 baud full duplex synchronous and NRZ for RS 232 C RS 423 A media This parameter is bit mapped as shown in Figure 5 4 with the baud rate selections given in Table 5 2 5 21 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE MSB LSB 0 12 3
16. MODE DOWN RUN MODE UP HIU EHA amp TO LOOP TEST DOWN MHIU EHA HOST PORT BAUD RATE UP SYNCHRONOUS DOWN ASYNCHRONOUS HO TPORT UP FULL DUPLEX HOST PORT DOWN HALF DUPLEX UP EVEN PARITY HOST PORT DOWN ODD PARITY UP PARITY ENABLED DOWN PARITY DISABLED Figure 3 10 NIIP Dipswitch Settings HOST PORT NOTE 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 UNILINK HOST ADAPTER 3 12 USER MANUAL 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 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 and checking is enabled Position 3 of Dipswitch 2 selects full duplex or half duplex operation Position 4 of Dipswitch 2 selects synchronous or asynchronous modem communications Selecting synchronous only enables the adapter to use the TxCLK DD and RxCLK DB RS 232 C control signals The adapter will not process synchr
17. RS 423 A media is 9600 baud full duplex synchronous and NRZ 5 51 UNILINK HOST ADAPTER USER MANUAL 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 Table 5 4 Option Code 01 Bit Map 0123 45 6 7 8 9 10 11 12 13 14 15 Channel B Baud Rate Bit 12 is MSB Not used Channel B 1 NRZI RZ Channel B 1 Full Duplex 0 Half Duplex Channel B 1 Synchronous 0 Asynchronous Channel A Baud Rate Bit 4 is MSB Channel B 1 Available 0 Not Available Channel A 1 NRZI 0 NRZ Channel A 1 Full Duplex 0 Half Duplex Channel A 1 Synchronous 0 Asynchronous NOTE The Local Line interface will always be NRZI and asynchronous regardless of the values in Option 01 or the dipswitch settings When configuring the channels they must be either both synchronous or both asynchronous You cannot run synchronous on one channel and asynchronous on the other UNILINK HOST ADAPTER 5 52 USER MANUAL HOST COMMAND SET REFERENCE Table 5 5 Baud Rates LSB Baud Rate 0 0 0 0 0 0 0 0 1 1 1 1 Oooo 0 Ooo OoO 0O 0 0 0 O 115200 Not available on host port Option 02 This parameter defines the Channel A RTS CTS delay or the maximum allowable delay between the ass
18. This will keep the Network Manager from spending time on device addresses that will never exist on the network Your applications software can request the link status information with the REPORT SECONDARY LINK STATUS command code 32 2 19 UNILINK HOST ADAPTER USER MANUAL 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 Primitives 02 Machine Status 03 Machine Type Configuration and 04 Primitive Format Configuration The TIWAY Systems Manual provides more details on the format and use of Primitives 2 7 1 Primitive 02 Response The Primitive 02 response will be returned as follows Spaces were added for clarity LLLL 02 HH DD EE FF Where 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 Status is not available EE will be 00 indicating that the NIM is operational FF will be 00 and has no meaning for an HIU UNILINK HOST ADAPTER 2 20 USER MANUAL 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 III JJJJ KKKKKKKK Where LLLL is the Primitive length HH will be 00 indicating that it is operational and
19. UNILINK HOST ADAPTER USER MANUAL CONFIGURATION WORKSHEET Host Computer Port Parameters Baud Rate 110 L_ Synchronous L_ Asynchronous C Full Duplex J Half Duplex Parity _ Enabled _ Even Disabled Odd Protocol BDLC _ NITP ChannelA cChanneiB Network Ports Parameters Port 1 Port 2 11 aa i Media Type Local Line 300 _ Modem 600 Auto Redundant Yes 1200 Media C No 2400 4800 RTS CTS 9600 Delay 19 200 After CTS 38 400 Delay pj OOU OUULI O0UUUOGOUOUULLIS NM O O O O O p OLI L Synchronous LJ Asynchronous LJ Full Duplex L Halt Duplex L_ NRZ LJ NRZI LI LI LI LI LI LI L C I LI LI E L c LI LI LI UNILINK HOST ADAPTER E 2 USER MANUAL APPENDIX F MACRO DEANMONS 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 Name Location UNILINK Host Adapter Enter the name used to describe the network with this adapter Enter the location of the network and or the adapter This could be the department in a plant a plant or any other definition The address or other identifier that specifies this adapter The form columns are Macro Buffer Number Command Buffer Length Response Buffer Length Source Id Secondary Address Macro Type Primitive Auto Enable Rept Enter the buffer
20. a specific HIU The counters do not reset after reaching their maximum value and must be explicitly reset Although the HIUs on the network have no direct control over the number of Network Manager buffers allocated to them they can control how those buffers are used with the ALLOCATE HIU BANDWIDTH command This command defines how the buffers are to be divided between direct requests non repetitive macros and repetitive macros by specifying how many of the allocated buffers will be used for repetitive macros By default repetitive macros can use all of the 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 of two requests per secondary or the number of NM buffers allocated to 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 is accepted Your applications software may issue this command more than once in order to change the parameters to match the demands as they change Issuethe REPORT HIU BANDWIDTH ALLOCATION command to determine the buffer allocation and retrieve macro statistical counters The statistical counter parameters are long words that must be explicitly reset when they reach their maximum values The command string includes the command code and the o
21. a valid exception will set the exception 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 will be compared to that first response 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 device and sets the exception whenever the response is not OK The 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 other than the OK status that was expected The INITIALIZE MACRO RESPONSE BUFFER command byte string includes 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 UNILINK HOST ADAPTER 2 42 USER MANUAL OPERATION AND APPLICATION 2 10 8 Checking Memory Usage Thereis a certain amount
22. also allows up to 32 UNILINK Host Adapters to be multidropped via a modem from the same host computer RS 232 C RS 423 A port The adapter supports or provides the following TI WAY features The adapter supports the TI WAY redundant media feature providing fault tolerant communications in case of a media failure The adapter supports communication with multiple network secondary devices concurrently for higher network throughput The adapter supports concurrent network request processing The host computer does not have to wait for a request to complete before issuing another request when using the advanced host communication protocol 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 the data UNILINK HOST ADAPTER 1 4 USER MANUAL THE UNILINK HOST ADAPTER e 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 network e The adapter provides transaction statistics collection to aid network performance tuning 1 3 TYPICAL NETWORK APPLICATIONS 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
23. and dipswitch settings are discussed further in Paragraph 2 5 1 There are three configuration commands the CONFIGURE ADAPTER command the CONFIGURE HIU command and the CONFIGURE NM command 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 to your needs 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 ports However the setting of Position 9 on Dipswitch 2 determines the default mode value When Position 9 is up the adapter will default to an HIU EHA and when Position 9 is down the adapter will default toan MHIU EHA D000000000 D0 00000000 eeeccce Number 1 Number 2 Reset LEDs Figure 2 11 Dipswitch Positions The default mode will be chosen when you issue one of the Base HIU commands before issuing the CONFIGURE ADAPTER command In the later case the adapter assumes the default mode from the setting of Position 9 on Dipswitch 2 and assumes the EHA mode This means that after the adapter is reset if yo
24. device failed to return the data either because it has gone offline or it could not respond within that time frame If this timeout continues to occur and the secondary is online try increasing the Host Command Timeout value You should also consider that a BROADCAST connect or disconnect takes several seconds to complete requiring a Host Command Timeout of at least 20 seconds The adapter must be reset each time the dipswitch settings are changed before the changes will take effect Paragraph 4 provides a more detailed discussion on setting the Host Command Timeout By setting an internal timer in NITP driver software you can test for an adapter that has lost power or a break in the connecting media between the host computer and the adapter The internal timer should be set to at least 100 ms greater than the Host Command Timeout to allow the adapter to process its time out errors If no message is returned within this internal time period check the adapter and make sure that it is online then make sure that the 25 pin connectors are secure at the adapter s host port Port 3 and at the host computer then test the media A 9 UNILINK HOST ADAPTER USER MANUAL APPENDIX B 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 a
25. free l F rame is received with an invalid N R from the host computer B 9 UNILINK HOST ADAPTER USER MANUAL 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 B 5 1 Busy Condition When either the host computer or the adapter temporarily cannot receive or continue to receive F rames or UIs because of internal buffer limitations that station alerts the sending station by transmitting an RNR with N R set to the count that it expects to receive on the next frame The busy station should continue to respond with RNR until buffer space is available while the sending station should respond with RR A busy condition on an adapter will be forced clear whenever the host computer sends a SNRM B 5 2 N S Sequence Enor An N S sequence error occurs when a receiving station receives a BCS error free F rame that contains an N S sequence number not equal to the internal receive count The receiving station does not increment its receive count and responds with a REJ with the N R set to the message it expected to receive If the receiving station is the host computer it can optionally issue a SNRM to reset the adapter s sequence counts B 5 3 N R Sequence Enors An N R sequence error occurs w
26. high speed transfer of data from another Series 500 controller 1 7 UNILINK HOST ADAPTER USER MANUAL 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 network from a single location The importance of the UNILINK Host Adapter is that it provides a communication link between the TIWAY network and one or more host computers Figure 1 7 is a diagram representing the various host computers that can be connected toa UNILINK Host Adapter and the typical devices that can be controlled in a TIWAY network ICC 6000 Cvu 5000 UniLink Others Host Adapter Map Foxboro Honeywell Fisher Gateways TIWAY Secondary Adapter NIM NIM NIM NIM Robots SIMATIC SIMATIC SIMATIC SIMATIC T1520 TI560 TI565 TI530 CNC TI530C Scales Other Int Devices PEERLINK Figure 1 7 TIWAY I Network You cannot use a UNILINK Host Adapter in a TIWAY network that also contains a TIWAY Gateway or Network Control Module NCM or a TIWAY Host Adapter Chapter 4 provides info
27. initializes the HIU No HIUs will be given permission to issue a DISC when the dipswitch is down Positions 3 6 of Dipswitch 2 represent the binary value for the number of NM buffers to assign to an HIU when the HIU is initialized The number of NM buffers can range from 1 to 16 The actual binary value selected will range from 0000 to 1111 binary where Position 3 is the most significant bit and Position 6 is the least significant bit The adapter will then add 1 to the binary value to scale the actual range to 1 16 When Position 7 of Dipswitch 2 is up the NM function will use the redundant media feature that uses both network ports Ports 1 and 2 to communicate with the secondary devices 2 5 6 Configuration Summary The general procedure for configuring the adapter follows in the list below 1 Set the dipswitch positions 2 Issuethe CONFIGURE ADAPTER command 3 Issuethe CONFIGURE NM command If this adapter will bean MHIU ora NM 4 Issue the CONFIGURE HIU command If this adapter will be an MHIU or an HIU UNILINK HOST ADAPTER 2 16 USER MANUAL 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 2 6 1 Redundant Media Channels The adapter provides for two network medi
28. 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 Network planning forms are located in Appendix E Appendix F and Appendix G 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 were selected to help you quickly install an operational network and expand it with minimal software changes As your network grows you can improve network efficiency by redefining the parameters to match your network needs Figure 2 2 illustrates the relative performance and flexibility gained with using additional commands Command Parameter Parameter e o Parameter Code 1 2 n Figure 2 1 Command Sting Structure 2 1 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION Network Manager Commands Performance and Applications Flexibility Configure Adapter Commands Mode Independent Commands Basic HIU Commands 10 20 30 40 NUMBER OF COMMANDS Figure 2 2 Performance vs Commands Communications between the host computer and the UNILINK Host Adapter area series of commands and responses as illustrated in Figure 2 3 For every command sent there
29. number returned by the ALLOCATE MACRO STORAGE BUFFERS command which numbers the buffers sequentially beginning with 01 hex Enter the length in bytes for the macro command buffer Enter the length in bytes for the macro response buffer Enter the Source Id associated with this macro Enter the secondary device address associated with this macro Enter the type code for this macro 01 Send Primitive 02 Connect Secondary Device 03 Disconnect Secondary Device Enter the primitive code from the secondary device manual or the TIWAY Systems Manual Check this box if the macro should be automatically enabled Check this box if the macro is to be a repetitive macro F 1 UNILINK HOST ADAPTER USER MANUAL MACRO DEFINITIONS FORM Freeze Check this box if the data causing the exception is to be frozen No Check this box if the first exception is to be bypassed E xecp Minimum Enter the time in milliseconds to wait before reissuing a Reissue repetitive macro Delay Link Enter the macro buffer number for the macro that is the Action action macro in the link macro pair This macro is the Macro trigger macro No These parameters are described in more detail in Chapter 2 and Chapter 5 Example F 1 shows an example definition UNILINK HOST ADAPTER F 2 USER MANUAL
30. of commands processed transactions completed on the network and other items Commands to retrieve these statistics do not require network transactions but return the information from the appropriate statistical area The following operating modes include the HIU function e Master Host Interface Unit MHIU e Host Interface Unit HIU e Master Host Interface U nit E mulate Host Adapter MHIU EHA e Host Interface U nit Emulate Host Adapter HIU EHA 2 5 UNILINK HOST ADAPTER USER MANUAL 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 TI WAY 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 There can be only one adapter configured with the Network Manager function in any particular TI WAY network This function will only process Network Manager commands These commands control the TI WAY I network operations return network statistical information and handle the background monitor and redundant media switching operations All network requests and responses are queued in the Network Manager buffers area Manages the message traffic on the TIWAY I network Uses memory for Network Buffers Network Stations Figure 2 5 Network Man
31. reserved in an MHIU and possibly more than 24 kbytes will be reserved in an HIU 5 48 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 21 Response 21 dddddddd ff 01 vvwv 02 vwwwv 03 vwwwv 04 vvvv Usage PERFORMANCE Parameters dddd The current values for Dipswitch 1 and Dipswitch 2 in the most significant word and least significant word respectively The position values are right justified in each word as shown in Figure 5 8 A bit set to one indicates the corresponding switch is up off WORD 1 WORD 2 MSB LSB LSB 345 6 7 12 13 14 15 4 5 67 10 11 12 13 14 15 T t23 8 9 Dipswitch 1 Dipswitch 2 Figure 5 8 Dipswitch Values Bit Map ff A flag that when set to one indicates that the CONFIGURE ADAPTER command has been processed In multiprocessing environments the tasks can check the value of this flag to determine if they can issue initiation operation and termination commands VVVV The parameters described in the CONFIGURE ADAPTER command 5 49 UNILINK HOST ADAPTER USER MANUAL 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
32. secondary device has been disconnected by a host computer Refer to Chapter 6 for a more detailed explanation of each termination code Table 2 3 MRSW Values eae ie Description hex This macro has not been executed 0000 since i last time it was enabled 0001 The number of times a repetitive to macro response has been updated 7FFF 8000 Termination Code the macro is to disabled due to either an error an FFFF exception or an explicit disable 2 41 UNILINK HOST ADAPTER USER MANUAL 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 Macros will only be enabled when their associated secondary device is online otherwise the ERROR RESPONSE will be returned for that macro The adapter will return the ENABLE DISABLE MACRO EXECUTION command code the Source Identification number and a list containing a pair of 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 whether the requested action was successful 2 10 7 Initializing the Macro Response Buffer There are two ways to insure that only
33. the buffer data including the MRSW Code 01 will return all of the buffer data but only for the requested buffers with their exception flags set Code 02 will return only the MRSW for the requested buffers that have their exception flags set The macro response exception flag is reset each time that the buffer data is retrieved with response type codes 00 and 01 it is not reset with response code 02 UNILINK HOST ADAPTER 2 40 USER MANUAL 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 F rame The secondary address MRSW Primitive data length and the Primitive data will be returned for each buffer number requested that meets the response type condition Specifying buffer number 00 is a special case that ignores the value in the response type byte In this case the HIU will return the buffer number and buffer data for the first buffer that has its exception flag set This allows your host application program to receive any exceptions as they occur 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 Code will reflect the error The exception flag will also be set if the macro is explicitly disabled or the
34. the response the adapter will also send the ASCII carriage return and line feed characters OD and OA respectively so that messages are scrolled on non intelligent terminals When the adapter is powered up it enters the receive state and waits for the host computer to transmit the first command When a message is received the adapter will first verify the NITP frame by verifying the length field and the ECC If any errors are found the adapter will format and transmit the ERROR RESPONSE Typical errors are described below in Paragraph 5 2 If there are no NITP frame errors the adapter will verify and process the command code and its parameters After the command is processed the adapter will format and transmit the response to the host computer A 7 UNILINK HOST ADAPTER USER MANUAL USING THE NON INTELLIGENT TERMINAL PROTOCOL A 2 1 Enors and Enor Recovery The following ERROR RESPONSE codes from Chapter 6 relate to NITP data link errors 0086 0087 0089 008B 008C 008D 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 This means that your message data can not be longer than 290 bytes which yields 580 ASCII character bytes HOST FRAME TOO SHORT the frame received was less than twelve bytes in length The message body must at least consist of a command code The frame then must be a minim
35. will be a response The response will be one of the following e Anacknowledgment that the command was received e A command response e TheERROR RESPONSE UNILINK HOST ADAPTER 2 2 USER MANUAL OPERATION AND APPLICATION Commands Host UNILINK Computer Responses Secondar Figure 2 3 Host Computer P 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 will be returned The ERROR RESPONSE will also be returned if a network request does not complete within the host command timeout The possible error codes that may be returned in the ERROR RESPONSE and corrective actions to take are listed in Chapter 6 2 3 UNILINK HOST ADAPTER USER MANUAL 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 The MHIU HIU and NM arethree of the six configurable operating modes In addition to the above modes there are two Emulate Host Adapter EHA modes and a Standalone Network Manager SANM mode 2 3 1 HostInterface Unit Function
36. 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 1 Disable the trigger macro 2 Reissue theLINK MACRO command 3 Enablethe trigger macro to start executing the link again The link is not automatically terminated if the trigger macro fails 2 10 10 Network Performance You can improve the performance of your networks by adjusting the bandwidth of the HIUs The statistical commands will provide a picture of transaction bottlenecks that you can also adjust One performance measure was already discussed in Paragraph 2 6 2 2 10 10 1 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 2 45 UNILINK HOST ADAPTER USER MANUAL 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 hos
37. 0 Channel A 01 Channel B aa The secondary addresses to be switched Special cases are 00 all secondaries including the broadcast message channel will be switched to the channel specified by cc FF The channel specified by cc will be used to send broadcast messages UNILINK HOST ADAPTER 5 60 USER MANUAL 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 Otherwise this command can only be issued before the Network Manager is enabled This command can only be issued once per HIU and the buffers allocated will remain allocated until the Network Manager adapter is reset The Network Manager may not be able to allocate the number of NM buffers requested because of memory limitations The actual number of NM buffers allocated is returned in the response In addition you can specify whether the HIU has disconnect permission Disconnect permission allows an HIU to take a secondary device offline when the DISCONNECT SECONDARY command or disconnect macro is processed If the HIU does not have disconnect permission the secondary will be removed from the HI Us secondary log but the secondary will remain online Spe
38. 2001000202000ECFES5 The following table summarizes the NITP message structure Table A 2 NNP Message Structure Field Contents No of Characters Beginning Delimiter Colon 1 Character Count Hexadecimal 4 Body of Message Hexadecimal 580 max Error Checking Code Hexadecimal 4 Terminator Semicolon 1 Total 590 A 5 UNILINK HOST ADAPTER USER MANUAL USING THE NON INTELLIGENT TERMINAL PROTOCOL Figure A 2 illustrates how a TIWAY Primitive is enclosed in the adapter command string which is enclosed in the NITP message structure Primitive Descriptor Data Unit Length Field s Field s TIWAY Primitives Secondary Command Code Network Data UNILINK Host Adapter Commands Message Character Adapter Data Check Sum Count NITP Protocol Message Frame i Figure A 2 Illustrative NITP Message Structure UNILINK HOST ADAPTER A 6 USER MANUAL USING THE NON INTELLIGENT TERMINAL PROTOCOL A 2 NIIP 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 The adapter receives the message processes the command composes and frames the response and transmits the response to the host computer This command response sequence ensures that the messages are always delivered in their intended order After the semicolon in
39. 4 5 6 7 8 9 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 Figure 5 4 CONAG URE HIU Command Option 01 Bit Map Table 5 2 Baud Rates MSB LSB Network Baud Rate 110 150 300 600 1200 2400 an 4800 9600 19200 38400 57600 115200 00000000 CO00O 320000 o 00 00 0O0O N 0 0 0 0 0 0 o UNILINK HOST ADAPTER 5 22 USER MANUAL 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 or 1 second The REPORT HIU CONFIGURATION command will return 0000 hex for this parameter when using Local Line media The default value of 1 000 ms was defined to allow operation with a wide variety of modems but cause the network operation to be very slow You can improve the performance of your network by tuning the value of this parameter Most typical modems will work properly with a delay of 15 ms You can start at this value and either increment or decrement it until the circuit functions properly Option 03 The number of milliseconds to delay transmission after the CTS signal becomes active This parameter is r
40. AST NETWORK DATA TRANSFER command was issued These errors are logged because the POLL command is not available to clear the outstanding frame ff The total number of times the Network Manager changed to another channel due to errors This parameter will be zero if redundant media is not available UNILINK HOST ADAPTER 5 64 USER MANUAL 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 Command 38 cc rr Response 38 cc bbbbbbbb cccccccc dddddddd eeeeeeee ffff Usage PERFORMANCE Modes NM Parameters rr The reset counters code 00 Do not reset the counters 01 Reset the counters but do not return any statistics The channel field will be returned cc Channel specifier 00 Return statistics for Channel A only 01 Return statistics for Channel B only 02 Return two sets of statistics the first for Channel A and the second for Channel B bbbb The total number of TIWAY HDLC commands I F rames RRs and others sent to the network secondaries by the Network Manager This count does not include HDLC commands sent to retry an HIU cccc The total number of TIWAY HDLC I Frames sent to th
41. AY NETWORK PORTS 4 4 SEMMNG 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 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 e Local Line media o 115 2K baud o half duplex asynchronous and o NRZI e RS 232 C RS 423 A media o 9600 baud o full duplex o synchronous and o 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 1 as illustrated in Figure 4 7 The applicable baud rate settings are given in Table 4 4 These settings should match the settings for any other TIWAY I network devices UNILINK HOST ADAPTER 4 10 USER MANUAL THE TIWAY NETWORK PORTS DIPSWITCH 1 8 9 10 HOST COMMAND TIMEOUT TIWAY I BAUD RATE UP SYNCHRONOUS DOWN ASYNCHRONOUS TIWAY I UP FULL DUPLEX DOWN HALF DUPLEX PINAY UP NRZI DOWN NRZ TIWAY I UP NITP Figure 4 7 Network Port Dipswitc h Settings NOTE The L
42. Allocation Report HIU Status 5 19 UNILINK HOST ADAPTER USER MANUAL 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 However it must be issued before a macro can be defined Only thirty two unique Source Ids may be active at a time Memory management is aided with Source Ids because they group resources so that these resources can be released simultaneously Once the resources are released the memory will be packed to free space for future memory allocation requests Command 10 ss 00 Response 10 ss 00 Usage OPERATION Modes MHIU HIU Parameters SS The Source Id A unique number ranging from O1toFE 1 to 254 decimal used to identify each task or process using the HIUs resources oo Allocate Deallocate Code 00 Allocate the Source Id clear all resources allocated to that Source Id if any and put the Source Id in the active list 01 Deallocate the Source Id clear all the resources allocated to this Source ld if any and take the Source Id out of the active list UNILINK HOST ADAPTER 5 20 USER MANUAL HOST COMMAND SET REFERENCE 5 4 2 Configure HIU Command 11 The CONFIGURE
43. Configure Network M anager Report Network Manager Configuration Report Secondary Link Status Switch Channel Allocate Network Manager Buffers Report Network Manager Buffers Available Report Network Bandwidth Allocation Report Network Manager Secondary Statistics Report Network Manager Network Statistics UNILINK HOST ADAPTER 5 50 USER MANUAL 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 00 wvv Response 30 Usage CONFIGURATION Modes NM Parameters o0 The option number ranging from 01 to 0E Any options not specified in the command string will assume the default values Options can be specified in any order but may only occur once VVVV The parameter value The following describes the options and their associated parameter values Option 01 This parameter defines the TI WAY network communications parameters for both Channel A and Channel B The defaults for this option depend on the host port protocol If this option is not specified the Network Manager will assume that only Channel A is available and its communications parameters will default to e thesettings on Dipswitch 1 when using NITP and e when using the BDLC protocol o Local Line media is 115 2K baud half duplex asynchronous and NRZI and o RS 232 C
44. ERENCE 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 If the action macro cannot be executed for any reason such as the secondary has gone offline the macro link will be terminated The trigger macro will then continue to execute as a non linked macro 5 43 UNILINK HOST ADAPTER USER MANUAL 4 5 HOST COMMAND SET REFERENCE Macro Linking Procedure 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 AO 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 AO The action response buffer must be at least four bytes in length Define one macro buffer with the following features a Either repetitive or non repetitive b Noauto enable c Send Primitive macro type d Either Primitive 20 or AO with the length of data to transfer Define the other macro buffer with the following features a Non repetitive b Noauto enable c Send Primitive macro type d Either Primitive 30 or BO Issue the LINK MACRO command
45. GURE ADAPTER command must still be sent to enable the HIUs network interface 2 5 3 The CONAG URE HIU Command The CONFIGURE HIU command defines the network parameters for an HIU function and enables the HIUs TIWAY 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 has been performed 2 5 4 The CONAG URE 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 network options such as auto redundant media 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 the tasks can check the configuration processed flag to determine whether or not they can begin issuing commands to the adapter UNILINK HOST ADAPTER 2 14 USER MANUAL OPERATION AND APPLICATION 2 5 5 Configuring the Standalone Network Manager The Standalone Network Manager SANM mode is configur
46. 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 ra Host Interface Cable UNILINK TIWAY UniLink Host Adapter MHU Figure 1 5 Single Host Network 1 5 UNILINK HOST ADAPTER USER MANUAL 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 With an additional UNILINK Host Adapter you can also add a personal computer workstation to the network for statistical quality control or other uses Host Host Computer Computer UNILINK UNILINK UniLink Host UniLink Host Adapter MHU Adapter MHU Figure 1 6 Multiple Host Network UNILINK HOST ADAPTER 1 6 USER MANUAL THE UNILINK HOST ADAPTER 1 4 TIVWAY I SYSTEM CHARACTERISTICS TIWAY is a bus structure Local Area Network LAN designed for industrial environments The TIWAY network connects a series of Texas Instruments Programmable Controllers P Cs and other devices to one or more host computers With the network you can obtain modify or re
47. L 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 connector wired as Data Terminal Equipment DTE for connection to Data Communications Equipment DCE This connector uses the RS 232 C 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 Host Adapter Host Communications Port A000654 Figure 3 2 Host Communications Port UNILINK HOST ADAPTER 3 2 USER MANUAL 3 2 1 CONFIGURING THE HOST COMPUTER PORT Table 3 1 RS 232 C RS 423 A D Connector Pin Assignment eet Bint cont Protective Ground Signal Ground Transmitted Data Recieve Data Request To Send Clear To Send Data Set Ready Data Terminal Ready Recieve Line Signal Detector 1 7 2 3 4 5 6 20 8 kk N A Transmitter Signal Element Timing Reciever Si nal n ement Timing 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 and baud r
48. LLOCATE HIU BANDWIDTH command It also returns the number of Frame pairs and the number of data bytes sent and received by each type of macro The first set of statistics corresponds to repetitive macros and the second set to non repetitive macros The counters stop incrementing after reaching their maximum value and must be reset with the reset code Command 1A rr Usage PERFORMANCE Modes MHIU HIU Parameters rr The reset counters code 00 Do not reset the counters 01 Reset the counters but do not return any statistics hh The number of Network Manager buffers allocated to the HIU This number will be zero until the HIU is initialized II The maximum number of repetitive macros that can be executing at one time This number will be zero until the HIU is initialized nn The number of outstanding requests per secondary This number will be zero until the HIU is initialized iii The number if TIWAY HDLC I Frame pairs sent and received by the macro The term l F rame pair refers to the fact that every Primitive has an Frame command and response pair This count does not include the Il Frames required for Network Manager to HIU communication SSSS The number of TIWAY HDLC I Frame bytes sent by the macro This count only contains the data bytes of the Frame and none of the HDLC overhead rrrr The number of TIWAY HDLC l Frame bytes received by the macro This count only contains the data bytes of the Frame and
49. MAND 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 The counters are not incremented after reaching their maximum value and must be reset explicitly Command 37 aa rr Response 37 aa bbbb cccc dddd eeee ff Usage PERFORMANCE Modes NM Parameters aa The secondary device address If set to FF and rr is set to 01 the statistics counters for all secondaries will be reset rr The reset counters code 00 Do not reset the counters 01 Reset the counters but do not return any statistics The address field will be returned bbbb The total number of TIWAY HDLC commands l F rames RRs and others sent to the secondary by the Network Manager This count does not include HDLC commands sent to retry an HIU cccc The total number of TIWAY HDLC I Frames sent to the secondary by the Network Manager dddd The total number of network errors associated with the secondary including bad CRCs aborts timeouts and the loss of RS 232 C RS 423 A control signals eeee The number of TIWAY HDLC errors including command rejects FRMR invalid HDLC responses and sequence errors This number may reflect errors logged because a BROADC
50. Macro Response Command 15 ss tt bb Response 15 ss tt bb aa cccc pppp Enable Disable Macro Execution Command 16 ss bb tt Response 16 ss bb rr Initialize Macro Response Buffer Command 17 ss bb tt rrrr Response 17 ss bb Report Memory Usage Command 18 Response 18 mmmmmmmm nnnn II ss Allocate HIU Bandwidth Command 19 II nn Response 19 5 73 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE Report HIU Bandwidth Allocation Command 1A rr 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 00 vvvv Response 1C ss b1 b2 ADAPTER CONFIGURATION COMMANDS Configure Adapter Command 20 01 vvwv 00 vvvv Response 20 Report Adapter Configuration Command 21 Response 21 dddddddd ff 01 vvvv 02 vvwv 03 vvwv 04 vvvv NETWORK MANAGER COMMANDS Configure Network M anager Command 30 00 wvv Response 30 Report Network Manager Configuration Command 31 Response 31 dddddddd ff 00 vvvv Report Secondary Link Status Command 32 Response 32 nnnn ss Switch Channel Command 33 cc aa Response 33 cc Allocate Network Manager Buffers Command 34 aa nn dd Response 34 aa mm Report Network Manager Buffers Available Command 35 Response 35 bbbb cccc Report Network Bandwidth Allocation Command 36 aa rr UNILINK HOST ADAPTER 5 74 USER MANUAL HOST COMMAND SET REFERENCE Rep
51. NILINK TIWAY1 or equivalent wire Host Adapter Network 3 Figure 3 6 Multidrop Host Interface Circuit NOTE You should select half duplex operation for the modems when you multidrop to prevent the network modems from simultaneously raising the carrier UNILINK HOST ADAPTER 3 6 USER MANUAL CONFIGURING THE HOST COMPUTER PORT 3 2 4 XON XOFF Aow Contol 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 For BDLC the XON and XOFF 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 by setting Position 3 of Dipswitch 2 up The adapter will recover from host computer failures by resetting the flow control when the starting delimiter of the next frame is received However that frame will be discarded and must be retransmitted by the host computer If you are using a Network Interface Unit NIU i e Ethernet Sytek etc or a host device that implements XON XOFF flow control with the BDLC
52. SIEMENS SIMATIC TIWAY 1 UNILINK Host Adapter User Manual Order Number PPX TIWAY 81 21 2 Manual Assembly Number 2587871 0045 Second Edition 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 network The UNILINK Host Adapter also referred to as the adapter in this manual is a hardware and software extension of the original TIWAY Host Adapter Figure 1 1 UNILINK Host Adapter 1 1 UNILINK HOST ADAPTER USER MANUAL 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 nterface 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 Figure 1 2 Personality Interface Module PIM 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 Host Adapter or the BDLC protocol an advanced byte oriented subset of the HDLC protocol Also there are two TIWAY interface ports and an external I O point block UNILINK HOST ADAPTER 1 2 USER MANUAL
53. SSSSSSS UNILINK HOST ADAPTER USER MANUAL The number of valid RESET ADAPTER commands processed The number of polls transmitted to secondaries The number of TIWAY I HDLC l Frames transmitted to secondaries The number of network errors including CRC errors timeouts aborts and the loss of RS 232 C RS 423 A control signals The number of TIWAY HDLC l F rames received This value will always be zero The number of TIWAY HDLC errors including command rejects FRMR invalid HDLC responses and sequence errors This value will always be zero The number of times that secondaries have been initialized as a direct request by the HIU This value will always be zero 5 18 HOST COMMAND SET REFERENCE 5 4 THE EXTENDED HIU COMMANDS The Extended HIU commands enhance the original TIWAY 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 These commands will not be accepted by any UNILINK Host Adapter that is configured to emulate a TI WAY Host Adapter or NM or SANM Allocate Source Id Configure HIU Report HIU Configuration Allocate Macro Buffers Define Macro Gather Macro Response Enable Disable Macro E xecution Initialize Macro Response Buffer Report Memory Usage Allocate HIU Bandwidth Report HIU Bandwidth
54. THE UNILINK HOST ADAPTER Host Computer RS 232 C RS 423A Host Interface Command Processor Host Ac TIWAY xternal Host Adapter Interface Input Point Output Point TIWAY Network Secondaries Figure 1 3 UNILINK Host Adapter Block Diagram Host Computer Port Power Connections AC AC NEUT CND LINE TIWAY Ports External I O Points PPX 500 7111 Dual Local Line media ports shown here Figure 1 4 UNILINK Host Adapter Physical Features 1 3 UNILINK HOST ADAPTER USER MANUAL 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 The adapter can be reset locally with an internal switch or remotely with a host issued command The adapter supports secondary to secondary communications without complex host software or additional hardware The adapter is backward compatible with TIWAY Host Adapter software and drivers The adapter includes an independent host communications port capable of serial communications at 38 4K baud This port operates simultaneously with the network ports This host port provides an optional advanced host protocol for improved throughput and data integrity This protocol
55. The reset will begin within one second after the reset command response is returned to the host Your applications software should allow an additional five second delay before issuing another command to allow the diagnostics to complete The response to either reset command will not be returned until the adapter is polled when using the host BDLC protocol Chapter 3 provides more information on host interface protocols UNILINK HOST ADAPTER 2 22 USER MANUAL OPERATION AND APPLICATION 2 8 2 The Extemal 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 F or safety critical applications any external alarms should be hard wired independently of the P C UNILINK Host 20 40 VDC Adapter Remote ADAPTER GOOD Indicator Figure 2 13 Extemal Input Output Points Example Application 2 23 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION 2 8 2 1 The Extemal 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 01 Read the input then reset the latch 02 Reset the latch then read the input Options 00 and O1 report whethe
56. 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 network The HIU uses the memory in the adapter for macro buffers and to store host to secondary statistics as shown in Figure 2 4 Macro buffers are used to store macro commands and responses Macros provide a method for connecting disconnecting or sending a Primitive to a secondary device without delays in host processing Macros are discussed further in Paragraph 2 10 1 Commands are received from the host computer and checked for validity Then 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 mode combines the HIU function and the Network Manager function UNILINK HOST ADAPTER 2 4 USER MANUAL 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 In the background the adapter is continuously collecting statistics on the number
57. 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 The normal response returned will be the command code and a list of secondaries that disconnected properly If none of the addresses in the list were connected the response will be the command code and a 00 address value The HIU function must have permission to issue a disconnect to a secondary before the secondary is actually taken offline If the permission is not granted the secondary device will be removed from the secondary log but will remain online Option 09 of the CONFIGURE NETWORK MANAGER command defines the default for granting this permission by the background monitor In addition the ALLOCATE NETWORK MANAGER BUFFERS command can specify the permission 2 9 5 Retieving Adapter Statistics 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 This will help build a profile of which commands are proces
58. USER MANUAL 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 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 counters will not be updated for offline secondaries or after reaching their maximum value of FF FF The host computer must explicitly reset the counters by issuing this command with the reset counter code Command 07 aa rr Response 07 aa bbbb cccc dddd eeee ffff gggg hhhh iiii Usage PERFORMANCE Modes MHIU EHA HIU EHA MHIU HIU Parameters aa The secondary address If the special address FF is used and the reset code parameter is set to 01 the statistics counters for all secondaries will be reset The special address cannot be used to return the statistics counters for all secondaries simultaneously rr The reset statistics counters code This optional parameter was added to the original TIWAY 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 is returned with the command code wh
59. a channels Ports 1 and 2 described in more detail in Chapter 4 You may select to use only one channel or both by specifying the appropriate value in the CONFIGURE NETWORK MANAGER command Using redundant media increases the mission reliability of the network or the probability that the network will remain operational when a random failure occurs When first initialized the adapter will communicate on 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 or all secondary devices The channel can be switched even if the auto redundant media feature is not active however if it is active the Network Manager function will switch the channel back if a failure occurs Channel B or Port 2 must be available or an ERROR RESPONSE will be returned when you try to issue this command If the command is accepted the adapter will return the command code and the channel code The primary function of redundant media is to provide a second communications path in the event of a failure on the primary path This can also 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 or receiving in a given instance The auto redundant media feature allows the Network Manager function to automatically swit
60. adding all the received frame bytes excluding the starting and ending flags and any inserted DLEs The procedure is 1 2 3 Zero the two calculation registers Begin with the address field byte Add the byte to the most significant register including any carry bit generated Use only eight bit arithmetic in these steps Add the most significant register to the least significant register again including the carry Get the next frame byte and go to Step 3 When there are no more bytes both calculation registers should be ZERO or a NEGATIVE ZERO represented by FF hex If not then an error has occurred Example B 4 illustrates the receiver check of the BCS in Example B 3 Notice that both registers contain negative zero values at the end of the calculation indicating a successful frame transmission Note All values are in hexadecimal notation Example B 4 Block Checksum Receiver Calculation Frame Byte MSB LSB 00 00 oi 01 01 93 94 gt 95 D5 gt 6A FF 95 FF FF UNILINK HOST ADAPTER B 18 USER MANUAL Appendices C and D not available in electronic form APPENDIX E CONAG URATION WORKSHEET Network Name Cable Diagram Reference Adapter Configuration Parameters Adapter Mode MHIU C HIU _ MHIU EHA C HIU EHA C NM C SANM Address Macro Memory _ 16 kbytes Requirements _ 24 kbytes _ As much as possible E 1
61. ager Function UNILINK HOST ADAPTER 2 6 USER MANUAL 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 e Master Host Interface Unit MHIU e Network Manager NM e Standalone Network Manager SANM e Master Host Interface U nit E mulate 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 functions as shown in Figure 2 6 A host computer connected toan MHIU can communicate with secondary devices through the HIU function and control network performance through the NM function Remember only one adapter in a TIWAY I network may have the NM function Figure 2 6 Master Host Interface Unit Diagram 2 7 UNILINK HOST ADAPTER USER MANUAL 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 RS 232 C RS 4 Host Interface UNILINK TIWAY UniLink Host Adapter MHU Figure 2 7 Typical Single Host Network Multiple host networks can be configured with a variety of adapters in different operating modes as illustrated in Figure 2 8 and Figure 2 9 Since the NM function is not in the same adapter with t
62. at may indicate problems These counters are not updated when they reach their maximum value of FFFF The host computer must issue this command with the reset counter code set to reset these counters Command 08 rr IHL mmmm nnnn ooco pppp qaqaq rrrr ssssssss Usage PERFORMANCE Modes MHIU EHA HIU EHA MHIU HIU Parameters rr The reset statistics counters code This parameter was added to the original TIWAY Host Adapter command to allow the counters to be reset 00 Return the statistics counters but do not reset them 01 Reset the statistics counters and do not return any counts aaaa The number of invalid commands received from the host computer Invalid commands do not include commands that are rejected due to transmission errors such as a bad checksum bbbb The number of valid SEND NETWORK DATA commands processed cccc The number of valid BROADCAST NETWORK DATA commands processed dddd The number of valid POLL SECONDARY commands processed eeece The number of valid CONNECT SECONDARIES commands processed ffff The number of valid DISCONNECT SECONDARIES commands processed gggg The number of valid READ SECONDARY LOG commands processed hhhh The number of valid READ SECONDARY DIAGNOSTICS commands processed iii The number of valid READ ADAPTER DIAGNOSTICS commands processed 5 17 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE jiji kkkk II mmmm nnann pppp qqqq rrrr S
63. at the other TI WAY Port uses RS 232 C media The media for both ports or channels must be the same 6 3 UNILINK HOST ADAPTER USER MANUAL 2009 200A 2010 2011 2012 2013 2014 2015 2016 2017 2018 ERROR CODES AND DIAGNOSTICS The device addressed in the command string was not an HIU 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 tothe number of devices in your TI WAY network plus a few for growth See the CONFIGURE ADAPTER command code 20 You tried to allocate a Source Id with a value of 0 The valid range for Source Ids is 1 to 255 01 to FF hex You have already allocated 32 Source Ids You will have to use a Source Id that has already been allocated or clear a Source Ids resources to begin another You can get a list of the Source Ids already allocated with the REPORT MEMORY USAGE command code 18 The Source Id specified in the command string has not been allocated Check the Source Id value and use the ALLOCATE SOURCE ID command code 10 to allocate it if necessary The macro type specified in the command string is invalid The valid macro types are 01 02 and 03 The macro command buffer is too small for the macro specified with the DEFINE MACRO command You will need to shorten t
64. ates up to 38 4K bits per second These parameters 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 DO00000000 DOON000001 Number 1 Number 2 o eecccce Reset LEDs Figure 3 3 Dipswitch Locations UNILINK HOST ADAPTER USER MANUAL 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 DIE 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 not exceed 50 feet in length You may order this cable from your Siemens distributor P N VPU 200 3605 Attached Device UNILINK Host Adapter TE GND Ne oa x TxD RxD RTS RTS CTS CTS DSR DSR
65. b Response 15 ss tt bb aa ccccllll pppp Usage OPERATION Modes MHIU HIU Parameters SS The Source d number tt The response type which qualifies which buffers will be returned and what kind of buffer data to return If no buffers are qualified only the ss and tt fields are returned 00 Return all buffer data 01 For the macro buffer numbers requested return the buffer data only for those with their exception flags set 02 Same as option 01 but do not return the Primitive field pppp This option will not clear the exception flag since no response data is returned bb The macro buffer number to gather the response from If bb equals 00 the HIU will ignore the tt parameter and select the first buffer for the Source Id to set its exception flag Since the exception flag is cleared when this command is processed this buffer will not be selected again until it sets the exception flag again When selecting several specific buffers you must make sure that the combined length of all responses will not exceed the maximum message length or an ERROR RESPONSE will be returned The maximum message length is 290 bytes for the BDLC protocol and 580 bytes for the NITP protocol including the command code and other parameters aa The secondary device address to send the macro command to cccc The Macro Response Status Word MRSW which indicates the status of the macro response and the number of
66. cation 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 CHAPTER 6 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 The NM function is possibly offline due to a malfunction or its maximum poll delay is longer than the host command timeout in the HIU This error could be the result of a global connect or global disconnect 0002 A TIWAY HDLC error occurred with the addressed secondary that could not be corrected Reset the secondary device 0003 The wrong secondary device address was returned to the HIU in the response Reissue the command If this error continues to occur you will need to reset the Network Manager which also resets the TI WAY network 0006 The command string tried to use secondary address 00 Retransmit the command with the correct secondary address 0008 TheNM could not process the stream of bits from the secondary fast enough Resetting the adapter with the NM function should clear this problem If this error continues to be returned report this problem by calling the Texas In
67. ccessfully If no address in the list was connected the response will be the command code and a 00 address value NOTE The host computer must wait for the response to be returned for the CONNECT SECONDARY and READ SECONDARY 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 2 25 UNILINK HOST ADAPTER USER MANUAL 2 9 2 OPERATION AND APPLICATION Sending Data And From Secondary Devices After the secondary device is connected your applications software can send TIWAY Primitives to the secondary with the SEND NETWORK DATA command or the BROADCAST NETWORK DATA TRANSFER command The TIWAY 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 The SEND NETWORK DATA command transfers a TIWAY Primitive toa specified secondary device When completed the adapter will return the command code the secondary address and the Primitive response 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 ADAPTER 2 26 USER MANUAL OPERATION AND APPLICATION The BROADCAST NETWORK DATA TRANSFER command will send the Primitive to all logical
68. ch 1 Address Positions OONDOARWMY O ae ee eee esses sets 3 O OODODODODODOOO000000 Nolo lt tolol ee tolol i tole et tolol te tolol i Volo t tolom N ool tol tol tol tol tol fol tol tol tol tol tol tol tol toll fe 5 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 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 The baud rate settings are shown in Table 3 2 Position 9 of Dipswitch 2 defines the adapter s operational mode discussed further in Chapter 2 Position 10 should be down for normal operation Positions 9 10 of Dipswitch 1 define the Host Command timeout value discussed in Paragraph 3 4 3 15 UNILINK HOST ADAPTER USER MANUAL CONFIGURING THE HOST COMPUTER PORT 3 4 HOSTCOMMAND 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 tothe host computer This time out function operates with either host communication protocol for the time out values shown in Table 3 4 Note that a timeout value of 0 seconds signifies that the adapter will not accept any host commands since the timeout occurs immediately When the Host
69. ch a secondary device to the opposite channel if communications can no longer continue on the current channel The secondary device will be switched if it fails to respond consecutively in maximum retry count times The maximum retry count is specified in the CONFIGURE NETWORK MANAGER command and defaults to 3 times Once the secondary has been switched the Network Manager function will attempt to communicate again on the new channel up to the maximum retry count If the 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 Background Monitor 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 the communications status for each channel and for each secondary whether the secondary is online or 2 17 UNILINK HOST ADAPTER USER MANUAL 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 re
70. cifying this ability here takes precedence over the background monitor defaults specified in the CONFIGURE NETWORK MANAGER command Command 34 aanndd Response 34aamm Usage CONFIGURATION Modes NM Parameters aa the HIU address to allocate NM buffers for nn The number of NM buffers to allocate ranging from 01 to FF hex The average number of buffers allocated to each HIU for a multiple host network should range between 5 to 10 buffers dd Set to 01 to allow the HIU to issue the disconnect command When set to 00 it will prevent the HIU from issuing the disconnect command mm The number of NM buffers allocated to the HIU This value may be less than the number requested in the command and will be 00 if no buffers were allocated because there was no buffer memory available 5 61 UNILINK HOST ADAPTER USER MANUAL 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 HI Us Command 35 Response 35 bbbb cccc Usage PERFORMANCE Modes NM Parameters bbbb The total number of Network Manager buffers cccc The number of buffers available for allocation to HIUs UNILINK HOST ADAPTER 5 62 USER MANUAL HOST COMMAND SET REFERENCE 5 6 7 Report Network Bandwidth Allocation 36 The REPORT NETWORK BANDWIDTH ALLOCATION command returns the
71. code subfield and up to 287 command parameter data bytes The length subfield contains the hexadecimal count of the number of bytes in the information field The smallest information field will contain the length subfield and the command code subfield for a minimum count of three or 0003 Inserted DLEs are not included in the length count The exception to this format is given in the discussion on the FRMR response in Paragraph B 5 7 UNILINK HOST ADAPTER B 4 USER MANUAL 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 The method for calculating and checking the BCS is discussed in Paragraph B 7 Figure B 3 illustrates how a TIWAY Primitive is enclosed in the adapter command string which is enclosed in the BDLC I F rame Primitive Elodie Data i a Primitives Secondary Command Code Network Data UNILINK Host Adapter Adapter Adapter BDLC Protocol I Frame Figure B 3 Illustrative BDLC I Fraame B 5 UNILINK HOST ADAPTER USER MANUAL USING THE BDLC PROTOCOL B 3 BDLC PROTOCOLCONTROL FELD STRUCTURES The control field will be one of three for
72. cro buffer cannot be enabled because the secondary device associated with it is offline 5 34 HOST COMMAND SET REFERENCE Example 16 OF 03 01 C3 00 3E 01 Bytes 7 amp 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 ENABLE DISABLE MACRO EXECUTION Example 5 1 ENABLE DISABLE MACRO EXECUTION Command 16 OF 03 00 C3 00 3E 07 Bytes 7 amp 8 Buffer 3E not enabled because secondary is offline Bytes 5 6 Buffer C3 disabled Bytes 3 4 Buffer 03 enabled Byte 2 Source Identification Number Byte 1 Command Code ENABLE DISABLE MACRO EXECUTION Example 5 2 ENABLE DISABLE MACRO EXECUTION Response 5 35 UNILINK HOST ADAPTER USER MANUAL 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 Command 17 ss bbtt rrrr Response 17 ss bb Usage OPERATION Modes MHIU HIU Parameters SS The Source d number bb The macro buffer number in which to store this predefined response tt This parameter will automatically enable the macro for execution when set to 01 otherwise the
73. d by the adapter B 15 UNILINK HOST ADAPTER USER MANUAL USING THE BDLC PROTOCOL B 7 BLOCK CHECKSUM GENERATION AND CHECKING To calculate the BCS 1 2 3 6 7 Zero both BCS field bytes Begin with the address field byte Add the byte to the most significant BCS byte including any carry bit generated Use only eight bit arithmetic in these steps Add the most significant BCS byte to the least significant BCS byte again including the carry Get the next frame byte and go to Step 3 If there are no more bytes continue with the following steps Add the least significant byte to the most significant byte Calculate the ones complement of the most significant BCS byte Example B 3 illustrates how to calculate the BCS on an example frame The BCS like the Cyclic Redundancy Checksum CRC detects burst errors single bit errors and most double bit errors UNILINK HOST ADAPTER B 16 USER MANUAL USING THE BDLC PROTOCOL Example B 3 Block Checksum Transmitter Calculation DLE STX Address Control Information BCS DLE ETX 1002 01 93 1003 SNRM Note All values are in hexadecimal notation BCS MSB LSB Bt 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 Frame BCS BCS Byte MSB LSB 00 00 01 o1 m ae 93 gt 94 gt 95 2A _ 95 Complement D5 the MSB The BCS is then D595 B 17 UNILINK HOST ADAPTER USER MANUAL USING THE BDLC PROTOCOL The receiver checks the BCS by
74. d 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 TOO0000000 DOON000000 Number 1 Number 2 Reset LEDs Figure 6 1 Adapter LEDs The diagnostic tests verify the operation of the following e Theintegrity of the diagnostics Read Only Memory ROM e The integrity of the adapter s microprocessor including its Random Access Memory RAM and communications circuits e Theintegrity of the adapter s Local Line and Host media boards power supply and watchdog timer e Theintegrity of the Personality Interface Module PIM ROM 6 9 UNILINK HOST ADAPTER USER MANUAL 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 At any given time the Online Receive and Transmit LEDs may be on off or flashing during normal operation O O O O O O Adapter Online Receive Transmit Good Figure 6 2 LEDs During Nomal Operation 6 4 2 Performing Diagnostic Tests The diagnostic tests are initiated either by pressing the RESET switch located tothe left of the LE Ds or by issuin
75. d only once after the adapter is reset or powered up Noticethat you must include Option 01 to select the operating mode NOTE If the first command sent to the adapter is one of the Base HIU commands the adapter will automatically begin operation in the Emulate Host Adapter EHA mode and the defaults for this command will be assumed Command 20 01 ww 00 vwwv Response 20 Usage CONFIGURATION Parameters o0 The option number ranging from 02 to 04 Any options not specified in the command string except Option 01 will assume the default values Options can be specified in any order but may only occur once VVVV The parameter value The following describes the options and their associated parameter values Option 01 Defines the basic adapter configuration This parameter must be specified vvvv 0000 Configure as an MHIU in EHA mode vvvv 0001 Configure as an HIU in EHA mode vvvv 0002 Configureas an HIU vvvv 0003 Configure as a Network M anager vvvv 0004 Configure as an MHIU Option 02 The secondary address of the HIU function ranging from 1 to 254 01 to FE hex The address will default to 254 for the HIU modes and 0 for the MHIU and Network Manager modes This address should be within the range defined by Option 03 and 5 47 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE should be unique HI Us function like other secondary devices and will use one of the availabl
76. d with a UA and then begin the reset The adapter will not respond to any commands until it has completed the power up diagnostics NOTE Power up diagnostics requires a minimum of 7 seconds to complete During this time the adapter will not respond to any host communications UA The Unnumbered Acknowledgment command is sent by the adapter in response to the SNRM and DISC commands to acknowledge their reception DM The Disconnect Mode response is returned by the adapter any time the host issues a command other than an SNRM when the adapter is in the Disconnected Mode RR The Receive Ready command is used by the host computer to poll for data and by the adapter to indicate the reception of a message and or that the host can send another message UNILINK HOST ADAPTER B 8 USER MANUAL USING THE BDLC PROTOCOL e 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 l Frames and poll with RRs until the adapter responds with an RR or an l F rame e REJ The Reject response is used by the adapter to indicate that a message frame was received out of order e FRMR TheFrame Error response is used by the adapter when o an BCS error free Frame is received with a control field that is invalid or not implemented or o anl Frameor UI is received with an information field that exceeds the maximum buffer size or O an BCS error
77. e adapter to be offline Retransmit the command 100C Thereis not enough memory available to allocate an area to hold status information for the requested secondary You can deallocate resources for a Source Id to gain enough memory for the secondary status information See the ALLOCATE SOURCE ID commana code 10 100D Thereis not enough memory available to allocate another Source Id You can deallocate resources for another Source Id to gain enough memory to allocate this one 100E The bandwidth statistics for the requested HIU are not available because the HIU has not been initialized by the Network Manager 100F You requested auto redundant mode without signifying that Channel B was available or tried issuing the SWITCH CHANNEL command without making Channel B See the CONFIGURE NETWORK MANAGER command code 30 Option 01 2002 TheNM andHIU are not configured for an MHIU You will need to issue command code 30 to configure the NM and command code 11 to configure the HIU 2003 The NM is not configured You will need to issue command code 30 before continuing 2004 TheHIU of the MHIU is not configured You will need to issue command code 11 before continuing 2006 Your command string contained the same option code twice Correct and reissue the command 2007 The HIU is already configured You can only issue command code 11 once after each adapter reset 2008 You tried to specify that one TIWAY Port uses Local Line media and th
78. e network secondaries by the Network M anager dddd The total number of network errors associated with the network secondaries including bad CRCs aborts timeouts and the loss of RS 232 C RS 423 A control signals 5 65 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE UNILINK HOST ADAPTER USER MANUAL The number of TIWAY 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 The total number of times the Network Manager changed to another channel due to errors This parameter will be zero if redundant media is not available 5 66 HOST COMMAND SET REFERENCE 5 7 MODE INDEPENDENT COMMANDS The following commands may be issued at any time toa 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 e Modify External Output Status e Report External Input Status e Soft Reset e Reset Adapter 5 67 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 5 7 1 Modify Extemal Output Status FC The MODIFY EXTERNAL OUTPUT STATUS command controls the external output point provided by the UNILINK Adapter Command FC cc Response FC Parameters cc O
79. e 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 The most efficient value for this parameter is the number of actual secondaries plus the number of HIUs plus some padding for network growth In addition you should set your secondary device addresses so that they are numbered consecutively Background Monitor checks each address beginning at one up to the value of this parameter Even though there is not a physical device for a particular address it gets checked You must make sure that all secondary and HIU addresses are less than this value or they will not be recognized as valid network components Values range from 1 to 254 01 hex to FE hex and will default to 254 Option 04 This parameter defines the maximum amount of memory to set UNILINK HOST ADAPTER USER MANUAL aside for macro storage in MHIUs and HIUs This option does not apply to an adapter configured as a Network Manager only or adapters in the EHA mode If this option is not specified it will default to 0000 hex or 16 kbytes of memory vvvv 0000 Reserve 16 kbytes of memory for macro storage vvvv 0001 Reserve 24 kbytes of memory for macro storage vvvv 0002 Reserve as much memory as possible for macro storage Only 24 kbytes will be
80. econd 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 Command FF Response FF 5 71 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 5 8 COMMAND SYNTAX QUIC K 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 Connect Secondaries Command 04 aa Response 04 bb Disconnect Secondaries Command 05 aa Response 05 bb Read Secondary Log Command 06 Response 06 aa Read Secondary Diagnostics Command 07 aa rr Response 07 aa bbbb cccc dddd eeee ffff gggg hhhh iiii Read Adapter Diagnostics Command 08 rr Response 08 aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk HI mmmm nnnn oooo pppp qqqq rrrr SSSSSSSS UNILINK HOST ADAPTER 5 72 USER MANUAL HOST COMMAND SET REFERENCE THE EXTENDED HIU COMMANDS Allocate Source Id Command 10 ss 00 Response 10 ss 00 Configure HIU Command Command 11 00 vvvv Response 11 Report HIU Configuration Command 12 Response 12 dddddddd ff 01 vww 02 vvwv 03 wv Allocate Macro Storage Buffers Command 13 ss xxxx rrrr Response 13 ss bb Define Macro Command 14 ss bb aa tt 00 eeee pppp Response 14 ss bb Gather
81. econdary Log 06 e Read Secondary Diagnostics 07 e Read Adapter Diagnostics 08 These commands will not be accepted by either the hosted or the stand alone Network Manager modes 5 7 UNILINK HOST ADAPTER USER MANUAL 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 01 aa pppp Response 01 aa pppp Usage OPERATION Modes MHIU EHA HIU EHA MHIU HIU Parameters aa The secondary address to receive the Primitive data pppp The TIWAY I Primitive data command or response This parameter begins with the length field of the Primitive UNILINK HOST ADAPTER 5 8 USER MANUAL 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 HDLC integrity checks to ensure message delivery If the adapter is configured as an MHIU in EHA mode the host applications software must is
82. ed VVVV The parameter values described in the CONFIGURE HIU command UNILINK HOST ADAPTER 5 24 USER MANUAL 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 Figure 5 6 shows the relationship between Source Id numbers and macro buffers These buffers remain allocated to the Source Id number until an ALLOCATE SOURCE ID command is issued to free them up Source ID 1 Source ID 2 Source ID 32 Up 10 32 OE 1A E5 enag source IDs Macro Buffer Macro Buffer Macro Buffer 1 4 Up to 254 Macro Buffer Macro Buffer Macro Buffer 35 33 Macro 2 3 Buffers Macro Buffer Macro Buffer Macro Buffer 63 80 60 Macro Buffer g d 87 Macro Buffer 109 Figure 5 6 Source Id Mac mw Buffer Relationship Command 13 ss xxxx rrrr Response 13 ss bb Usage OPERATION Modes MHIU HIU Parameters SS The Source Id number previously defined with the ALLOCATE SOURCE ID command XXXX The length of the macro command buffer in bytes rrrr The length of the macro response buffer in bytes NOTE 5 25 UNILINK HOST ADAPTER USER MANUAL bb HOST COMMAND SET REFERENCE In addition to the bytes specified 22 bytes will be added for header information If this t
83. ed 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 The other positions of Dipswitch 1 define the TI WAY network parameters DIPSWITCH 1 Cee HOST COMMAND TIMEOUT 0 TIWAY I BAUD RATE UP SYNCHRONOUS DOWN ASYNCHRONOUS TIWAY I UP FULL DUPLEX DOWN HALF DUPLEX TIWAY I UP NRZI DOWN NRZ TIWAY I DEFAULTS TO NITP DIPSWITCH 2 U 1 2 3 4 5 6 Fi 8 9 10 UP TEST MODE DOWN RUN MODE UP HIU EHA amp IO LOOP TEST DOWN MHIU EHA UNUSED UP AUTO REDUNDANT MEDIA DOWN NO REDUND ANT MEDIA HIU NM BUFFERS UP DISC DOWN NO DISC UP AFTER CTS DELAY DOWN NO DELAY Figure 2 12 Standalone Network Manager Dipswitc h Settings 2 15 UNILINK HOST ADAPTER USER MANUAL 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 No delay is selected when the dipswitch is down When Position 2 of Dipswitch 2 is up all HIUs are given permission to issue a network disconnect DISC This permission is granted by the NM function when it
84. en this option is selected bbbb The number of polls successfully transmitted to the secondary cccc The number of TIWAY HDLC l Frames successfully transmitted to the secondary dddd The number of network errors including CRC errors timeouts aborts and the loss of RS 232 C RS 423 A control signals eeee The number of TIWAY HDLC I Frames received ffff This value will always be zero gggg The number of TIWAY 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 in a network that contains Intelligent Tank Transmitters ITTs as secondary devices These errors are logged because the ITT returned a REJ even though the information was received 5 15 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE hhhh This value will always be zero iii The number of times the secondary has been initialized as a direct request by the HIU UNILINK HOST ADAPTER 5 16 USER MANUAL 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 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 th
85. ength for a BDLC protocol frame is 9 bytes The secondary device addressed in the command string is not connected to the TIWAY I network Recheck the address in the command string and the addresses of the secondary devices Then issue a CONNECT SECONDARY command or enable a macro that was previously defined to connect that secondary The colon that begins an NITP message frame was missing Correct the frame and retransmit it The character count field value did not match the number of characters received This could be caused by an error in the software driver In either case your applications software should retry the message at least three times If this same error returns all three times check for an error in your software driver The checksum calculated by the adapter did not match the Error Checking Code or the Block Checksum field value Retry the message at least three times If this same error returns all three times check for an error in your software driver UNILINK HOST ADAPTER 6 2 USER MANUAL 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 If this same error returns all three times check for an error in your software driver 100B TheHIU has not been initialized by the Network Manager causing th
86. ent 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 Command 02 pppp Response 02 Usage OPERATION Modes MHI Parameters Pppp UNILINK HOST ADAPTER USER MANUAL U EHA HIU EHA MHIU HIU The TIWAY Primitive request This parameter begins with the length field of the Primitive 5 10 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 Command 03 aa Response 03 aa pppp Usage OPERATION Modes MHIU EHA Parameters aa The secondary address being polled pppp The TIWAY Primitive data response This parameter begins with the length field of the Primitive 5 11 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 5 3 4 Connect Secondaries 04 The CONNECT SECONDARIES command logically connects one or more secondar
87. equired 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 This parameter will default to 0 ms and will be reported as 0000 hex for Local Line media ERROR RESPONSE 0085 will be returned if a non zero value is specified for this option when using Local Line media 5 23 UNILINK HOST ADAPTER USER MANUAL 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 12 Response 12 dddddddd ff 01 vwww 02 vwwv 03 vvvv Usage CONFIGURATION Modes MHIU HIU Parameters dddd The current values for Dipswitch 1 and Dipswitch 2 in the most significant word and least significant word respectively The position values are right justified in each word as shown in Figure 5 5 A bit set to one indicates the corresponding switch is up WORD 1 WORD 2 LSB MSB LSB 34567 12 13 14 15 1 10 11 12 13 14 15 ALL TTT Dipswitch 1 Dipswitch 2 Figure 5 5 Dipswitch Values Bit Map ff A flag indicating that the CONFIGURE HIU command has been processed when set to one In multiprocessing environments the tasks can check this flag to determine whether they can start issuing initiation operation and termination commands or not 00 The option number ranging from 01 to 03 All four option value pairs will be return
88. erminate the macro link 2021 The trigger macro Primitive must be either Primitive 20 or Primitive 2022 You cannot explicitly define the number of Network Manager buffers to allocate to the HIU because the default number of buffers specified in Option 09 in the CONFIGURE NETWORK MANAGER command is not zero The background monitor will bring the HIU online with the default number of buffers 2023 TheNetwork Manager buffers have already been allocated 2024 The macro command buffer has been allocated but not defined You cannot initialize the macro response buffer until the macro has been defined 3001 A message length error occurred in a message between the NM and the HIU You should reset your NM if this error continues 4001 AnHIU to NM message command was out of range You should reset the HIU and or the NM if this error continues 4002 AnHIU toNM message address field was out of range You should reset the HIU and or the NM if this error continues 4003 A broadcast mode error occurred in an HIU to NM message You should reset the HIU and or the NM if this error continues 4004 The secondary response included an incorrect HDLC field 6 5 UNILINK HOST ADAPTER USER MANUAL ERROR CODES AND DIAGNOSTICS 6 2 PRIMIMVE ERRORS The HIU function will respond to the 02 03 and 04 TIWAY Primitives just like Network Interface Modules NIMs The following Primitive response errors will be returned to any device sending an invalid Pr
89. ertion 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 This parameter is only needed for RS 232 C RS 423 A media networks and will return the ERROR RESPONSE if specified for Local Line media The REPORT NETWORK MANAGER CONFIGURATION command will return zero for the value of this parameter for Local Line channels The default value of 1 000 ms was defined to allow operation with a wide variety of modems but cause the network operation to be very slow You can improve the performance of your network by tuning the value of this parameter Most typical modems will work properly with a delay of 15 ms You can start at this value and either increment or decrement it until the circuit functions propery Option 03 The Channel B RTS CTS delay specified as described above 5 53 UNILINK HOST ADAPTER USER MANUAL 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 O to 1000 0000 hex to 03E8 hex in increments of 1 ms This parameter will default to 0 ms and will be reported as 0000 hex for Local Line media ERROR RESPONSE 0085 will be returned if a non zero value is specified for the o
90. ex and the exception flag will be set The MRSW can be retrieved with the GATHER MACRO RESPONSE command This macro type will be automatically enabled when the command is processed and will be disabled when the connect attempt is complete 03 Disconnect Secondary This macro type performs the DISCONNECT SECONDARY function for the single secondary device in the background mode This function performs exactly like Macro Type 2 except a disconnect is performed When the disconnect attempt is complete the MRSW will be set to 8005 hex and the exception flag will be set The macro will remain undefined and an ERROR RESPONSE will be returned if the associated secondary device is offline When executed the secondary will be removed from the secondary log and all associated macros for that secondary will be disabled and their exception flags set 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 the specified secondary from the network This does not prevent another HIU from reconnecting the secondary Once a secondary device is logically disconnected it will appear offline to all HIUs on the network causing the remaining network HIUs to set the exception flag and MRSWs for any macros associated with that secondary 5 28 HOST COMMAND SET REFERENCE 00 The macro options byte which is bit mapped as follows
91. f the secondaries Your network will operate more efficiently if you number your secondary devices and HI Us beginning with address 1 and consecutively numbering the remaining devices UNILINK HOST ADAPTER 5 4 USER MANUAL 5 1 4 Active Command Codes In Each Mode HOST COMMAND SET REFERENCE Table 5 1 Secondary Addresses Decimal Hexadecimal U Address Address sage Reserved for special functions refer to individual commands Available for secondary device addresses Reserved for special functions normally used to indicate all secondary devices are to be effected by the command 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 YES Power up commands Intended Adapter HIU Configured Network Manager Active Mode Configured Command 11 Configured Command Command 20 and Initialized by Command 30 Network Manager MHIU YES 1 8 21 FC FF EHA NO 1 8 20 21 FC FF HIU YES 1 2 4 8 21 C FF 20 2 21 3 NM YES a NO 21 3 20 2 6 8 6 8 6 8 NO ves YES MHIU YES m S NO NO YES NO YES HIU YES 4 O NO 1 2 6 8 20 2 1 2 4 10 12 1C 21 30 32 31 38 FC FF 4 10 12 10 21 FC FF 1 FC FF 38 FC FF 0 32 34 38 FC FF FC FF 0 1C
92. ficant bits to enable or disable the following options e Theauto enable option which specifies whether to automatically enable the macro for execution after definition is complete or not If you do not choose this option you can explicitly enable the macro with the ENABLE DISABLE MACRO EXECUTION command e The repetitive non repetitive option which defines how the macro will be executed e The freeze option which selects whether to freeze the macro and response when an exception occurs e Theset first exception option which selects whether to set the exception flag on the first response 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 MACRO EXECUTION command before the macro will be scheduled for execution The last option Bit 4 causes the HIU to not check the 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 of the bit coding for various combinations 2 39 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION MSB LSB Byte ACTIONS hex 00000000 00 Non repetitive must be exp
93. g one of the software reset commands WARNING Pressing the RESET switch or sending the RESET ADAPTER command code FF causes a hardware reset and stops all system operation All buffers and macros will be cleared and the adapter will enter the diagnostic test mode regardless of the system activity in progress at the time There are two diagnostic test modes available for checking the adapter s operational integrity These modes are selected by the setting of Position 10 on Dipswitch 2 shown in Figure 6 3 When the switch is down the adapter is in the run mode or normal operation mode Any reset by a command or the RESET switch will cause the adapter to perform its diagnostics and then return to run mode with the Adapter Good LED lit if the tests are successful If an error occurs the LEDs will be lit in a pattern that defines the particular test that failed These patterns are described in Paragraph 6 4 3 The diagnostic tests in this mode do not perform any of the external loopback tests UNILINK HOST ADAPTER 6 10 USER MANUAL ERROR CODES AND DIAGNOSTICS 234 5 6 7 8 9 10 Kaipa papopapai UP TEST MODE DOWN RUN MODE UP HIU EHA IO LOOP TES DOWN MHIU EHA Figure 6 3 Test Mode Dipswitch When Position 10 of Dipswitch 2 is up the test mode is selected The test mode performs all of the diagnostic tests performed in the run mode test and the external loopback tests Unlike the run mode test when the test is completed
94. h 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 This command can only be issued once to each adapter after they have been reset or powered up INITIATION This command is used to initialize the network devices OPERATION This command is used for ongoing communications between the host computer and the network devices PERFORMANCE 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 TERMINATION This command is used to shut down or terminate network devices 5 3 UNILINK HOST ADAPTER USER MANUAL 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 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 o
95. he HIU function in Figure 2 9 the NM 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 memory for NM buffers will increase network performance UNILINK HOST ADAPTER 2 8 USER MANUAL OPERATION AND APPLICATION Host Host Com Com outer outer UNILINK UNILINK UniLink Host UniLink Host Adapter MHU Adapter MHU Figure 2 8 Typical Multiple Host Network UNILINK UNILINK Figure 2 9 NM Network 2 9 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION 2 3 5 The Emulate Host Adapter Modes There are two modes available that provide an emulation of the TI WAY 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 Both of these modes will operate with applications software written for the TIWAY Host Adapter The MHIU EHA can directly replace the TIWAY Host Adapter in single host network applications However the MHIU EHA cannot be used in a multiple host network The HIU EHA provides the ability to use TI WAY Host Adapter software applications in a multiple host network 2 3 6 The Standalone Network Manager Mode The Standalone Network Manager mode opera
96. he macro data or allocate another macro buffer with sufficient size Remember that macro buffers cannot be explicitly deleted You must deallocate the Source Id or reset the adapter to recover macro buffers The macro buffer number in the command string has not been allocated Verify the macro buffer number and issue the ALLOCATE MACRO STORAGE BUFFERS command code 13 if necessary The macro buffer number in the command string is already enabled This error will be returned when you try to redefine or initialize the response buffer of a macro that is currently enabled The Source Id in the macro buffer did not match the Source Id in the command string Check the Source Id number and reissue the command with the correct value The INITIALIZE MACRO RESPONSE BUFFER command code 17 is not valid because this is a non repetitive macro UNILINK HOST ADAPTER 6 4 USER MANUAL 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 Theaction macro is enabled 201C Theaction macro Primitive must be either Primitive 30 or Primitive BO 201D Thedata types in the trigger macro do not match the data types defined in the action macro 201E A macro link already exists between the macro buffers specified 201F Nomacrolink exists between the specified macro buffers 2020 Thetrigger macro is enabled and must be explicitly disabled before you can t
97. he most significant word and least significant word respectively The position values are right justified in each word as shown in Figure 5 10 A bit set to one indicates the corresponding switch is up off WORD 1 WORD 2 MSB 34 5 im 12 13 7 8 9 10 LSB 9 10 11 Dipswitch 1 Dipswitch 2 Figure 5 10 Dipswitch Values Bit Map ff A flag indicating whether the CONFIGURE NETWORK MANAGER command has been processed when set to one In multiprocessing environments the tasks can check the value of this flag to determine if they can issue commands fore The option number ranging from 01 to OE VVVV The values for the parameters described in the CONFIGURE ADAPTER command 5 57 UNILINK HOST ADAPTER USER MANUAL HO ST COMMAND SET REFERENCE 5 6 3 Report Secondary Link Status 32 The REPOR T 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 Command 32 Response 32 nnnn ss Usage PERFORMANCE Modes NM Parameters nnann SS UNILINK HOST ADAPTER USER MANUAL The number of times the Background Monitor has gone through the list of secondary devices from address 01 to the maximum secondary address specified by the CONFIGURE ADAPTER command updating the link status This count rolls over to one after reaching its maximum val
98. hen a receiving station receives a BCS error free F rame that contains an N R sequence number not equal to the internal send count If the receiving station is the host computer it should respond with an RR to acknowledge the last frame received correctly or should send a SNRM to reset the adapter s sequence counts If the receiving station is the adapter it will respond with a FRMR indicating the condition causing the error FRMR is further described in Paragraph B 5 7 UNILINK HOST ADAPTER B 10 USER MANUAL USING THE BDLC PROTOCOL B 5 4 BCS Enor When the Block Checksum calculated by the receiver does not match the BCS in the l 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 Recovery is then initiated by the sending station when the timeout period expires B 5 5 Timeout Enors The adapter should always respond to a host computer BDLC command within 30 ms If it does not the host computer should try to retransmit the unacknowledged Frames Timeouts are caused by receiving a frame with a BCS error in which case the adapter does nothing and by the adapter going offline no power or host port media is disconnected B 5 6 RRand REJ Recovery When the sending station receives an RR or REJ with an N R sequence count less than its internal send count it should retransmit the unacknowledged Frames
99. hen set to one enables the freeze feature This option is only valid for repetitive macros When an exception is found the HIU will disable the macro Bit 3 when set to one will disable the exception flag test on the first macro response This option is only valid for repetitive macros and prevents the exception flag from being set when the first macro response is compared to the uninitialized macro response buffer 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 The actual time may be delayed longer when the network is heavily loaded The Primitive data command or response which begins with the length field A further definition of TIWAY Primitives is provided in the TIWAY Systems Manual PPX TI WAY 8101 x 5 30 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 The exception flag is cleared when the response buffer data is returned Command 15 ss tt b
100. icolon to scroll the response on ASCII terminals More intelligent host devices can be set to filter out the carriage return and line feed A 1 3 Character Count To aid in error control the colon at the beginning of the message is followed by a four character count field representing the total number of printable characters in the message including the colon character count message body error checking code and the terminating semicolon The four characters represent a 16 bit hexadecimal value such that a count of 100 characters will be represented as 30 30 36 34 0064 hex NITP messages are limited toa maximum length of 590 characters A 1 4 Message Body The message body consists of ASCII character pairs from the character set in Table A 1 representing a single binary byte value The binary values from each character pair is the adapter command string discussed in Chapter 2 and Chapter 5 The maximum message body length is 580 characters A 3 UNILINK HOST ADAPTER USER MANUAL USING THE NON INTELLIGENT TERMINAL PROTOCOL A 1 5 EnorChecking 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 Divide the character count and the message body into blocks of four characters left justified a
101. ies 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 MHIU EHA HIU EHA MHIU HIU Parameters aa The secondary addresses to be connected Specifying address FF will attempt to connect all secondaries bb The secondary addresses that connected properly If bb is 00 hex none of the secondaries addressed were connected UNILINK HOST ADAPTER 5 12 USER MANUAL 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 This does not prevent another HIU or the background monitor from reconnecti
102. ification number is allocated with each command sent to the UNILINK Host Adapter 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 Allocate The Macro Buffers 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 for 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 length of memory for both the macro command buffer and the macro response buffer 2 37 UNILINK HOST ADAPTER USER MANUAL 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 The connect and disconnect secondary macro types do
103. igure 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 START Allocate A Source ID Allocate A Macro Buffer Define the Macro More Macros for the same ource Figure 2 16 Macro Setup Procedure UNILINK HOST ADAPTER USER MANUAL 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 Source ID 1 Source ID 2 Source ID 32 Up to 32 OE 1A E5 unique source IDs Macro Buffer Macro Buffer Macro Buffer 1 2 4 Up to 254 Macro Buffer T Buffer Ti Buffer Macro 35 Buffers Macro Buffer Macro Buffer Macro Buffer 63 80 60 Macro Buffer Macro Buffer 87 97 Macro Buffer 109 Figure 2 17 Relationship Between Source Ids and Macro Buffers UNILINK HOST ADAPTER 2 36 USER MANUAL 2 10 4 2 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 Only one Source Ident
104. ill determine whether the command string is transferred in binary format or converted to ASCII characters The following conventions are used to define the command syntax used in the succeeding sections e The most significant bit labeled Bit 0 is the left most bit in the byte word or long word e All command code numbers are one byte hexadecimal values and will always be the first byte in the command string e Each letter in a command parameter indicates a nibble four bits so that a o byteis represented as aa word is represented as aaaa o and a long word is represented as aaaaaaaa e Parameters containing more than eight nibbles long word are represented as aaaa 5 1 UNILINK HOST ADAPTER USER MANUAL 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 These are aa the secondary device address o ss the Source Identification number o rr the reset counters code o oo the option code Commands may have one or more option codes O pppp a TIWAY Primitive UNILINK HOST ADAPTER 5 2 USER MANUAL HOST COMMAND SET REFERENCE 5 12 Usage Description A usage description is included wit
105. imitive The responses to valid Primitives are defined in Paragraph 2 7 CODE MEANING 00 The Primitive is currently not implemented 03 The Primitive is too long 04 The Primitive is too short A Primitive must include a Length word and a Primitive code so that the smallest Primitive length is three bytes 05 The message length and the Primitive length are not equal UNILINK HOST ADAPTER 6 6 USER MANUAL 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 CODE MEANING 8000 The requested macro buffer is undefined 8001 The macro was disabled by either defining it as not enabled in the DEFINE MACRO command or explicitly disabling it with the ENABLE DISABLE MACRO command 8002 An exception occurred for this macro and it has been frozen 8003 This non repetitive macro has completed execution 8004 This connect secondary macro has completed execution 8005 This disconnect secondary macro has completed execution 8010 This macro is disabled because the associated secondary is offline no exception occurred before it went offline so there is no new buffer data 8011 This macro was disabled because the associated secondary is offline the exception flag was set p
106. in the secondary log Command 16 ss bbtt Response 16 ss bb rr Usage OPERATION Modes MHIU HIU Parameters SS The Source d number bb The macro buffer number The response returns the buffer numbers in the same order as specified in the command tt 01 hex to enable the macro or 00 hex to disable it rr The response code for that macro buffer The possible values are 00 the macro was successfully enabled or disabled as requested 01 the macro buffer number requested has not been allocated Use the ALLOCATE MACRO STORAGE BUFFERS command to allocate the buffer then reissue this request 02 the macro buffer number specified has a different Source Id than the one specified Check your macro definitions table and reissue with the correct Source ld 03 the macro buffer specified is the action macro in a link macro pair which cannot be explicitly enabled or disabled 04 the tt parameter specified was a value other than 00 hex or 01 hex 5 33 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE UNILINK HOST ADAPTER USER MANUAL 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 Wait for a short interval and reissue this request again 07 the specified ma
107. kground monitor will automatically bring secondary devices online However these secondary devices are not available to the host until they are connected with the CONNECT SECONDARY command When set to one this bit indicates that background monitor has brought the secondary device online Bit 4 When set to one this bit indicates that Background Monitor has determined that the secondary device can request network transactions Bit 5 When set to one this bit indicates that the secondary device is an HIU in a multi host network Bit 4 must also be set to one before the value of this bit is valid Bit 6 When set to one this bit indicates that the HIU has been allocated NM buffers by the NM It can now request network transactions Bit 7 Reserved 5 59 UNILINK HOST ADAPTER USER MANUAL 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 This command can be used even when the auto redundant media option is enabled however the Network Manager may change this user specification without notice if a failure is detected All secondary device communications will take place on Channa A at initialization Command 33 cc aa Response 33 cc Usage OPERATION Modes NM Parameters cc The channel to switch to 0
108. l other pins should be left vacant to prevent damage which may be caused by non standard pin usage 4 5 UNILINK HOST ADAPTER USER MANUAL THE TIWAY NETWORK PORTS Table 4 3 RS 232 C RS 423 A D Connector Pin Assignment ea com Protective Ground Signal Ground Transmitted Data Receive Data Request To Send Clear To Send Data Set Ready Data Terminal Ready Recieve Line Signal Detector Transmitter Signal Element Timing Reciever Signal Element Timing 1 7 2 3 4 5 6 20 8 ako ak N A 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 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 The modems used must be non intelligent and have data transparency Non intelligent refers to the class of modems that do not have an internal command set Modems such as the Hayes Smartmodem and compatibles do have an internal command set and should not be used Generally modems that meet the Bell 103 202 and 208 specifications will work but the Bell 212A class modems will not In addition to being non intelligent the modems must support data transparency which means no start bits
109. licitly enabled 11000000 C0 Repetitive auto enabled will not freeze exception 01110000 70 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 of milliseconds to delay before reissuing a repetitive macro The delay 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 to be delayed longer than this minimum delay You can redefine a macro but it must be disabled first with the ENABLE DISABLE MACRO command which will clear the exception flag and discard any outstanding responses 2 10 5 Checking The Macro Response and Macro Status 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 number the response type and the buffer number or numbers The response type byte can be either code 00 01 or 02 Code 00 instructs the UNILINK Host Adapter to return all of
110. ll be sent to the NM function before any of the queued requests This priority 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 provides a method for defining your own execution priority for 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 is detected the exception flag for that macro is set The host computer application can check the state of the exception flag and act accordingly without 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 data that caused the exception 2 31 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION 2 10 2 The Parts ofa 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 This buffer number ranges from 1 to 254 01 hex to FE hex so that up
111. ly connected secondary devices on the network and is provided for backward compatibility with the original TIWAY Host Adapter The Broadcast P oll sequence is more efficiently handled with macros discussed in Paragraph 2 10 Unlike the SEND NETWORK DATA command the responses from the secondaries do not automatically return If the command is accepted the command code will be returned then your applications software MUST issue a POLL command to each secondary to collect the Primitive response 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 however the broadcast poll sequence can be implemented in other operating modes with macros Example 2 1 is a typical sequence for the broadcast poll commands 2 27 UNILINK HOST ADAPTER USER MANUAL OPERATION AND APPLICATION 02 0002 11 00 Issue Broadcast command 02 Accep
112. mats as shown in Figure B 4 The Frame format is used to transfer messages between the host computer and the adapter The N S and N R sequence numbers are Modulo 8 counts These counts begin at zero when the host computer issues the Set Normal Response Mode SNRM command to link the adapter The counts are incremented by one First bit transmitted a MSB LSB 0 1 2 3 4 5 6 I Frame Format N R P F N S Format Format Where WN S is the transmitting station send sequence number N R is the transmitting station recieve sequence number S is the supervisory function bits e gt M is the modifier function bits P F is the Poll Final bit N is the modifier function bits Figure B 4 BDLC Protocol Control Field Structures for each frame transmitted in either direction The Supervisory frame format is used to perform link supervisory control functions such as acknowledge I Frames request retransmission of an Frame and others Responses of this type do not contain the Information Field and only update the N R sequence count Valid S subfield values are 00 RR Receive ready 01 RNR Receive not ready 10 REJ Reject UNILINK HOST ADAPTER B 6 USER MANUAL 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 at either the transmitting or receiving stations Commands Responses of this
113. message and an error checking code field as illustrated in Figure A 1 Character Message Figure A 1 NIMP Message Structure A 1 1 NAP Character Set NITP uses the subset of standard ASCII codes shown in Table A 1 to communicate with a wide variety of host devices from ASCII terminals to more intelligent machines A 1 UNILINK HOST ADAPTER USER MANUAL USING THE NON INTELLIGENT TERMINAL PROTOCOL Table A 1 NNP Character Set Displayed Character oO 1 2 3 4 5 6 7 8 9 NOTE 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 OE hex 30 45 UNILINK HOST ADAPTER A 2 USER MANUAL 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 This allows the host to use any parameters required by its software between lines of output When transmitting data to the host the UNILINK Host Adapter sends carriage return and line feed characters after the terminating sem
114. mitive 45 bytes long expecting a response 30 bytes long and another macro to disconnect secondary 5 The total memory required for these three macros is Macro 1 Connect 22 22 22 Macro 2 Primitive 22 45 30 97 1 98 Macro 3 Disconnect 22 22 22 Total Memory Required 142 Bytes Example 2 2 Macro Memory Requirements Job Directory Host Job A Computer UNILINK Pas TIWAY UniLink Host Adapter Figure 2 15 Host Computer Multiprocessing Application Example 2 33 UNILINK HOST ADAPTER USER MANUAL 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 The Source ID can also be used in single task environments to group related subtasks and gather their responses 2 10 3 The Macro Commands Macros are defined and maintained with the following commands e ALLOCATE SOURCE ID e ALLOCATE MACRO STORAGE BUFFERS e DEFINE MACRO e GATHER MACRO RESPONSE e ENABLE DISABLE MACRO EXECUTION e INITIALIZE MACRO RESPONSE BUFFER e LINK MACRO UNILINK HOST ADAPTER 2 34 USER MANUAL OPERATION AND APPLICATION 2 10 4 Setting Up A Macro F
115. nd has triggered the action macro Disabling the trigger macro automatically disables the action macro even if the action macro has started execution If the action macro has been queued for execution before it is disabled it will complete execution but the response will be dropped Command 1C ss b1 b2 00 vv Response 1C ss bl b2 Usage OPERATION Modes MHIU HIU Parameters SS The common Source Id The linked macros must have the same Source Id b1 The trigger macro buffer number b2 The action macro buffer number 00 The option number VVVV The option parameter This field will be used for future enhancements The following describes the options and their associated parameter values Option 00 Terminate link This option terminates the link between the macros specified in the b1 and b2 fields The trigger macro must be disabled before the link can be terminated Option 01 Unconditional Store and Forward USF This special link requires a trigger macro using Primitive 20 or AO to read the data from a secondary and an action macro using Primitive 30 or BO to write the data read to another secondary Each time the trigger macro completes a read it is disabled and its data is moved into the action macro buffer to create a valid write Primitive and the action macro is enabled If the trigger macro receives an error from the secondary the exception flag UNILINK HOST ADAPTER 5 42 USER MANUAL HOST COMMAND SET REF
116. nd terminating logical connections between the host computer and the adapters to handle data transfers between them and to ensure message integrity in those transfers The most significant difference between BDLC and the ADCCP standard is that ADCCP frames are transmitted as a continuous stream of data bits but BDLC transmits frames as a series of data bytes allowing the use of common serial communications devices through the RS 232 C RS 423 A host port Port 3 In other words BDLC is an asynchronous data link protocol The physical link layer protocol can use either asynchronous or synchronous operation as selected by the dipswitch settings described in Chapter 3 The main requirements for data link control are 1 Bracket the information being sent to distinguish the information from other noise signals 2 Identify and permit addressing of the receiver 3 Detect errors and provide a recovery method 4 Manage the sharing of the link among multiple station B 1 UNILINK HOST ADAPTER USER MANUAL USING THE BDLC PROTOCOL B 1 BDLC CONAGURATION 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 Commands PRIMARY Host Computer Secondary Seco
117. nd zero filled The beginning and ending delimiters are not included in the calculation 2 Treat each block as a four digit hexadecimal number 3 Sumthe resulting numbers blocks 4 Takethetwo s complement of the sum to get the ECC As an example consider a message whose body is the CONFIGURE ADAPTER command 20 01 00 02 02 00 0E DEDE ITI ERER ale 32 3030 3130 3030 3230 32 30 3030 45 The total character count is found by adding together the number of characters in the message the four characters for the ECC the four characters for the character count and the two characters used to delimit the message Thus the total character count for a message containing 2001000202000E is Starting Delimiter O1 1 Character Count 04 4 Message Body 2001000202000E OE 14 Error checking Code 04 4 Ending Delimiter lt 01 1 Total Character Count 0018 24 Numbers in parentheses are the corresponding decimal values UNILINK HOST ADAPTER A 4 USER MANUAL 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 complemen of 0018 2001 0002 0200 0E00 CFE5 ECC N Fill Characters so that the complete message is the character string 00182001000202000E CF E5 or as 3A 30 30 31 38 32 30 30 31 30 30 30 32 30 32 30 30 30 45 43 46 45 35 3B CHARACTERS 0018
118. ndary Adapter Adapter A B Figure B 1 BDLC Unbalanced Configuration In the normal response mode a secondary station may only transmit frames as a direct result of receiving permission from the primary The primary grants this permission by polling the secondary stations UNILINK HOST ADAPTER B 2 USER MANUAL USING THE BDLC PROTOCOL B 2 BDLC PROTOCOL FRAME STRUCTURE B 2 1 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 All of the fields are on byte boundaries and are represented hexadecimal rather than as ASCII characters so that hexadecimal 1E is transmitted as 1E The maximum length of the frame is 300 bytes which includes all bytes except the inserted DLEs Figure B 2 BDLC Protocol Frame Hag Fields DLE SIX DLE ETX These two byte flag fields are the BDLC protocol message delimiters DLE STX is the pair of hexadecimal values 10 02 and signals the beginning of a message DLE ETX is the pair of hexadecimal values 10 03 and signals the end of a message Any other occurrence of the DLE character is considered to be part of the information NOTE An extra DLE must be inser
119. ng the secondary Once a secondary device is logically disconnected it will appear offline to all HIUs on the network causing the remaining network HIUs to set the exception flag and MRSWs for any macros associated with that secondary Trying to disconnect many secondary devices at the same time using the global address FF hex could cause the host command timeout to expire if the secondary devices cannot respond in that time limit If this occurs the ERROR RESPONSE will be returned and your applications software should retrieve the secondary log to determine which secondary devices were disconnected Command 05 aa Response 05 bb Usage TERMINATION Modes MHIU EHA HIU EHA MHIU HIU Parameters aa The secondary addresses to be disconnected Specifying address FF will attempt to disconnect all secondary devices listed in the secondary log bb The secondary addresses that disconnected properly If bb is 00 hex none of the secondaries addressed were disconnected 5 13 UNILINK HOST ADAPTER USER MANUAL 5 3 6 HOST COMMAND SET REFERENCE 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 aa The secondary addresses currently connected to the HIU If no secondaries are connected the value returned will be 00 UNILINK HOST ADAPTER 5 14
120. no stop bits and no parity This is necessary because TIWAY uses the bit oriented HDLC protocol to transfer information between devices Most short haul modems are non intelligent and provide data transparency UNILINK HOST ADAPTER 4 6 USER MANUAL THE TIWAY 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 There is also an RTS CTS timeout These delay values are set through configuration commands described in Chapter 2 and Chapter 5 4 1 3 Runaway Transmitter Recovery 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 message If the transmission exceeds this limit the adapter will perform a hardware reset discarding all macro buffers and any outstanding directives 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 4 7 UNILINK HOST ADAPTER USER MANUAL 4 2 THE TIWAY NETWORK PORTS REDUNDANT MEDIA TRANSMISSION Most TIWAY conformant devices support a
121. none of the HDLC overhead 5 39 UNILINK HOST ADAPTER USER MANUAL 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 Command 1B rr Response 1B jj kk bbbbbbbb cccccccc dddd eeee ffff gggg hh ii Usage PERFORMANCE Modes MHIU HIU Parameters rr The reset counters code 00 Do not reset the statistics counters 01 Reset the statistics counters but do not return any statistics jj The online status flag When set to 01 it indicates that the HIU has been logically connected to the network kk The number of Network Manager buffers allocated to the HIU at initialization bbbb The number of directives solicited by the Network Manager cccc The number of directive responses returned by the Network Manager dddd The number of network errors including CRC errors timeouts aborts and the loss of RS 232 C RS 423 A control signals and RS 232 C timeouts eeee The number of 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 in a network that contains Intelligent Tank Transmitters ITTs as
122. not require any buffer storage to hold the command only 22 bytes for the header 14 Source Buffer Secondary Macro Options Id Address Type Byte Figure 2 18 Macro Command Frame Table 2 2 Macro Types ze Function Performed Send Primitive to secondary Connect the secondary Disconnect the secondary 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 secondary macro is executed the MRSW will be set to indicate if the connect was successful or if not why it failed The disconnect secondary macro 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 is accepted from the host computer UNILINK HOST ADAPTER 2 38 USER MANUAL 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 The macro options byte uses its five most signi
123. ocal 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 Network Baud Rate 110 150 300 600 1200 2400 an 4800 9600 19200 38400 57600 115200 sao 1 OOOO 2 OOOOH jO 00 O00 OO IN 0 0 0 0 0 0 o 4 11 UNILINK HOST ADAPTER USER MANUAL CHAPTER 5 HOSTCOMMAND 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 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 5 10 provides a similar list that groups the commands according to their use 5 1 1 Command Syntax Conventions Command Parameter Parameter e o Parameter Code 1 2 n Figure 5 1 Command Sting 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 discussed in Chapter 3 w
124. of housekeeping that your host application programs will need to do for the flexibility provided by macros Your programs should apply the following rules e Your programs must assign and keep track of the Source Identification numbers e Your programs must ensure that no more than 32 Source Identification numbers are active at a time This is easily accomplished by maintaining an internal table in your applications program If you need 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 responses before deallocating e Your programs must keep track of the buffer numbers and the associated Source Identification number This can also be accomplished by maintaining an internal table in your applications program e Your programs must ensure that no more than 254 macro buffers are allocated The REPORT MEMORY USAGE command will help your programs track these items When your program sends Command Code 18 the UNILINK Host Adapter will return the Command Code the number of memory bytes available the number of unallocated macro buffers the number of unallocated Source Identification numbers and a list of all Source Identification numbers currently active 2 10 9 Linking Macros In addition to the basic operations with macros
125. ol 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 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 driver software on your host computer Additional throughput improvements are gained by using the multiple outstanding transaction capability illustrated in Figure 3 9 This allows the host computer applications software to continue issuing commands before the network response is returned The host computer can issue a network request to secondary device 1 then another to secondary device 2 followed by the command to retrieve the response from secondary device 1 It uses an address to distinguish individual adapters in a multipoint host interface circuit as described in Paragraph 3 2 3 More detailed specifications are given in Appendix B UNILINK HOST ADAPTER 3 10 USER MANUAL CONFIGURING THE HOST COMPUTER PORT Host UNILINK Computer Host Adapter BDLC Host Command _ gt lt lt RR Message Received BDLC Host Command _ lt RR Message Received RR Poll __ lt _ _ Fi
126. onous control characters from synchronous data link protocols such as BiSync Table 3 2 Host Port Baud Rates Dipswitch 2 MSB LSB S 5 0 0 0 0 1 1 1 1 1 1 a a OOOO O COO 00 00 N 0 0 0 0 0 o 3 13 UNILINK HOST ADAPTER USER MANUAL 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 network parameters and are discussed in more detail in Chapter 4 To 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 1 DIPSWITCH 2 P_ DOW HOST COMMAND TIMEOUT UP TEST MODE 00 STANDALONE DOWN RUN MODE NM MODE O 10SEC UP HIU EHA amp 10 20 SEC 10 LOOP TEST 11 40 SEC DOWN MHIU EHA BDLC ADDRESS HOST PORT BAUD RATE UP SYNCHRONOUS DOWN ASYNCHRONOUS UNUSED HOST PORT UNUSED UP FULL DUPLEX HOST PORT DOWN HALF DUPLEX urusen UNUSED DOWN BDLC PROTOCOL Figure 3 11 BDLC Protocol Dipswitc h Settings UNILINK HOST ADAPTER 3 14 USER MANUAL CONFIGURING THE HOST COMPUTER PORT Table 3 3 BDLC Protocol Address Dipswit
127. ort 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 Report External Input Status Command FD cc Response FD ss Soft Reset Command Command FE Response FE Reset Adapter Command FF Response FF 5 75 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 5 9 COMMAND CODES REFERENCE NUMERIC AL 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 11 Configure HIU 12 Report HIU Configuration 13 Allocate Macro Storage Buffers 14 Define Macro 15 Gather Macro Response 16 Enable Disable Macro Execution 17 Initialize Macro Response Buffer 18 Report Memory Usage 19 Allocate HIU Bandwidth 1A Report HIU Bandwidth Allocation 1B Report HIU Status 1C Link Macro 20 Configure Adapter 21 Report Adapter Configuration 30 Configure Network Manager 31 Report Network M anager Configuration 32 Report Secondary Link Status 33 Switch Channel 34 Allocate Network Manager Buffers 35 Report Network Manager Buffers Available 36 Re
128. otal 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 The buffer number assigned by the adapter to the buffer pair The buffer numbers are returned in the same order as issued The buffer numbers will range from 1 to 254 decimal 01 hex to FE hex If there was not enough memory to allocate all of the buffers only those that were allocated will be returned If none were allocated the list will be empty Your applications software should store these buffer numbers as they are returned so that they may be referenced in other commands You should also record these numbers on the planning worksheet given in Appendix F Example 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 The total memory required for these three macros is Macro 1 Connect 22 22 22 Macro 2 Primitive 22 45 30 97 1 98 Macro 8 Disconnect 22 22 22 Total Memory Required 142 Bytes The ALLOCATE MACRO STORAGE BUFFERS command string to allocate Macros 1 2 and 8 is shown below Notice that the spacing between parameters is shown for clarity and should not be included when sent to the adapter 13 01 0000 0000 002D
129. parameter should be set to 00 rrrr The predefined macro response data UNILINK HOST ADAPTER 5 36 USER MANUAL 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 This command can be issued at any time after the CONFIGURE ADAPTER command has been issued Command 18 Response 18 mmmmmmmm nnnn II ss Usage OPERATION Modes MHIU HIU Parameters mmmm The number of memory bytes available for macro nnnn The number of macro buffers not yet allocated II The number of Source Id numbers remaining from the limit of 32 active numbers SS The list of currently active Source Id numbers 5 37 UNILINK HOST ADAPTER USER MANUAL 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 This bandwidth processes direct commands non repetitive macros and repetitive macros Since repetitive macros are always ready for transmission they will tend to use the entire bandwidth slowing down the response for direct commands and non repetiti
130. performing instruction execution DDDD will be 007E indicating that the device type is an HIU EEEE FFFF GGGG III1 JJJJ will be 0000 KKKKKKKK will be 00000000 2 7 3 Primitive 04 Response The Primitive 04 response will be returned as follows LLLL 04 NNNN MM EE FF GG Where LLLL is the Primitive length NNNN will be 010E and indicates the maximum Primitive length supported MM EE FF GG will be 00 2 21 UNILINK HOST ADAPTER USER MANUAL 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 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 reset operation All current TIWAY operations will be aborted and the 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 after sending the response to the host Your applications software should not issue another command for at least 500 ms The second reset command is the RESET ADAPTER command code FF
131. place data stored in any of the following Siemens products e SIMATIC T1520 SIMATIC TI530 SIMATIC TI520C SIMATIC TI530C P Cs e SIMATIC TI560 SIMATIC T1565 P Cs e PM550 PM550C P Cs e 5TI Series 102 103 P Cs e T 111 IT 121 IT 121A 1T150 and IT 160 Intelligent Tank Transmitters I TTs The P Cs are connected to a TIWAY network through Network Interface Modules NIMs The PM550 P C can also be connected with a Computer Interface Module CIM but it limits the configuration choices The UNILINK Secondary Adapter is a TI WAY interface device that allows other devices such as the following to be connected to a TI WAY network e Robots e Computer numerical controlled machines e Non SIMATIC programmable controllers e Intelligent instruments e Computer equipment TIWAY gateways are also available for connecting the Fisher Foxboro and Honeywell networks to TIWAY However you cannot use a gateway and a UNILINK Host Adapter in the same TI WAY network TIWAY is designed to satisfy today s factory requirements for acquiring data and controlling manufacturing processes It is a noise hardened serial binary communications 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 on
132. port Network Bandwidth Allocation 37 Report Network Manager Secondary Statistics 38 Report Network Manager Network Statistics FC Modify External Output Status FD Report External Input Status FE Soft Reset FF Reset Adapter UNILINK HOST ADAPTER 5 76 USER MANUAL HOST COMMAND SET REFERENCE 5 10 COMMAND CODES REFERENCE BY FUNCTION Configuration and Reset Commands 11 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 03 Poll Secondary 04 Connect Secondaries 05 Disconnect Secondaries Macro Commands 10 Allocate Source Id 13 Allocate Macro Storage Buffers 14 Define Macro 15 Gather Macro Response 16 Enable Disable Macro Execution 17 Initialize Macro Response Buffer 18 Report Memory Usage 1C Link Macro Adapter Statistics Commands 06 Read Secondary Log 07 Read Secondary Diagnostics 08 Read Adapter Diagnostics HIU Performance Commands 19 Allocate HIU Bandwidth 1A Report HIU Bandwidth Allocation 1B Report HIU Status Network Performance Commands 32 Report Secondary Link Status 33 Switch Channel 34 Allocate Network Manager Buffers 35 Report Network Manager Buffers Available 5 77 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE 36 Report Network Bandwidth Allo
133. protocol the BDLC data values 11 and 13 hex may inadvertently trigger the flow control If possible you should deselect the XON XOFF flow control on the NIU or host device or select the NITP protocol on the adapter Flow control is only provided as a convenience for the host devices the adapter will not try to stop a host transmission with XOF F 3 7 UNILINK HOST ADAPTER USER MANUAL CONFIGURING THE HOST COMPUTER PORT 3 3 HOSTPORTCOMMUNICATIONS 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 Both protocols include link establishment message framing and error 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 which protocol to use 3 3 1 Choosing a Host Protocol The NITP protocol was designed to be simple and still provide data integrity The major features of NITP are listed below e It worksin a point to point circuit connecting the host computer to the adapter NITP cannot be used in a multipoint circuit because it does not have the ability to address individual adapters e Messages are transmitted in a frame that includes beginning and ending delimiters message character count
134. ption when using Local Line media Option 05 The Channel B CTS delay specified as described above Option 06 This parameter defines the Channel A secondary turn around time This is the maximum time required by a secondary to generate an HDLC response to a Network Manager HDLC command The value is specified in milliseconds and ranges from 1 to 5 000 0001 hex to 1388 hex This long turn around time is required for system testing and defaults to 15 ms This long default enables the Standalone Network Manager to operate with ITTs since ITTs havea longer turnaround time than NIMs The overall secondary timeout will be calculated by the Network Manager as the secondary turn around time plus the RTS CTS delay plus the character time plus the after CTS delay Character time is the time required to transmit eight bits of data at the selected baud rate Option 07 The Channel B secondary turn around time specified as described above Option 08 0001 Enables the auto redundant media option The NM will UNILINK HOST ADAPTER USER MANUAL automatically switch secondary devices from a failed channel to the backup channel if redundant media is available 0000 Explicitly disables the auto redundant media option Option 08 is disabled by default 5 54 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 backgro
135. ptional reset counters code 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 Frame pairs sent and received by the macro type The second counter in each set counts the number of l F rame bytes sent by the macro type The third counter in each set counts the number of I F rame 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 2 47 UNILINK HOST ADAPTER USER MANUAL 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 The REPORT NETWORK MANAGER SECONDARY STATISTICS command code 37 returns statistics for a specific secondary device These statistics are counters reflecting the communications between the Network Manager and the secondary Each transaction will update the counters until their maximum value is reached Then the command must be issued to reset the counters You may want to reset the counters before beginning the diagnostic period so that the counts start at the zero baseline The second command REPORT NETWORK MANAGER NETWORK STATISTICS
136. r the on condition ever occurred but not report the current state of the external input point Option 02 however reports the instantaneous value of the input and should be used for time dependent applications The response will be either 00 indicating that the input is off or 01 indicating that the input is on The complete specifications for the input point are given in the UNILINK Adapter Installation and Operation Manual TI WAY 8106 2 8 2 2 The Extemal Output Point The MODIFY EXTERNAL OUTPUT STATUS command either turns the external output point ON or turns it OFF The corresponding voltage levels are 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 code in response The initial state of the External Output Point is zero after a reset or power up A remote Adapter Good lamp can be set up using this point by connecting it to a remote control center panel lamp so that when the host computer applications software issues the MODIFY EXTERNAL OUTPUT STATUS command to turn on the output point the lamp will light If a problem occurs that causes the adapter to reset the lamp will be extinguished UNILINK HOST ADAPTER 2 24 USER MANUAL OPERATION AND APPLICATION 2 9 BASIC NETWORK OPERATIONS The simplest network operations in either a single or multiple host netwo
137. 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 This type of a circuit is illustrated in Figure 4 5 Examples of the software commands are given in Chapter 2 UNILINK Secondary Bus alternate trunk Bus main trunk Up to 254 Secondaries Figure 4 5 Redundant Media Circ uit NOTE Redundant media is provided to improve a network s mission reliability However the adapter cannot use the dual media ports to access two independent networks UNILINK HOST ADAPTER 4 8 USER MANUAL THE TIWAY NETWORK PORTS 4 3 TIWAY I HDLC NETWORK PROTOCOL The TIWAY 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 control field and any data specified by the information field The TIWAY primitive requests and responses are encapsulated inside HDLC I Frames according to the format shown in Figure 4 6 Figure 4 6 HDLC Frame 4 9 UNILINK HOST ADAPTER USER MANUAL THE TIW
138. rior to being disabled 8012 This macrois disabled because the HIU was reinitialized the network was reset no exception occurred before being disabled 8013 This macrois disabled because the HIU was reinitialized the network was reset an exception did occur before being disabled 8014 This macro is disabled because the HIU was disconnected from the network no exception occurred before being disabled 8015 This macro is disabled because the HIU was disconnected from the network an exception occurred before being disabled 8016 This macro is disabled because another direct command or macro was issued to disconnect the secondary from the network 6 7 UNILINK HOST ADAPTER USER MANUAL 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 Primitive in the link action response The secondary device should have returned a response for either Primitive 20 or Primitive AO 8024 Received the wrong TI WAY Primitivein the link trigger response The secondary device should have returned a response for either Primitive 30 or Primitive BO UNILINK HOST ADAPTER 6 8 USER MANUAL ERROR CODES AND DIAGNOSTICS 6 4 DIAGNOSTIC TESTS The UNILINK Host Adapter provides both selectable an
139. rk 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 However these commands are direct issue requests meaning that the host application must wait for the network response before another command can be issued Paragraph 2 10 discusses how to process multiple outstanding transactions 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 timeout the ERROR RESPONSE will be returned and you will have to issue the READ SECONDARY LOG command to determine which secondaries were connected before the timeout A successful connection will return the command code and alist of the secondary device addresses that were connected su
140. rmation on interfacing the adapter to a TIWAY I network UNILINK HOST ADAPTER 1 8 USER MANUAL THE UNILINK HOST ADAPTER 1 5 INSALLATION 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 instructions and guidelines for the the UNILINK Host Adapter Chapter 2 discusses the different operational modes and how they are configured Chapter 3 discusses the host computer interface port Port 3 and how to set the dipswitches to establish communications Chapter 4 discusses the TI WAY interface ports Ports 1 and 2 and how setup your network 1 6 TECHNICALASSISANCE 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 1 7 CUSTOMER SERVICE CENTER If you need assistance in placing an order returning a product or learning about product availability 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 1 9 UNILINK HOST ADAPTER USER MANUAL CHAPTER 2 OPERATION AND APPLICATION 2 1 INTRODUCTION This chapter provides an
141. rst Network Response RR Poll 39 _ gt lt lt 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 Host Adapter meaning that they require the NITP protocol If you plan to use either the Master Host Interface Unit MHIU or Host Interface Unit HIU in EHA mode you must also use the NITP protocol because these modes do not support commands for configuring network parameters and the dipswitch used to define 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 as an MHIU EHA which requires the NITP protocol TTs may also be used in the TI WAY mode without the above restriction 3 11 UNILINK HOST ADAPTER USER MANUAL 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 DIPSWITCH 1 A I 234 5 6 8 9 10 HOST COMMAND TIMEOUT UP TEST
142. s 9 and 10 of Dipswitch 2 are up To run this test perform the following steps 1 Install a 20 0 to 30 0 VDC power supply to the output power terminal 8 shown in Figure 6 5 2 Using a 22 AWG wire connect the input point terminal 1 to the output point terminal 45 3 Using another 22 AWG wire connect the input point return 2 to the output point return 4 4 Install the loopback connectors provided with the adapter to Port 3 and Port 4 5 Apply power to the adapter 6 Set Positions 9 and 10 of Dipswitch 2 up 7 Press the reset switch Pin 1 Input 2 Input Return 3 Power 4 Output Return 5 Output Figure 6 5 Extemal I O Loopback Test Connections If the External I O loopback test fails the pattern shown in Figure 6 4 will be displayed on the LEDs Check the connections shown in Figure 6 5 and retest If the test continues to fail return the unit for repair 6 13 UNILINK HOST ADAPTER USER MANUAL APPENDIX A USING THE NON INTELLIGENT TERMINAL PROTOCOL A 1 CHARACTERISTICS OF THE NON INTELUGENT 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
143. sed most often and will indicate possible bottlenecks Like the counters for the secondary statistics these counters are not automatically reset when the maximum limit of is reached 2 29 UNILINK HOST ADAPTER USER MANUAL 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 WhatAre 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 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 and increases data throughput 2 10 1 1 Configuration Modes Supporting Macros Table 2 1 Configuration Modes Supporting Macros MHIU HIU NM The UNILINK Host Adapter must be configured as either a Master Host Interface Unit or a Host Interface Unit to use the macro fea
144. sponses In addition it will also select one secondary device address per cycle to perform a link status check The selected secondary 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 starts over again with address one 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 be updated and if it is an HIU buffers will be allocated This means that any time that a valid secondary device is connected to the network it will be brought online UNILINK HOST ADAPTER 2 18 USER MANUAL 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
145. struments Technical Services Hotline at 615 461 2501 0009 The adapter continued to receive an incorrect HDLC Block Checksum from the secondary after the maximum number of retries 000A The secondary timed out in the middle of the message 000B The secondary device timed out because the maximum poll time expired The value for the maximum poll time may need to be adjusted This is described in the syntax reference for command code 30 in Chapter 5 6 1 UNILINK HOST ADAPTER USER MANUAL OOOE 0010 0011 0084 0085 0086 0087 0088 0089 008B 008C ERROR CODES AND DIAGNOSTICS An uneven number of bytes was received from the secondary Lost Data Carrier Detect DCD from the TI WAY interface port s Lost Clear To Send CTS from the TI WAY interface port s The command processor found an unrecognized command code in the command string This also indicates that the command code is not valid for the currently configured operating mode If you receive this error after issuing one of the Extended HIU or NM commands you can assume that the adapter was reset and needs to be reconfigured An invalid field was received with the command code Check the command syntax in Chapter 5 The length of the command frame received from the host was too long for the specified command code The length of the command frame received from the host was too short The minimum length for an NITP protocol frame is 11 bytes The minimum l
146. sue a POLL command for each secondary device to collect the responses or some responses may be lost In any other configuration you should 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 command to determine if the broadcast message was received The 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 non MHIU EHA networks by using macros for data acquisition NOTE Before the data is broadcast all pending TIWAY l F rames 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 The following are typical uses for this command e Time synchronization for all secondary devices This could be used to signal all secondaries to reset their counters at the beginning of a production period e Data collection via a snapshot read The broadcast could signal the secondaries to move data to a designated area in the secondary device which will be retrieved later with aPOLL or SEND NETWORK DATA command 5 9 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE You CAUTION should not issue the BROADCAST NETWORK DATA TRANSFER command if your network contains Intellig
147. t media transmission when Ports 1 and 2 are connected to a redundant twisted pair cable network discussed further in Paragraph 4 2 The pin assignments for these ports are given in Table 4 2 Table 4 2 Local Line Connector Pin Assignments Reserved Reserved Sheild Cable shield and signal common Reserved Reserved LLM Positive biased signal line Reserved Reserved LLM Negative biased signal line 1 2 3 4 5 6 7 8 9 UNILINK HOST ADAPTER 4 2 USER MANUAL THE TIWAY NETWORK PORTS The TIWAY 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 bus structure with the network trunkline cable which can generally extend up to 25 000 feet with droplines up to 100 feet in length Figure 4 3 is a chart showing the maximum cable distances compared to the number of stations on the TI WAY network NOTE PM550 CIM users should refer to Appendix C for different media length factors Host Computer RS 232 C RS 423 A we Host Interface Cable UNILINK ha TIWAY UniLink Host Adapter MHU Figure 4 2 TIVAY I Bus Structure 4 3 UNILINK HOST ADAPTER USER MANUAL THE TIWAY NETWORK PORTS 19 2 k bps n 38 4 k bps T 57 6 k bps y 115 2 k bps lt Belden 9860 115 2 k bps or lower
148. ted at the point where the DLE character occurs in the data stream by the transmitting station and removed in the data stream by the receiving station This differs from the ANSI X3 66 1979 standard which uses Zero bit insertion B 3 UNILINK HOST ADAPTER USER MANUAL 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 There is no global address that causes all the adapters in a multipoint circuit to respond B 2 3 Contol Field The control field is an eight bit field containing the BDLC codes for commands and responses that control transmission reception and error recovery of messages from the host computer to the UNILINK Host Adapter Table B 1 lists the minimum command set supported by this protocol These commands are described in more detail in Paragraph B 3 Table B 1 BDLC Protocol Command Set Host Computer UNILINK Host Adapter Command Transmission Response Transmission l lor RR or RNR RR I or RR or RNR SNRM UA DISC UA B 2 4 Information Field The 290 byte information field is divided into three subfields the two byte length subfield the one byte UNILINK Host Adapter command
149. ted response 03 01 gt Poll address 1 03 01 0002 11 01 Address 1 response 03 02 Poll address 2 03 02 0002 11 01 lt Address 2 response 03 03 Poll remaining addresses 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 This information is not essential for normal operation but can be useful for identifying problems 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 ADAPTER 2 28 USER MANUAL OPERATION AND APPLICATION 2 9 4 Taking Secondary Devices Off line The DISCONNECT SECONDARIES command performs the opposite function of the CONNECT SECONDARIES command
150. ter the initial delayed poll specified by the poll delay option The value is in milliseconds and ranges from 0 to 5 000 0000 hex to 1388 hex in increments of 10 ms If a value is specified that is not an increment of 10 ms it will be rounded down to the next lower increment of 10 The default is 40 ms Option OC This parameter defines the maximum poll time or the maximum amount of time the Network Manager will poll for a Primitive response before issuing an error message The time is measured from the secondary acknowledgement of the received Primitive request The value is in milliseconds and ranges from 0 to 40 000 0000 hex to 9C40 hex in increments of 10 ms If a value is specified that is not an increment of 10 ms it will be rounded down to the next lower increment of 10 The default is 10 000 ms Option OD Reserved Option OE This parameter defines the number of retrys the adapter will UNILINK HOST ADAPTER USER MANUAL attempt during error recovery on each channel The value ranges from 0 to 16 and defaults to three 5 56 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 31 Response 31 dddddddd ff oo vvvv Usage PERFORMANCE Modes NM Parameters dddd The current values for Dipswitch 1 and Dipswitch 2 in t
151. tes independent of any host computer It controls the TIWAY network but cannot accept any host commands to change any performance parameters You can use this mode to implement a multiple host network using applications software written for the TIWAY Host Adapter Only minor changes to the applications software are needed to process the adapter configuration command A typical network is shown in Figure 2 10 Host Com outer UNILINK UNILINK HIU Figure 2 10 Standalone NM Network 2 4 TIWAY I HOSTSOFIWARE SUPPORT As mentioned in Paragraph 2 3 5 the MHIU EHA and HIU EHA modes will operate with the TIWAY HOST SOFTWARE products The MHIU and NM modes will also work with this product however you must enclose the extended and NM commands in the XPAR subroutine UNILINK HOST ADAPTER 2 10 USER MANUAL 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 OPERATION AND APPLICATION 2 5 SETMNG 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
152. th the UA and begins a hardware reset The host computer will have to wait a minimum of seven seconds before issuing any further BDLC frames This allows enough time for the power up diagnostics to complete Once the adapter is disconnected or in the disconnected mode it will respond to any command other than a SNRM with the DM response UNILINK HOST ADAPTER B 14 USER MANUAL 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 UNILINK Host Adapter 1 I Frame N S 1 N R 0 P REJ N R 2 F SNRM SS UA Frame N S 0 N R 0 P oe RR N R 1 F lt lt ume i i 2 FRMR FRMR 3 I Frame N S 3 N R 2 P timeout I Frame N S 3 N R 2 P me RR N R 4 F 1 This sequence illustrates an error with the adapter s receive count To clear this condition the host computer issues a SNRM to reset the counts and it resets its internal counts then retransmits the original Frame 2 This sequence illustrates an invalid command condition since the FRMR is not a valid command to the adapter to which it responds with a FRMR 3 This sequence illustrates a timeout The host computer did not receive a response from the adapter before the internal 30 ms time period expired The host computer then retransmits the Frame which is acknowledge
153. the host supplied Primitives before linking them The Primitives must use the same TT type but may use different 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 for both secondaries involved Once the link is established just enable the trigger macro to begin the process 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 buffer to create a valid write Primitive and the action macro is enabled If the trigger macro receives an error from the secondary the action macro is not enabled and the exception flag is set disabling the trigger macro UNILINK HOST ADAPTER 2 44 USER MANUAL 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 The exception flag of the action macro is only set when an error occurs for its secondary device If the action macro can not be executed for any reason such as the secondary is offline the link will be automatically terminated The trigger macro
154. times the macro has been updated as given in Table 5 3 The Termination Codes are defined in Chapter 6 5 31 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE Table 5 3 MRSW Values MRSW Values Description hex 0000 This macro has not been executed since the last time it wasnabled ee The number of times a repetitive 7FFF macro response has been updated 8000 Termination Code the macro is to disabled due to either an error an FFFF exception or an explicit disable Il The length of the Primitive field in bytes This value also includes the Primitive length field as defined in the TIWAY Systems Manual PPX 500 8101 x This field will be 0000 when the MRSW is 0000 and for connect and disconnect macro types pppp The Primitive response from the secondary device UNILINK HOST ADAPTER 5 32 USER MANUAL HOST COMMAND SET REFERENCE 5 4 7 Enable Disable Mac mw 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 If the macro is successfully enabled the MRSW is reset or if the macro is successfully disabled the MRSW is set to the disabled Termination Code NOTE The send Primitive and disconnect macro types can only be enabled when their associated secondary device is not
155. to 254 buffers can be allocated depending on the size of each macro and the amount of memory set aside for the macro buffers Each macro buffer consists of command and response buffers referenced by the same unique buffer number and a macro header as shown in Figure 2 14 You specify the size of each macro command buffer and its corresponding macro response buffer in the ALLOCATE MACRO BUFFER command Use the following formula to calculate the number of bytes of memory required for each macro Macro Memory 22 Bytes Macro Command Macro Response Header Buffer Length Buffer Length If this total is an odd number of bytes add one to make the total count even The header is a storage area for the macro operating parameters one of which is the Macro Response Status Word MRSW The MRSW is normally a counter that holds the number of times a repetitive macro has been executed However if an error or exception occurs a termination code indicating the cause of the error will be stored there Send the GATHER MACRO RESPONSE command to get the MRSW value The header also contains the Source Id and the secondary address associated with the macro and internally used pointers and flags UNILINK HOST ADAPTER 2 32 USER MANUAL 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 Pri
156. ts 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 If no value was specified for Option 09 the value will default to one fourth of the available buffers An amount other that the default number of buffers can be allocated explicitly with the ALLOCATE NETWORK MANAGER BUFFERS command when the number of buffers allocated by the background monitor is zero or if issued before 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 Manager and can only be issued once for each as HIU After the buffers are allocated they will remain allocated until the NM or MHIU is reset 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 AVAILABLE command to determine how many buffers are unused To use it send the one byte command code 35 The adapter will return the command code the total number of NM buffers and the number of NM buffers available UNILINK HOST ADAPTER 2 46 USER MANUAL 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
157. ts are part of the control subfield and does not require a separate transmission Example B 1 BDLC Error free Sequence Host Computer UNILINK Host Adapter 1 SNRM n _i UA 2 Frame N S 0 N R 0 P RR N R 1 F 3 I Frame N S 1 N R 0 P I Frame N S 0 N R 2 F 4 RR N R 1 P RR N R 2 F 5 RR N R 1 P_ o I Frame N S 1 N R 2 F 6 DISC UA 7 second delay 7 RR N R 0 P DM B 13 UNILINK HOST ADAPTER USER MANUAL 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 l F rame The sequence counts are 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 F rame The host computer sends another Frame with the N S count incremented This time the adapter has information to return and sends an Frame This Frame acknowledges the host computer s frame with the N R subfield The host computer has no further information and polls the adapter with an RR which also acknowledges the adapter s Frame The adapter also has no information and responds with an RR The host computer continues to poll the adapter and this time the adapter has information to return The host computer determines that no further communications are needed and issues the DISC command The adapter responds wi
158. ture 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 modes UNILINK HOST ADAPTER 2 30 USER MANUAL OPERATION AND APPLICATION 2 10 12 Repetitive and Non Repetitive Mac mos 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 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 command to disable it Both repetitive and non repetitive macros are scheduled for processing by the HIU function The HIU function schedules the requests in the following order Direct commands for a single secondary device Direct commands for multiple secondary devices Non repetitive macros PW IN E 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 wi
159. type may or may not contain an Information field Valid control field values are hex value 93 SNRM command 53 DISC command 73 UA response 1F DM response 97 FRMR response The Poll Final bit should always be set to a binary one This bit designates a poll when set by the host computer and designates the final frame when set by the adapter BDLC operates with a window size of one meaning that only one outstanding command frame can be issued at any given time Before the host computer can send another command frame it must receive a response frame with the Final bit set to one The only exception to this is if the adapter does not respond to the host computer s poll within the 30 ms timeout B 7 UNILINK HOST ADAPTER USER MANUAL 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 A SNRM must be sent to the adapter before any other command when the adapter is in the Disconnected M ode DISC The Disconnect command is issued by the host computer to logically deactivate the adapter s host interface and forces the adapter to perform a hardware reset which executes the power up diagnostics When the adapter receives the DISC command it will first respon
160. u issue any of commands 01 through 08 the adapter will assume the MHIU EHA or HIU EHA mode depending on the setting of Position 9 2 5 2 The CONHGURE ADAPTER Command The first command your application software should send is the CONFIGURE ADAPTER command code 20 The main function of this command is to set the UNILINK HOST ADAPTER 2 12 USER MANUAL 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 Each host 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 device address and the macro memory limit 2 13 UNILINK HOST ADAPTER USER MANUAL 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 The physical network parameters for the HIU function of an MHIU are not used but the CONFI
161. ue The one byte link status information for each secondary up to the maximum secondary address specified by the CONFIGURE ADAPTER command where the relative position of the status byte indicates the secondary address In other words the first status byte corresponds to secondary address 01 the second status byte to secondary address 02 and so on The bit mapping for this status byte is shown below 5 58 HOST COMMAND SET REFERENCE MSB LSB 012 3 45 6 7 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 1 Current Channel Is B 0 Current Channel Is A 1 Channel B Available 0 Channel B Not Available 1 Channel A Available 0 Channel A Not Available Figure 5 11 Link Status Byte Bit Map Bit 0 When set to one indicates that the Network Manager can communicate with the secondary device on Channel A Port 1 Bit 1 When set to one this bit indicates that the Network Manager can communicate with the secondary device on Channel B Port 2 Bit 2 This flag indicates which channel the Network Manager is currently using to communicate with the secondary device When set to one the NM is communicating on Channel B When set to zero the NM is communicating on Channel A Bit 3 Bac
162. um of twelve characters for the delimiters character count command code message body and ECC MISSED START OF MESSAGE DELIMITER the semicolon that begins a NITP frame was missing Correct the frame and retransmit it MESSAGE LENGTH COUNT ERROR the character count field value did not match the number of characters received This could be caused by a noise spike that deletes one or more characters or an error in the software driver In either case your applications software should retry the message at least three times If this same error returns all three times check for an error in your software driver MESSAGE CHECKSUM BAD the checksum calculated by the adapter did not match the ECC field value Retry the message at least three times If this same error returns all three times check for an error in your software driver INVALID HEX ASCII CHARACTER RECEIVED one of the ASCII characters between the beginning and ending delimiters was not in the NITP character set This could be caused by noise spikes that change bit values Retry the message at least three times If this same error returns all three times check for an error in your software driver UNILINK HOST ADAPTER A 8 USER MANUAL 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
163. und 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 Buffers must be allocated to an HIU before it can start issuing directives If you do not specify a default number of NM buffers with this option you can explicitly allocate NM buffers to each HIU with the ALLOCATE NETWORK MANAGER BUFFERS command code 34 or use the default of onefourth the number of buffers available This option also specifies whether an HIU can issue the network DISCONNECT command The DISCONNECT permission is enabled by setting Bit 0 to 1 MSB 0 LSB 15 1 0 0 0 00 0 00 0 0 0 1 0 1 0 Bits 1 15 Number of NM Buffers To Allocate Bit 1 1 Permission To Issue DISCONNECT 0 Not Permitted To Issue DISCONNECT Figure 5 9 Option 09 Bit Map Option OA This parameter defines the Poll delay or the minimum delay between the receipt of a Primitive by a secondary and the first Network Manager poll for the Primitive response The value is in milliseconds and ranges from 0 to 5 000 0000 hex to 1388 hex in increments of 10 ms If a value is specified that is not an increment of 10 ms it will be rounded down to the next lower increment of 10 The default is 40 ms 5 55 UNILINK HOST ADAPTER USER MANUAL HOST COMMAND SET REFERENCE Option OB This parameter defines the Poll period or the minimum delay between polls for a Primitive response The delay is used to space out polls af
164. utput status action 00 Turn the output off 01 Turn the output on UNILINK HOST ADAPTER 5 68 USER MANUAL HOST COMMAND SET REFERENCE 5 7 2 Report Extemal 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 FD ss Parameters cc Input read reset options 00 Read the input but do not reset the latch 01 Read the input then reset the latch 02 Reset the latch then read the input SS Input status 00 The Input is off 01 The Input is on 5 69 UNILINK HOST ADAPTER USER MANUAL 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 communications will be aborted all macros cleared and the adapter will branch to the beginning of normal operating routines The power up diagnostics will not be performed The reset will begin immediately after the response has been sent to the host computer Your host applications software should delay issuing another command for a minimum of 500 ms Command FE Response FE UNILINK HOST ADAPTER 5 70 USER MANUAL 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 s
165. ve macros The first parameter for this command specifies a limit on the number of NM buffers that can be used for repetitive macros The second parameter is to limit the number of outstanding requests for a single secondary device This prevents a single secondary device from getting the entire bandwidth thus leaving no room for requests for other secondaries It also prevents one HIU from dominating a secondary device and increasing its access delay for other HIUs This command may issued at any time after the HIU has been initialized and the bandwidth allocated by the Network Manager This helps tailor the bandwidth to changing network conditions Command 191 nn Response 19 Usage PERFORMANCE Modes MHIU HIU Parameters HT The maximum number of repetitive macros that can be executing at one time Values range from 0 to the number of NM buffers allocated by the Network Manager and will default to the number of NM buffers allocated by the Network Manager nn The number of outstanding requests per secondary Values range from one to the number of NM buffers allocated by the Network Manager and will default to two requests per secondary or the number of NM buffers allocated by the Network Manager whichever is smaller UNILINK HOST ADAPTER 5 38 USER MANUAL 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 A
166. w will be displayed The external loopback tests will only be performed when Position 10 of Dipswitch 2 is up LED Error Codes No Error Run Mode seessesssssseeeesssenn No Error Diagnostic Mode _ 6 Diagnostics ROM Checksum Error RAM Test Error ou ceeeeceeceeeeeeeeeeeeeeeeeeeees TIWAY Port 1 External Loopback Error salves ee tences TIWAY Port 2 External Loopback Error 2eiccevecdecenstenuseemeeenes Host Port Port 3 Loopback Error Port 4 Loopback Error sescenicsnisccctecesneticed TIWAY I Serial Communications Controller Failure sseeeeeeeeeeee PIM Checksum Error cssisvecdccoerneiivendsncads CPU Failure sxacaignisdsinceteneceienebaduauataccidenes 5 volt Power Supply Failure Watchdog Timer Failure 0 0 0 External VO Loopback EMO scscasisestcemcedcestausisents Network Address Error o eececeeeceeeeeeeeeeees ROM Checksum Error e ceeceeeeeeeeeeeeeees Legend C Flashing pn Lit Cff 2Extinguished Figure 6 4 LED Enor Codes O O00e O00 000 OOCOOOO OOO O OO00O O 000 0000O 000 O OOOO O0 OCOO 800 O OO00O O80 O0E OOO OOOO 000 00000 000 O80 0OC0O0 O0O UNILINK HOST ADAPTER 6 12 USER MANUAL ERROR CODES AND DIAGNOSTICS 6 4 4 Extemal I O Loopback Test Thereis a special diagnostic test for the Input Output Points This test is active when Position
Download Pdf Manuals
Related Search
Related Contents
Mode d`emploi Poire vaginale 商品テスト誌の日独比較と今後の課題 Cisco Systems 3750 User's Manual 取扱説明書(PDF) Manhattan 177375 mice Varionaut 2 / A / DMX / 01 災害対策用造水機 トレスキュー エンバイロモニター エンバイロモニター エンバイロモニター Peerless ACC314-AB mounting kit Copyright © All rights reserved.
Failed to retrieve file