CAPL Script

xlAcquireLED

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

dword xlAcquireLED(dword ledBitMask);

Function

Acquires the specified LEDs of a hardware device in order to set their operation mode withxlSetLEDafterwards. This function is only supported onVN8900devices. Note that for every successful call ofxlAcquireLEDon a specific LED, you have to callxlReleaseLEDto release this LED again.

Parameters

ledBitMask The LEDs you want to acquire. Note that you can bitwise combine the values to specify multiple LEDs. The following LEDs are available forVN8900devices:

Return Values

0: no error, function succeeded.

!= 0: error, function failed. Check whether your device supports this function and you have an appropriate driver installed on the device.

variables  {
  const dword kLedMaskC1 = 0x008;
  const dword kLedMaskC2 = 0x010;
  const dword kLedMaskC3 = 0x020;
  const dword kLedOrangeOn = 0x00000020;
  const dword kLedOrangeBlinking = 0x00000040;
  dword status;
}
on start  {
  status = xlAcquireLED(kLedMaskC1 | kLedMaskC2 | kLedMaskC3);
  if (status == 0)  {
    xlSetLed(kLedMaskC1 | kLedMaskC2, kLedOrangeOn);
    xlSetLed(kLedMaskC3, kLedOrangeBlinking);
  }
}
on stopMeasurement  {
  if (status == 0)  {
    xlReleaseLED(kLedMaskC1 | kLedMaskC2 | kLedMaskC3);
  }
}