How Do I Access the User LEDs On My Compact FieldPoint or Compact RIO controller?
Primary Software: LabVIEW Modules>>Real-Time Module
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Compact FieldPoint>>Controllers, Compact FieldPoint>>Controllers
Problem: I have a cFP/cRIO controller and I want to use the User LEDs to give status information to the user. For example, I want to indicate that the unit has booted successfully or communication has been established with a host. How can I do this?
Solution: On a cRIO system, User LEDs are accessed from the LabVIEW Real-Time code, not the FPGA.
To create the LabVIEW Real-Time code, target the real-time device in a LabVIEW project. Then create a VI under the real-time target. In the figure below,
UserLED-cRIO and
UserLED-cFP are VIs under the Compact RIO and Compact FieldPoint real-time targets respectively.

Right-click the block diagram and select Real-Time » Real-Time Utilities » RT LEDs VI. To turn the user LED on or off, supply values to the LED Num and State input terminals of the RT LEDs VI. You can also read the current state of the User LED by wiring an indicator to the Led State output terminal of the RT LEDs VI.
User LEDs are labeled A through D on the controller, and are numbered 0 through 3 respectively in software. If the real-time controller has a single LED, its number is 0. Wire a numeric constant to the LED Num terminal that corresponds to the User LED you wish to light. Wire a numeric constant to the State terminal of the RT LEDs VI. Use 0 to turn the LED off, use 1 to turn the LED on. The following code works identically for the cRIO and the cFP. It turns on User LED A.

If you are targeting the cFP system, you can also use a FieldPoint Write VI to turn the User LEDs on or off. Right-click the block diagram and select Measurement I/O » FieldPoint » FP Write (Polymorphic) VI. Create a constant from the FieldPoint IO Point In terminal of the FP Write VI. Select Browse from the constant's drop-down box. In the Select Device section of the FieldPoint Device Selection window, select the cFP controller @0.

From the Select Item section of the FieldPoint Device Selection window, select the desired LED.

Wire a True or False constant to the Values input terminal of the FieldPoint Write VI if you would like to turn the LED On or Off. The following code works only on the cFP. It turns on User LED A.

Related Links: LabVIEW 8.6 Real-Time Module Help: RT LEDs VIKnowledgeBase 4CQADBCY: FieldPoint Status LED Error Indicators
Attachments:
Report Date: 05/01/2007
Last Updated: 08/30/2008
Document ID: 4906NAHY