-
Notifications
You must be signed in to change notification settings - Fork 4
Server Configuration
Complete guide for configuring servers and registers in Server mode.
Give your server a descriptive name to identify it when running multiple instances:
- Displayed in the top bar
- Saved with configuration files
- Helpful when managing multiple servers
Each server requires a unique network port:
-
Automatic assignment: Modbux automatically assigns the next available port
- First server: 502 (standard Modbus TCP port)
- Additional servers: Next available port (503, 504, etc.)
-
Manual override: You can manually change the port if needed
- Range: 0-65535
- Modbux validates port availability
- Detects conflicts with other Modbux servers and system applications
- Administrator privileges: Ports below 1024 may require elevated permissions on some systems
Run up to 10 independent server instances simultaneously:
- Click the + Icon to add a new server
- Modbux automatically assigns the next available port (you can change it manually if needed)
- Each server maintains its own:
- Port number
- Server name
- Unit ID configurations (248 Unit IDs per server)
- Register configurations
- Switch between servers using the server selector button group
- Delete servers with the Trash Icon
To add an Input or Holding Register:
- Expand the appropriate register type container (Input Registers or Holding Registers)
- Click the Add Register button
- Configure the following parameters:
Address:
- Range: 0-65535
- Must not conflict with existing registers
- Multi-register types automatically allocate consecutive addresses
- Example: A double at address 100 occupies addresses 100-103
Data Type:
- 16-bit types (1 register): int16, uint16
- 32-bit types (2 registers): int32, uint32, float
- 64-bit types (4 registers): int64, uint64, double
Value:
- Static: Fixed value you set manually
- Generator: Dynamic values that change automatically (see Value Generators section below)
Comment:
- Optional descriptive text
- Document register purpose, units, or value ranges
- Helpful when sharing configurations
Endianness (32-bit and 64-bit types only):
- Big Endian (BE): Default, Modbus standard (most significant byte first)
- Little Endian (LE): Less common, for proprietary implementations
Boolean registers (Coils and Discrete Inputs) are added in groups:
- Expand the register type container (Coils or Discrete Inputs)
- Click Add
- Configure:
- Starting address: First bit address (0-65535)
- Count: Number of bits to add (typically 8 or multiples of 8)
- Bits are added with consecutive addresses
This matches how Modbus groups bits into bytes for efficient communication.
Numeric registers:
- Click the Edit Icon (pencil) next to the register
- Modify any parameter: address, data type, value, comment, endianness
- Changes apply immediately
Boolean registers:
- Click directly on the bit value to toggle it
- Changes are instant and visible to connected clients
Individual deletion:
- Click the Trash Icon next to the register
- Register is removed immediately
Batch deletion:
- Click Clear All button in the register container
- Removes all registers of that type for the current Unit ID
- Warning: Cannot be undone
Value generators create dynamic, changing values for realistic simulation. Instead of fixed values, generators produce random values within a specified range at regular intervals.
Use generators to simulate:
- Sensor readings that fluctuate (temperature, pressure, humidity)
- "Realistic" testing scenarios with changing data
When adding or editing a numeric register, select Generator as the value type and configure:
Min Value:
- Minimum value the generator will produce
- Generator creates random values between min and max
- Example: 15 for a temperature sensor with 15°C minimum
Max Value:
- Maximum value the generator will produce
- Must be greater than min value
- Example: 30 for a temperature sensor with 30°C maximum
Interval (seconds):
- How often the value updates
- Range: 1-3600 seconds
- Example: 2 seconds for a temperature sensor that updates every 2 seconds
- Shorter intervals create more realistic simulation but use more CPU
The generator produces a new random value between min and max at each interval. Connected clients see the updated values in real-time.
- Generators start automatically when the register is created
- Values update at the specified interval continuously
- Updates are visible to all connected clients in real-time
- Generators persist across Modbux restarts (settings are saved)
- You can switch a register between Static and Generator at any time
Generators work with all numeric data types:
- Integer types: int16, uint16, int32, uint32, int64, uint64 (whole numbers only)
- Floating point types: float, double (can generate decimal values)
Generators are not supported for boolean registers (Coils, Discrete Inputs) - use direct toggle instead.
Server mode supports 8 numeric data types:
- int16: Signed integer, range -32,768 to 32,767
- uint16: Unsigned integer, range 0 to 65,535
Most common types in Modbus.
- int32: Signed 32-bit integer
- uint32: Unsigned 32-bit integer
- float: IEEE 754 single-precision floating point (~7 decimal digits precision)
- int64: Signed 64-bit integer
- uint64: Unsigned 64-bit integer
- double: IEEE 754 double-precision floating point (~15 decimal digits precision)
Multi-register types (32-bit and 64-bit) can use different byte orders:
- Big Endian (BE): Default, Modbus standard (most significant byte first)
- Little Endian (LE): Less common, for proprietary implementations (least significant byte first)
Toggle the LE indicator when editing a register to switch to Little Endian. For detailed explanation of endianness in Modbus, see Understanding Modbus.
Modbux automatically allocates consecutive addresses for multi-register types:
- Float at address 100: Uses addresses 100 and 101
- Double at address 200: Uses addresses 200-203
- First available address is automatically suggested when adding registers
The system validates that no registers overlap:
- Attempting to add a register at an occupied address displays an error
- Edit operations validate new addresses before applying
- Multi-register types check all required addresses
Multi-register types must fit within the address space:
- Maximum address: 65535
- Invalid example: Double at address 65533 (would need 65533-65536, exceeding limit)
- Modbux prevents these configurations
Click the SAVE button to export your server configuration:
What's saved:
- Server name and port
- All configured Unit IDs with their registers
- Register addresses, data types, and values
- Generator settings (min, max, interval)
- Comments and endianness settings
File format:
- JSON format
- Human-readable and editable
- Can be stored in version control
Use cases:
- Backup configurations before making changes
- Share test scenarios with team members
- Maintain different device simulation profiles
- Version control for configuration management
Click the OPEN button to load a saved configuration:
- Opens file browser to select JSON configuration
- Warning: Replaces current server configuration entirely
- All Unit IDs from the file are loaded
- Useful for quickly switching between test scenarios
- Server Overview - Features and interface overview
- Test with Client mode - Connect and test your server