Acromag’s Modbus C Library software greatly simplifies development of programs to interface with Acromag’s BusWorks® and EtherStax® Ethernet I/O products. The library also supports any standard Ethernet Modbus slave device that communicates via Modbus TCP/IP or UDP/IP protocol. This utility is ideal for developers that are unfamiliar with Modbus protocol or the framing of TCP/IP or UDP/IP messages. The C library makes programming easy and portable by simply linking user code with the provided function calls (below). Most function calls require passing only a few parameters such as the IP address, Modbus register address, and register count. Codes | Functions 01 (01H) | Read Coil (Output) Status 02 (02H) | Read Input Status 03 (03H) | Read Holding Registers 04 (04H) | Read Input Registers 05 (05H) | Force Single Coil (Output) 06 (06H) | Preset Single Register 15 (0FH) | Force Multiple Coils (Outputs) 16 (10H) | Preset Multiple Registers 17 (11H) | Report Slave ID
Example ProgramThe included example program is menu-driven to help users build Modbus TCP/IP and UDP/IP commands. Menu selections let users configure, read, and write Ethernet I/O slave devices such as Acromag’s BusWorks and EtherStax products. Users may also leverage this demonstration application into a tool for configuration or test by supplying commands and/or data values in the form of a text file. The program will execute each command in the text file as if it had been typed from the console terminal.
Showing all 4 results