12.07.2015 Views

Manual (pdf) - Artisan Scientific

Manual (pdf) - Artisan Scientific

Manual (pdf) - Artisan Scientific

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the Scan Complete BitYou can use the Scan Complete Bit (bit 8) in the Operation Status Registerof a switchbox to determine when a scanning cycle completes (no other bitsin the register apply to the switchbox). Bit 8 has a decimal value of 256 andyou can read it directly with the STAT:OPER? command (refer to theSTATus:OPERation[:EVENt]? command in Chapter 5 for an example).When enabled by the STAT:OPER:ENAB 256 command, the ScanComplete Bit will be reported as bit 7 of the Status Register. Use the HP-IBSerial Poll or the IEEE 488.2 Common Command *STB? to read the StatusRegister. When bit 7 of the Status Register is enabled by the *SRE 128Common Command to assert an HP-IB Service Request (SRQ), you caninterrupt the controller when the Scan Complete Bit is set, after a scanningcycle completes. This allows the controller to do other operations while thescanning cycle is in progress.The following example monitors bit 7 in the Status Register to determinewhen the scanning cycle completes. The computer used in the example is anHP Series 200/300 used with HP BASIC as the program language. Thecomputer interfaces with the mainframe over HP-IB. The HP-IB select codeis 7, the HP-IB primary address is 09, and the HP-IB secondary addressis 14.Example: ScanComplete Interrupt10 OUTPUT 70914;"*CLS" !Clear all switchbox statusstructure.20 OUTPUT 70914;"STAT:OPER:ENAB 256"!Enable Scan Complete Bit to setbit 7 in Status Register.30 OUTPUT 70914;"*SRE 128" !Enable bit 7 of Status Registerto assert SRQ.40 OUTPUT 70914;"TRIG:SOUR EXT" !Set to external trigger mode.50 OUTPUT 70914;"SCAN (@100:115)" !Select channels to be scanned.60 OUTPUT 70914;"INIT" !Start scanning cycle.70 WHILE NOT BIT(SPOLL(70914),7) !Waiting for scan complete.80 PRINT "DO OTHER OPERATION HERE"!Enter program lines forcomputer to do other operations.90 END WHILE100 PRINT "INTERRUPT GENERATED" !Program goes to this line afterinterrupt is generated by acompleted scanning cycle.110 END46 Understanding the Relay Multiplexer Modules Chapter 4<strong>Artisan</strong> Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!