07-06-2005 11:47 AM
07-07-2005 05:19 PM
Hello Topher,
Let me see if I understand you correctly. Do you want to output a signal when the counter reaches a certain number? You can put your signal into counter 0 source. Then output a pulse on counter 1 that uses the number of timebase ticks to create the digital pulse. For example, it would count 5 rising edges or ticks on counter 0 source and then create a rising edge on counter 1. This would repeat continuously. You could then use counter 1 internal output as the sample clock for your analog output.
This is really easy to do in DAQmx. With this setup, since you are only using 2 counters, you could just use the PCI-MIO-16E-1. Please let me know if you have any questions. Have a great day!
Sincerely,
Marni S.
07-08-2005 11:43 AM
Let me clear this up.
I would like a LabView program that reads three separate counters after a user selected time interval. For example, I would select “1-second” and the program would give me the number of counts (from three photon counters) that has accumulated over the 1-second. These counters should reset back to zero at the end of each time interval. Also, this process has to repeat until I stop the program. (I think this may be related to a buffered period measurement.)
The voltage output is an independent operation that has to be synchronized with the counters. In other words: I would start the counters, wait some time interval, read the counters, increment a predefined voltage, wait the same time interval, read the counts, increment the same voltage, wait, et cetera. Also, I want to save this sequence of events at the end.
Start--> Wait --> Read --> Increment --> Wait --> Read --> Increment --> Wait-->…--> Stop
I have already successfully done this through software timing, but the counters have problems reading a steady test signal. So, I am now trying to do the same task with hardware timing. Any advice with any part of this program would help. Thanks again!
07-11-2005 06:01 PM
Hello Topher,
I understand what you are saying now. You can't do all of that in hardware, but you can use a combination of hardware and software to do what you want.
If you want to read a counter after a specified amount of time and restart it every time, you can do it with buffered event counting. Output a pulse on a second counter that is the same width as time between reading in the first counter. Input the second counter into the source of the first counter. It will read every time the second counter's pulse goes high. Since you can't actually restart the count register you will have to subtract the count from the previous count.
If you want to add the analog output in there, you can do triggered analog output. Based on what the user specifies as the selected time interval, you can create the trigger off of that.
If you can upgrade your counter/timer board, this is much easier to do in DAQmx. Please let me know if you have any questions. Have a great day!
Sincerely,
Marni S.
07-12-2005
12:11 PM
- last edited on
06-04-2024
07:56 PM
by
Content Cleaner
07-13-2005
04:59 PM
- last edited on
06-04-2024
07:57 PM
by
Content Cleaner
07-14-2005 08:51 AM
Topher,
I would suggest you use "buffered period counting" rather than buffered event counting, because in buffered period mode, the counter value resets to zero on each sample clock edge.
As to the need for 3 counters, I would highly recommend the PCI-6602. It can perform 3 buffered operations using high-speed DMA for data transfer (the cheaper 6601 only supports 1 channel of DMA). Also, since your MIO card is a PCI type, you hopefully have a PCI slot available. You may not have realized this, but the PC-TIO-10 must use an old ISA slot which you may not even have.
A final suggestions with the 6602: In addition to the 3 buffered period counters, you could program a 4th counter to generate the sample clock. This would allow you to change the sampling rate on-the-fly if needed. The 6602 also allows you to start the 3 counters off a common trigger so that all the time measurements are sync'ed to the same 0 point.
Good luck with the app!
-Kevin P.
07-14-2005 10:45 AM
Since I need to make measurements every half a second (minimum), would LabView real-time fix the problem with my counts? I find it very strange that my program can precisely read a steady test signal at one million counts then decide to decrease two thousand counts once every 3-4 minutes (After that, it returns to the correct reading). I’m confident that my app is programmed correctly, so maybe there is a problem with my test signal... Thank you very much for your responses.
07-15-2005 04:37 PM