Telegraf modbus plugin serial port connection problem

Hello.

I’m test telegraf with modbus rtu in windows.
but there is error code in windows command.
usb port number is com7.

error message
2021-10-21T06:04:20Z E! [inputs.modbus] Error in plugin: The system cannot find the path specified.

This is modbus.conf

[[inputs.modbus]]
name = “witmotion”
slave_id = 80
timeout = “1s”
controller = “file:///dev/ttyUSB07”
baud_rate = 9600
data_bits = 8
parity = “N”
stop_bits = 1
transmission_mode = “RTU”
holding_registers = [
{ name = “angle_x”, byte_order = “AB”, data_type = “UINT16”, scale=0.1, address = [61]},
{ name = “angle_y”, byte_order = “AB”, data_type = “UINT16”, scale=0.1, address = [62]},
{ name = “angle_z”, byte_order = “AB”, data_type = “UINT16”, scale=0.1, address = [63]},
{ name = “temperature”, byte_order = “AB”, data_type = “UINT16”, scale=0.01, address = [64]},
]

In windows the COM-Ports are named differently. In your example you do have a Unix/Linux path. Maybe try controller = “file:///com7"?

1 Like

It was solved thanks to you.