Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 on Traditional DAQ : can't assign gate(0) to source input of counter (0)?

We are replacing a system that used PC-TIO-10 boards with 6602 boards. In an attempt to minimize system changes, the new system has been wired identically to the old system, which used the gate lines to count by opening the gate on the rising edge of the gate line and counted on the falling edge.

Apparently, we are prevented from using the gate line as source to a counter. It is confusing enough that the manual says each of the fourty counter I/O lines can be assigned to any of the counters and any of the counter functional inputs: I still don't know if this is true or if it is an improper interpretation of the manual.

Additionally, using DAQ 7.4, we are specifically limted to using source(x) lines as source inputs to the counters.

a) Is it really not possible to connect a gate() line to the source input of the same counter?
b) If so, is it possible to connect the gate(x) input to the source input of counter(x+1) or (x-1) without affecting counter (x), which is how it appears in the VI's?
c) If worse comes to worse, we are driving the gate inputs with the output of an MC14490 hex contact bounce eliminator. Can we tie the gate and source inputs to a single counter together, and in software set the source as input and set gate on, and count events that way?

and I guess,
d) we're hopelessly  crazy and misinformed, and have to remake the interface boards and/or completely rewrite the software to use DAQmx?

ray
0 Kudos
Message 1 of 7
(4,276 Views)

We are replacing a system that used PC-TIO-10 boards with 6602 boards. In an attempt to minimize system changes, the new system has been wired identically to the old system, which used the gate lines to count by opening the gate on the rising edge of the gate line and counted on the falling edge.

I don't understand the function you were accomplishing.  What do mean by "opening the gate" on the rising edge?



It is confusing enough that the manual says each of the fourty counter I/O lines can be assigned to any of the counters and any of the counter functional inputs: I still don't know if this is true or if it is an improper interpretation of the manual.

No, the assignments are not that flexible.  However, you certainly can assign any counter's default source pin to be used as a source by any other counter's task (or by several tasks at once).  There are a few other special-case assignments, but for the most part they are flexible within their own category.  Any source pin can be the source for any counter, any gate pin can be the gate for any counter, etc.


a) Is it really not possible to connect a gate() line to the source input of the same counter?
b) If so, is it possible to connect the gate(x) input to the source input of counter(x+1) or (x-1) without affecting counter (x), which is how it appears in the VI's?
c) If worse comes to worse, we are driving the gate inputs with the output of an MC14490 hex contact bounce eliminator. Can we tie the gate and source inputs to a single counter together, and in software set the source as input and set gate on, and count events that way?

a) I'm not at hw now and can't recall for sure about using a counter's own gate signal as a source.  See b).

b) I'm pretty sure a counter can use as its source the gate signal from its paired counter (x+1 or x-1).

c) Um, it isn't clear to me why you need both source and gate connected this way if you are just counting events.

 

d) we're hopelessly  crazy and misinformed, and have to remake the interface boards and/or completely rewrite the software to use DAQmx?

I don't think so.  If the PC-TIO-10 was just performing event (edge) counting, then you shouldn't need to worry about the gate inputs on the 6602.   The new counters can simply count source edges without regard to a gate input.

Can you describe how the source and gate inputs were used to accomplish the measurement you needed on the PC-TIO-10?  It's been a long time since I used one and I only ever used it for period measurement...

-Kevin P.

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 7
(4,263 Views)

The 5000-character limit prevents me from answering your questions in full. In precis:

Why gate inputs? Because on the TIO-10, you could tie the gate input to both the gate and the source of a counter. This allowed enabling (opening) the gate on the rising edge, counting and closing the gate with the falling edge, counting one event. Because the original project used this, and the engineer (now manager) who evaluated recreating the original project stipulated no changes to the software, I was told that I must tie to the gates PFI's.

experimental results from yesterday:

a) unless we missed something very important, you can't connect a gate line to the source input of the same counter, at least not in Traditional NI-DAQ(legacy)

b) neither were we able to connect a gate PFI to counter X to the input of its paired counter. (The documentation is so confusing on this point that it looks like it is saying that we can connect the gate of counter(0) to the source of counter(1), not PFI_38 to the input of counter(1)!)

c) I needed to short (jumper) PFI_38 to PFI_39 so that the signal being provided to PFI_38 could get through PFI_39 to the counter source for (internal)counter(0), allowing us to prove that the 6602 board was, indeed, still functional, and that a switch closure on the input to my interface board could, indeed, cause an event to be counted by the 6602 board. Because of the relatively high impedance of the PFI inputs, the driving CMOS output signal from the debouncer chips was able to drive both input lines, and yes, we were able to count, so I could redesign my interface boards, get new ones made, and only lose a week on this project.

The manual is very confusing on the matter of what can be connected to what. With the confusions between source(0) as a PFI line and source(0) as an internal counter input, it was easy to interpret the 'other counter gate' connection as tying two inputs together with no driving signal. The addition of a single quote (prime) to the actual internal counter inputs would demystify the manual by half. A clearer statement (perhaps an additional sentence in section 3, Device Description third paragraph stating "Likewise, for 660x series devices, any gate PFI (PFI_38, PFI_35, etc) can be selected as gate inputs to the counters.") would be desirable.

There is a whole other issue of Traditional NI-DAQ (legacy) vs. NI-DAQmx, and what they enable to be programmed on the 6602, but the 5000-char limit precludes raising it properly.

At this point, the boards have been recast, inputs to source PFI's, gate PFI's brought out to  tie high or low, and new boards are being made. We're only losing a week.

0 Kudos
Message 3 of 7
(4,249 Views)

Hello onlyocelot,

I am happy to hear that you have resolved your issues.

However, I apologize that the documentation is confusing.  If you would like to submit feedback about this, I suggest you go to www.ni.com/support and click on the feedback link.  We value our customers' feedback and strive to make our products easier to use. 

Regards,

Laura

0 Kudos
Message 4 of 7
(4,219 Views)
onlyocelot,

I am in agreement with Kevin P. about the wiring of the source and the gate together.  I can not figure out why the previous engineer wanted to do that.  I understand that you are unable to change that part of the code.

As for connecting the source and the gate together...  I am not yet convinced that this is not possible with the 6602.  About 10 minutes ago I picked up a PCI-6602 and am going to try to route the gate and the source together using Traditional DAQ.

I will keep you updated.

Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 5 of 7
(4,217 Views)
onlyocelot,

I am convinced now, you will not be able to route the gate and source together in Traditional DAQ on your 6602.

Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 6 of 7
(4,199 Views)
Thanks, Lorne!
 
As it happens, expressPC turned our boards around in 3 working days, it took me another day to populate and rewire the system, and an afternoon to troubleshoot (and one burned finger. Amazing how, after 32 years, you can still burn a finger on an IC installed backwards.) The code is corrected (using source instead of gate input) the gates are left floating so the internal weak pulldowns can enable them all, and the system works like a charm.
 
When the smoke clears, I'll write up something for the manual folk about clarity for the overhopeful ex-user of PC-TIO boards, and suggest differentiating input lines from counter inputs more symbolically.
 
raybro
0 Kudos
Message 7 of 7
(4,193 Views)