Write to standard servo output channels
Simulink Desktop Real-Time
Set the shaft position of a standard servo motor.
To rotate the servo shaft, send values to the block input.
Sending out-of-range values to the block input has the same effect as sending the minimum or maximum input values.
The block input inherits the data type of the upstream block.
Servo Data— Servo data to write to output channels
Servo position (angle). The minimum and maximum values for shaft position vary with the Block input signal (units) argument value:
Block input signal
Minimum Servo Data
Maximum Servo Data
Sample time— Sample time of block
0.1(default) | double
Enter a value, in seconds, that represents how frequently you want the block to execute and interact with the I/O hardware. The block synchronizes your model with the real-time clock at this sample rate.
If you are using a fixed-step solver, enter the value that you entered as the Fixed step size configuration parameter or an integer multiple of that value.
Output channels— Channel vector that selects other output channels
1(default) | vector
Enter a channel vector that selects the other output channels that you are using on this board. The vector can be any valid MATLAB® vector form. For example, to select the first two other output channels, enter:
Block input signal— Units of the block input signal
Select the units of the block input signal that specifies servo position.
Minimum pulse duration— Duration of the control pulse
Select the duration of the control pulse that corresponds to the minimum servo angle. Because not all servos are the same, this parameter lets you calibrate the input signal to the actual servo angle.
Maximum pulse duration— Duration of the control pulse
Select the duration of the control pulse that corresponds to the maximum servo angle. Because not all servos are the same, this parameter lets you calibrate the input signal to the actual servo angle.
Initial value— Specify the value that the channel generates before execution starts
Enter the initial value for each output channel that you entered in the Output channels box.
Final value— Specify the value that the channel generates after execution ends
Enter the final value for each output channel that you entered in the Output channels box.