536
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\callproc.fb
Chapter 8, Programming the Call Processing Subsystem
Example Programs
Comments for Polling Example Program
Table 53 Comments For Polling Example Program
Program Line
Number
Comment
70 The polling loops require a wait statement to allow the Test Set time to process. The loops
have a WAIT statement included so that only this line need be changed to set the polling
wait time.
190 The number of the received data field(s) to be read is passed to the Read_rcdd_data
subprogram as string data. In this example fields 1, 2 and 3 will be read. The order in which
the field numbers are passed dictates the order in which they are printed.
330,340 A dummy variable is required to satisfy the FNOrder function passed parameter list. This is
necessary because IBASIC does not support the OPTIONAL keyword in function and
subprogram passed parameter lists.
6060 Ptr_value is the value that the positive transition filter will be set to. The value is
determined by which pseudo-LED will light when the desired command is completed. For
example, a successful order to change power is indicated by the Connect pseudo-LED
lighting. Therefore the Ptr_value is set to 32 (2^5) for the Power command.
1020 * Reset the Test Set: *RST
* Clear the status reporting system: *CLS
* Clear the Service Request Enable Register: *SRE 0
* Preset the transition filters to pass no transitions: STAT:CALLP:PTR 0;NTR 0
The filters will be set by the functions FNSet_state and FNOrder. The functions will set
the proper filter values to pass the desired transition.
* The Test Set’s HP-IB interface has a large input buffer and can handshake in several
commands. The commands are processed serially out of the input buffer. In this example
program the Cnfg_srvc_intrp sends 8 commands to the Test Set in rapid succession.
The *RST command requires several seconds to execute. Since the Test Set can
handshake in many commands it can appear to the control program that the Test Set has
executed all of the commands sent, when in reality they have only been placed in the
input buffer. To prevent the control program from getting ahead of the Test Set the
*OPC? query command is used to synchronize the Test Set and the control program.