Main Content

Read Parameter

Read PX4 system parameters

  • Library:
  • UAV Toolbox Support Package for PX4 Autopilots

Description

The Read Parameter block reads the specified PX4 system parameter, and provides its value as output.

The block supports all parameters listed in PX4 Parameter Reference page. You can also use custom parameters that you have developed using the guidelines.

Ports

Output

expand all

Value of the specified PX4 system parameter

Data Types: int32 | float

The Status output indicates if the parameter that you specified is valid or not. A value of 0 indicates that the parameter handle is valid, and a value of 1 indicates that the parameter handle is invalid.

Data Types: Boolean

Parameters

expand all

Enter the name of the PX4 system parameter.

Note

The Parameter Name that you enter in this field must match one of the PX4 parameters; otherwise, the Status port outputs 1, indicating that the parameter handle is invalid.

Select the data type of the parameter that you entered in the Parameter Name field.

Note

If the Data type that you select in this field does not match the actual data type of the PX4 parameter, the values read may not make sense due to data type mismatch.

Enter the time interval at which the block reads values from the uORB network.

When you set this parameter to -1, Simulink® determines the best sample time for the block based on the block context within the model.

See Also

Introduced in R2018b