Engee documentation

Ardupilot RX

Page in progress.

Receiving PWM signals from the autopilot.

blockType: EngeeFunction

Path in the library:

/Interfaces/Ardupilot/Ardupilot RX

Description

To work with the block, install/update the support package. equipment.

Block Ardupilot RX It receives the autopilot’s PWM signals via a UDP bridge created by the block Ardupilot Setup (the descriptor is fed to the input conn), and outputs them as a vector.

Ardupilot SITL sends to Engee frame from 16 or 32 PWM values; the block takes the first ones from it Количество принимаемых ШИМ-сигналов: values and outputs them as a vector of servos. These values usually correspond to the motor control signals, and after scaling, they are fed to the drive model.

The exchange is synchronized (lockstep): the block waits for a PWM frame no longer than specified by the parameter Таймаут ожидания ШИМ-сигналов:. If no frame has arrived during this time, the block stops the simulation with an error. ArduPilot lockstep timed out waiting for PWM — this usually means that the Ardupilot SITL is not running or is not sending data to the port. 9002.

When the simulation is completed, the connection is closed automatically.

Ports

Input

# conn — connection descriptor
scalar

Details
Data types

Float64

Complex numbers support

No

Output

# servos — Autopilot PWM signals
vector

Details
Data types

Float64

Complex numbers support

No

Parameters

Параметры моделирования

# Количество принимаемых ШИМ-сигналов: — the number of signals issued by the unit

Details
Default value

4

Program usage name

m_pwm_cnt

Tunable

No

Evaluatable

Yes

# Таймаут ожидания ШИМ-сигналов: — maximum frame waiting time

Details
Default value

5.0

Program usage name

m_timeout_pwm

Tunable

No

Evaluatable

Yes

# Шаг расчёта, с: — block calculation step

Details
Default value

-1

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes