Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait for two frequency inputs to be in sync and then pass one of them out

Hello! I am hoping to get your advice on programming with NI DAQmx. I have two TTL signals, one at 1 kHz and the other at 500 Hz. What I'd like to do is: send a command to start to the DAQ card then have it wait until both the 1 kHz and 500 Hz signals are "on," at which time it will begin passing the 1 kHz signal. I have an PCI-6036E DAQ card and a BNC-2110, if that shapes your answer at all. I'm sorry I don't have a vi to attach of my work so far; after looking through the examples and the forums, I've had trouble finding where to start. Thank you very much!

0 Kudos
Message 1 of 4
(3,903 Views)

So I've done some messing around with the DAQ assistant and constructed the attached VI. If I understand what I've read, what I need to do is use the 1 kHz as a clock for a digital counter and then use the 500 Hz signal as a trigger for my counter. Does that make sense? This VI mostly spits out error messages and for some reason the counter that is spat out from CTR 0 OUT operates at 100 Hz, despite the input timing operating at 1 kHz. I also get a ton of error messages, namely:

  • Error -200557 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Analog Edge).vi:1
  • Error -200279 occurred at First Effort.vi:Instance:3:1
  • Error -201021 occurred at First Effort.vi:Instance:1:1
  • Error -200088 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Analog Edge).vi:1->First Effort.vi
  • Error -200279 occurred at First Effort.vi:Instance:3:1

 

I'd really appreciate some input here, I feel a fair bit over my head. I'm a fairly experienced labview programmer, but this is my first foray into programming with a DAQ card. Thank you!

0 Kudos
Message 2 of 4
(3,875 Views)

do you want to check that both signals are there, or do you need them in sync = fixed phase relation?

 

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 3 of 4
(3,824 Views)

Hello Henrik,

I realize now that my title is unclear. What I'm looking to do is run the VI, wait for the rising edge of my 500 Hz signal, and then begin passing along the 1 kHz signal that it is receiving from an external clock. I want to DAQ card to effectively be a logic gate, that blocks the 1 kHz signal from passing through the DAQ card when the VI isn't running and begins to let it pass when I've told it to start AND it has received the trigger (transmitted by the rising edge of the 500 Hz signal). At that point, it will continue passing the 1 kHz signal until I tell it to stop. Is that more clear? Thank you very much for your response!

0 Kudos
Message 4 of 4
(3,817 Views)