How-to
Saving an HMI screenshot to USB with EasyBuilder Pro PLC Control
Short answer
In EasyBuilder Pro 6.03.02.463 and later, a PLC Control object with Type set to Screen hardcopy, a Boolean trigger address, a matching trigger mode and Output to set to USB disk saves the chosen window as an image on the HMI's USB drive when the monitored bit meets the trigger condition. The toggle switch only supplies that trigger, so when no file appears, check the address binding, the trigger mode and the USB storage recognition one at a time.

On this page
- What does the PLC Control object actually do?
- Which EasyBuilder Pro build does this procedure apply to?
- How do you configure Screen hardcopy with USB disk output?
- Which Source Window option should you choose?
- How do you connect a toggle switch to the trigger?
- Why does the switch change but no screenshot appear?
- How do you prove the whole capture path works?
- Questions asked
A screenshot of a running Weintek HMI reaches a USB drive through one object: a PLC Control entry with its Type set to Screen hardcopy, a Boolean trigger address, a matching trigger mode and Output to set to USB disk. Any object that can write the trigger bit — a Toggle Switch, a macro or the PLC program — starts the capture, and the HMI renders the window and writes the image itself, so the picture never travels through the PLC. When the switch works but no file appears, the cause sits in one of four places: the trigger address, the trigger mode, the source window or the storage. The steps below configure the object and then check those four points in order.
What does the PLC Control object actually do? #
It binds one runtime action to one Boolean address: while the project runs, the object watches the trigger address, and whenever the configured trigger condition is met it executes — in this case capturing the chosen window and writing the image to the selected output. The name points in one direction only: PLC Control describes where the trigger usually comes from, not where the image goes. The capture command, the source window choice and the destination all live in this single object, which is why every capture fault traces back to its settings or to the storage it writes to. PLC logic is involved only when the PLC owns the trigger bit.
Which EasyBuilder Pro build does this procedure apply to? #
The field names used here come from EasyBuilder Pro 6.03.02.463 and later builds, and the target HMI needs a working USB host port with a drive inserted that the runtime recognizes before the first test. Earlier builds carry the same object but may label the fields differently, so match names against the dialog in front of you rather than a list from another build. Three conditions must hold before any capture: the project compiles and downloads cleanly, the USB drive sits in the HMI's own port, and — where the model provides a storage status display — the runtime lists that drive.
How do you configure Screen hardcopy with USB disk output? #
Open the Object tab, add a PLC Control object, select New, set Type to Screen hardcopy, choose the trigger Address and Trigger mode, pick the Source Window option and set Output to to USB disk. The entry is built in this order:
- Open the
Objecttab and selectPLC Control. - In the
PLC Control Objectdialog, selectNewto add an entry. - Set
TypetoScreen hardcopy. - Under
Address, select the Boolean trigger address the object will watch. - Set
Trigger modeto the condition the operating object will produce. - Under
Source Window, select the capture source — the next section decides which of the three fits. - Set
Output totoUSB disk. - Download the updated project to the HMI so the entry exists at runtime.
Two fields carry most of the failure surface: Address plus its device connection decides whether the trigger is ever seen, and Output to decides where the file lands. Check Type first only when the entry does something other than a hardcopy — the control list can hold several entries of different types.
Which Source Window option should you choose? #
Pick Current base window to capture whatever base screen is active, Designate window no. for one fixed target, and Window no. from the register only when project logic must select the window at runtime. The three options differ in what you must verify:
Current base windowfollows navigation. Bring a screen with unmistakable content on screen before the first test. The word base matters: confirm on the bench how a pop-up or overlay layer appears in the file instead of assuming it is included.Designate window no.fixes the target in the drop-down. It is the best first test and the best choice for a repeating capture of one overview screen, because it removes the window-selection register from the diagnostic path.Window no. from the registerreads a configured register at trigger time. That register must hold the intended window number when the bit fires, and it should stay a different address from the trigger bit.
For an operator button that means save the screen in use, take Current base window. For a fixed target — the alarm overview captured at end of shift, for example — take Designate window no. and let the trigger come from the PLC or a macro. Reach for the register only when the program itself decides which window to archive.
How do you connect a toggle switch to the trigger? #
The switch must write the exact address entered under Address, under the same device connection, and the change it produces must satisfy the Trigger mode you selected. Place a Toggle Switch on the window and point it at that bit. The match is character for character, including the device name in front of the tag: identical text under two device connections is two different tags, and that mistake yields a switch that visibly works while the monitored bit never moves. The device name is the same binding you set up when writing WAGO 750 PLC digital outputs from a Weintek HMI.
Choose a bit the HMI or the program can actually write: a toggle switch cannot drive a physical PLC input, for the reason in why an HMI toggle switch cannot write a physical PLC input. If a controller owns the trigger bit, check that PLC logic does not write it back — a competing write can undo the switch's change before the trigger condition is satisfied. When communication is in doubt, prove the path with an HMI-local bit first, then move the address.
Trigger mode decides which state or change of the bit starts the action. Read the mode descriptions in the dialog and pick the one matching the switch: for a single capture at each operation, the mode keyed to the change the switch makes, not to its steady state.
Why does the switch change but no screenshot appear? #
Because a working switch proves only that some bit changed: check the four failure points in order — monitored address, trigger mode, source window, then storage — and change one setting at a time.
| Observation | Likely cause | Fix |
|---|---|---|
| Switch operates, monitored bit never changes | Binding or communication failure | The switch writes a different address or device connection; correct it, and if a controller owns the bit, check the driver connection |
| Bit changes, no capture runs | Trigger mode mismatch |
The mode expects a state or a change the bit did not produce; set the mode to match the switch's action |
| File saved, wrong window content | Source Window problem |
Verify the selected option; with Window no. from the register, read the register and compare it with the intended window number |
| No file although the bit made the qualifying change | Storage problem | Output to still on USB disk, drive listed by the runtime, free space present, stick not write-protected |
| Second capture missing | Trigger not re-armed | A mode keyed to a change needs a fresh change; operate the switch again |
Retest after each single correction and note which stage now passes; changing address, mode and output together leaves a working system and no idea which fault was real.
How do you prove the whole capture path works? #
Compile and download the project, insert the USB drive, bring a window with unmistakable content on screen, operate the switch once, then open the new file from the drive on a PC and compare it with the intended window. The full run:
- Compile the project and download it to the target HMI.
- Insert the USB drive; where the model provides a storage status display, confirm the drive is listed.
- Bring the intended window up — navigate there with
Current base window, or make sure the fixed target or the register value points at a screen with recognizable content. - Watch the trigger address — a bit lamp on it works — operate the switch and confirm the bit makes exactly the change
Trigger modeexpects. - Check the drive for the new image file; its file time should match the moment of the test.
- Open the image, compare it with the intended source window, then trigger a second time to prove the path re-arms.
If another station on the bench runs a PC runtime instead, the equivalent capture is done by script, as shown in the cyclic screenshot scripting guide for PC-based operator stations.
Questions asked
Can a function key take the screenshot instead of a toggle switch?
Yes. The Function Key object covers several tasks, among them switching windows, opening the keypad, running a macro, executing a screen hardcopy and setting USB storage, so a fixed bezel or on-screen key can capture without any trigger address to bind. The PLC Control object remains the better choice when the capture must follow a bit that the PLC program or a macro sets.
Can the image be sent somewhere other than a USB disk?
Other destinations exist. Release material for EasyBuilder Pro 5.00.01 already lists remote screen hardcopy to a backup server, so a networked HMI can push images to a configured server instead of a local drive. USB disk remains the only destination this procedure verifies, and it is the one that works with no network and no server setup.
Is the screenshot drive the same one used to carry the project file?
It can be, but keep two sticks. A project-download stick is prepared in the engineering tool under Tools, Build Data for USB Disk or SD Card Download, and carries a package for loading the HMI. The hardcopy writes plain image files from the runtime. A dedicated capture stick keeps the images easy to find and the download package untouched.
Does holding the switch on keep producing files?
It depends on the trigger mode. If the selected mode keys on the state of the bit, the condition stays true while the switch holds that state and the object can execute repeatedly; a mode keyed on a change executes once each time the bit makes that change. For one file at each operation, select the change the switch produces and operate the switch once.


