EasyManua.ls Logo

GSE 574 - Page 184

Default Icon
339 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GSE Scale Systems - 165
Chapter 16 Macro Programming Operations Technical Reference Manual
command. Otherwise, the subsequent commands are
skipped until the ELSE or ENDIF command is
encountered. Refer to the IF command explanation for
further clarification on IF command operation. The
following example will help clarify this usage:
803%s%c%e P803.32 Macro # 3
Using 1%%#%e 0001 scale #
small%%N%e 0009 if not
large%%E%e 0015 end if
scale.%%p%e 0021 Print
Another application for this usage of the %# is when
setpoints are being used with the multi-scale option.
Since the setpoints cannot be setup to be based upon a
particular scale, when a setpoint is reached the current
scale may be checked and then the appropriate action
may be taken by the macro.
Disable Input Command (%!)
Operator input via either the front panel keypad or the
RS-232 input or both may be programmed to be ignored
until otherwise specified.
%! Re-enable both front panel and keypad
input.
1%! Disable front panel keypad input.
2%! Disable RS-232 input.
3%! Disable input from either source.
This command can be used within a macro to insure that
operator input is processed from only one source or the
other. For instance, in an application where a computer
is connected to the instrument and may at any time send
a request to print the custom transmit or to download a
database, a macro could disable RS-232 input during
operator input requests (%G, %W, and %Y).
Disabling RS-232 input does not prevent the unit from
receiving characters, it simply suspends the processing of
data in the unit's receive buffer. When that buffer
becomes full, the instrument's handshake will
automatically be de-asserted informing the connected
device to temporarily stop transmitting.
Caution: Since the unit has only one actual receive input
to the processor, disabling the RS-232 input disables the
processing of all serial input coming into the J2
connector on the pins marked "RX>", "232>", and
"TTL>". It cannot discern between computer input,
remote ASCII keyboard input, or barcode input.
"IF INPUT" Command
It is possible to test for operator input via the front panel,
or for RS-232 input having been received. The IF
command, "%(" may be used in the same manner as the
other IF type commands. Possible applications include
allowing a macro to continue looping until an operator
has pressed a key, or causing a macro to abort if RS-232
input has been received, allowing the unit to process a
series of commands received from a computer. Also
note that the character being checked is not cleared when
it is found to have occurred. It must be subsequently
cleared or used as part of an entry.
The variations of the "IF INPUT" command are as
follows:
%( If Keypad or RS-232 input
1%( If Keypad input
2%( If RS-232 input
For example:
%T TAG position in macro.
ABC Scale%P Prompt Operator for one
second
Call ABC%P Second prompt.
555- 1234%P Third prompt.
%( IF keypress
%N otherwise
%J JUMP to TAG
%E END IF
%) CLEAR RS-232 buffer and
keypad character. (flush entry
buffer).
The "%(" has another capability; it performs a "If input
equals" command. If a numeric value between 3 and 255
precedes the %( command, then the decimal value of the
input (RS-232 or keypad) will be compared to that
decimal value, and the following statements will be
executed only if the input equals the number. Refer to an
ASCII chart or Table in the appendix for the decimal
values of the front panel keys. The decimal for the
numeric keys is 48 through 57 for the [0] through [9]
keys respectively.
Note that comparing an entered character or key does not
remove it from the input buffer. This allows a single
entry to be compared against multiple possibilities. To
clear the input buffers refer to the %) command to clear
all entered characters or use the %W command to
remove only the next key from the buffer.
SECTION - 16.8

Table of Contents