WinTECH Software
API for Expanded Modbus Master Dll

The expanded version of the Win32 Master Dll supports not only direct serial connections, but also modem connections via the TAPI interface, as well as network connections using the MBAP, (Modbus API for network communications), standard. The basic API for direct serial connections remains the same as previously defined:

ConnectRTU (...)
Opens a communications port to the specified baud rate, parity, & protocol. The dll is configured for Modbus RTU Transmission mode.

ConnectASCII (...)
Opens a communications port to the specified baud rate, parity, & protocol. The dll is configured for Modbus ASCII Transmission mode.

HookRspNotification (...)
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.

PollMODBUS (....)
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.

WriteMODBUS (...)
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.

ReadResponse (...)
Used by the controlling application to obtain the results of the last message transaction.

CloseConnection (...)
Closes the connection.

The following API calls have been added to support modem connections via the Windows TAPI interface:

NumberOfLineDevices (...)
Returns the number of TAPI devices currently installed on your system.

GetLineDeviceName (...)
Returns the name of an installed TAPI device.

DialCall (...)
Establishes a remote connection using the specified phone number.

GetCallState (...)
Allows you to monitor the progress of a call.

AbortTheCall (...)
Allows you to abort a dial attempt.

A single API call is used to establish a network connection to an MBAP compatible server:

ConnectTCP (...)
Attempts a connection to a server at the defined network address.

Additional API calls have also been added to the basic modbus API command set to allow controlling applications access to debugging information and to provide for non-standard modbus messages:

ReadDebugData (...)
Returns byte string of data as transmitted and received via the modbus connection, allowing the controlling application to monitor serial traffic.

WriteUserString (...)
Transmits a serial string of user-defined data.

ReadUserResponse (...)
Returns a serial string of data received in response to WriteUserString().

Last Updated: December 29, 1997
Copyright © 1996,97, WinTECH Software
Backup to MODBUS Driver Page.