Makers Blog
177 views 0 comments

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:

  1. 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/
  1. Call the script in the PLCnext Engineer program instead of executing the Python script.

Picture3

  1. Create a button in the eHMI and add the following action:

Picture4

The pdf file opens now in your webbrowser. Printing is also available here.

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users