Chapter 6 RAPID!
Functions
194 WCDMA Options Version 6.20
EVENTWAIT, EVENTSTATUS
Example
The following example program reads a text file and
stores the data read from the file in a string array.
LET i=0
OPEN "STRINGS.TXT" FOR INPUT AS #1
DO WHILE NOT EOF(1)
LET i=i+1
INPUT #1, theStrgs$(i)
LOOP
CLOSE #1
Syntax
EVENTWAIT(timeOut)
EVENTSTATUS
Parameters
timeOut is a numeric expression, interpreted as positive
integer.
Description
EVENTWAIT
Waits for an event and returns the event code.
Events may be created by various devices or tasks (e.g.
reception of a string on the GPIB bus).
timeOut specifies a wait time in milliseconds. During
the wait time, the program will be halted and will wait
for the event to occur. If the expected event does not
occur, a timeout will be generated.
EVENTWAIT may be used to react on any of the follow-
ing events:
KEY push of a softkey. In this case, the file handle
returned will be ‘0’.
TIME-OUT means that there was no device or task creat-
ing an event; time simply expired without anything hap-
pening. In this case, the file handle returned will be ‘-1’.
GPIB an event on the GPIB bus (e.g. data have been
applied and are ready to be read).
SCPI an event on the SCPI interface (e.g. a measurement
value is ready to be handed over).
EVENTSTATUS
In case there is an event created by the GPIB bus,
EVENTSTATUS may be used to read the status byte.