PX4 CAN Transmit
R2026bLibraries:
UAV Toolbox Support Package for PX4 Autopilots /
PX4 Utility Blocks
Description
Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.
The PX4 CAN Transmit block transmits message to a Controller Area Network (CAN) network by using the PX4 Autopilot CAN port.
Specify the message type and its properties using the block parameters dialog box.
If you simulate a model that contains the PX4 CAN Transmit block without connecting the hardware, the block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation (Simulink).
During Connected I/O simulation, this block writes data to the peripherals of the hardware.
Note
To avoid conflict with PX4 UAVCAN, disable UAVCAN before working with PX4 CAN
blocks. To disable, set the PX4 parameter, UAVCAN_ENABLE to 0. For more
information, see Finding/Updating Parameters.
Ports
Input
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"px4Utilslib/Read Parameter"
Example: add_block("px4Utilslib/Read Parameter","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2022b
