Archive for the ‘example’ Category

If a new application or toolkit requires NI hardware drivers, knowing what to do isn’t always clear. You could install an existing driver, which will slow the process and be unnecessary altogether, or you could not include the driver and receive confusing errors and still be at a loss. Wouldn’t it be nice if your system could check the application for the driver upon startup? We thought so too. 


Use this example code to check the application before installation. If no driver is installed, a simple message for download will appear. If a driver is already installed, it will run the main code without you even knowing. 




>> Save yourself the trouble and download the code here.

If you are using multiple monitors, there can be difficulties when moving between systems. This example application can help you make the switch an easy transition. The application first checks your operating system for multiple monitors. Once other monitors are found, a switching button will be visible to you.  All you have to do is click on it and the application will be switched from the primary monitor to your secondary monitor and will automatically center on the screen.




>> Download the code here.

Do you remember the last time you developed a roll of film and received photo negatives with your pictures? Negatives may seem like a thing of the past, but they are actually the master images from which all other copies are made. Even though there has been an evolution away from film, photographers and amateurs still produce negatives from digital images for use in many photo processes.

Now you can create photo negatives with NI LabVIEW software by using one or all of these functions: IMAQ inverse function, IMAQ subtract, or IMAQ ImageToArray. Each will prompt you to upload an image and then LabVIEW will invert the pixel values and display both the original and the negative image. Isn’t it interesting how we can use modern technology to carry out old processes in new ways?


>>To create your own photo negative, download the code here.

Have you ever wondered what your weight would be if you stood on the surface of another planet? Even if this thought has never crossed your mind, I bet you’re curious now! If you stood on the surface of another planet in our solar system your weight would not be the same due to gravity changes and the different masses of each planet. But now you can find out exactly what you would weigh with the!


Enter your “Earthly Weight” and hover your mouse over one of the planets. When you do so, an information box will appear giving you the name of the planet and your approximate weight on its surface. Go ahead, entertain your curiosity.



>>Download the code here.

There is a new NI Community group centered around expanding the new LabVIEW Interface For Arduino (LIFA). This is a toolkit centered around deploying LabVIEW code to Arduinos. I see this new FREE toolkit becoming very popular because it combines the incredible power of graphical design in LabVIEW with the low cost hardware of Arduino. Check out the LabVIEW Interface for Arduino community group for information on how to download the toolkit, setup procedures for the Arduino hardware, and also great getting started examples.


Arduino Block Diagram - No Comments.png

Community member tjellden created an example program to show off the 3D Picture Control capabilities in LabVIEW. If you run the VI, then you can pull back on the joystick with your mouse and the graphic will update with the aircraft's movement. Needless to say I spent 15 minutes playing with the VI to make the plane do barrel rolls and then I dove into the code to figure out how it was done. I highly suggest checking this Flight Simulator In LabVIEW example out if you are interested in more advanced graphics in LabVIEW.