Hi all,
I've written a small program which completely hides the complexity of
the async acquisition of COMEDI and just calls a python function at the
sampling rate of the DAQ cards. The argument contains all the channel
values.
The source is here:
https://github.com/berndporr/comedi2py
My goal is to do plotting (Qwt) and number crunching in python. I've
tried to get a Qwt window created but haven't managed so far. Probably
the reason is that I'm creating already an QT application in the C
program and then the python call conficts with it. I guess instead of an
application I need to create another QT window object or I just need to
drop any QT functionality in the C part. Python experts: can you help
here out? Also, do you see any memory leaks generated by the repetitive
calls to to comedidata(a) in the C part?
compilation:
qmake
make
running:
bp1@bp1-x61:~/sandbox/comedi2py$ ./comedi2py Simple
Sampling rate is:
1000.0
0.113277323544 [0.11327732354402542, 0.11198132485151291,
0.11560995876789093, 0.11265372484922409, 0.11204055696725845,
0.12523999810218811, 0.11184453219175339, 0.11200643330812454,
0.11126832664012909, 0.1104205921292305, 0.10909569263458252,
0.11126042902469635, 0.11187833547592163, 0.11530795693397522,
0.11249371618032455, 0.11253778636455536]
0.22568179667 [0.1124044731259346, 0.11157491058111191,
0.11534318327903748, 0.11226090043783188, 0.11177456378936768,
0.12535355985164642, 0.11163603514432907, 0.11155769228935242,
0.11094483733177185, 0.11094009876251221, 0.1086660623550415,
0.11077156662940979, 0.11119914054870605, 0.11519912630319595,
0.11176903545856476, 0.11152341961860657]
/Bernd
--
www:
http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.imdb.com/name/nm3293421/
Mobile:
+44 (0)7840 340069
Work:
+44 (0)141 330 5237
University of Glasgow
School of Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LT