PCD7.D250
User program examples
26/770 E1
(D25-08-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 8-37
•
Leading sign "SIGN":
Defines the position for the first character of the input field.
"SIGN" = 0 —> Input of minus sign disabled.
"SIGN" = 1 —> Input of minus sign enabled.
•
Sign key "K_SIGN":
Defines the ASCII code for the minus key.
A leading plus sign cannot be entered.
•
Serial channel number "CHAN_N":
Defines the serial channel number. The serial channel must be
assigned in mode C before calling the FB. (Possible assignment
modes for the PCD7.D100 terminal are: MC0, MC1 and MC2).
•
Serial channel diagnostic flags "RBSY_F" / "XBSY_F":
Addresses for the RBSY_F and XBSY_F flags must agree with the
diagnostic flag addresses defined by the SASI instruction.
•
Input busy flag "IN_BUSY":
The input busy flag "IN_BUSY" must initially be zero otherwise the
FB will not function correctly. --> Reset the "IN_BUSY" flag in
XOB 16. The flag is set high the first time the FB is called. The flag
is reset when a carriage return is received.
Input/change of a parameter:
The first time the FB is called, the input text is output, the "IN_BUSY"
flag is set, and the cursor is positioned according to FB parameters
"X_POS" and "Y_POS". It is then possible to enter a number (with
optional minus) via the keyboard. If the first key depression is numerical,
a preceding minus or the decimal point, the parameter input field is
deleted.
Input field size is limited by the maximum number of digits (defined with
FB parameter "DIGIT"). The maximum number of digits is monitored
and limited by the FB during input. When the carriage return (CR) key is
depressed, the number entered is stored in the "PARAM" register or
counter, the "IN_BUSY" flag is reset and the data input ends.
During input of a value (while the "IN_BUSY" flag is high) the FB must
be called cyclically by the user program.