Link 20

From KeystoneIntranet
Jump to navigation Jump to search

LINK-20 USER'S MANUAL

Phone Lines OR Direct Connection



                         Link-20/cComputer Connection


     Link-20 connects to a computer in the same way that an additional
     terminal would be connected. It responds to commands or requests
     for information from the computer in much the same manner that a
     data entry cleric would respond to commands and requests at a
     terminal. It can be connected to any computer which will support
     at least one asynchronous terminal (in addition to the system
     Console).
     The data rates have been kept low to allow communication over
     poor or questionable quality telephone lines. If errors are
     encountered, Link-20 signals the computer to re-transmit the data.
     This results in very reliable data transmission, with almost no
     chance of lost or garbled data.
     The remainder of this manual deals with the technical
     specifications of the Link-20 interface.
     DATA COMMUNICATIONS FORMAT SUMMARY
     Transmission Type: 	Serial, Asynchronous ASCII
     Baud Rate:			1200
     Number of Data Bits: 	8
     Number of Start Bits: 	1
     Number of Stop Sits: 	1
     Parity: 			None


    LINK-20 USER'S MANUAL


    COMMUNICATION SPECIFICATION
    LOW LEVEL DRIVE
    In order to assure accurate as well as rapid data transfer, the
    Spectrum has adopted a communications protocol to handle basic
    low-level errors.
    This protocol will be used for all fields allowing data errors to
    be corrected by the serial port drivers, instead of the higher
    level applications program.
    The driver will wait on character strings to either receive or
    transmit.
    In the case of receive, the driver will count the number of
    characters it receives, until it receives a <CR>. This will
    signify the end of the transmission. The driver will then
    generate a CRC based on the data and verify that it matches the
    CRC sent. If it matches, an <ACK> will be sent. If not, a
    <NACK> is sent, in which case the fields should be retransmitted
    up to three times before aborting. A successful transmission
    will signify that the next field(s) can be sent.
    In the case of transmit, the driver will generate a CRC and send
    it out at the end of the data string, followed by a <CR>. If it
    receives an <ACK>, the next field can transmit. If it receives a
    <NAK>, it will retry three times before aborting and reporting
    back to the higher level application program.
    The CRC calculated should include the command field and the data
    field. The CRC should be sent as an ASCII string representing
    the hexadecimal CRC code. For example, if the CRC calculated was
    12BC HEX, then ASCII 1, 2, B and C characters should be sent for
    the CRC.

    LINK-20 USER'S MANUAL


    LINK-20 COMMAND STRUCTURE
    The Link-20 system is always under control of the computer. The
    computer transmits a command to Link-20. The command way contain
    data for the Spectrum or a request for data from the Spectrum.
    Link-2Z always transmits a response back to the computer. The
    response may ackncwled9e proper receipt of a command, signal an
    error, or it may contain the requested data from the Spectrum.
    In order to simplify the structure, all commands and responses
    have the same general format.
           <STX> (Function Code>b[Data]<ETX><CRC><CR>[<LF>]
    The command and response are in ASCII.
    The notational convention is as follows:
           <STX>		Start of text character		02HEX
         	<Function code> is a five digit number of the form:
         DGGFF
              D is a single digit reserved for destination
              information. It should be the digit “4” in
              Commands. Responses will return with the
              diqit “3”.
              GG is a two digit Command Group Code (see commands).
              FF is a two digit field number, or the command
              code extension of the specified command (see
              commands).
   		b		Space (blank) 			20HEX
          is an alpha-numeric string.
              It must start with a printing character (not
              space). It must contain only printing
              characters or spaces. The data field may
              not be present in all commands and responses.
              Specific data field formats are required in
              some commands.
         <ETX> 		End of text character 		03HEX
         <CR> 		Carriage return character 	ODHEX
         <LF> 		Line feed character 		OAHEX
   The following sections will give commands and their normal
   responses, error responses, and examples.


    LINK-20 USER'S MANUAL


    In addition to the error responses shown for specific commands,
    there are several general error responses:
               30002 ERROR 		Syntax error. The command is
                                   not in a proper format.
               30004 ERROR 		Undefined command.
               30090 ERROR 		This command is not implemented.
               NOTE: The complete error list is on Pg. 13.
    GENERAL COMMAND GROUP (CODE 2)
               40200               Request system identification.
                                   NORMAL RESPONSE:
                                   30200 <System ID>
                                   Wbere <System ID is the Sales
                                   Order Number of the Spectrum.
                                   ERROR RESPONSE:
                                   30006 ERROR
                                   Command extension not defined.
    EXAMPLE:
              COMMAND 40200
              RESPONSE 30200 SO-012800

    LINK-20 USER'S MANUAL


    CAS (Code Activated Switch)
    A multidrop unit number must be selected for each Spectrum in the
    system. A zero must be used for non-multidrop systems. The unit
    number may be 1 through 15.
    The Spectrum will be enabled by an arming code (ASCII DC3 or 13
    Hex) followed by the unit number.
    Be sure to select a unit number that is not used by any CAS
    already in the system.
    Note:  The Spectrum will assert a RTS (request to send) before
    each response, wait for the selected CTS (clear to send) delay,
    then transmit it’s response. At the end of transmission, the
    Spectrum will drop RTS.


    LINK-20 USER'S MANUAL


    OPEN. DELETE, CLOSE COMMAND GROUP (CODE 3) [TICKET]
              40390	<Customer Code> 	Create and open a ticket.
                                        	When a ticket is open, the
                                        	Spectrum will display a
                                        	flashing '"c'" (communicating)
                                        	beside the ticket in Job
                                        	Index. The Spectrum system
                                        	can hold up to 200 tickets
                                        	in it’s job index, to be
                                        	batched upon command by
                                        	the Spectrum operator.
                                        	Open tickets cannot
                                        	be loaded or run until they
                                        	are closed. A ticket must be
                                        	open in order to perform any
                                        	of the following data transfer
                                        	operations.
                                        	NORMAL RESPONSE:
                                        	30390	<Ticket Code>
                                        	Where <Ticket Code> is a
                                        	decimal number (1-9,999,999)
                                        	which identifies this
                                        	particular ticket. It may be
                                        	used in subsequent commands to
                                        	access this ticket.
                                        	ERROR RESPONSES:
                                        	30007 ERROR
                                        	Attempt to create a ticket
                                        	when no space is available.
                                        	30010 ERROR
                                        	Attempt to create a ticket
                                        	while another ticket is open.
                                        

300ll ERROR

Attempt to create a ticket

                                        	while a customer file is open.
                                        	30012 ERROR
                                        	Attempt to create a ticket
                                        	while a product file is open.

     LINK-20 USER'S MANUAL


               40391 				End ticket transfer
                                        	(close ticket)
                                         NORMAL RESPONSE:
                                         30391 <Ticket Code>
                                         ERROR RESPONSE:
                                         30009 ERROR
                                         Attempt to close a ticket that
                                         is not open.


               40393 				Delete an open ticket.
                                         NORMAL RESPONSE
                                         30393 <Ticket Code>
                                         ERROR RESPONSE:
                                         30015 ERROR
                                         Attempt to delete while no
                                         ticket is open.


    LINK-20 USER'S MANUAL


    Delete an existing ticket.
    EXAMPLE:
    COMMAND 			RESPONSE 			COMMENT
    40500   2 							Open Ticket Number 2

30500 00000

    40393 								Delete the Ticket
                         	30393   00000
    Note: The specific data items stored, their formats, and their
    “field numbers” are defined by the "Ticket Record Definition",
    Pgs. 19-21.


    LINK-20 USER'S MANUAL


    QUERY FIELD COMMAND GROUP (CODE 4) [TICKET]
              404FF 					Query field number FF of
                                             	the current open ticket
                                             	(see 40390 or 40392).


                                             	NORMAL RESPONSE:
                                             	304FF 
                                             	where  is the
                                             	current field data.


ERROR RESPONSES:

                                             	30008 ERROR
                                             	Illegal field reference
                                             	(field number too large).
                                             

30009 ERROR

Attempt to query with no

                                         ticket open.
    EXAMPLE
    COMMAND 			RESPONSE 			COMMENT
    40392  2 							Open ticket #2
                        	30392  00002
    40438 								Query delivered quantity
                        	30438  000030.00		30 yards delivered
    40391 								Close the ticket
                        	30391  00002
    Note: The specific data items stored, their formats, and their
    "field numbers" are defined by the “Ticket Record Definition”,
    Pgs 31-33.
    Note: This feature not implemented.

    LINK-20 USER'S MANUAL


    FIND FIELD AMD OPEN COMMAND GROUP (CODE 5) [TICKET]
               40500  				Open the ticket
                                              	whose ticket number
                                              	matches
                                              	.
                                              	NORMAL RESPONSE
                                              	30800 <Ticket Code>


                                              	ERROR RESPONSES
                                              	30010 ERROR
                                              	Attempt to open a ticket
                                             	while another ticket is
                                              	open.


                                              	30014 ERROR
                                             	Attempt to open a
                                             	batching or loaded
                                              	ticket.


                                              	300l6 ERROR
                                              	Data field missing.
    EXAMPLE
    COMMAND 			RESPONSE 			COMMENT
    40500  12345 						Ticket number
                         	30520   00002


   LINK-20 USER'S MANUAL


   TRANSFER BLOCK MODE COMMAND GROUP (CODE 6) [TICKET]


              406FF   				Transfer  to
                                             	currently open ticket
                                             	using block mode
                                             	transmission.  is
                                             	to start at field number
                                             	<FF> in the Ticket Record
                                             	(see Pg 32), and continue
                                             	through as many fields as
                                             	there is  available
                                             	for.  is of no
                                             	fixed length. Length of
                                             	zero is allowed. As many
                                             	fields as desired can be
                                             	sent in this manner, or
                                             	the record can be sent in
                                             	one large field. If
                                             	fields are sent
                                             	individually, this
                                             	command behaves exactly
                                             	as command <408FF>.


                                             	NORMAL RESPONSE:
                                             	306FF <Ticket Code>


                                             	ERROR RESPONSE:
                                             	30008 ERROR
                                             	Illegal field reference

(field * too large).

30009 ERROR

                                             	Attempt to transfer data
                                             	with no open ticket.

   LINK-20 USER'S MANUAL


   LINK-20 ERRORS
         30001               Communication error
         30002			Syntax error
         30004               Undefined command
         30006 			Command extension not defined
         30007               Attempt to create a ticket - no space
         30008               Illegal field reference
         30009               Attempt to transfer, close or query
                        	an unopened ticket
         30010               Attempt to create/open a ticket - another
                        	ticket previously opened
         30011			Attempt to create/open a ticket -
                        	customer file presently open
         30012 			Attempt to create/open a ticket -
                        	product file presently open
         30013 			Attempt to open a non-existing ticket
         300l4 			Attempt to open a batching or loaded ticket
         30015			Attempted to delete ticket without opening
         30016			Data field (ticket code) missing
         30017 			Attempt to access an unknown table
         30018			Request command is incomplete - end of
                        	buffer reached
         30090               This feature has not been implemented

     LINK-20 USER'S MANUAL


     LINK-20 Function Code Summary


                 Ticket
     Create
     and Open 	40390
     Close 	4039l
     Delete	40393
     Query
     Field 	404FF *
     Open on
     Ticket #	40500
    	Transfer
     Block 	406FF


     * This feature has not been implemented.


    LINK-20 USER'S MANUAL


    LINK-20 TRANSFER BLOCK EXAMPLE 1
    Good Transmission
    Command 					Response
    (1)
    <STX>40390bBuilders<ETX><CRC><CR><LF>
                                   

(2)

                                   	<ACK> <STX>30390b00003<ETX><CRC><CR>
    (3)
    <ACK><STX>40600b23bbbbbBuildersbbJohnbSmithbCorp.bbbbbbbbbbbbbb
    DublinbApartmentbComplexbbbbbbl234bFifthbAve.bbbbbbbbbbbbbbb
    ColumbusbbbbbbbOh.
    43212bbbbbbbbbb432lDeliverbtob3456bDublinbRd.bbbb<ETX><CRC><CR><LF>
                                    

(4)

                                    	<ACK><STX>30600b00003<ETX><CRC><CR>
    (5)
    <ACK><STX>40634b2500bbbbbbLowbSlumpbMixb#2bbbbbbbbbbbbbb
    Ydsbbbbb8.00bbbb38.00bbbbb8.00bbbbb25.00bbbb200.00
    <ETX><CRC><CR><LF>
                                    	(6)
                                    	<ACK><STX>30600b00003<ETX><CRC><CR>
    (7)
    <ACK><STX>40391b<ETX><CRC><CR><LF>
                                    	(8)
                                    	<ACK><STX>30391b00004<ETX><CRC><CR>
    (1) Create and open a ticket.
    (2) Ticket #3 opened
    (3) Transfer block of data starting at Field 0.
         Example:
         Ticket # 			23
         Customer Code 		Builders
         Customer Name 		John Smith Corp.
         Customer Information 	Dublin Apartment Complex
         Customer Address Line 	1234 Fifth Ave.
         City 				Columbus


    LINK-20 USER'S MANUAL


    (4) Block Received
    (5) Transfer block of data starting at Field 38.
         Example:
         Product Code #1 		2500
         Description 			Low slump Mix #2
         Unit of Measure 		Yds
         Quantity this load 		8.00
         Total Ordered 		38.00
         Total Delivered		8.00
         Price 				25.00
         Ext. Price 			200.00
    (6) Block Received
    (7) Close Ticket
    (8) Ticket Closed, next ticket is 00004.


    LINK-20 USER'S MANUAL


    LINK-20 TRANSFER BLOCK EXAMPLE 2
    One transmission error and NAK
    Command 					Response
    (1)
    <STX>40390bBuilders<ETX><CRC><CR><LF>
                                       	(2)
                                       	<ACK><STX>30390b00003<ETX><CRC><CR>
    (3)
    <ACK><STX>40600b23bbbbbBuildersbbJohnbSmithbCorp.bbbbbbbbbbbbbb
    DublinbApartmentbComplexbbbbbbl234bFifthbAve.bbbbbbbbbbbbbbb
    ColumbusbbbbbbbOh.
    43212bbbbbbbbbb432lDeliverbtob3456bDublinbRd.bbbb<ETX><CRC><CR><LF>
                                     	(4)
                                     	<NAK>
    (5)
    <ACK><STX>40600b23bbbbbBuildersbbJohnbSmithbCorp.bbbbbbbbbbbbbb
    DublinbApartmentbComplexbbbbbbl234bFifthbAve.bbbbbbbbbbbbbbb
    ColumbusbbbbbbbOh.
    43212bbbbbbbbbb432lDeliverbtob3456bDublinbRd.bbbb<ETX><CRC><CR><LF>


                                     	(6)
                                    	<ACK><STX>30600b00003<ETX><CRC><CR>
    (7)
    <ACK><STX>40634b2500bbbbbbLowbSlumpbMixb#2bbbbbbbbbbbbbb
    Ydsbbbbb8.00bbbb38.00bbbbb8.00bbbbb25.00bbbb200.00
    <ETX><CRC><CR><LF>


                                     	(8)
                                    	<ACK><STX>30600b00003<ETX><CRC><CR>
    (9)
    <ACK><STX>40391b<ETX><CRC><CR><LF>
                                     	(10)
                                    	<ACK><STX>30391b00004<ETX><CRC><CR>


    (1) Create and open a ticket.
    (2) Ticket #3 opened
  LINK-20 USER'S MANUAL


     (i) Transfer block of data starting at Field 0.
         Example:
         Ticket # 			23
         Customer Code 		02
         Customer Name 		John Smith Corp.
         Customer Information 	Dublin Apartment Complex
         Customer Address Line 	1234 Fifth Ave.
         City 				Columbus
     (4) Noise on line causes data error and CRC test fails.
         <NAK> is sent.
     (5) Transfer block is repeated as in (3).
     (6) Block Received
     (7) Transfer block of data starting at Field 38.
         Example
         Product Code #1 		25GB
         Description 			Low Slump Mix #2
         Unit of Measure 		Yds
         Quantity this load		8.00
         Total Ordered 		38.00
         Total Delivered 		8.00
         Price 				25.00
         Ext. Price 			200.
     (8) Block Received
     (9) Close Ticket
    (10) Ticket Closed, next ticket is 00004.


   LINK-20 USER'S MANUAL
  
   TICKET RECORD


   Field # Description 				    	   Length 	     	    Type
    0 	Ticket # (Sequence #) 					7 			A
    1 	Customer Code 						10			A
    2 	Customer Name 						30 			A
    3 	Customer Information 					30 			A
    4 	Customer Address Line 					30 			A
    S 	City 								15 			A
    6 	State 							3 			A
    7 	Zip Code 							10 			A
    S 	Account Number 						10 			A
    9 	Delivery Instruction Line #1 				30 			A
   10 	Delivery Instruction Line #2 				30 			A
   11 	Delivery Instruction Line #3 				30 			A
   12 	Delivery Instruction Line #4 				30 			A
   13 	De1Every Instruction Line #5 				30 			A
   14 	Delivery Instruction Line #6 				30 			A
   15 	Memo Line #1 						19 			A
   16 	Memo Line #2 						19 			A
   17 	Notes 							30 			A
   18 	Purchase Order # 						10 			A
   19 	Sales Order #						10 			A
   20 	COD Flag (Y/N) 						1 			A
   21 	Credit Code 						5 			A
   22 	Order Tax Rate 						9(xxxxx.xxx) 	N
   23 	Order Tax Code 						4 			A
   24 	Taxable 							1 			A
   25 	Project Code 						9 			A
   26 	Zone 								9 			A
   27 	Use 								9 			A
   28 	Reference # 						3 			N
   29 	Truck # 							4 			N
   30 	Driver Initials 						5 			A
   31 	Driver Name 						15 			A
   32 	Date 				(MM/DD/YY) 			8 			A
   33 	Time 				(HH:MM) 			5 			A
   34 	Spacing (Load Interval) 	(HH:MM) 		5 			A


   LINK-20 USER'S MANUAL
  


   TICKET RECORD
   CONTINUED


     35 	Extra Product Code #1 (Concrete Product) 		10 			A
     36 	Description 						30 			A
     37 	Unit of Measure 						3 			A
     38 	Quantity This Load 					9(xxxxxx.xx) 	N
     39 	Total Ordered 						9(xxxxxx.xx) 	N
     40 	Total Delivered 						9(xxxxxx.xx) 	N
     41 	Price This Product 					10(xxxxxxx.xx) 	N
     42 	*Ext. Price This Load (Oty. * Price) 		l0(xxxxxxx.xx)	N
     43 	Extra Product Code #2 					10			A
     44 	Description 						30 			A
     45 	Unit of Measure 						3 			A
     46 	Type 								1 			A
     47 	Taxable 							1 			A
     48 	Quantity 							9(xxxxxx.xx) 	N
     49 	Ordered 							9(xxxxxx.xx) 	N
     50 	Delivered 							9(xxxxxx.xx) 	N
     51 	Price 							l0(xxxxxxx.xx)	N
     52 	*Ext. Price 						l0(xxxxxxx.xx)	N
     53 	Extra Product Code #3 					10 			A
     54 	Description 						30			A
     55 	Unit of Measure 						3 			A
     56 	Type 								1 			A
     57 	Taxable 							1 			A
     58 	Quantity 							9(xxxxxx.xx) 	N
     59 	Ordered 							9(xxxxxx.xx) 	N
     60 	Delivered 							9(xxxxxx.xx) 	N
     61 	Price 							10(xxxxxxx.xx)	N
     62 	*Ext. Price 						10(xxxxxxx.xx) 	N
     63 	Extra Product Code #4 					10 			A
     64 	Description 						30 			A
     65 	Unit of Measure 						3 			A
     66 	Type 								1 			A
     67 	Taxable 							1 			A
     68 	Quantity 							9(xxxxxx.xx) 	N
     69 	Ordered 							9(xxxxxx.xx) 	N
     70 	Delivered 							9(xxxxxx.xx) 	N
     71 	Price 							l0(xxxxxxx.xx)	N
     72 	*Ext. Price 						10(xxxxxxx.xx) 	N

    LINK-20 USER'S MANUAL


   TICKET RECORD
   CONTINUED
     72 	Extra Product Code #5 					10 			A
     74 	Description 						30 			A
     75 	Unit of Measure 						3			A
     76 	Type 								1 			A
     77 	Taxable 							1 			A
     78 	Quantity 							9(xxxxxx.xx) 	N
     79 	Ordered 							9(xxxxxx.xx) 	N
     80 	Delivered 							9(xxxxxx.xx) 	N
     81 	Price 							10(xxxxxxx.xx) 	N
     82 	*Ext. Price 						10(xxxxxxx.xx) 	N
     83 	Extra Product Code #6 					10 			A
     84 	Description 						30 			A
     83 	Unit of Measure 						3 			A
     86 	Type 								1 			A
     87 	Taxable 							1 			A
     88 	Quantity 							9(xxxxxx.xx) 	N
     89 	Ordered 							9(xxxxxx.xx) 	N
     90 	Delivered 							9(xxxxxx.xx) 	N
     91 	Price 							l0(xxxxxxx.xx) 	N
     92 	*Ext. Price 						10(xxxxxxx.xx) 	N
     93 	Previous Total 						l0(xxxxxxx.xx) 	N
     94 	*Ticket Total 						10(xxxxxxx.xx) 	N
     93 	Sales Tax 						10(xxxxxxx.xx)	N
     96 	Ticket Total 						l0(xxxxxxx.xx)	N
     97 	New Total 						10(xxxxxxx.xx)	N
     98 	slump 							7(xxxx.xx) 		N
     99 	**Batch Flag (Y/N) 					1 			A
     A0 	Number of Loads 						5 			N
     Al 	*Delivery Address Line One Extension 		19 			A
     A2 	Delivery Address Line Two Extension 		19 			A
     A3 	Other Address Line Extension 				19 			A
     -- 	Spare 							25 			A
           TOTAL LENGTH OF RECORD 					1200


            * NOTE: Spectrum does not re-compute or check
                    these prices or any amounts in any fields.
           ** NOTE: Y = Batch and print ticket
                    N = Don't batch, just print ticket