How to set Payload Parameters for the 'PARAM_SET' and 'PARAM_REQUEST_READ' MAVLink message blocks
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I am having issues trying to set a specific parameter using the MAVLink Blank Message block ('PARAM_SET') in Simulink and reading that parameter using the MAVLink Deserializer block ('PARAM_VALUE'). I am currently communicating with PX4.
Any assistance with this would be much appreciated.
댓글 수: 1
답변 (1개)
Swastik Sarkar
2024년 8월 30일
편집: Swastik Sarkar
2024년 8월 30일
Recreating the Simulink model is essential for diagnosing and resolving issues related to hardware interaction and parameter settings. The absence of necessary hardware affects the ability to fully replicate the model. Consequently, some lines remain unconnected in the attached Simulink model, allowing for direct connection of the serial communication blocks.
It appears that the model attempts to set a parameter using the PARAM_SET message block and retrieve the onboard parameter value. The PARAM_SET block will send an acknowledgment as a PARAM_VALUE message. Ensure that the correct system and component IDs are being listened to, as specified in the PARAM_SET. If new messages do not appear on the PARAM_VALUE block, reducing the simulation speed to improve interaction with the hardware I/O may be necessary. This can be achieved using the Run with I/O simulation mode after connecting the I/O. Additionally, incorporating a delay in the system design to allow for a pause before continuing execution might be required. Refer to below example to properly configure the model for execution:
For more information on Run with I/O simulation in Simulink:
If the attached model does not function as intended, consider sharing the Simulink model to facilitate issue reproduction and resolution.
To obtain the onboard parameter value, utilize the PARAM_REQUEST_READ message, which will transmit the data as a PARAM_VALUE message to the listener.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!