The text of a manual · part 3 of 37
TCL Terminal Control Language Programmer's Manual, pages 21 to 30
Pages 21 to 30 of 362
The original document is the PDF (13 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the VeriFone Tranz 330
Page 21
2. Terminal Basics idle, _ - _ - - - - _?> Key Transact Bi N Y 4 Card (host) = (985) def "1 N ¥ B.C. (host) = (988) def '2" N Y Ring Auto Answer N Application packet received? Y
Auto Answer
ANZ 340 only)
Display New Time
Figure 2-2. Idle State Routine
With TRANZ 330 version 2.1 or greater, and TRANZ 380, the terminal checks memory location 985/0985 for the programmed host number for card-initiated transactions. If the first character is between 1-9, the terminal goes to that particular host (e.g., "3" goes to host 3). If a value is not programmed in location 985/0985, or if the terminal detects an alpha character, the terminal will default to 1.
A bar code-initiated transaction, available on TRANZ 330 versions 2.1 through 3.40 and on TRANZ 380. The terminal checks memory location 986/0986 for the programmed host number for bar code transactions. If the first character is between 1-9, the terminal goes to that particular host (e.g., "3" goes to host 3). If a value is not programmed in the memory location, or if the terminal detects an alpha character, the terminal will default to 2.
The auto answer function. See Figure 2-4, "Dial Terminal Auto Answer (for TRANZ 330 versions prior to 2.1)", and Figures 2-6 and 2-7 "TRANZ 330 Auto Answer Routine (for firmware 2.1 or greater) and TRANZ 380. If the terminal receives an incoming ring, the terminal goes to the auto answer function. This is only supported in TRANZ 330/380 versions.
Page 22
Key Press
TCL Programmer’s Manual
For the PNC 340 or TRANZ 340, which does not receive an incoming ring, the operating system checks whether an application packet has been received. If it has, the terminal goes to auto answer. If not, the terminal proceeds to “idle control string enabled?" (See Figure 2-5, "TRANZ 340 Auto Answer Routine.”) The TRANZ 330 (202) has no auto answer and proceeds to the idle control string.
The idle loop control string. (See Figure 2-8, "Idle Loop Control String.") If the idle control string is enabled, the terminal will timeout, set in memory location 980/0980 then execute the idle loop control string.
When no keys are pressed and memory location 030/0030 is empty, the terminal continues to update the time display.
From the idle state the terminal will execute the operation associated with the key press. Figure 2-3, "Key Press Routine" illustrates the following key press operations:
Pressing the [*] or [#] key causes the terminal to scroll the displayed message left or right, respectively. If the displayed message does not exceed 16 characters, the terminal leaves the display as is.
Pressing one of the keys numbered 1 through 9 will initiate a transaction. When one of these keys is pressed, the terminal uses the host data associated with the pressed key to format data packets, dial the host and execute the transaction. Refer to "Transaction Routine” page 2-15.
Pressing the [0] key initiates the "AUTODIAL"” function. The terminal will wait until the memory-dial location is entered, then retrieves and dials the selected telephone number.
Pressing the [BACKSPACE] key causes the terminal to post dial (wait until all transaction data is entered before dialing) the telephone number of the host associated with the next pressed key. For example, if you press [BACKSPACE] then [1], the terminal will post dial the host telephone number associated with key [1]. This operation overrides the pre-dial instruction in the control string.
When the multiple transaction feature is enabled (multi-trans flag in location 007/0007 set to a value greater than 0) and the [ALPHA] key is pressed, the terminal will remain on line and perform multiple transactions with the host associated with the next key press. For example, if you press [ALPHA] then press [5], the terminal will dial the host associated with key [5] and remain on-line, performing multiple transactions with that host until the multi-trans timeout period expires or the [CLEAR] key is pressed.
When the [FUNC] key is pressed, the terminal enters the routine illustrated in Figure 2-10, "Function Routine.”
Pressing [CLEAR] causes the terminal to abort the execution of TCL and return to the idle state.
Page 23
Polled Terminals
2. Terminal Basics
Key Pressed
Scroll Left Seroll Right Set (host) to Key Autodial: Get Wait 30 Location > seconds for ABORTD Number and user to pick dial it up the phone Set Post > Dial Flag The items in this block are for dial-up Set terminals only. They Mult a are not available In ult Trans polled terminals.
CLEAR Key Pressed
<<
Figure 2-3. Key Press Routine
Polled terminals will execute the following key press operations as described above: *, scroll left (*) or right (#),
*, initiate transaction (TRANZ 330 202 can initiate only if being properly polled by the host),
* perform function and clear routines.
The PNC 340, TRANZ 340, and 330 (202) terminals ignore the [0], [BACKSPACE] and [ALPHA] keys.
Page 24
Auto Answer Function
TRANZ 330 Versions Prior to 2.1
TCL Programmer’s Manual
When the terminal senses an incoming ring while in the idle state, the operating system executes its auto answer feature, as described in Figures 2-4 through 2-7.
Note: The following description and the flow chart illustrated in Figure 2-4 applies to TRANZ 330 versions prior to 2.1. See Pages 2-9 through 2-11 for a description and flow charts which apply to PNC 330 versions 3.5 and greater, TRANZ 330 versions 2.1 or greater and TRANZ 380. The polled terminal auto answer function flow chart can be found on page 2-8.
1. The terminal checks if there is a control string to execute the auto answer feature. If the control string is empty, it returns to the idle state.
2. If the auto answer control string is enabled, the terminal gets the number of seconds for the answer delay that is set in location 015. If a standard telephone is connected to the same line, this allows the user to answer the phone for voice communication before the terminal goes off hook.
Note: Verify your auto answer delay is not mismatched with the timing of the ring established by your telephone company.
3. If the delay has been set, the terminal waits the appropriate time; if the delay has not been set, the terminal proceeds to go off hook to answer the phone and waits the two-second billing delay required by the phone company. Following the two-second wait, the terminal raises the answer carrier, then waits for the originate carrier and for the host computer to send the ENQ that begins the communication process.
4. The operating system executes the commands in the auto answer control string (038) and the terminal sends its transmit buffer.
5. The terminal waits for response and loops back to execute the control string.
Note: To exit the auto answer process, the user must execute the ABORT *K command, or the terminal will automatically abort after 20 seconds of inactivity or a communication error.
Page 25
2. Terminal Basics
Auto Answer C. S. mpty (038)
Get Auto Answer
Delay Appropriate Time
Delay = 0
1. Go Off Hook
2. Wait 2 seconds
3. Raise Answer Carrier
4. Wait for Originate Carrier 5. Wait for ENQ
\¢+ - - Execute Auto Answer C. S. (038)
v
Send Transmit Buffer v
Wait for Receive Buffer
Figure 2-4. Dial Terminal Auto Answer (for TRANZ 330 versions prior to 2.1)
Page 26
Polled Terminals
TCL Programmer’s Manual
The TRANZ 330 (202) terminal does not perform the auto answer function; the PNC 340 and TRANZ 340 do.
Although the PNC 340/TRANZ 340 terminal does not have a modem, it is continuously polled by a controller and performs the auto answer routine whenever an application packet is received at the idle state. See Figure 2-5.
Reset Application Packet Received Flag
Execute Auto Answer C. S. (038)
Communicate
Figure 2-5. TRANZ 340 Auto Answer Routine
1. Upon receipt of an application packet, the PNC 340/TRANZ 340 resets the application packet received flag so that the application packet will not be processed more than once.
2. The terminal then checks if the auto answer control string (location 038/0038) is empty. If it is, the terminal returns to the idle prompt.
3. Ifit is not empty, the terminal executes the auto answer control string (memory location 038/0038).
4. The terminal then executes the communicate routine which sends the message in the transmit buffer to the controller and waits for a response from the receive buffer.
5. Steps 3 and 4 are repeated (looped) until the *K command is executed to cause an abort.
Page 27
PNC 330/TRANZ 330 2.1 or Greater and TRANZ 380
2. Terminal Basics
The following procedure is the auto answer function for PNC 330 and TRANZ 330 versions 2.1 or greater, and TRANZ 380. See page 2-6 for versions prior to 2.1 and the auto answer function for polled terminals.
1. The terminal checks to see if the auto answer control string (memory location 038/0038) is empty. If it is empty, the terminal retums and proceeds to the idle loop control string.
2. If the auto answer control string is enabled, the terminal gets the appropriate delay set in location 015/0015.
3. The terminal sets the modem speed (baud rate) as indicated in memory location 965/0965. For TRANZ 330 version 3.0 or greater and TRANZ 380, it sets the BELL/CCITT mode found in memory location 958/0958 for international and industrial versions only.
4. The terminal goes off hook to answer the phone, waits a required two seconds and checks if memory location 966/0966, Auto Answering Process, is set to "2”. If it is, the terminal goes off hook, waits two seconds and executes the auto answer control string. The terminal proceeds to step 7.
5. However, if location 966/0966, which dictates auto answering, does not equal 2, the terminal raises the answer tone.
6. On TRANZ 330 version 3.0 or greater and TRANZ 380, the terminal then checks if BELL is selected. If it is, the terminal proceeds to step 7. If it isn't, the terminal waits 3.3 seconds, turns off the answer tone, waits 75 ms, then raises the unscrambled answer carrier.
7. The terminal then waits 30 seconds for originate carrier and displays "CONNECTED".
8. On TRANZ 330 version 3.0 or greater and TRANZ 380, the terminal then checks for 1200 baud. If not set to 1200 baud, the terminal proceeds to step 9. If set to 1200 baud, the terminal scrambles the carrier.
9. The terminal checks if memory location 966/0966= 1. If it does not, the terminal waits 10 seconds for the host to send the ENQ. If 966/0966 does equal 1, the terminal goes off hook, waits two seconds and raises the answer carrier.
10. The terminal executes the command in the Auto Answer Control String (038/0038), sends the data in the transmit buffer to the calling computer, waits for a response and loops back to execute the control string.
Page 28
TCL Programmer’s Manual
Note: To exit the auto answer process, execute ABORT (*K) command. Or, depending on the timeout value set in location 967/0967, Auto Answer Packet Inactivity Timeout, the terminal can be set to automatically abort after a specified period of inactivity.
Location Y 038 Empty?
Delay Appropriate Time Set Modem Speed to (965) Set Bell/CCITT Location 958 (TRANZ 330 CCITT Only) Go Off Hook Wait 2 Seconds Raise Answer Tone {TRANZ 330 CCITT Only)
N Wait 3.3 Seconds, P) Tum off Answer Tone Wait 75 ms Raise Unscrambled Answer Carrier J
Bell Selected
Wait 30 Seconds for, Originate Carrier N Display "No Carrier” Y
Display "CONNECTED" . Oo ©
Figure 2-6. PNC 330, TRANZ 330 Auto Answer Routine (for firmware 2.1 or greater) and TRANZ 380, Part 1
Page 29
2. Terminal Basics
1200 Baud Scramble Carrier
Wait 10 Seconds for ENQ
ENQ N Display Received "NO ENQ FROM HOST"
Y
Execute Auto, - - -§> AnswerC.S. kg - (038)
v
Send Transmit Buffer v
Wait for Receive Buffer
Figure 2-7. PNC 330, TRANZ 330 Auto Answer Routine (for firmware 2.1 or greater), and TRANZ 380, Part 2
Page 30
Idle Loop Control String
TCL Programmer’s Manual
The Idle Loop Control String can be used for the terminal’s unattended operations. For example, if the terminal is left inactive for a set number of seconds, it can be programmed to check the time, beep or upload a batch at a preset time. As shown in Figure 2-8, "Idle Loop Control String”:
Idle Control String
Execute Control
String in Location 981 Dial Phone Number in + - _O Wait for ENQ Location 982 Y ENQ Received N Send Request Packet Display "NO ENQ v FROM HOST" Wait for Response Packet
Append Error Code =} in Response Buffer
Execute Control String in Location 983
Figure 2-8. Idle Loop Control String