Sync Software Loop to GPS PPS

Productos y Entorno

Esta sección refleja los productos y el sistema operativo utilizados para crear el ejemplo.

Para descargar el software de NI, incluyendo los productos que se muestran a continuación, visite ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Controlador

  • Other

Código y Documentos

Adjunto

Overview
Demonstrates how to use a GPS PPS signal in hardware to trigger and control the execution timing of a software loop.

 

Description
Unlike DAQmx Events on M and X Series devices, niSync hardware cannot directly generate a software event.  However, if you want to sync your software execution timing with GPS (or any external trigger), you can create a physical clock on the 6682 (GPS PPS) that is used to trigger timestamps.  By using a blocking read on the timestamp data to control execution flow, you can ensure that your software loop only fires when a timestamp is latched.  This causes the software only to iterate when a physical trigger is received.

 

Requirements

Software:

  1. LabVIEW 2012 (or compatible)
  2. NI-Sync 14.0(or compatible)


Steps to Implement or Execute Code

  1. Open niSync session.

     2a. Configure timestamp trigger.

     2b. Configure GPS PPS for 1 Hz.

     3a. Blocking timestamp read triggers loop execution to continue.

     3b. This code is not required, but it shows the current GPS timestamp. It simply keeps the PPS output signal from disabling until Loop 1 completes.

  1. Put your code into the programming diagram.
  2. Set stop to TRUE if Loop 1 errors, to make Loop 2 stop. Please note that if Loop 2 errors out, Loop 1 will exit when it times out.

     6a. Disable timestamp trigger.

     6b. Clear PPS clock configuration.

  1. Close and handle errors.

 

Additional Information or References
VI Snippet

1111.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,
Chris Elliott
x36772

El código de ejemplo del Intercambio de Código en la Comunidad de NI está autorizado con la licencia MIT. 

Comentarios
joaoneves
Member
Member
el

Please, save for Labview 2011.

Thanks

Chris-NI
NI Employee (retired)
el

2011 version of main VI posted.

Regards,
Chris Elliott
x36772