10-22-2009 04:04 AM
I have some code that was running on a 9172 + 9401 that configured the two onboard counters as x4 encoders.
I am trying to do the same thing with a 9178 + 9403, and I specified the two counters as cDAQ3/_ctr0 and cDAQ3/_ctr1.
I have tried the module in slots 3 and 5, but I thought it did not matter on this chassis.
However, I get
Error -200254 occurred at DAQmx Start Task.vi:4
Possible reason(s):
Terminal for the device is invalid.
Property: CI.Encoder.AInputTerm
Corresponding Value: empty string
Channel Name: EL
Task Name: SMU_SWEEP_EL
So, have the default terminals for A/B/I changed? I looked for them, but could not find the pinouts.
10-22-2009 04:12 AM
10-30-2009 09:55 PM
Hi Jed,
It's true that the 9403 is only capable of static digital I/O with cDAQ. As a general rule, any of the digital modules with more than 8 lines can't be used for HW-timed digital I/O or for routing the counter signals.
The underscore ('_') before the counters when you're configuring your task is used when referencing the internal counter signals. If you wanted to count one of the internal signals on the cDAQ you could reference the counters this way without having to use a digital module. On the 9172 it was fairly common to use the internal counter to generate a clock signal for correlated digital I/O.
You're correct that slot numbers do not matter anymore on the 9174/9178 when using clocked digital modules. On the 9172 correlated digital I/O required the module to be in slot 1-4, while counters and PFI lines were accessible through slot 5 and 6.
Best Regards,
John
10-30-2009 10:21 PM
Thank you for the clarification. I think I understand. When I see something like "cDAQ1/Mod3_ctr0", I am specifying a counter signal that will be connected externally through that device, either on the default pin or by remapping the pin vis the DACmx interface, right? The "cDAQ1/_ctr0" implies that I am using the counter internally, for something like a timing signal for another module?
While I have your ear, I noticed that on one of my applicaitons, when I specified PFI7 for an external AI clock (via a 9401 in slot 5), I had to end the channel name with a slash. The code errored when I did not have the slash. Yet every other channel name didn't require the slash. Any idea there?
10-30-2009 11:34 PM
That's correct, when you use Mod3_ctr0 then we are telling the device to connect the counter (which is on the blackplane of the chassis) to the module in slot 3. The default pins will be used unless specified otherwise through a DAQmx Channel Property Node.
_ctr0 with no module name in front of it means we're going to run the counter task without being connected to any external signals. There are no default pins in this case, so if using a counter input application you would need to tell the counter which signal it is going to be counting. If you're generating a timing signal for another module, you would need to use the counter's Internal Output when setting up the other task.
I'm not really sure on the slash--do you mean you had to use the name "/cDAQ2Mod5/PFI7/" as the sample clock source? The following code runs fine for me on DAQmx 9.0.2:
In fact, when I put a '/' at the end of the terminal name I receive the following error:
What error message are you seeing without the '/'? Would it be possible to post a simple example like the one above that demonstrates the problem?
-John