In my last post I explained how to create a PDF file with Python. If you want to open the PDF file via the built-in eHMI, here are the steps:
- Create a shell script "pdf.sh" with the following content and copy it in the /opt/plcnext folder of the PLC.
> python3 PDF_Report.py
> cp Report.pdf /opt/plcnext/projects/PCWE/Services/Ehmi/ehmi/
- Call the script in the PLCnext Engineer program instead of executing the Python script.
- Create a button in the eHMI and add the following action:
The pdf file opens now in your webbrowser. Printing is also available here.
Leave a Reply
You must be logged in to post a comment.