Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean LED with NULL using an Xcontrol

In some situations the default LabVIEW data types have limitations in that they do not support a NULL data type. For instance the boolean control have 2 states on/off. But there might be a third state (i.e. not assigned / NULL).

By using an XControl and the Execution State event the attached code demonstrate a boolean LED that when executed but not assigned is yellow. After the first data value is assigned the LED will either be green or red depending on that value being true or false.

After this the boolean will execute as a normal boolean control, until the program is stopped and LabVIEW goes back to edit mode.

Examples:

Program when first started (no value assigned):

Community_pic1.PNG

Program when boolean is set as true and false.

NI_Community2.png

Program after finished execution (goes back to unassigned state):

ni_community_3.PNG

Edit: Updated the code to fix dependency conflict.

Download All
Comments
sccompu
Member
Member
on

Hello, file "XControl1.xctl" is missing.

A.Rohde
Active Participant
Active Participant
on

Hi Sccompu

Please see corrected version, v3. Sorry for the troubles.

Best Regards

Anders Rohde

A.Rohde
Active Participant
Active Participant
on

Duplicate

NickC9
Member
Member
on

I need this in Labview 2011, Pl can any one help me.

A.Rohde
Active Participant
Active Participant
on

Hi Nick. I've uploaded a 2011 version.

Best Regards

Anders Rohde

NickC9
Member
Member
on

Hi Anders Rohde, Thank you.

Here, In my application I am evaluating data with some limits from the can message.

Based on the evaluation it giving result Pass with Green and Fail with Red color.

But by default it is showing Fail with Red color before running application.

My intention is result should be in "Not tested" mode with some other color.

Could you please suggest how to do it?

Capture.PNG

A.Rohde
Active Participant
Active Participant
on

Hi Nick

My CustomLED has the purpose of exactly what you need. Basically you should be able just to replace the VB monitor 9V with my CustomLED.xctl from my sample project. Just copy paste my custom LED and you should see it working.

I have encapsulated all the information so you should need anything else than to include the custom control in your program and wire the boolean wire to it.

If you have issues try to implement it and send me a screenshot of how you tried.

Best Regards

Anders Rohde

Contributors