The following API calls are supported by both the 16-bit Modbus Master Dll and the Win32 Master Dll. The 32-bit version uses a separate thread to handle COM notification events so the last two calls, (ProcessCommNotification() and ProcessTimerNotification()), are not required.
Opens a communications port to the specified baud rate, parity, & protocol. The dll is configured for Modbus RTU Transmission mode.
Opens a communications port to the specified baud rate, parity, & protocol. The dll is configured for Modbus ASCII Transmission mode.
The controlling application supplies an HWND & WMSG as parameters. Modbus.dll uses this information to notify the application whenever the results of the last modbus message transaction are available.
Used by the controlling application to read one or more modbus data points. The application specifies the point type, slave address, point address and number of points to read. The dll polls the device and sends a WMSG to HWND whenever the response data is available. The app can then read the data into an array via the ReadResponse(...) function.
Used by the controlling application to write one or more modbus data points. The app passes the data to be written as an array or words. The dll notifies the app, (via the WMSG), when the message transaction is completed.
Used by the controlling application to obtain the results of the last message transaction.
Closes the connection.
Two additional API calls are required for the 16-bit dll. These are used by the controlling application to pass control to the dll upon receipt of the Windows Comm Notification and Timer messages.
Last Updated: November 27, 1997