Controlling Hardware

This tutorial show you how to control external hardware. It is combined with a simulation so that you can observe both the real system and the simulated system at the same time.

Background

An electromagnet can be used to lift a steel ball. This is used in many applications. In most cases the goal is to lift metal objects. In this case we want to hold the ball at a fixed distance from the magnet. As it turns out this situation is not stable. While you can find a current that will hold the ball against the pull of gravity any small movement of the ball will cause it either to fall or to attach itself to the magnet. For that reason we need to sense the position of the ball and use a feedback control system to keep its position.

Click on a link to learn more.

Setting up the hardware

The hardware consists of a steel ball, an electromagnet, a Hall sensor and interface electronics.

Click on a link to learn more.

Input and output

A Labjack U3 USB box is used for input and output. Measurements from the Hall sensor come in using the A/D converter and outputs use the D/A converter.

More information on Labjack products can be found at www.labjack.com

Click on a link to learn more.

Implementing the controller

The controller is built into the Labjack data source plugin.

Click on a link to learn more.

Simulation

A close loop simulation is implemented in DSim. You can send it a command to synchronize with the real system and see how it works!

Click on a link to learn more.