All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Troubleshooting Analogy DIO
@ 2014-05-23 21:43 Manu S Madhav
  2014-05-23 22:31 ` Gilles Chanteperdrix
  2014-05-24 18:59 ` Paul Janzen
  0 siblings, 2 replies; 11+ messages in thread
From: Manu S Madhav @ 2014-05-23 21:43 UTC (permalink / raw)
  To: xenomai

Hello all,

I am running Ubuntu Precise (12.04) with kernel version 3.4.6 and
xenomai-2.6.2.1. I have a NI PCIe 6259 which I am trying to configure for
Digital I/O. Currently, the code itself is non-RT, I am trying first to
figure out how to do I/O as well as obtain counter / quadrature information
from my DAQ card.

Using Analogy, and with a bit of reading, I was able to get analog input
and output up and running without too much trouble, but digital I/O is
completely evading me. I am just trying to turn on all digital outputs to 1
using synchronous instruction to the DIO subdevice (#2, in my case). Size
of the subdevice is 4 (32 bits).

None of the following attempts worked. From the mailing list archives, I
found a suggestion to compile xenomai libs with --fno-omit-frame-pointer,
and that also didn't help. Any suggestions would be appreciated.


*First try (Using command-line insn_bits)*

********************
insn_bits -v -d analogy0 -s 2 0xffffffff 0xffffffff

insn_bits: device analogy0 opened (fd=0)
insn_bits: basic descriptor retrieved
     subdevices count = 14
     read subdevice index = 0
     write subdevice index = 0
insn_bits: complex descriptor retrieved
insn_bits: selected subdevice index = 2
insn_bits: mask = 0xffffffff
insn_bits: value = 0xffffffff
insn_bits: result = 0x0
********************

*Second try (Using a4l_sync_dio)*

********************
// dsc = is a4l_desc_t , previously configured
 int subd_DIO = 2;

uint32_t mask = 0xffffffff;
uint32_t buf = 0xffffffff;
a4l_sync_dio(&dsc, idx_subd_DIO, &mask, &buf);

********************

Again, even when I am getting a return of 0 (success), I am not measuring a
digital 1 at the physical pins.

*Third try (Using a4l_send_insn)*:

********************
// dsc = is a4l_desc_t , previously configured
int subd_DIO = 2;
unsigned char values[16];

    a4l_insn_t insn;
    insn.type = A4L_INSN_BITS;
    insn.idx_subd = idx_subd_DIO;
    insn.data = values;
    values[0] = 0xff;
    values[1] = 0xff;
    insn.data_size = 2 * sizeof(uint32_t);

    a4l_snd_insn(&dsc, &insn);

********************

Manu S Madhav

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-30 11:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 21:43 [Xenomai] Troubleshooting Analogy DIO Manu S Madhav
2014-05-23 22:31 ` Gilles Chanteperdrix
2014-05-24 18:59 ` Paul Janzen
2014-05-24 20:22   ` Manu S Madhav
2014-05-25  1:46     ` Paul Janzen
2014-05-27 12:56       ` Rosali Pyun
2014-05-27 14:42         ` Manu S Madhav
2014-05-27 15:03           ` Paul Janzen
2014-05-27 15:54             ` Rosali Pyun
2014-05-28 13:31               ` Manu S Madhav
2014-05-30 11:30                 ` Rosali Pyun

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.