09-04-2009 04:55 PM
Hi,
I am trying to count the number of TTL pulses that are coming in from two photon counting PMTs using a PCI-6122 (S-series, DAQ STC). I need the counting to start simultaneousely, via an external trigger (right now I am using an internal trigger just to test things out).
To the best of my understanding, I need to use an outside clock source as the timebase for the counters' count edges application; I am using a 40kHz TTL signal from a function generator for this purpose, that I have hooked up to Ctr 0 Gate (PFI 9) and to Ctr 1 Gate (PFI 4). The signals from the PMTs are attached to the Ctr 0 Source and Ctr 1 Source terminals.
Without the DAQmx Trigger(Start Digital Edge).vi, the program runs fine. But, whenever I use DAQmx Trigger(Start Digital Edge).vi I receive the following error:
Error - 200452 occured at Property Node DAQmx Trigger (arg1) in DAQmx Start Trigger (Digital Edge).vi
Measurements: Specified Property is not supported by the device or is not applicable to the task.
Property: Start.Trig Type
Does anyone know why I am receiving this error, and more importantely, how can I simultaneousely start to count edges using the two counters on this board and a trigger (external or internal)?
Thank you very much for any help in advance.
P.S. I have also attached a picture of the block diagram.
09-08-2009 02:09 PM
09-08-2009 02:09 PM
Here is the knowledgebase article I found that addresses the triggers on the DAQ-STC chip
http://digital.ni.com/public.nsf/allkb/5D8913252908341786256CB0006A5B5F?OpenDocument
09-08-2009 04:35 PM - edited 09-08-2009 04:37 PM
Hi Doug,
Thanks for your reply. I came across the Knowledgebase article that you have linked after I posted my original message. Please tell me if I have understood your suggestion correctly: I would use an external clock source, which I would attach to each of the counters' "gate" pins. I would connect the input signals (from each of the PMTs) to each of the counters' "source" pins. Once I would start that external clock source (with a physical trigger), both counters would start simultaneousely? If this is the case, unfortunately I cannot implement it since my signal generator cannot be triggered 😞
Since I posted the original message, I have also found out that I can use an internal clock source, i.e. the onboard clock, for non-buffered acquisitions. I still don't seem to be able to use an internal clock source for buffered acquisitions, though. So, would I be able to do a triggered non-buffered acquisition in which I connect each of the input signals to the "source" pins of each of the counters, and connect a common TTL pulse to the "Gate" pins of each of the counters, to be used as Pause Trigger? My logic is that with the TTL Gate signal/Pause Trigger, I can then synchronize the two counters.
Also,
I found the
following article (http://zone.ni.com/devzone/cda/epd/p/id/3356) which
seems to have found a way around the triggering issue while still doing
a buffered acquisition, by first routing the onboard clock to the RTSI
clock and then rerouting the onboard clock to itself(?). I am trying
to understand their vi, since it uses DAQ Legacy and I can't quite make
sense of it (I am using DAQmx).
Could you, or any other good samaritan , perhaps take a
look at it as well to see if you can maybe
"translate" it? They are saying that they are using the same clock
signal for both counters, which is the "source", and that we can choose
different "gate" signals for the two counters, if we wanted to. I am
confused about this. I thought that the "source" should be the input
signal(s) whose edges we want to count, so they could be two different
signals, and that the "gate" should be the sample clock, which would
then ensure their synchronization. This is what I understood based on
the tables that are in "Counter Parts in NI-DAQmx">"NI-DAQmx
Help">"NI DAQ">"National Instruments">"All Programs".
I know these are a lot of questions/doubts that I have outline here, but I am in a bit of a pinch and appreciate any help you can provide me.
Thanks again.
09-09-2009 01:19 PM
09-10-2009 09:36 AM
09-10-2009 10:41 AM
I've talked with a few other people about this and that article is not really accurate because the sample clock cannot be changed after the DAQmx task has been started which is essentially what it is saying to do. The only real solution that we were able to develop with your current hardware is to not start the edge counting until after both of your counters have had sufficient time to arm.
The other option is to get a card with Arm-Start enabling, any M or X series card, or anythign with the STC-II chip on it.
09-10-2009 04:57 PM - edited 09-10-2009 05:01 PM
Hi Doug,
Thank you very much for checking for me. I thought I had been forgotten If I don't start the edge counting until after both counters have armed, I would be able to synchronize both of them together, correct? The problem is that I not only need to have the edge counting from both counters be done synchronousely, but also need to synchronize the said edge countings' start with an external trigger (coming from a shutter). I have attached a conceptual schematic of what I am trying to achieve. I apologize if I was not clear in my previous posts.
I made a vi that I thought would achieve what I am trying to do. I have attached a screen shot of the block diagram as well. The idea is to:
1.) Prepare both counters and wait.
2.) Once the external trigger is received (from Port0/line0), "internally connect/route" the terminal to which the external clock source is attached (PFI5) to the Gate of counter 1 (PFI 4). Note: Gate 0 (PFI 9) and Gate 1 (PFI 4) have been physically connected together.
3.) Start the edge counting with both counters at the same time.
I am running into the following error:
Error -89137 occurred at DAQmx Connect Terminals.vi
Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
Source Device: Dev1
Source Terminal: PFI5
Destination Device: Dev1
Destination Terminal: PFI9
Required Resources in Use by
Task Name: _unnamedTask<4E>
Source Device: Dev1
Source Terminal: PFI4
Destination Device: Dev1
Destination Terminal: Ctr0Gate
Is there a way to get around this?
Thanks.
08-01-2011 07:00 AM
I would propose you start the counters as in the attached file, then they should be well synchronised. Hope that helps you!