Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

usb6211 finite digital pulse

My first post to forum. (So hello : )).

 

to the point: I want to generate a finite digital signal on one of the digital outputs of USB6211. The signal is a UART frame (8N1) (baud rate can be as low as 100 Hz).

 

So I was expecting something what I did to output an analog output signal, i.e. set the rate, set the duration via setting data and runForeground ..etc, but It seems this is not supported with 6211.(am I right?)

 

How can I do this? I appreciate any help.

 

I'm using Matlab 2014b but I can use C functions if necessary (NIDAQmx.h)

 

Thank you

0 Kudos
Message 1 of 6
(4,990 Views)

Hello,

 

There are several DAQmx examples for C that come with NI-DAQmx and are located in the following location on your computer:

Go to your Start Menu > All Programs > National Instruments > NI-DAQmx > Text-Based Code Support > NI-DAQmx ANSI C Examples > Digital. One helpful example is the WriteDigChan.c example, located in Digital > Generate Values.

 

This is a great place to get started. If you have further questions, I would brouse through some of the examples on NI Community (http://www.ni.com/examples/)

 

Hope this helps!

 

Aimee

 

0 Kudos
Message 2 of 6
(4,947 Views)

Hi;

 

I have already done that. But I was able to write one sample at a time with the write function but it is too slow with this way(minimum possible pulse width is around 700us).

 

 

Clocked digital output is not supported in usb 6211. (Am I correct?) So I can't set the session rate and pass the (digital) data array to the session and produce the finite waveform, as I did in analog output.(right?)

 

I'm asking a device spesific question. Anyone did sth similar with this device?

 

0 Kudos
Message 3 of 6
(4,941 Views)

Yep, you're correct - the USB-6211 doesn't have a dedicated onboard sample clock for digital I/O timing. However, it should support correlated digital I/O (DIO that is correlated to another clock signal, like the AI or AO sample clock on your device or an external clock). If you still want your operation to be hardware timed, this article lists some alternatives for your device:

 

http://digital.ni.com/public.nsf/allkb/51754212AD10BDCE862573BD007BFDD2

Message 4 of 6
(4,926 Views)

The 621x devices only support software-timed digital I/O (not counting the two counters which can be used to generate pulses... but the 621x counters are not flexible enough to generate arbitrary digital signals anyway).  "Correlated" digital output applies to most of the other M Series devices (e.g. 622x) but the 621x do not have this feature.

 

Perhaps you could use the analog output for this task instead (write 0 volts for logic low and 5 volts for logic high)?

 

 

Best Regards,

John Passiak
Message 5 of 6
(4,911 Views)

thanks john, Analog outputs are reserved for other task. (all of them) 

 

Looks like I have to abandon uart and implement some sort of custom serial comm. using mcu's interrupts and do everything manually.

Thanks again clearing my doubts.

 

 

0 Kudos
Message 6 of 6
(4,901 Views)