- It is relatively simple
- It generates and processes simulated data (so you can play with it without hardware)
- It has worked cleanly and easily the first time
This Single Control Loop example is useful for robots that do relatively simple, repetitive algorithms. Insert code for acquiring and processing sensor data and controlling the robot inside this Timed Loop. The Functions>>Robotics palette contains useful robotics-related VIs and functions.
This Timed Loop controls timing and is configured to run at 10 Hz. However, all processing must execute fast enough to keep up with this loop rate. The Previous Iteration Finished Late? Boolean returns TRUE if the contents of the loop does not finish fast enough for the current configuration of the Timed Loop. If this occurs, consider slowing the loop rate or optimizing the contents of the loop.
If you do not need a fixed loop rate and want this loop to run as fast as possible, right-click the loop border and select Replace with While Loop.
The Block Diagram:
The Project Explorer: