LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"How to wait for PFI input"

I have some Labview code which sends a series of digital outputs (using a PCI-6289 DAQ) representing a command to external hardware.  The external hardware sends back a digital pulse to a PFI input as an acknowlegement.  The code reads the counter before and after the command for the acknowlegement which should be a difference of 1 indicating the pulse was received.  A loop reads the counter the second time and after so many attempts gives up indicating a problem.  Is there a wait on PFI edge function that won't tie up CPU resources but continues as soon as the pulse is received?
0 Kudos
Message 1 of 2
(2,087 Views)

Hi,

 

Thank you for posting to the NI forums.  I would recommend using the Change Detection line to sample your digital inputs.  This version of the Timing VI allows you to sample a digital line on the rising/falling edge of another digital line.  There is a great example of how to set this up that can be found in the LabVIEW Example Finder.  Browse to Hardware Input and Output >> DAQmx >> Digital Measurements >> Read Dig Chan-Change Detection.vi.

 

I hope this helps.  Please post back if you have further questions.

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 2
(2,064 Views)