Example Code

Dual State Machine XML Architecture Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI shows how to build upon the Real-Time VI within a single loop while allowing the communication loop to take care of the rest, while the Windows VI maintains sync with the Real-Time application.


Description
It’s important to maintain synchronisation between two systems for a wide variety of applications, ensuring the host application isshowing the same state as the second target. Utilising the scalability of State Machines alongside the power of XML this architecture allows you to build upon the Real-Time VI within a single loop while allowing the communication loop totake care of the rest, while the Windows VI maintains sync with the Real-Time application, ensuring that the data you are viewing is correct and up to date.

The time of the Real-Time device is streamed along with any additional data so you can log the time with events, and also use this as a software watchdog for the Windows host if this is a requirement for your project


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached VI
  2. Run the VI

 

Additional Information or References
VI Snippet

3-377.png

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

Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.