Example Code

Reboot a CompactRIO device over Serial

Code and Documents

Attachment

Overview

This application demonstrates how to reboot an NI CompactRIO by sending a command to its Serial Port. This is great for inaccessible systems which need to be remotely rebooted.

Description

This VI uses the VISA API to send the string "18" to the serial port; when a cRIO receives this command it reboots. This command can also be executed via HyperTerminal or Putty by pressing the "CTR + X" key combination. This method can also be achieved by programming any generic serial modem to send the command to a cRIO. A snippet of this implemented with LabVIEW code is shown below.

restartcrio.png

Steps to Implement

  • Connect your Computer to a cRIO via a Null-Modem Serial Cable.
  • Run the attached VI or VI Snippet
  • Observe the cRIO rebooting

Requirements

  • Software
    • LabVIEW 2011 or newer
    • NI-VISA installed
  • Hardware
    • Computer with a Serial Port
    • cRIO
    • Null-Modem Serial Cable

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

Applications Engineer

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

Contributors