How Do I Read the USER1 Button on cDAQ or cRIO?

Updated Mar 8, 2024

Environment

Hardware

  • CompactDAQ Controller
  • CompactRIO Controller

Software

  • LabVIEW
  • LabVIEW Real-Time Module
  • LabVIEW FPGA Module

Driver

  • NI-RIO

  • I would like to use the USER1 button that is available on some CompactRIOs (cRIO) and CompactDAQs (cDAQ). How can I read its value in LabVIEW?
  • Can I read the USER1 button value in Scan Engine mode on the RT?

Due to the architecture differences between cRIO and cDAQ, the way to read in the USER1 button value is slightly different depending on which one you want to read.

 

CompactDAQ

You can use the system hardware property node from the NI System Configuration API to read the state of the USER1 button. One indicator from the array will be representing value of USER1 button. Some cDAQ devices will need additional code to access USER button and LED states.



 

CompactRIO 

On cRIOs, the USER1 button value is available only directly from FPGA. You have to choose FPGA interface when adding cRIO to your project and you will be able to read it.