07-08-2009 05:20 AM
Solved! Go to Solution.
07-08-2009 12:42 PM - edited 07-08-2009 12:43 PM
Hi TradLuddite,
On many DAQmx devices (e.g. E Series, M Series), you can scan repeated physical channels by passing a comma-delimited string like "Dev1/ai0,Dev1/ai0,Dev1/ai0,Dev1/ai1,Dev1/ai0,Dev1/ai2" for the physicalChannel parameter to DAQmxCreateAIVoltageChan() or by calling this function multiple times, as you are trying to do.
Some other DAQmx devices (e.g. S Series, DSA, and Compact DAQ) do not support repeated physical channels.
Is DAQmxCreateAIVoltageChan() returning an error code? One likely issue is that each virtual channel in the task needs to have a unique name with respect to the task. This means that you need to pass something other than an empty string for the nameToAssignToChannel parameter, or you will get an error when adding repeated physical channels to the same task. By default, the virtual channel name is the same as the physical channel name, which is not unique in your case.
If this doesn't answer your question, you should post more information. What device are you using? Could you post a concise snippet of code that demonstrates the problem?
Brad
07-09-2009 04:16 AM - edited 07-09-2009 04:19 AM
07-09-2009
09:17 PM
- last edited on
11-10-2025
03:17 PM
by
Content Cleaner
Hi TradLuddite,
E Series devices have a "configuration memory size" specification of "512 words", which means that they can scan up to 512 unique physical channels. So I would expect a Depth of 1000 to cause DAQmxStartTask() to return an error. However, it may be possible to exceed this limit if the scanlist consists solely of identically-sized groups of identical physical channels (where the input limits and terminal configuration are identical within each group), because the hardware supports a very simple form of scanlist compression. M Series devices have a corresponding "scan list memory" specification of "4095 entries", so a Depth of 1000 would not run into this limitation on M Series.
Setting the data transfer mechanism property is probably unnecessary. DAQmx chooses a default value for this property based on the type of device and the sample timing type property. Using DAQmxCfgSampClkTiming() to set the sample timing type to "Sample Clock" will result in a default data transfer mechanism of "DMA", "USB Bulk", or "Interrupts" depending on bus type (PCI/PXI, USB, and PC Card, respectively). Not configuring timing (or calling DAQmxSetSampTimingType(taskHandle, DAQmx_Val_OnDemand)) will result in a default data transfer mechanism of "Programmed I/O".
Which DAQmxRead() function are you calling? Are you specifying DAQmx_Val_GroupByChannel or DAQmx_Val_GroupByScanNumber for the fillMode parameter? Have you checked the value returned in *sampsPerChanRead?
Are only the repeated channels returning incorrect data? Does it work when you don't repeat any channels? If not, perhaps the terminalConfig parameter doesn't match how the signals are wired, you are experiencing ghosting, or there is a problem with the signal wiring. Does it still work in Traditional NI-DAQ?
Brad
07-14-2009 11:57 AM