Example Code

Write from a Text File to the Lines of a Digital Port 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
Demonstrates how to scan strings from a text file and write them to various lines of a port.

 

Description
Here is simple example description:

This is the example that the device can scan the string from the text file and convert them to binaries, which send to the hardware devices. The devices’ digital port can response based on the data message.

Requirements

  1. LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Select the related file path.
  2. Configure the hardware parameters, like Port.
  3. Display the result by array control or hardware indicator lights.
  4. Close the session

 

Additional Information or References

VI Snippet

Write from Text File to Digital Lines 2013 NIverified.png 

 **This document has been updated to meet the current required format for the NI Code Exchange.**
Gabby
National Instruments Applications Engineer

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

Comments
Fred_A
Member
Member
on

Hello,

Thanks for sharing, it looks interesting for me.

Can you provide an example of your *.txt file with datas to see how numbers are implemented (lines(s), seperators, etc.) ?

Thanks

Fred