Generic function to create Modbus RTU or TCP context.
Creates a new Modbus RTU context.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(modbus_rtu_type), | intent(out) | :: | modbus |
Modbus RTU type. |
||
character(len=*), | intent(in) | :: | path |
Device path. |
||
integer, | intent(in) | :: | baud_rate |
Baud rate enumerator ( |
||
integer, | intent(in) | :: | byte_size |
Byte size enumerator ( |
||
integer, | intent(in) | :: | parity |
Parity enumerator ( |
||
integer, | intent(in) | :: | stop_bits |
Stop bits enumerator ( |
Creates a new Modbus TCP context.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(modbus_tcp_type), | intent(out) | :: | modbus |
Modbus TCP type. |
||
character(len=*), | intent(in) | :: | address |
IPv4 address. |
||
integer, | intent(in) | :: | port |
Port number. |