Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a strem using Ni USB 6212

Hi,

I have an NI USB 6212 card and I want to send a stream of bits at a fixed clock rate (2KHz) on two ditital lines. The stream is stored as a uint8 vector in a buffer. Length is less than 2K.

I'm using C code and DAQmx drivers.

I looked at various sample codes and discussions but couldn't find any working code. The card manual just directs to DAQmx documentation without any restriction.

The code fails at command DAQmxCfgSampClkTiming (from one of the sample codes) with error -200077.

In some posts I saw that maybe clocked DIO is not supported on this board. If yes how can I know for other cards. Can I use the AO for the same task?

Thank you,

Alecs

0 Kudos
Message 1 of 7
(5,718 Views)

You are right that this card does not have an internal clock. All M-series devices need to have a clock provided from an external source if you want to configure sample clock timing. Regardless of if you are using DIO or AO, you will need to feed it a clock source. You can find out if a module has an onboard clock by checking out the manual or the spec sheet.

 

-Erik S

0 Kudos
Message 2 of 7
(5,701 Views)

Hi Erik,

Unfortunatly I don't agree with your observation. The documentation and the actual device do state that the "streming" option is available for AO. The card has internal clock and it can be configured to work with AI, AO and Counters. In addition there is no explicit need for external clock, the internal one can be used.

For my project I need two DO lines, and I was able to use the two AO to generate them.
However I do need some additional features:

1. The documentation of the NI USB 621x series specify that there are some routing options for the counter inputs and outputs. How can I know how to do them with DAQmx functions?

2. Since I also need much more DO's to beaccording to data vector (function not supported by M series), what series do support? and what is the code-name for this fuctionality?

Thank you,

Alecs

 

0 Kudos
Message 3 of 7
(5,692 Views)

Hi Alecs,

 

If you look in the C reference help, there is a function called DAQmxConnectTerms. It sounds like it will create a route like you were talking about. If you search Internal Channels in the reference help, the first option should be a list of internal channel names that may be useful for you. In general, the reference help is always a great source to find function names and descriptions. Can you give a little more information about what you mean by data vector functionality?

 

-Erik S

0 Kudos
Message 4 of 7
(5,674 Views)

Hi,

What I mean by "data vector functionality" is the ability to activate the DO to generate a stream of values according to a predefined clock (internal clock is OK). By this functionality I can generate a waveform on all DO lines of the specific port (ports).

I have an old NI PICe-6537 card that supports this feature. I need a card with this functionality that is USB connected (with low clock rate ~ 20KHz).

What series is suitable?

Thank you,

Alecs

0 Kudos
Message 5 of 7
(5,666 Views)

Hi Alecs,

 

These DAQ devices look like they should do what you are asking.

 

http://sine.ni.com/np/app/main/p/bot/no/ap/daq/lang/en/pg/1/sn/n17:daq,n21:41,n24:USB,n33:9807,n36:8...

 

-Erik S

0 Kudos
Message 6 of 7
(5,651 Views)

{{{{{{{{{{{ This post is so great and nice }}}}}}}}}}}}

 

looked at various sample codes and discussions but couldn't find any working code. The card manual just directs to DAQmx documentation without any restriction.

The code fails at command DAQmxCfgSampClkTiming (from one of the sample codes) with error -200077.

Testking [url=http://www.testking.co.uk]Testking[/url]
actualtests rhce certification exam [url=http://www.actualtests.com/certs/RHCE-training-certification.htm]actualtests rhce certification exam[/url]
actualtests cisco ccie wireless certification [url=http://www.actualtests.com/certs/CCIE-Wireless-training-certification.htm]actualtests cisco ccie wireless certification[/url]
0 Kudos
Message 7 of 7
(5,601 Views)