Create MODBUS object
m = modbus(
constructs a MODBUS object, Transport
,DeviceAddress
)m
, over the transport type
Transport
using the specified
'DeviceAddress'
. When the transport is
'tcpip'
, DeviceAddress
must be
specified as the second argument. DeviceAddress
is the IP
address or host name of the MODBUS server.
m = modbus(
additionally specifies Transport
,DeviceAddress
,Port
)Port
. When the transport is
'tcpip'
, DeviceAddress
must be
specified. Port
is the remote port used by the MODBUS server.
Port is optional, and it defaults to 502, which is the reserved port for
MODBUS.
m = modbus(
specifies
additional options with one or more name-value pair arguments using any of the
previous syntaxes. For example, you can specify a timeout value. The
Transport
,DeviceAddress
,Name,Value
) Timeout
property specifies the waiting time to complete
read and write operations in seconds, and the default is
10
.
m = modbus(
specifies additional options with one or more name-value pair arguments using
any of the previous syntaxes. For example, you can specify
Transport
,'Port'
,Name,Value
)NumRetries
, the number of retries to perform if there is
no reply from the server after a timeout.