Program SPOLL_2Purpose The main purpose of this program is to demonstrate how to serviceImportant program linesCommentsNote7-1 O Programming Examplesan SRQ directly in the program. It also demonstrates how to:initialize the interface of the HP 8 1 12A and set it to the standardsettingclear the status byteconduct a serial poll (SPOLL)return the instrument to local mode130 CLEAR 712 Initialize the HP 81 1 2A interface andset it to the standard setting170 A=SPOLL (712) Read the status byte to clear it210 OUTPUT 7 1 2 ; " XXX" Case a syntax error270 A=SPOLL ( 7 12) Conduct a serial poll280 PRINT "SPOLL= " ; A Print the result3 1 0 LOCAL 7 1 2 Return the HP 81 1 2A back to localmodeInitialization sectionThe interface is initialized. The HP 8 1 12A is set to the StandardSetting and the status byte is clearedMain sectionIn the main section "XXX" is sent over the HP-IB to the instrument(line 210) but it is not a valid command so it causes a syntax errorSince the instrument needs some time to parse "XXX" , the computershould wait a sufficient amount of time before conducting thefollowing SPOLL (line 270). This is done by forcing the computer towait for 0 . 1 seconds (line230).The HP 8 1 12A detects a syntax error and therefore sets the syntaxerror bit of the Status Byte. As a result , bit 6 of STB is set and aSRQ is generated. The result of the SPOLL printed in line 160 willbe value 68.After every SPOLL the complete status byte is cleared. This meansthe RQS bit is reset after the first SPOLL.The status byte is updated after every command received by theHP 8 1 12A