
•
Let's say your operator is
SIGNED ON
and decides it's time to take a break. Instead of pressing the F1
key to
SIGN OUT
, he presses the OFF key. Pressing the OFF key is OK (it will
SIGN
him
OUT
) but there
is a delay until the
SIGN OUT
is acknowledged. Because of the delay, the operator might think he didn't
press the key hard enough and press it again - this time actually powering down the Terminal before the
SIGN OUT
was complete. If this happens, you need to plan to resend the last prompt to the Terminal
when he
SIGN
s
ON
again.
PromptCOM: The
WDterm
ActiveX Control
Drop-in components are tools that are added to your programming environment "tool kit". There are a variety of
different technologies around for implementing a drop-in component such as VBX (for Visual Basic) and VCL (for
Delphi and C Builder) and COM (ActiveX). Only the
ActiveX
variety are widely compatible with almost all
development environments.
PromptCOM/ActiveX
is a drop in COM component that allow programmers to easily add the ability to send
prompts to and receive data from their R/F Terminal via an RF Base Station. It is compatible with Visual Basic,
Visual C++, Delphi, and most other 32-bit development platforms. See the help file for installation instructions.
Programming Considerations
Before making any method calls, make sure to:
•
Set the COM port properties (device name, baud, parity, bits, etc.) as desired. Make sure the port is
closed (call
CloseDevice
) before making changes to any of the port settings.
•
Call the
OpenDevice
method. This activates the COM port used by this instance of the
WDterm
control.
•
Set the
ActiveTerminal
property to identify the terminal on which you desire to operate. You can change
the
ActiveTerminal
at any time in order to direct commands to appropriate terminals.
Test For Good Communication
•
Implement an
event handler
for
OnTermBaseRegister
that causes a beep or displays a message when
called. If communication between the host PC and the base station is good, your
event handler
will fire
when your program is running and you power up an attached base station.
Multiple Base Stations
•
For installations using multiple base stations attached to a single host PC (these were called "channels"
in PromptCOM/DLL) simply add a Wdterm control to your application for each base station.
Terminal Tracking
•
Since you get one set of event handlers for each base station, you will need some scheme for keeping
track of where each terminal (up to 64 per base station) is in its transaction sequence. One possible
solution is to use a "state"variable for each terminal (perhaps stored in an array). Test the state variable to
determine the next prompt for any given terminal.
•
It is very important to keep track of "login status" for each terminal. Every SignOut event should have an