Programming Examples

Transferring the Mainframe Configuration

270! *********************** SEND THE SETUP QUERY **************************

280OUTPUT 707;":SYSTEM:HEADER ON"

290OUTPUT 707;":SYSTEM:LONGFORM ON"

300OUTPUT @Comm;"SELECT 0"

310OUTPUT @Comm;":SYSTEM:SETUP?"

320!

330! ******************** ENTER THE BLOCK SETUP HEADER *********************

340! Enter the block setup header in the proper format.

350!

360ENTER @Comm USING "#,B";Byte

370PRINT CHR$(Byte);

380WHILE Byte<>35

390ENTER @Comm USING "#,B";Byte

400PRINT CHR$(Byte);

410END WHILE

420ENTER @Comm USING "#,B";Byte

430PRINT CHR$(Byte);

440Byte=Byte-48

450IF Byte=1 THEN ENTER @Comm USING "#,D";Numbytes

460IF Byte=2 THEN ENTER @Comm USING "#,DD";Numbytes

470IF Byte=3 THEN ENTER @Comm USING "#,DDD";Numbytes

480IF Byte=4 THEN ENTER @Comm USING "#,DDDD";Numbytes

490IF Byte=5 THEN ENTER @Comm USING "#,DDDDD";Numbytes

500IF Byte=6 THEN ENTER @Comm USING "#,DDDDDD";Numbytes

510IF Byte=7 THEN ENTER @Comm USING "#,DDDDDDD";Numbytes

520IF Byte=8 THEN ENTER @Comm USING "#,DDDDDDDD";Numbytes

530PRINT Numbytes

540!

550! ******************** TRANSER THE SETUP ********************************

560! Transfer the setup from the mainframe to the buffer.

570!

580TRANSFER @Comm TO @Buff;COUNT Numbytes,WAIT

600! Clear the terminator from the message queue

610ENTER @Comm USING "-K";Length$

620PRINT "LENGTH of Length string is";LEN(Length$)

630!

640PRINT "**** GOT THE SETUP ****"

650PAUSE

660! ********************* SEND THE SETUP **********************************

670! Make sure buffer is not empty.

680!

690IF Numbytes=0 THEN

700PRINT "BUFFER IS EMPTY"

710GOTO 1170

720END IF

15–4

Page 238
Image 238
HP Sander 16500C manual 15-4, Output 707SYSTEMHEADER on Output 707SYSTEMLONGFORM on