Modbus.Rtu.Master (baud v0.5.6)
RTU module.
Link to this section Summary
Link to this section Functions
Link to this function
exec(pid, cmd, timeout \\ 800)
Link to this function
start_link(params)
Starts the RTU server.
params must contain a keyword list to be merged with the following defaults:
[
device: nil, #serial port name: "COM1", "/dev/ttyUSB0", "/dev/tty.usbserial-FTYHQD9MA"
speed: 9600, #either 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
#win32 adds 14400, 128000, 256000
config: "8N1", #either "8N1", "7E1", "7O1"
]opts is optional and is passed verbatim to GenServer.
Returns {:ok, pid}.
Example
Rtu.start_link(device: "COM8")
Link to this function
stop(pid)
Stops the RTU server.
Returns :ok.