r4212 - in developers/werner/ahrt/host/tmc: . examples

werner at sita.openmoko.org werner at sita.openmoko.org
Sat Mar 15 14:37:34 CET 2008


Author: werner
Date: 2008-03-15 14:37:29 +0100 (Sat, 15 Mar 2008)
New Revision: 4212

Modified:
   developers/werner/ahrt/host/tmc/README
   developers/werner/ahrt/host/tmc/examples/usbtmc.py
   developers/werner/ahrt/host/tmc/io.c
   developers/werner/ahrt/host/tmc/python.c
Log:
Completed the repeat command functionality for "start", and did some
general cleanup.

- README: sending several samples over USBTMC causes loss of per-sample timing
- README: we now have DCI, but it doesn't always work yet
- README: implemented re-issuing READ?
- README: documented the optional "command" argument of "start"
- python.c (tmc_methods): removed left-over module method "stop"
- python.c (tmc_tp_methods): "start" is now METH_VARARGS, not METH_O
- io.c (debug): turned off debugging
- tmc/examples/usbtmc.py: use a sample size of one and a repeat command to 
  restart sampling



Modified: developers/werner/ahrt/host/tmc/README
===================================================================
--- developers/werner/ahrt/host/tmc/README	2008-03-15 03:22:57 UTC (rev 4211)
+++ developers/werner/ahrt/host/tmc/README	2008-03-15 13:37:29 UTC (rev 4212)
@@ -88,7 +88,7 @@
 
 Asynchronous mode is entered with
 
-    instr.start(filename)
+    instr.start(filename [, command])
 
 This creates the specified file and start streaming instrument output to
 the file. Instrument output is chopped into separate entries not only at
@@ -100,6 +100,10 @@
 
     instr.send('*TRG')
 
+If the command argument is passed to "start", this command is issued at
+the end of a read to start another read cycle. Typically, this command
+will be 'READ?'.
+
 The command
 
     instr.stop()
@@ -181,7 +185,11 @@
 samples. Instead, PicoTest suggest to use a large SAMP:COUN and to
 re-issue READ? when running out of samples.
 
+One drawback of this work-around is that several samples are sent to
+the host en bloc and thus have the same timestamp. Therefore, the
+individual sample timing has to be reconstructed in this case.
 
+
 Leaptronix mPP-3040D
 --------------------
 
@@ -208,9 +216,6 @@
 
 Passing an argument that doesn't want to be a string yields a segfault.
 
-Re-issuing READ? for the PicoTest M3500 should be implemented in the
-transport protocol driver.
-
 There should be a way to detect whether an asynchronous acquisition has
 completed, and also to synchronize with that event.
 
@@ -225,5 +230,5 @@
 
 The USBTMC driver doesn't implement most of the error handling and.
 
-The USBTMC driver doesn't implement DCI, so the device has to be reset
-manually.
+The USBTMC driver doesn't implement DCI properly, so the device sometimes
+has to be reset manually.

Modified: developers/werner/ahrt/host/tmc/examples/usbtmc.py
===================================================================
--- developers/werner/ahrt/host/tmc/examples/usbtmc.py	2008-03-15 03:22:57 UTC (rev 4211)
+++ developers/werner/ahrt/host/tmc/examples/usbtmc.py	2008-03-15 13:37:29 UTC (rev 4212)
@@ -18,10 +18,10 @@
   ':VOLT:DC:RANG 10;'
   ':VOLT:RES 1e-4;'
   ':VOLT:NPLC 0.2;'
-  ':SAMP:COUN 50000;'
+  ':SAMP:COUN 1;'
   ':READ?')
 
-d.start("usbtmc.out")
+d.start("usbtmc.out", 'READ?')
 
 time.sleep(5)
 

Modified: developers/werner/ahrt/host/tmc/io.c
===================================================================
--- developers/werner/ahrt/host/tmc/io.c	2008-03-15 03:22:57 UTC (rev 4211)
+++ developers/werner/ahrt/host/tmc/io.c	2008-03-15 13:37:29 UTC (rev 4212)
@@ -23,7 +23,7 @@
 #include "io.h"
 
 
-int debug = 1;
+int debug = 0;
 
 
 /* ----- Asynchronous I/O -------------------------------------------------- */

Modified: developers/werner/ahrt/host/tmc/python.c
===================================================================
--- developers/werner/ahrt/host/tmc/python.c	2008-03-15 03:22:57 UTC (rev 4211)
+++ developers/werner/ahrt/host/tmc/python.c	2008-03-15 13:37:29 UTC (rev 4212)
@@ -206,7 +206,7 @@
 static PyMethodDef tmc_tp_methods[] = {
 	{ "send",	tmc_py_send,	METH_VARARGS,	"Send commands" },
 	{ "read",	tmc_py_read,	METH_NOARGS,	"Read a response" },
-	{ "start",	tmc_py_start,	METH_O,		"Start async logging" },
+	{ "start",	tmc_py_start,	METH_VARARGS,	"Start async logging" },
 	{ "stop",	tmc_py_stop,	METH_NOARGS,	"Stop async logging" },
 	{ NULL, NULL, 0, NULL }
 };
@@ -226,7 +226,6 @@
 
 
 static PyMethodDef tmc_methods[] = {
-	{ "stop",	tmc_py_stop,	METH_NOARGS,	"Stop async logging" },
 	{ NULL, NULL, 0, NULL }
 };
 





More information about the commitlog mailing list