- From: Tim Holy <holy_at_pcg.wustl.edu>
- Date: Fri, 20 Sep 2002 14:46:46 -0500
Hello, I decided to write a "functional" test routine for comedi. I was inspired by a few recent bug reports (e.g., from Jack Culpepper and Markus Dostal) and a general, long-standing, and occasionally useful paranoia about making sure my data acquisition system is doing what I think it is. Now that I've run it on my systems, I can sleep easily... To make this useful, you need to have both inputs and outputs available (either analog or digital), not necessarily on the same board (in theory, at least; I only have one board per machine so haven't tested this). The basic idea is to generate outputs and measure them with the inputs; since you generated them yourself, you know what the answer is supposed to be, and you can compare the two. While we all do that "by eye," an automated system can check several hours of data with a high degree of accuracy. I've implemented a somewhat flexible function for doing this. It handles both digital and analog channels, single-sample and streaming types (sorry, digital streaming isn't yet implemented, since I don't use it and don't even have a board which can do it). You can do multiple channels simultaneously; the waveforms it generates are unique for each channel. Currently you need one output channel for each input; it might be worth generalizing this code to allow multiple inputs to "listen" to the same output, but because of other duties I am unlikely to implement this in the near future. Since this code is already useful in its current form, I thought I'd share it with the list. While it works well on my systems when I (the author) am running it, I expect other users will find bugs; please let me know when you find them. It's a single file, which you can compile with # gcc -o feedback feedback.c -lm -lcomedi Execute # feedback -h to find out how to use it and to get a sense for the options available. If it seems generally useful, feel free to include it in comedlib/testing. Since it makes fairly extensive use of comedilib, it's a handy complement to the routines in that directory. Best, -- Tim Holy Asst. Prof. of Neurobiology Washington University School of Medicine Department of Anatomy and Neurobiology 4401 North Building Campus Box 8108, 660 S. Euclid Avenue St. Louis, MO 63110-1093 tel: 314-362-0086 fax: 314-362-3446 email: holy_at_pcg.wustl.edu
Attachments
- text/x-csrc attachment: feedback.c
Received on 2002-09-20Z18:46:46