08-01-2013 02:27 PM
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
08-02-2013 06:09 PM
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
08-04-2013 05:57 AM
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
08-05-2013 06:40 PM
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
08-06-2013 09:28 AM
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
08-07-2013 09:08 PM
Hi Alecs,
These DAQ devices look like they should do what you are asking.
-Erik S
08-13-2013 04:58 AM
{{{{{{{{{{{ 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.