Generate Two Pulse Trains With a 90 Degree Phase Shift

Updated Sep 24, 2024

Environment

Hardware

  • USB-6363
  • VirtualBench All-in-One Instrument

Driver

  • NI-DAQmx

NI Data Acquisition (DAQ) hardware has a counter that can be used to generate a pulse train. This tutorial will show you how to generate a finite two-pulse train with a 90-degree phase shift using USB-6363, this can be used to simulate a quadrature encoder for your application.

 

Hardware Setup

  • USB-6363 is used to generate a two-pulse train:
    • Connect CTR 0 OUT (PFI12) to the NI VirtualBench.
    • Connect CTR 1 OUT (PFI13) to the NI VirtualBench.
  • NI VirtualBench (no longer sold) is used to view the result from both counters. Refer to the VirtualBench Help for more information about setup and installation. You could also choose another type of device to measure and display the signals.
2022-10-26_11h59_47.png


Software Setup

two finite pulse train.png
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.

 

Here is the result for a finite two-pulse train with a 90-degree phase shift using USB-6363:
 
Result.png