# How to use "FMU PWM OUT" and "I/O PWM OUT" simultaneously on PX4 board

**URL:** <https://discuss.px4.io/t/how-to-use-fmu-pwm-out-and-i-o-pwm-out-simultaneously-on-px4-board/34251>\
**Category:** PX4 Autopilot\
**Created:** [September 11, 2023, 10:29am UTC](https://discuss.px4.io/t/how-to-use-fmu-pwm-out-and-i-o-pwm-out-simultaneously-on-px4-board/34251 "2023-09-11T10:29:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![serkan](https://discuss.px4.io/user_avatar/discuss.px4.io/serkan/32/15385_2.png) [@serkan](https://discuss.px4.io/u/serkan)\
**Post date:** [September 11, 2023, 10:29am UTC](https://discuss.px4.io/t/how-to-use-fmu-pwm-out-and-i-o-pwm-out-simultaneously-on-px4-board/34251/1 "2023-09-11T10:29:52Z")

</div>

Hello, I control the drone’s motors using the FMU PWM OUT port on the PX4 board. How can I give PWM output using the IO PWM OUT part while the FMU PWM OUT part is working?  
My purpose: I want to control 3 more motors besides the motors required for the drone to fly

---

<div class="post-metadata">

**Author:** ![serkan](https://discuss.px4.io/user_avatar/discuss.px4.io/serkan/32/15385_2.png) [@serkan](https://discuss.px4.io/u/serkan)\
**Post date:** [January 6, 2024, 8:54am UTC](https://discuss.px4.io/t/how-to-use-fmu-pwm-out-and-i-o-pwm-out-simultaneously-on-px4-board/34251/2 "2024-01-06T08:54:59Z")

</div>

While sending data on the ROS2 side, I enabled the desired motor to run by using the ‘VehicleCommand::VEHICLE\_CMD\_ACTUATOR\_TEST’ command in test mode.

```auto
#define OFFSET_ACTUATOR_SET_1 (301.00f)
#define OFFSET_ACTUATOR_SET_2 (302.00f)
#define OFFSET_ACTUATOR_SET_3 (303.00f)
#define OFFSET_ACTUATOR_SET_4 (304.00f)
#define OFFSET_ACTUATOR_SET_5 (305.00f)
#define OFFSET_ACTUATOR_SET_6 (306.00f)

#define MC_MOTOR_1 (101.00f)
#define MC_MOTOR_2 (102.00f)
#define MC_MOTOR_3 (103.00f)
#define MC_MOTOR_4 (104.00f)

```

```auto
publishVehicleCommand(uint16_t command, float param1, float param2, float param5, uint8_t system){
	VehicleCommand msg{};
	msg.param1 = param1;
	msg.param2 = param2;
    msg.param5 = ((system == 255) ? 1000.00f + param5 : param5);
	msg.command = command;
	msg.target_system = 1;
	msg.target_component = 1;
	msg.source_system = system;
	msg.source_component = 1;
	msg.from_external = true;
	msg.timestamp = this->get_clock()->now().nanoseconds() / 1000;
	pub.vehicle_command->publish(msg);
}

```

```auto
publishVehicleCommand(VehicleCommand::VEHICLE_CMD_ACTUATOR_TEST, joy.axes.x, 1.00f, MC_MOTOR_1, 255);

```
