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 axis
Map horizontal movement to steering, pan, or another output channel.
Y axis
Map vertical movement to throttle, tilt, forward/backward, or lift control.
Dead zone
Use stop threshold to prevent joystick drift from moving hardware.
Real-time remote hardware control
Rover or pan/tilt control
Map X to steering or pan and Y to throttle, tilt, or forward/backward control.
PWM or servo output
Use ranges such as 1000;1500;2000 to convert joystick values into controller register values.
One-axis control
Set the unused axis index to -1 when only throttle, steering, pan, or tilt should be controlled.
Direction correction
Use reverse flags when physical motion is opposite to the operator's expected direction.
Configuration parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
Modbus | Yes | Target direct ModbusThing whose writable registers receive axis outputs. | None |
Gamepad | Yes | Identifier of the gamepad that should control this action. | None |
Stop threshold | Yes | Dead-zone threshold used to suppress joystick drift. | 0.1 |
X axis settings | Optional | Axis index, min/mid/max range, output register index, and reverse flag for X. | 1000;1500;2000 |
Y axis settings | Optional | Axis index, min/mid/max range, min/mid/max threshold, output register index, reverse flag, and one-sided mode. | 1400;1500;1600 |
Operational notes
Gamepad event source required
Gamepad State Controller or an equivalent event source must be running and producing GamePadStateChangedEvent.
Direct Modbus target
The action targets ModbusThing, not ModbusLineThing. Output indexes are direct device writable register indexes.
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.