The text of a manual · part 21 of 37
TCL Terminal Control Language Programmer's Manual, pages 201 to 210
Pages 201 to 210 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 201
+T - Characters I/O Over the DIN 6 Port
Description: Sends the transmit buffer to the DIN 6 port for bar code or PIN pad operation.
Typical input/output messages include pass characters which are coded in ROM and represent special flag characters used in data communication. A pass character is only valid when parameter "a" = 7. When received, the terminal processes and then acts upon its represented message. Valid pass characters include the following:
Character Hex Description
EOT 04h End of Transmission ENQ 05h Enquire
ACK 06h Acknowledgement NAK 15h No acknowledgement CR ODh Carriage return vVACK 07h VISA ACK 1
VWACK, 11h Wait ACK vWAIT 12h VISA wait
Special host communication characters used when logging into several different hosts and networks:
@ 40h : 3Ah = 3Dh ~ 7Eh XON 1th See Also: | Command Description *H Encrypt PIN +H Wait for PIN +U Set DIN 6 Parameters
Category: Communications Control
Buffer Status: | Source Buffer Destination Buffer No change No change; buffer read Terminals Supported: Terminal Special Conditions PNC 330/340 None XL Not available TRANZ 330/340 Available on versions 2.1 or greater TRANZ 380 None
5 - 137
Page 202
5 - 138
+T - Characters I/O Over the DIN 6 Port
Command Format:
Parameters: Default Parameter Value Description a 0 Optional; options for this parameter are:
Transmitting data:
0 send transmit buffer
1 append termination character TERMCHAR (set with *P command) and LRC, then send the transmit buffer
Receiving data:
5 wait for number of characters specified in "n" parameter to be received, append it to the destination buffer
6 wait for 1 character or packet to be received, append it to destination buffer; if STX received wait for packet
7 wait for pass character or packet or; retransmit last data if NAK received, append receive character or packet to the destination buffer. (See also *| command for pass characters.)
t 0 Optional; timeout period in seconds
(receive only):
0 wait forever
1-255 number of seconds to wait
If the unit times out, the destination buffer remains unchanged.
Ss 0 Optional; number of commands to skip if received data (applies to receive only) n 1 Optional; number of characters to wait before appending characters to destination buffer; this parameter applies only when "a" parameter = 5 (receive data only).
Examples: Command Operation
; This routine changes the idle prompt on the PIN Pad display ; change PIN Pad
313$ *W1 ; Wait one second B.1 ; Select transmit buffer as destination buffer G ; Clear destination buffer R2 ; Append a "STX" char to the buffer R’Z8’ ; Reset/Set idle prompt command A#2 ; Append new idle prompt
Page 203
+T - Characters {/O Over the DIN 6 Port
Examples: Command Operation (continued)
B1.2 ; Source = transmit buffer ; Destination = receive buffer (response from ; PIN Pad will be here)
G ; Clear destination buffer +T1 ; Append termination character and send ; transmit buffer +77.15 ; Wait for packet or a ‘pass character’ (expecting
; an ACK) retransmit last data if receive NAK
; append receive character or packet to the
; destination buffer timeout period is 15 seconds *W2 ; Wait a couple seconds *M ; Return
5 - 139
Page 204
U - Copy Buffer to a Memory Location
Description: | Copies the contents of a specified buffer to a memory location, overwriting any data in the memory location.
See Also: | Command Description B Select Buffers D Delete Characters from Buffer G Clear Destination H Search for String +J Buffer Modification O Move Extraction Pointer +S Get Buffer Size V Display Buffer Zz Pad Destination Buffer
Category: Buffer Operations
Buffer Status: | Source Buffer Destination Buffer No change Buffer read Terminals Supported: Terminal Special Conditions PNC 330/340 None XL None
TRANZ 330/340/380 None
Command Format:
Default Parameters: Parameter Value Description m 000 Optional; three-digit memory location into which the buffer will be copied; the default is location 000 b ¢) Optional; the buffer to be copied; the default, 0, selects the current destination buffer; other buffer options include:
current destination buffer
Buffer #1 - Transmit Buffer
Buffer #2 - Receive Buffer
Buffer #3 - Data Capture Buffer
Buffer #4 - Print Line Buffer
Buffer #5 - Temporary Buffer akoON - oO
5-140
Page 205
U - Copy Buffer to a Memory Location
Examples: Command Operation
; Routine to increment a 3-digit batch number, padded with leading zeros, ; upon reaching ’999’ roll to sequence number ’001’.
B3.3 ; Select source and destination buffer 3 G ; Clear destination buffer
A61 ; Append the batch number
13.2.’999’ ; If not = ’999’, then skip 3 else
G ; Clear destination buffer
R48 ; Append zero
U61 ; Update batch number
G ; Clear destination buffer
R49 ; Append 1 to destination buffer
Té61 ; Increment batch number by 1
G ; Clear destination buffer
A61 ; Append batch number. When you perform
; an arithmetic operation on a memory location, ; the padding is lost, so we need to pad for future ; uses of this number
Z3.48.1 ; Pad with zeros for up to 6 characters, right ; justified U61 ; Update batch number with padded value
5-141
Page 206
5- 142
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
*U - Bar Code Reader Input
Causes the terminal to accept input from the bar code reader, appends data to the destination buffer if a bar code is read, and skips the specified number of commands. See Appendix J for use with industrial terminals.
If you press a key before a bar code is read, the terminal executes the next TCL command looking for "E" or "K" commands to take the data.
Note: Verify that the bar code wand is selected as the DIN 6 peripheral, location 970. Command Description E Input from Card Reader or Keypad +E Input Variable Decimal Point K Input from Keypad Only M Input from Card Reader Only *Y Check Input Devices Data Entry
Source Buffer
Destination Buffer
No change Buffer updated
Terminal Special Conditions
PNC 330/340 Not available
XL Not available
TRANZ 330 Not supported in version 3.60; s2 not available
TRANZ 330 (202) TRANZ 340 ZON 53X/54X TRANZ 380
Pressing [CLEAR] after bar code data is read, but before *U command is executed disables further bar code reads. To re-enable, power cycle unit or run bar code reader test in the Diagnostics mode.
Also applies to ZON 53x industrial terminals. S2 not available
S2 not available
S2 available on industrial terminals only
S2 not available
Page 207
Parameters:
Example:
*U - Bar Code Reader Input
Parameter
Default Value
Description ai a2
$2
Command none
Optional; the number of commands to skip when a a valid bar code is read; if a key is pressed before the bar code is read, the terminal will execute the next instruction. Note: The programmer must use a "K" command to accept and process the keyboard entry.
Optional; Bar code algorithm 0 = 3 of 9.
Optional; Luhn check digit used to ensure input data is valid; the default is 0, no check digit; check digit options include: Q no check digit performed by "*U" itself 1 Luhn check digit for code 39 if data is totally numeric. Only available if "*Y" does not logically precede "*U". Note: Standard code 39 mod 43 check sum to be implemented at a future date, but not from this parameter.
Optional; ZON 53x/54x only (TRANZ 330/340 industrial counterpart); number of commands to skip on a bad bar code read. See Appendix J.
Operation
; This routine accepts input from the bar code wand or keyboard. It will aiso ; check the Luhn check digit of a bar code in code 39 symbology, excluding ; the first character which is alphabetic.
970=1
113=SCAN BAR CODE
144$ B3.3 G P113 *U 4.1.28 *L145 D U97 L K3.10.1 I-5
; Set flag to indicate bar code wand attached
; Select source and destination buffer
; Clear destination buffer
; Display "SCAN BAR CODE"
; Accept input
; If keyboard entry, skip 4
; Verify Lunn Check Digit
; Delete field separator at end
; Store number
; Get next bar code
; Accept keyboard input, quit if [ENTER]
5-143
Page 208
5 - 144
Example: (continued)
Industrial Example: (see Appendix J)
*U - Bar Code Reader Input
Command Operation 145$ B3.4 ; Select source and destination buffer G ; Clear destination buffer O ; Move extraction pointer past alpha character 4 ; Copy rest of number C1 ; Verify Luhn check digit on destination buffer B3 ; Reset source buffer extraction pointer G ; Clear destination buffer X ; Copy number into destination buffer Command Operation
; This routine allows the terminal to display the bad bar code and an ; appropriate error message.
607$ B.3 ; Select buffer 3 G ; Clear 3 P113 ; Display "SCAN BAR CODE" *U1..0.3 ; Skip 1 on bar code read, no check skip 3 on bar code K3.10.1 ; Keyboard input V.2.2 ; Display buffer 13 ; Skip 3 V.2.2 ; Display bad bar code P120 ; display error message "BAD BAR CODE" *K1 ; Halt transaction *K 120=BAD BAR CODE 604 =9
Page 209
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
+U - Set DIN 6 Communication Parameters
Sets the data speed (baud rate) and format of the DIN 6 port.
Note: Be sure to select "General Communication Device" for the DIN 6 peripheral in memory location 970.
If the memory location was changed with the U command, *K (abort) must be re-executed to put it in effect.
Command Description *H Encrypt PIN +H Wait for PIN +T Send over DIN 6
Communications Control
Source Buffer Destination Buffer
No change No change
Terminal Special Conditions
PNC 330/340 Options 4 and 5 of a1 not available
XL Not available
TRANZ 330 Available on versions 2.0 or greater, except options 4 and 5 of a4
TRANZ 330 (202) Available on versions 2.1 or greater, except options 4 and 5 of a4
TRANZ 340 Available on versions 2.1 or greater, except options 4 and 5 of a4
TRANZ 380 None
5-145
Page 210
+U - Set DIN 6 Communication Parameters
Parameters: Default Parameter Value Description at 0 Optional; baud rate 0 = 300 (set to 1200 baud on abort) 1 = 600 2 = 1200 3 = 2400 4 = 4800 5 = 9600 a2 0 Optional; data format 0 nochange (set to 7E1, pass 7 on abort) 1 set 7E1, pass 7 bits 2 set 8N1, pass 7 bits 3. set 8N1, pass 8 bits
Example: Command Operation
+U2.1 ; Set DIN 6 port to 1200 baud, 7E1
5 - 146