diff --git a/Home.md b/Home.md index 5d08b7b..0e04418 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,52 @@ -Welcome to the Wiki. \ No newline at end of file +# 1. Requirements +| Requirement| Comment | Link | +| --- | --- | --- | +| Python | 3.14 or latest| [Download](https://www.python.org/downloads/) | +| Power BI Desktop | | [Download ](https://www.microsoft.com/en-us/power-platform/products/power-bi/desktop) | +| OPCUA python library | Installed via command line | [Instructions](#2-install-python-libraries) | +| Pandas python library | Installed via command line | [Instructions](#2-install-python-libraries) | + +# 2. Install python libraries +After installing python, open command line or terminal windows and run the following command: + +`python -m pip install opcua pandas` + +# 3. Setup python in Power BI +After installing python and Power BI desktop, open Power BI and click the following menus: +File - Options and settings - Options + +![emtpy](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Setup_01.png) + +A window will popup. Select 'Python Scripting' on the left tab and make sure there is a Python Home directory selected so Power BI can run python scripts + +![emtpy](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Setup_02.png) + +# 4. Refresh data +1. Open Report with Power BI desktop +2. Connect PC to PLC network and make sure network settings are correct and you can connect to all PLC's +3. Press Refresh button +![](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Refresh_01.png) + +Power BI will run a python script that will connect to all PLC's and collect tracking data. This can take a minute or so. When finished, the report will update with the new data. Make sure to save the report to keep the latest date. +On top of the report the last update date and time will be set to current. + +# 5. Add remove PLC's +1. Open Power BI report +2. Open power query + +![emtpy](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Python_01.png) + +3. Open df Source + +![emtpy](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Python_02.png) + +4. Edit python script + +![emtpy](https://giteakaput.duckdns.org/Docs/PBI_Reports/raw/branch/main/Assets/Wiki/PBI_Python_03.png) + +5. Change plcs variable according to project details + + + + + \ No newline at end of file