Development without hardware
Build and test Modbus client applications before physical devices are available. Eliminates hardware dependencies in early development phases.
Virtual Modbus device simulation for industrial testing and development. Create TCP and RTU devices without physical hardware.
Build and test Modbus client applications before physical devices are available. Eliminates hardware dependencies in early development phases.
Create reproducible test scenarios including error conditions, edge cases, and timeout situations that are difficult to trigger with real equipment.
Safe, repeatable environment for teaching industrial protocols. Students practice troubleshooting without risking actual equipment.
Automated regression testing for Modbus systems. Virtual devices enable continuous integration pipelines for industrial software.
Full TCP/IP implementation for Ethernet networks with multiple concurrent client connections.
Serial communication support with automatic CRC calculation and configurable port settings.
All standard Modbus function codes for reading and writing coils, discrete inputs, and registers.
Complete Modbus memory model with configurable sizes and real-time data simulation.
using ULTRAMEGA.Modbus.DTS;
// Create TCP device on port 502
var device = ModbusDeviceFactory.CreateTcpDevice(
deviceId: 1,
port: 502
);
// Set initial values
device.SetHoldingRegister(0, 1234);
device.SetCoil(0, true);
// Start the device
await device.StartAsync();
// Device now responds to Modbus TCP requests
Console.WriteLine("Device running on port 502");
Console.ReadKey();
await device.StopAsync();
// Create RTU device with serial settings
var device = new ModbusRtuDevice(
deviceId: 2,
portName: "COM3",
baudRate: 9600,
parity: Parity.None,
dataBits: 8,
stopBits: StopBits.One
);
// Configure timeouts
device.ResponseTimeout = TimeSpan.FromMilliseconds(500);
// Start the device
await device.StartAsync();
public class TemperatureSimulator : ModbusTcpDevice
{
private Random random = new Random();
public override void SimulateData()
{
// Simulate 10 temperature sensors
for (int i = 0; i < 10; i++)
{
float temp = 20 + (float)(random.NextDouble() * 15);
SetHoldingRegister(i, (ushort)(temp * 10));
// Set alarm if temperature exceeds threshold
SetCoil(i + 100, temp > 30);
}
base.SimulateData();
}
}
Contact us to learn more about Modbus Digital Twin and how it can accelerate your industrial software development.