10-02-2009 08:12 AM
10-05-2009 04:39 PM
Hi Jim,
Yes, you can use two (2) counters simultaneously. I recommend looking over the DAQmx examples in the Example Finder. I'm not clear on the function of the two vi's you focused on in your image. How did you come about those 2 VIs?
Regards,
Glenn
10-05-2009 07:46 PM
Hi Glenn,
the VI is attached. As I mentioned, every time I arm 2 events, only the second one works. if I arm counter 1 then 2, only counter 2 works. Arm 2 then 1 and only 1 works. I have looked at the examples, but didn't really see anything that addressed simultaneously clocked events.
Thanks for the reply,
Jim
10-06-2009 05:44 PM
Hi Jim,
I'm not sure how the attached vi contributes to the application. I noticed that it nests a state machine and does only a single vi depending on the value connected to the action.
To clarify, you want to run two counters to count two inputs?
Regards,
Glenn
10-06-2009 07:09 PM
Hi Glenn,
Here's the deal. I have two flow meters in two pipes. Each pipe discharges water periodically, and I need to measure the volume discharged. As you observed, the larger VI is a state machine, and two of the the states poll the counters. What the program should do is arm the counters and poll them. When the count begins to go up on one of them, it should look for it to stop increasing. Once the count stops increasing, the flow is done and the volume should be recorded. Then the counter needs to be cleared and re-armed. As I do not control when the flow will happen, they both need to be able to be polled in an interleaved manner. I hope adds a bit of clarity.
Regards,
Jim
10-07-2009 04:00 PM
Hi Jim,
The counters are independet from one anotherso, arming one should not cause the other to disarm,
1) What is the trigger?
2) Does one counter stop to count?
3) How are you arming the counters?
4) What are you using for the sampling clock?
Regards,
Glenn
10-28-2009 08:24 PM
Hi Glenn,
This temporarily dropped down on the priority list, but it's up top again. As stated previously I am using DAQmx tasks to collect data with a 9172 cDAQ chassis and NI 9422 DI modules in slots 5 & 6. Specs say that the 9172 has 2 counter/timers, but I cannot seem to be able to use more than 1 at a time. I have 4 counter tasks, one for eack flow meter. They are connected to the inputs for ctr0 and ctr1 for each 9422. Tasks CNTR0_Counts and CNTR1_Counts are configured to the ctr0 and ctr1 inputs of the module in slot 5. CNTR2_Counts and CNTR3_Counts are configured for cntr0 and cntr1 inputs of the module in slot 6. Using the attached VI I get the following results. If the two loops are configured to collect gata on cntr 0 & 1 on the same module, the data is the same for both. If I try to simultaneously collect data on 1 channel of each module, I get an error.
Thanks for any help,
Jim
10-30-2009 10:12 AM
Hi Jim,
Have you ran Count Digital Events.vi? That should be an example that is suitable for your application.
10-30-2009 02:11 PM
Hi Jim,
The counters in CompactDAQ are actually on the backplane, not the modules. So while they're accessible on slots 5 and 6 in the cDAQ-9172, there are only 2 for the chassis, and so if you use both in slot 5, you won't have any available in slot 6. It sounds like you may be trying to use 4 total, and there are only 2.
If at some point you're looking at new hardware, the new cDAQ-9174 and cDAQ-9178 chassis have 4 backplane counters, which are accessible through any slot.
Regards,
Kyle
11-06-2009 06:51 AM
Hi Kyle,
I understand that the counters are in the backplane. At the time that I ordered the chassis my sales rep told me about the 9174 & 9178, but I couldn't wait a month for them to come out. While I have 4 counter tasks, I am only trying to use 2 at a time. That would double my acquisition rate. See message 3 of this thread, as well as the last 2 sentences of message 7.
Jim