Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use counter using PCI 6259

Hello, users,
I have a PCI 6259 board and use Labview 7.1.
I'd like to repetitively count the photon signals at 10ms integration time. I want cumulative counts in every 1 sec (1000ms) (or 1 min (60000ms)) And I want to save counts into txt.file which is open in excel program.
 
I am a beginner to use counter using PCI 6259 board.
 
1. Could you explain default NI-DAQmx counter terminals, i.e., CTR 0 SRC, CTR 0 GATE, CTR 0 AUX, and CTR 0 OUT?
 
2. How do I use them or how can I connect to count TTL pulse using PCI 6259?
 
3. As I mention my purpose above, which example is the first step to start working my purpose?
 
4. If you know good example, could you tell me about that?
 
5. If anyone has labview example which is similar to my aim, could you give me some tips or your examples?
 
Any hint, comment or advice would be appreciated.
Thank you so much for your response.
 
Leek2
0 Kudos
Message 1 of 4
(4,290 Views)

Leek2,

I encourage you to look through the help documentation for the NI-DAQmx driver.  It can be found at Start-->All Programs-->National Instruments-->NI DAQ-->NI-DAQmx Help.  It gives a really strong broad overview of the counter parts and functionalities.  I would specifically look into the following index heading "counter parts in NI-DAQmx".  I would also recommend browsing through the NI Example Finder.  You can go to the Help Menu and then select Find Examples.  From the browse tab, You should select the following substructure:
Hardware Input and Output --> DAQmx -->Counter Measurements...

There are six sub-folders of this directory with a plethora of examples.  If you highlight an example, the information window will populate with a brief description of what the example does.  Also, there are explicit instructions within the front panel and block diagram of each example. 

Also, I will put a link below to a series of counter tutorials and information pages on our website.

http://zone.ni.com/devzone/devzone.nsf/webcategories/67CA5DDAA7E03B2186256F19004738B5

I hope this is helpful!
-Jeff P.
National Instruments Applications Engineer

0 Kudos
Message 2 of 4
(4,278 Views)

Dear Jeff,

Thank you for your information. I found one example which is "Duplicate Count Prevention" from your link site.

I modified this Labview program to count TTL pulse every 10ms integration time (I set rate (100Hz) with 1000 samples). But I am having a trouble when I write the data file using WRITE. vi (This shows that there is count number at 0 and there is no count number at 1). I expected that this data shows that 0 count at 0sec, some count number (e.g. 236) at 10msec, 357 at 20msec, etc..until time is set by user. But I couldn't get this kind of data.

As I mentioned about my board system, PCI 6259, I connected TTL pulse (source signal) into pin nimber 37(CTR 0 SRC) and TTL ground signal into pin number 11 (PFI 0) as mentioned in example. (I used BNC-to-two aligater jacks, which fed in SCB 68).

If I have a mistake in my labview program, could you tell me about that?

Any hint or advice would be greatly appreciated.

Leek2

Message Edited by leek2 on 12-30-2005 02:15 PM

0 Kudos
Message 3 of 4
(4,233 Views)

Hi leek2,

I think there are couple of reasons why you are not getting the expected reading from the counter. First, according to the pin-out specs for the 6259 the gate for counter 0 is pin 3 which is PFI 9. Since incorrect gate is enabled you are not able to count any pulses on counter 0.

Secondly, I am not certain why you are using the feedback vi to record the counts. I would suggest building an array and using shift registers to updated that array if you'd like to keep track of all the counts. When debugging your code first try to record counts straight to the file rather then manipulating the data with the merge signal vi. Also, run you code in highlighted mode (by selecting the light bulb icon on your block diagram) and step through the code to see where your counts are getting lost. Also, wire that waveform chart (or any other indicator) directly to the data output on the Daqmx Counter read vi, just so you can make sure you are getting some kind of reading from the counter 0.

I hope these suggestions help. Good luck

 

Regards,
Natasa
0 Kudos
Message 4 of 4
(4,196 Views)