From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you turn on an LED based on an event in LabWindows/CVI?

I don't understand which function is used to control the state of the LED.
0 Kudos
Message 1 of 4
(3,494 Views)
//Turn on
SetCtrlVal(hPanel, hLedCtrl, 1);

//Turn off
SetCtrlVal(hPanel, hLedCtrl, 0);
Message 2 of 4
(3,494 Views)
Thank you. I was getting a compile error in my .h file saying that SetCtrlVal was already declared. I didn't understand this until I looked into the userint.h file and saw it was already declared there.
0 Kudos
Message 3 of 4
(3,494 Views)
you're welcome.

One quick way to see if a function is a CVI one, is to first write only the name of the function, and while the cursor is on it press CTRL+P.

This will recall the function panel help if it is a cvi one, or it will tell you that it cannot recoginized the functions.

Best regards.
0 Kudos
Message 4 of 4
(3,494 Views)