How to show a PDF document on a Siemens Comfort Panel HMI


Dear PLC Technical members,

Welcome to our followers on the Blog PLC Technical, today in this article I will show you step-by-step directions to show a PDF document with Siemens Comfort Panel HMI /Advanced programming PDF View Control.

PDF document on a Siemens Comfort Panel HMI

I. How to show a PDF document on a Siemens Comfort Panel HMI

Today in this part I'm going to show you how to integrate the PDF view object into your siemens comfort panel HMI so that you can view and navigate PDF files run time you know on your Siemens HMI, so the first thing that I'm going to do is I'm going to switch to my demo screen here, and then I'm going to need to locate the PDF view object within the toolbox, and then in the controls' area, you will find the PDF view object.

So what I'm going to do is I'm going to place the PDF view object on the screen and this is going to be the tool like it's used for displaying the actual PDF files now the first thing that you need to configure in the PDF view would be the media area.

You can specify a predefined path you know for our predefined filename that you're going to display or you can specify a string tag that you can dynamically control which PDF file would be displayed in the viewer.

What I'm going to do is put in a predefined path which is going to be a storage card SD slash HMI info dot PDF and so the storage card SD in the path to the SD card slot on the Siemens HMI, this could be a USB stick path as well as a network drive, but I'm using SD card and then displaying the file info dot PDF.

The next thing that I'm going to do is I'm going to put some buttons on the screen that will allow me to navigate or control the PDF view object during runtime so the first thing I do in my toolbox under elements I'm going to take a button object and I'm going to draw that out onto the screen what I will do is copy and paste it will line that up here and then I'm going to take one more of these buttons here but I'm going to position it over on the far left-hand side ok.

Make this just a little smaller little narrower here than what I'm going to do is copy and paste this button will line this up and this last one I'll just move over here a little it's going to use some alignment commands here but I'll select all these buttons here but I'll evenly distribute them across the button ok, and I'll need one more button, so I'll just do a copy and paste that I'm going to use this up here in the upper left-hand corner what I'll do is I'll start configuring these pushbuttons then for controlling the PDF file.

So I'll start over here on the right-hand side the first one is going to be the first page the next one is going to be for the previous page control then I will do a scroll up.

The next one will be scroll down and then I will do the next page and I will do the last page, on the far left-hand side in the lower left-hand corner I will do a button for doing a left scroll I'll do a button for right scroll then I will do a fit width and I will do a fit height and I will do zoom in will do zoom out and I will do zoom 100%, and so I'll just do zoom 1:1 there I will also need a button up here that is going to be my go-to page and make that button just a little wider here.

So I guess I'll start on the upper left-hand corner here and I'll go to the events area and then for a press event what I will do is I will do a PDF you know to go to the PDF go to the page and then one of the parameters here is going to be the screen object so this is going to be the actual PDF view and then I've gotten the specific page number or I can enter a variable here which I will say is going to be an HMI tag and I'll just drag over the page number tag over here so now that button yeah well when I press it will take whatever numbers are this aisle field and go to that specific page.

In the upper right-hand corner, I will configure the first-page button so that is going to be my PDF go to the first page then I will do a PDF and go to the previous page, and then here I will do the PDF scroll up for this now I will do PDF scroll down then I have PDF go to the next page and then I can do PDF.

So all these buttons are configured on the side on the far left-hand side I will do PDF scroll left and then I will do PDF you have to scroll right and this button here is going to be PDF fit with and I'm taking advantage of the total sense features PDF fit height then I'll do the PDF and I believe it's called zoom in PDF zoom out and finally, I will do PDF zoom original which is the 100% ok.

So now all of my buttons have been configured so what I will do is highlight my HMI and I will start the simulation this will bring up the runtime environment, when I go to my demo screen you can see that a PDF file shows up so what I can do is go to the PDF next page I can go the previous page I can go to the first page etc…

If I want to go to a specific page like maybe page there I can enter that in my oi filed press go to a page button and it will take me to page three so this is a quick example of how you can use the PDF view object to display PDF files.






From here we have finished the subject today if you like it please share it with friends until it benefits, and then meet on a new topic on PLC Technical blog.

Regards,
PLC Technical

Post a Comment

Post a Comment (0)

Previous Post Next Post