Programming Examples

Transferring the Mainframe Configuration

730 !

740! ********************* SEND THE SETUP COMMAND **************************

750! Send the Setup command

760!

770OUTPUT @Comm USING "#,15A";":SYSTEM:SETUP #"

780PRINT "SYSTEM:SETUP command has been sent"

790PAUSE

800!

810! ********************* SEND THE BLOCK SETUP ****************************

820! Send the block setup header to the mainframe in the proper format.

830!

840Byte=LEN(VAL$(Numbytes))

850OUTPUT @Comm USING "#,B";(Byte+48)

860IF Byte=1 THEN OUTPUT @Comm USING "#,A";VAL$(Numbytes)

870IF Byte=2 THEN OUTPUT @Comm USING "#,AA";VAL$(Numbytes)

880IF Byte=3 THEN OUTPUT @Comm USING "#,AAA";VAL$(Numbytes)

890IF Byte=4 THEN OUTPUT @Comm USING "#,AAAA";VAL$(Numbytes)

900IF Byte=5 THEN OUTPUT @Comm USING "#,AAAAA";VAL$(Numbytes)

910IF Byte=6 THEN OUTPUT @Comm USING "#,AAAAAA";VAL$(Numbytes)

920IF Byte=7 THEN OUTPUT @Comm USING "#,AAAAAAA";VAL$(Numbytes)

930IF Byte=8 THEN OUTPUT @Comm USING "#,AAAAAAAA";VAL$(Numbytes)

940!

950! *********************** SAVE BUFFER POINTERS *************************

960! Save the transfer buffer pointer so it can be restored after the

970! transfer.

980!

990STATUS @Buff,5;Streg

1000 !

1010 ! ****************** TRANSFER SETUP TO THE HP 16500C ********************

1020 ! Transfer the setup from the buffer to the HP 16500C mainframe.

1030 !

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

1050 !

1060 ! ********************** RESTORE BUFFER POINTERS ***********************

1070 ! Restore the transfer buffer pointer

1080 !

1090 CONTROL @Buff,5;Streg

1100 !

1110 ! ******************** SEND TERMINATING LINE FEED **********************

1120 ! Send the terminating linefeed to properly terminate the setup string. 1130 !

1140 OUTPUT @Comm;""

1150 !

1160 PRINT "**** SENT THE SETUP ****"

1170 END

15–5

Page 239
Image 239
HP Sander 16500C manual 15-5