* [Xenomai] Setting range in analogy read function
@ 2014-10-02 10:31 GianPiero Puccioni
0 siblings, 0 replies; only message in thread
From: GianPiero Puccioni @ 2014-10-02 10:31 UTC (permalink / raw)
To: xenomai
Hi,
I am having a problem in using analogy calls to read from a NatIns PCI-MIO-16E-4
I installed Xenomai 2.6.3 on a freshly installed Kubuntu 10.4 followed
all the instructions and the kernel running is 3.8.13-xenomai-2.6.3.
The latency test did run without problems.
I tried the example programs in /opt/xenomai-2.6.3/src/utils/analogy/
in particular insn_read it seems to work except for the fact that it
doesn't seem to set the range, but just rescale (wrongly) the result
The raw output (for a square wave 100mv amp) is between 0x0810 and 0x07e8
and If run "insn_read -R X" it gives values that change i.e
X max min
0 0.080 -0.115
1 0.040 -0.057
2 0.020 -0.024
3 0.006 -0.012
And so on: it rescale for a range but it doesn't set it properly
I tried to write a small prog that just does one read using
a4l_sync_read and I have seen from an old message that you should use
PACK() to set the range but If I pass PACK(0,1,0) to the function
to pass the range I get this error:
4l_sync_read failed (err=-22)
How can I fix this?
Thanks,
GianPiero
--
GianPiero Puccioni |Istituto dei Sistemi Complessi-CNR
gianpiero.puccioni@isc.cnr.it |Via Madonna del Piano, 10
T:+39 0555226682 F:+39 0555226683|50019 Sesto F. (Firenze) ITALY
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-02 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 10:31 [Xenomai] Setting range in analogy read function GianPiero Puccioni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.