Re: NI6534 output config

Hi, thanks for the help, but i'm really a novice.
I have installed everything, downloaded fw, and made a simple program
the toggles a bit in output.
Everything works with no errors but no output toggles.

Could you send me a very simple "hello world" program ?

Thanks a lot,
RM

PS: this is my program and execution output:

	#include <stdio.h>
	#include <comedilib.h>

	unsigned int subdev = 0;
	unsigned int chan = 0;
	unsigned int bit;
	int res;

	int main(int argc, char *argv[]) {

		comedi_t *it;
		lsampl_t data;

		it = comedi_open("/dev/comedi0");

		if (it==NULL) printf("Open device: Failure\n");
		else printf("Open device: OK\n");

		res = comedi_dio_config(it,subdev,chan,COMEDI_OUTPUT);
		printf("comedi_dio_config result: %d\n",res);

		bit = 1;
		res = comedi_dio_write(it,subdev,chan,bit);
		printf("comedi_dio_write res: %d\n",res);

		comedi_close(it);
		return 0;
	}

.....:~/comeditest$ gcc test.c -lcomedi -otest
.....:~/comeditest$ sudo ./test
Open device: OK
comedi_dio_config result: 1
comedi_dio_write res: 1



On Tue, 2006-05-09 at 07:49 -0400, Frank Mori Hess wrote:
> On Tuesday 09 May 2006 04:31 am, Riccardo Marracci wrote:
> > Hi,
> > I have a NI6534 PCI DIO but don't understand how to set output channel
> > characteristics (open drain or standard output). The function
> > comedi_dio_config only allows to set direction (COMEDI_INPUT/OUTPUT).
> > Can somebody help me?
> > Thanks
> > RM
> 
> You would use a INSN_CONFIG_DIO_OPENDRAIN configuration insn.  It hasn't 
> been implemented anywhere yet though, aside from the id being defined in 
> comedi.h.
> 

Received on 2006-05-18Z15:03:36