beautypg.com

B&B Electronics MODSCAN32 - Manual User Manual

Page 91

background image

91

Events

The Modbus_slave Control posts the following events to the controlling application:

DataWrittenFromMaster

The DataWrittenFromMaster Event signifies that a block of data
maintained by the control has been modified via the modbus connection.
The handle of the effected data block is returned as a parameter with this
event. The controlling application should compare the returned value
with it’s list of defined data blocks to determine which range of addresses
have been written.

TCPConnectionFail

The TCPConnectionFail event is posted to the controlling application if
the modbus/TCP service port fails during initialization. Opening the
modbus/TCP service port is an asynchronous operation. The value
returned from ConnectTCP reflects the handle to be used in referencing
the connection, however the port has not been completely opened upon
return from the ConnectTCP() method. The controlling application
should monitor the TCPConnectionFail event and attempt to retry the
ConnectTCP method if it occurs.