Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a digital outpout signal from two digital input signals with DAQ?

I have two digital input signals, let's call them IN_0 and IN_1.  I would like to create a digital output signal, OUT_0, using the USB-6343 DAQ that basically sends a pulse when IN_0 = LOW and IN_1 = HIGH.  In other words, it should generally perform the function:

 

OUT_0 = !IN_0 && IN_1

What are the different ways to implement this using the DAQ? Is it possible to do this without involving the CPU?  I am new to using DAQs so would love if someone could point me in the right direction.  Thanks so much!

0 Kudos
Message 1 of 9
(4,849 Views)

Let me just add that IN_0 and IN_1 are both just signals that can either each be HIGH or LOW.

0 Kudos
Message 2 of 9
(4,847 Views)

airoll wrote: Is it possible to do this without involving the CPU?

Not unless you get an R series board, which you program an FPGA to do the logic.

 

With your board, you are just going to have to read the two digital lines, perform your logic, and write to your digital output.  There is nothing complicated here.

 

What language are you using to do this task?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 9
(4,810 Views)

Or use two  NANDs of a single discrete logic and use hard wires ??  

With a DIP housing no PCB is needed .. use two 5Ohm resistors to power and GND, add a 100nF buffer cap at the chip 🙂

(and wire the unused inputs to GND 😉 )

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 9
(4,808 Views)

Thanks for the suggestions.  Let me ask a quick follow-up question.  Say if I have one digital input, say IN_2, and I want to generate a digital output OUT_1 that continually pulses at 1 kHz when IN_2 is HIGH, will that require the CPU as well?

 

As for the language, I am using LabVIEW on Windows.  If we do the use DAQ and the CPU, then how do we ensure that it won't effectively drop any pulses?  Do we need to dedicate a CPU thread to it?  How would we do that?  Thank you for all your help.

 

0 Kudos
Message 5 of 9
(4,793 Views)

@airoll wrote:

Thanks for the suggestions.  Let me ask a quick follow-up question.  Say if I have one digital input, say IN_2, and I want to generate a digital output OUT_1 that continually pulses at 1 kHz when IN_2 is HIGH, will that require the CPU as well?


How accurate of a 1kHz do you need?  How quickly do you need the pulses to stop when the input goes low?

 

What I would do is use a counter output to generate your pulses and then use external circuitry to AND the pulses with your enable line.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(4,790 Views)

If we generate our pulses using a counter output, how accurate is it?  Additionally, we want to use the rising edge of the digital input (IN_2) to trigger generating the pulses.  The pulses should stop immediately when the digital input is zero.

0 Kudos
Message 7 of 9
(4,777 Views)

@airoll wrote:

If we generate our pulses using a counter output, how accurate is it?  Additionally, we want to use the rising edge of the digital input (IN_2) to trigger generating the pulses.  The pulses should stop immediately when the digital input is zero.


The counter is quite accurate.  You just tell it to generate a clock with F frequency and X duty cycle.  And the logic you are describing is exactly and AND.  Use an external circuit (1 chip, possibly a seperate power supply, need to check the DAQ specs to verify if it has a +5V supply).  It will make your life a lot easier.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(4,772 Views)

one or two transistors (&1-2 R) should do the job to tie the counter output down 🙂

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 9 of 9
(4,768 Views)