Simulink libraries perform complex functions and augment the capabilities of the Simulink software.  With libraries like the Aerospace Blockset, complex tasks (like creating a 6 dof simulator)  are greatly simplified.  As an exercise I started what I am calling the Autopilot Blockset.  The purpose of this library is to hold the blocks that connect the control system blocks to the hardware blocks.  Although right now the library might better be called the hardware servo library, the plan is to expand the library with blocks for telemetry packets and AHRS communication.

Autopilot_Library

Currently the library contains just the Servo block.  This block converts the angles used by a control system into a signal the hardware can use to command the physical servo.  In testing the block was used to smoothly command a servo through a 180 degree sweep using the below model.

ServoSweep

The servo block is configured through a menu that is shown by double-clicking on the servo block.  The angle commanded by the user will be the angle of the surface it is connected to if the pulse length limits and their angles are properly configured.  In a simple example the servo arm can be setup as the controlled surface by setting the limit angles to 90 and -90.  Regardless of the commanded angle the servo will not be commanded beyond the pulse length limits.  Because of this, an actual angle output is made available which provides the actual commanded position taking into account any truncation due to limits.