Mercurial > ~darius > hgwebdir.cgi > pyinst
diff rs_fsp7_example.py @ 18:9bb8a9f3df6b
Update examples to match new code.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Wed, 10 Aug 2011 15:18:26 +0930 |
parents | c2c13d804fce |
children | 438a5f1ddcd7 |
line wrap: on
line diff
--- a/rs_fsp7_example.py Wed Aug 10 15:17:57 2011 +0930 +++ b/rs_fsp7_example.py Wed Aug 10 15:18:26 2011 +0930 @@ -55,14 +55,16 @@ # Wait up to 10 seconds for it to be done r.write("*OPC?") - print "OPC - " + r.read(10) + opc = scpi.getdata(r.read(10), int) + print "OPC - %d" % (opc) # Set peak excursion r.write("CALC:MARK:PEXC 6DB") # Find 3rd order intercept & get result r.write("CALC:MARK:FUNC:TOI ON") r.write("CALC:MARK:FUNC:TOI:RES?") - print "Result " + r.read(10) + toi = scpi.getdata(r.read(1)) + print "Result = %.2f" % (toi) # Set data format r.write("FORM REAL,32")