Programming Examples
Checking for Measurement CompletionChecking for Measurement Completion
This program can be appended to or inserted into another program when you need to know when a measurement is complete. If it is at the end of a program it will tell you when measurement is complete. If you insert it into a program, it will halt the program until the current measurement is complete. In this example, the module installed in slot B is being checked for measurement complete.
This program is also in the state analyzer example program in "Making a State Analyzer Measurement" on page
420! ****************** CHECK FOR MEASUREMENT COMPLETE **********************
430! Enable the MESR register and query the register for a measurement
440! complete condition.
450!
460OUTPUT 707;":SYSTEM:HEADER OFF"
470OUTPUT 707;":SYSTEM:LONGFORM OFF"
480!
490Status=0
500OUTPUT 707;":MESE2 1" ! Enables register for slot B
510OUTPUT 707;":MESR2?" ! Queries register for slot B
520ENTER 707;Status
530!
540! Print the MESR register status.
550!
560CLEAR SCREEN
570PRINT "Measurement complete status is ";Status AND 1
580PRINT "0 = not complete, 1 = complete"
590! Repeat the MESR query until measurement is complete.
600WAIT 1
610IF (Status AND 1)=1 THEN GOTO 630
620GOTO 510
630PRINT TABXY(30,15);"Measurement is complete"
640!
650END