ex_modbus v0.1.0 Modbus.Packet

Handle Modbus packet creation and parsing.

Summary

Functions

Parse a ModbusTCP response packet

Read status from a contiguous range of coils. starting_address is 0-indexed

Read status from a contiguous range of discrete inputs. starting_address is 0-indexed

Read the contents of a contiguous block of holding registers. starting_address is 0-indexed

Read the contents of a contiguous block of input registers. start_address is 0-indexed

Write a single coil. Possible values are :on and :off

Functions

parse_response_packet(arg)

Parse a ModbusTCP response packet

read_coils(starting_address, count)

Read status from a contiguous range of coils. starting_address is 0-indexed.

read_discrete_inputs(starting_address, count)

Read status from a contiguous range of discrete inputs. starting_address is 0-indexed.

read_holding_registers(starting_address, count)

Read the contents of a contiguous block of holding registers. starting_address is 0-indexed.

read_input_registers(starting_address, count)

Read the contents of a contiguous block of input registers. start_address is 0-indexed.

write_multiple_registers(starting_address, data)
write_single_coil(starting_address, status)

Write a single coil. Possible values are :on and :off

write_single_register(starting_address, data)