Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Connect to the Modbus IP device
- require_once 'connect_modbus.php';
- $modbus = connect_modbus('192.168.1.1', 502);
- // Read online registers
- require_once 'read_registers.php';
- $registers = read_registers($modbus, 0, 10);
- // Store the data in the MySQL table
- require_once 'store_data.php';
- store_data($registers);
- // Display the data in a table on the web page
- require_once 'display_data.php';
- display_data();
- // Close the Modbus connection
- $modbus->disconnect();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement