beautypg.com

B&B Electronics MODSCAN32 - Manual User Manual

Page 76

background image

76

could be the result of the user application making an invalid request, (such as
setting the Length Property > 128), or as the result of a communications error
with the designated MODBUS slave device.

WriteStatus

This status property is set by the control to indicate the results of the last write
command issued from the control. The WriteStatus may indicate an error
condition occurring as the result of an invalid write command, (such as
attempting to write an index beyond the length of the data array), or as a result
of an error returned from the designated slave device. Normally, the
WriteStatus will be set to WRITE_PENDING, (310), after the user code
modifies a data value. After the results of the message transaction are
returned from the slave device, WriteStatus will reflect any errors which may
have occurred. A value of zero indicates successful implementation of the last
write command.

InhibitReadAfterWrite

This boolean property determines how modbus data is refreshed to the control
after a Write operation. Data accessible to your application is maintained
local to the control and only updated from the modbus slave device in
response to an Update() method. Issuing a Write command to the slave can
cause the data contained within the control to be out of sync with newly
written data in the remote device, necessitating a read request, (Update()
method), to refresh the control’s data. The default setting of this property to
FALSE allows the control to automatically issue an Update() to refresh the
value of the data array immediately after the completion of a Write command.
Setting the value of this property to TRUE, bypasses this extra Update()
causing the data to only be refreshed under user control.

Additional properties are defined which allow the control to access data from a remote machine connected
via a compatible network.

IPAddr1 . . . 4

These four properties allow the controlling application to configure the control
to access MODBUS data via the internet protocol using modbus/TCP. The
IPAddr properties define the IP Address of the corresponding modbus/TCP
server application residing on the machine connected to the MODBUS slave
device of interest. If configured for remote operation, all other control
properties operate the same as if the MODBUS device were attached via a
local COM port. An Update(), Coil(), Register(), or Float(), operation will
initiate the request to the designated remote machine rather than the local
machine.

UseNetwork

If TRUE, the control will attempt to access data across the network using the
specified IP address of the server. If False, the control will attempt a direct or
TAPI connection as specified by the Modbuss.Port property.