Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a digital trigger to ouput an analog signal

I am using an M-series multifunciton DAQ board to output an square wave analog signal on receipt of a digital trigger. The attached VI recieves a digital trigger and outputs either a continuous or finite waveform. What I want to do now is when the digital signal is recieved, I want to output the finite waveform but in a loop so that the waveform that I output is sent in bursts. The frequency of the digital signal is 30kHz. I was thinking of using a counter to count the digital signal coming in and for every (for example) 1000 counts, the output of a finite square wave is triggered. Would anyone know where I would start to do this ? I have also attached a schematic of what I want to do.
Download All
0 Kudos
Message 1 of 5
(3,174 Views)

Hi,

  the principle would involve the use of the terminal count as a trigger to the analog output clocking.

The problem is that you need one counter to make the trigger event for the terminal count, and reset it, and another two counters to make a finite retriggerable pulse train, so that you could make a retriggerable analog output section. You haven't said what M-series card you're using, but if you're the same person who's e-mailed into the uk office aswell, then it's a 6251, which only has 2 counters, so you cannot acheive this on this board alone.

have a look at the following link (which is for analog input) for how to use the terminal count.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=E5BC1A8028A1541AE034080020E74861&p_...

It should be a simple convert to get to the AO instead of AI, and you would need three counters on your board, or a couple on a second board plus a RTSI cable to connect them together and adding in the retriggerable finite pulse train generation (there's shipping examples of this)

The synchronisation of the timing will have a fixed delay, so if you need very high (ns) resolution on the timing, it's not going to happen that fast.

You must have a specific length pulse duration too for the card to trigger correctly which matches the specs. (i.e. TTL is equivalent to 20MHz = about 50nS).

Without specific timing information, then it's going to be a case of trying it.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 5
(3,158 Views)

Hi,

  should have said - the Analog output section would have to be set as continuous, and therefore the retriggerable pulse train would be the clock source.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 5
(3,156 Views)

Hi,

  a slightly different approach works better, and acheives all this on one card, plus a bit of external wiring.

Given the defaults on the front panel of the attached vi, it uses the external incoming clock on PFI0 to clock out a digital pattern so that on the 10th clock pulse, you get a 1 for example, i.e. the pattern is 0000000001.

This output needs hardwiring to PFI1 to be used as the trigger source for the finite retriggerable pulse generation on the counter (internally using the second onboard counter since it's finite).

The internal counter output is then used as the clock source for a continuous analog output task, so you get fixed bursts of information every nth clock pulse.

Hope that helps

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 5
(3,129 Views)

Hi,

  just got an e-mail directly from the original poster of the question here :

It is running and doing what its supposed to, however , the pulsewidth of the digital pulses is equal to the period of the incoming 30kHz signal. Is there a way to vary the pulse width of these digital pulses so that they are high for longer giving longer "bursts". I have also posted this question one of the discussion forum.

The pulses generated on the digital line are orcestrated by the pattern you generate.
My code generates a pattern that is clocked out, so if the pattern is 0000000001, then every 10th clock input, you get a single clock period output.
If you want this longer, then generate a pattern of 0000000111, so every 7th pulse, you get a 3 period pulse out.
It's only the edge of the digital line that's being used on the counter pulse train output, so if it's pusleing correctly, then you need to make it more pulses, or change the pulse specs to get different clocking times on the counter to acheive a different setup for the analog output.

Is that what you're trying to acheive?

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 5 of 5
(3,110 Views)