From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is two synchronized signals arriving in trigger analog and gate counter card entries respectively are synchronized?

Hello,

we have 2 signals that are synchronized by hardware. One is plugged for gate counter, the other for analog trigger. This plug normally permits to synchronize counter and analog acquisition, but is it really the fact? Must we use internal card synchronisation for the 2 signals (gate and trigger) to be sure that acquisition for counter and analog start in the same time?

We use PCI6052E and NIDAQ C/C++.

Thanks a lot,
Alain
0 Kudos
Message 1 of 5
(2,655 Views)
Hello Alain,

I have an idea for your question. I am including (attaching) a program that measures the frequency of an analog input using a synchronized counter. I think this might be the solution that you are looking for.

If this is not the answer you want, then please draw a basic picture that includes the signals, triggers, gates, sources, and other connections for the analog input and counters you want to use. You can attach the picture if you need to reply to this answer. Then I can answer your question faster instead of giving you guesses.

Thank you. I hope this is helpful,

John N
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,655 Views)
Hello John,

thank you for your answer, but it is not exactly what we want.

We want that analog and counter acquisition start in the same time (counter and analog are no dependence one another). For this, we use a signal A which arrives in gate counter and signal B which arrives in trigger start/stop analog.
We want to know this: if signal A "arrives" before B, how to say to the card (by programming) that it must wait on signal B to begin acquisition (in fact: synchronize the gate counter and start trigger to high in the same time).

We have attached a small picture for this diagram.
Hope we have given good explanation.

Thanks a lot,
Alain

PS: we develop only with C/C++, no Labview, sorry.
0 Kudos
Message 3 of 5
(2,655 Views)
Hi Alain,
Sorry it has taken a while to answer, but since this is a programming question, I have to answer on my own time.

The picture you sent is great. I understand what you are trying to do now. I have one suggestion that might be a solution for you.

If you can use only one line for both triggers, then you could configure the counter gate just as you have in the picture. However you could then use the gate as the trigger for the analog input. The start trigger can be configured for a rising edge (of the gate) and then the stop triggered configured for a falling edge (also of the gate). Then the acquisitions will be synchronized.

The final question is how to combine the two signals that you have into one that gives priority to the an
alog trigger. A simple suggestion for this is to send the analog trigger into a simple flip-flop device. The flip-flop should default to low, and then go high when the analog trigger pulse arrives. The output of the flip-flop is then "ANDed" with the original gate signal. Thus, the final gate signal will be high only if both the original gate is high and the analog trigger is between the start and stop trigger.

I am including a modified version of your diagram that should help demonstrate what I am trying to describe.

The functions I think you would use (just in case you aren't using these yet) are:
DAQ_Config
DAQ_StopTrigger_Config
0 Kudos
Message 4 of 5
(2,655 Views)
Hello John,

>Sorry it has taken a while to answer, but since this is a programming question, I have to answer on my own >time.
??, when you participe to a NI newsgroup, it's on your own time? Then, thank you for your support, we appreciate.

> If you can use only ... Then the acquisitions will be synchronized.
Exactly what we wanted, we have finally taken this way, because it's more accurate. We can now start acquisition from a signal coming through RTSI bus(single pulse generate from counter card when a frequency is reached).
We have finally dropped our box, too complicated to maintain in fact (and NI-DAQ with cards can make now the same work).

> The final question is how to combine ...
Very good solution, the gate will give
us what we wanted too.

> I am including a modified version of your diagram that should help demonstrate what I am trying to describe
You describe good, and we keep your solution in mind, because it's very simple to set up (not only for our problem).

Thanks a lot for spending time to answer to our question.
NI-DAQ is great when we know to use it (specially RTSI).

Best regards,
Alain
0 Kudos
Message 5 of 5
(2,655 Views)