LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger+Synchronization Problem (DAQmx)

Hello dear LabVIEW-experts,

I'm new to LabVIEW and I'm struggling with a problem I thought to be fairly simple:

I need a retriggerable single Output Counter signal (of about 1µs high) that is synchronous with the rising edge of a fast 400kHz Input Counter and which should be repeatedly triggered by a slightly slower and irregular (20-100kHz) Input Counter. I'm using a PCI-6602 to get the two trigger-pulses and to generate the output counter.

I read some DAQmx tutorials and examples and some forum posts about similar problems and here are the three solutions I came up with, but none work properly...

1: My first idea was to use the slower signal for the Arm-Start-Trigger and the fast signal for the Start-Trigger. That way, may generated pulse is synchronous to the fast pulse but only occurs after the slow pulse has been there. This is exactly what I want, but it only works once, because I can't find a way to make the Arm-Start-Trigger retriggerable.
I tried to run the VI in a loop, which is never a good idea and only worked up to 500Hz. That's by far not fast enough. Is there a way to make the Arm-Start-Trigger retriggerable like the Start-Trigger? Maybe in C#? I tried it there too, with the same problem...

2: My second attempt was to switch the Output-Counter to "rate" and I used the fast pulse as the rate-source. The slow pulse was a normal retriggerable Start-Trigger. That works fine, and I get a signal synchronous to my 400kHz, but the pulses are too long, because the minimal rate is 2 high and 2 low, so twice as long as my 400kHz pulses. But I need to freely adjust the length of the outgoing pulse.

3: That gave me my Idea for the third try: I defined the task to be a time-controlled Output-Counter (so I can choose the high-duration) and tried to use the Timing-VI to get the pulse synchronous to my 400kHz pulses. Although I read the context- and DAQ-help, I apparently I didn't understand the Timing-VI because nothing chances, whether there is a signal on the timing-source or not.
Can I use the timing VI for my problem at all?

Does anyone have any other ideas? Either in LabVIEW or C#?
Are there any other possibilities to make one trigger wait for another trigger?

I'm using LV 2013 (German) under WinXP.

It seems that I can't attach VI's (? I'm using firefox...), so it's pictures only, sorry.

Many thanks in advance
Fred
-- 

0 Kudos
Message 1 of 5
(2,754 Views)

Hello again.

Maybe my text was a bit long last time 😉

 

The problem:

I have two digital (counter) inputs A and B. I want to generate a pulse output C, where the user can  choose the high duration. Each pulse C should be synchronous to A and triggered by B.

 

New idea for a solution:

My latest idea would use the "digital pattern filter". But LV tells me, that my NI PCI-6602 card cannot do this. Is that true? (Then, why would there be 32 digital input lines? Smiley Indifferent ) Do I have to configure the card somehow to use this filter?

 

So, if anyone can tell me how I can find out if the card can use this filter or has any other suggestions, that would be great.

 

Cheers

Fred

--

0 Kudos
Message 2 of 5
(2,696 Views)

Fred,

 

I think it may be worth looking at the "pause trigger" DAQmx property.

It looks as though you may be able to use the slow pulse train to gate the fast one.

 

http://digital.ni.com/public.nsf/allkb/4A9AF19480E50C6D862571B70058142A

 

Can't promise it will help as I have no device to test with here, can't hurt to try it.

 

 

0 Kudos
Message 3 of 5
(2,683 Views)

Hello and thanks for the help.

 

I previously looked into the pause trigger, but I didn't see a way to use it for my problem. Unfortunately I can't download the VIs in the example you linked.

 

In order to make use of the pause trigger, I think I first would have to be able to use one of my input signals directly as an output counter. I don't know if and how that's possible.

The only other way would be to somehow use the start and pause trigger in one task, but LV says I'm not allowed to do that Smiley Sad -

 

Best regards

Fred

--

0 Kudos
Message 4 of 5
(2,671 Views)

Here is an image, discribing how the input looks and how the output should look... maybe that helps...

0 Kudos
Message 5 of 5
(2,655 Views)