noam76

Readme.me

May 13th, 2023
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. config.php: Contains the database configuration and connection using PDO.
  2. modbus.php: Connects to the Modbus IP device and reads registers.
  3. save_data.php: Saves the data to the "data_storage" table at the user-defined interval.
  4. display_data.php: Displays the data in a table on the website at the user-defined interval.
  5. graph.php: Displays a graph of the selected registers using Chart.js.
  6. fetch_data.php: Fetches data from the "data_storage" table for use in the graph.
  7. export_excel.php: Exports the data from the "data_storage" table to an Excel file based on the user's chosen date and time.
  8. Please note that you'll need to create the "data_storage" table in your MySQL database and adjust the code according to your specific requirements. Additionally, you may need to create HTML forms and handle user input for some of the files, such as save_data.php, display_data.php, and export_excel.php.
  9. Also, don't forget to install the required libraries using Composer:
  10. "phpmodbus" library for modbus.php
  11. "phpoffice/phpspreadsheet" library for export_excel.php
  12. Once you have set up the files and made any necessary adjustments, you should have a working system to read Modbus IP device data, save it to a database, display it in a table and a graph, and export it to an Excel file.
Advertisement
Add Comment
Please, Sign In to add comment