Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / Modbus 2D Vector Action
Knowledge base

Modbus 2D Vector Action

Modbus2DVectorAction maps gamepad 2D analog input to two holding-register channels on a direct ModbusThing. Use it for rover, pan/tilt, servo, motor, PWM, or joystick-driven hardware control.

Map joystick axes to Modbus registers

The action listens for GamePadStateChangedEvent from a selected gamepad ID, converts X and Y axis values from the gamepad range into configured min/mid/max register values, and writes target values into the direct ModbusThing register buffer.

X

X axis

Map horizontal movement to steering, pan, or another output channel.

Y

Y axis

Map vertical movement to throttle, tilt, forward/backward, or lift control.

DZ

Dead zone

Use stop threshold to prevent joystick drift from moving hardware.

Real-time remote hardware control

DRV

Rover or pan/tilt control

Map X to steering or pan and Y to throttle, tilt, or forward/backward control.

PWM

PWM or servo output

Use ranges such as 1000;1500;2000 to convert joystick values into controller register values.

ONE

One-axis control

Set the unused axis index to -1 when only throttle, steering, pan, or tilt should be controlled.

REV

Direction correction

Use reverse flags when physical motion is opposite to the operator's expected direction.

Test unloaded first: start with conservative min/mid/max values and test with the device unloaded. Expand the range gradually until movement is smooth and safe.

Configuration parameters

ParameterRequiredDescriptionDefault
Modbus
YesTarget direct ModbusThing whose writable registers receive axis outputs.None
Gamepad
YesIdentifier of the gamepad that should control this action.None
Stop threshold
YesDead-zone threshold used to suppress joystick drift.0.1
X axis settings
OptionalAxis index, min/mid/max range, output register index, and reverse flag for X.1000;1500;2000
Y axis settings
OptionalAxis index, min/mid/max range, min/mid/max threshold, output register index, reverse flag, and one-sided mode.1400;1500;1600

Operational notes

SRC

Gamepad event source required

Gamepad State Controller or an equivalent event source must be running and producing GamePadStateChangedEvent.

DIR

Direct Modbus target

The action targets ModbusThing, not ModbusLineThing. Output indexes are direct device writable register indexes.

STOP

Add a neutral action

Combine this action with a separate stop or neutral register action so operators can explicitly return outputs to a safe value.

Related remote control pages

Related tasks and pages