Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

9237 can't read physical channel names

I'm trying to programmatically read physical channel names out of a DAQMx task.  I'm using a cDAQ, two 9221 modules, and a 9237 module.  Everything works when I only use the 9221s, but when I try to read the names off the 9237 it errors out with error code -201087 and states:

 

Task contains physical channels on one or more devices that require you to specify the Sample Clock Rate.

Specify a Sample Clock Rate.

 

I have specified a sample rate, with no luck.  I still get the same error.  Has anyone else run into this problem?

0 Kudos
Message 1 of 8
(3,981 Views)

Hi kent.wedeking,

 

The text for that error message is not 100% complete: in addition to setting the SampClk.Rate property, you also have to set the SampTimingType property to Sample Clock. The standard way of doing this is to call DAQmx Timing (Sample Clock).vi, which sets several related properties: SampTimingType, SampQuant.SampPerChan, SampQuant.SampMode, SampClk.ActiveEdge, SampClk.Rate, and SampClk.Src. The equivalent function in ANSI C is DAQmxCfgSampClkTiming(), and in .NET it's myTask.Timing.ConfigureSampleClock().

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 8
(3,965 Views)
I'm not getting any love out of your response ... that does make absolute sense, but its not working.  I'm still getting the same error, whether i use DAQMx Timing.vi or property nodes ... any other suggestions?
0 Kudos
Message 3 of 8
(3,963 Views)

Could you post some code that shows what you're doing?

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 8
(3,956 Views)

Hi Kent,

 

First, please verify that you are selecting a sample rate within the specified range of your NI 9237 Module.  Please reference the link below:

 

Valid Sampling Rates for the NI 9233, NI 9234,and NI 9237

 

If you are using a property node to read the physical channel names off of the task, be sure you are reading after you specify the timing in your code.  Also, if you are using global virtual channels to read your physical channel names, and not a task, the default sample rate is On Demand, and thus would cause this error.  The 9237 does not have support for a clock rate of On Demand timing.  The simple workaround for this is to create a dummy task and specify the clock rate in the task as either finite or continous.

 

Finally, posting your code will help our efforts in finding a resolution to your issue.  Thank you.

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 5 of 8
(3,929 Views)

Hi Kyle, Kent

I have this same behavior and continue to see it even if I create a copy of the task and set the timing properties. I've copied all of the initialization from the acquisition vi to make sure I didn't miss anything.  I, too, use global virtual channels, in this case I am trying to tie a virtual channel string name back to the actual physical device name (look up).  Hardware is also a 9237.  Thanks -Stefan

0 Kudos
Message 6 of 8
(3,639 Views)

Hi icebear,

 

Are you setting timing properties before or after your DAQmx Timing.vi?  What rate are you sampling at?  If you do not use a global virtual channel, do you still see the error? 

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 7 of 8
(3,618 Views)

My apologies, I was able to "re-write" the code on another machine and it worked fine.  It turned out to be a simple wiring mistake in referencing the channel rather than the task in the loop/property node read.  Thank you for your help.

0 Kudos
Message 8 of 8
(3,599 Views)