Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

6341-USB setup query.

Hi everybody. I'm not new here, but it's been a long time and I forgot the email addy I signed up with.

Anyhow...

 

My company has a device which produces pulses from 2 separate sensors (A & B) which are physically locked together on a rotating shaft. The measurement needed is the phase difference between them. If these inputs are armed from the leading edge of A and XOR'd together, the mark space ratio of the result directly relates to the phase difference, whatever the shaft speed. This, I believe from the manual, requires an 'implicit buffered pulse measurement, which returns both the mark and the space counts as a unit. The problem I'm having is working out whether any of the vast array of input routings to the board will result in the XOR function, or will I need to implement this initial input in hardware? Perhaps there is a quadrature method of addressing the problem? Ideas appreciated.

 

Rgds - Steve.

0 Kudos
Message 1 of 3
(3,679 Views)

Honestly I would just use an external hardware XOR and wire the result into the DAQ card for the cleanest solution.

 

Two other options I can think of though...

 

1.  Combine a two edge separation measurement (to get absolute time difference between pulses) with a frequency or period measurement on a separate counter.

 

2.  Assuming the inputs are both the same value to start out, if you toggle the state of a digital output every time one of the input signals changes state, you effectively have your XOR signal.  A digital input task with change detection timing can be used to generate a clock (called the "change detection event") on each state change of your A or B signal.  Use this change detection event as the sample clock for a digital output task which runs continuously with a buffer of alternating 1s and 0s.

 

 

Best Regards,

John Passiak
Message 2 of 3
(3,658 Views)

Thanks for the time and consideration. After more thought it seems that hardware is definitely the way to go, although the labyrinthine dig-in routing does have definite merit in the 'blind the boss with science' stakes. A part I didn't mention was that the initial input is a smallish sine wave which will need  squaring. The trigger point of the comparators is critical to accuracy and will have to be determined by calibration. Happily I have 2 very accurate analog outputs for this very purpose. I love it when a plan comes together.

0 Kudos
Message 3 of 3
(3,650 Views)