O'Reilly logo

LabVIEW Graphical Programming Cookbook by Yik Yang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a C-based DLL

Codes can be shared through DLL. There are many DLL built-in to the window operating system. In this example, we will demonstrate how to access the built-in DLL for Windows.

How to do it...

We will create a program that can access C-based DLL in a loop:

  1. Build the following block diagram. It has two loops. The top loop contains a case structure that executes the GetSystemPowerStatus function within the kernel32.dll. The bottom loop executes the Beep function within kernel32.dll with frequency and duration input set to 100 ms.
    How to do it...
  2. The input cluster for the GetSystemPowerStatus function is shown in the following screenshot:
  3. The False case ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required