On 06/11/2019 09:37, Ravi shankar wrote:
>
> Sir, I have tested that and it is working fine in my RTAI+COMEDI framework.
>
> However my application demands outputting the analog data on all 32
> channels synchronously.(i.e all at a time)
> could you please help me whether this feature is supported or not?
> through comedi
Synchronized output to analog channels is not part of the normal
functions of comedi, but a few devices supported by comedi support
synchronized output by various means.
The adv_pci1724 driver does not currently support synchronized output.
It could be made to do so by supporting INSN_CONFIG instructions on
subdevice 0 (the normal analog output subdevice) to configure
synchronization mode and trigger synchronized output. (I guess it
wouldn't be needed for the two calibration subdevices.)
There are various ways it could be implemented. Here is one way:
* Use a INSN_CONFIG_ARM instruction with data[1] set to 0 to enable
synchronized output mode:
int enable_sync_output(comedi_t *d)
comedi_insn insn;
lsampl_t data[2];
memset(&insn, 0, sizeof(comedi_insn));
insn.insn = INSN_CONFIG;
insn.subdev = 0;
insn.channel = 0;
insn.data = data;
insn.n = 2;
data[0] = INSN_CONFIG_ARM;
data[1] = 0; /* 0 = only enable sync output */
return comedi_do_insn(d, &insn);
}
* Use a INSN_CONFIG_ARM instruction with data[1] set to 1 to trigger
synchronized output:
int trigger_sync_output(comedi_t *d)
comedi_insn insn;
lsampl_t data[2];
memset(&insn, 0, sizeof(comedi_insn));
insn.insn = INSN_CONFIG;
insn.subdev = 0;
insn.channel = 0;
insn.data = data;
insn.n = 2;
data[0] = INSN_CONFIG_ARM;
data[1] = 1; /* 1 = trigger sync output */
return comedi_do_insn(d, &insn);
}
* Use a INSN_CONFIG_DISARM instruction to disable synchronized output
mode (return to direct output mode):
int disable_sync_output(comedi_t *d)
comedi_insn insn;
lsampl_t data[1];
memset(&insn, 0, sizeof(comedi_insn));
insn.insn = INSN_CONFIG;
insn.subdev = 0;
insn.channel = 0;
insn.data = data;
insn.n = 1;
data[0] = INSN_CONFIG_DISARM;
return comedi_do_insn(d, &insn);
}
If the above implementation looks reasonable to you, I'll have a go at
implementing it.
>
>
> On Tuesday, November 5, 2019 at 6:28:46 PM UTC+5:30, Ian Abbott wrote:
>
> On 05/11/2019 05:12, Ravi shankar wrote:
> >
> > Hi,
> >
> > I have installed Comedi , RTAI in UBUNTU 16.04 Version.
> >
> > I want to interface ADVANTECH PCI 1724U through Comedi in RTAI
> frame work.
> > But the Comedi is not supporting this specific card.
> > Could you please tell me how i can access this card in
> RTAI+COMEDI frame
> > work.
> >
> > Thank you.
>
> Frank Mori Hess wrote a driver for this card in 2013 for the version of
> Comedi included in the Linux kernel "staging" sources (included in
> Linux
> kernel version 3.10 onwards).
>
> For RTAI, I guess you are using the "out-of-tree" Comedi Linux kernel
> modules from our Git repository on GitHub, and the required driver for
> the PCI 1724U is not yet present, but I have some good news for you.
>
> I have just back-ported Frank's "adv_pci1724" driver and pushed it to
> our repository on GitHub. It compiles OK, but I am unable to test it.
> Please give it a try.
>
> --
> -=( Ian Abbott <
abb...@mev.co.uk <javascript:>> || Web:
>
www.mev.co.uk <
http://www.mev.co.uk> )=-
> -=( MEV Ltd. is a company registered in England & Wales. )=-
> -=( Registered number: 02862268. Registered address: )=-
> -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-
>
> --
> You received this message because you are subscribed to the Google
> Groups "Comedi: Linux Control and Measurement Device Interface" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
comedi_list...@googlegroups.com
> <mailto:
comedi_list...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/comedi_list/cd9b6732-f4b6-44d0-bec9-2fd2e40e7aa4%40googlegroups.com
> <
https://groups.google.com/d/msgid/comedi_list/cd9b6732-f4b6-44d0-bec9-2fd2e40e7aa4%40googlegroups.com?utm_medium=email&utm_source=footer>.