The ability to display PDFs on an HMI is a really useful feature; having machine manuals, hardware manuals, brochures, or work instructions available on a machine can help minimise downtime by ensuring valuable documentation remains with the machine. In this TechTip, we’ll be taking a look at the PDF Reader object available on selected Weintek cMT and cMT X Series HMI. To ensure your HMI supports the PDF Reader object, please check that it is not greyed out on the object menu in EasyBuilder Pro. PDFs are stored on a USB stick or SD Card, for clarity in this example, the PDFs have been placed in a folder on the USB stick called “pdf” and the files are named 1.pdf, 2.pdf etc. There are a a few ways to select the PDF to be viewed on the HMI, and we’ll look at two of them in this TechTip. Firstly, we’ll put a PDF Reader object onto our screen and choose a control word. This occupies 20 words from and including the start address. For this example, we’ll LW 0 for the “Path” and LW 20 for the “Page control” address. PDF Reader object dialogue File Browser Method: To use the file browser, choose “File Browser” from the object menu. Specify the register used for the “Full(folder+filename) address” – use the same as per the PDF Reader Object above. File Browser Object dialogue Place the File Browser as required on the screen. String to Select Method: It’s not always desirable to have users able to navigate around the USB stick using the file browser, so instead, we can select a file using the “Set Word Object, using the “Write constant string” function to write, for example, “pdf/1.pdf” to the Path address of the PDF Reader object. Using a Set Word object to write a string to the PDF reader path registers Page Control Address: If ticked, and specified, the Page control addresses can be used to navigate the pdf – useful if you want bigger buttons than the PDF reader object standard navigation buttons. The first address is the “Current Page“, the second, the “Total Pages“. In our example, we’re using the Set Word object to increment the page and use the “Total Pages” to set the dynamic limit. Decrementing the Page number to a minimum of “1” Incrementing the page number to a maximum of the Page Count As usual, we have a demo project for you to download and try out (this project was developed for a cMT3162X). Please note that the PDF Reader object will only work on a physical HMI, not on online/offline simulation.
For more information on TechTip: Using PDF Reader on Weintek cMT & cMT X Series HMI talk to Lamonde Automation Ltd