IMDTouchKnowledge BaseShop main store

How-to

Display an animated GIF in WinCC Flexible PC runtime

HMI and touchscreens Published 7 min read By IMDTouch engineering team

Short answer

WinCC Flexible PC runtime does not play an animated GIF in a standard graphic object. Drive state animation with a graphic I/O field and a graphics list, or point the HTML Browser object at a local HTML page that hosts the GIF, and keep every button and text object outside the browser rectangle because that surface cannot be overlaid.

On this page
  1. Choose the method before you open the screen
  2. Build the state animation with a graphics list
  3. Play a real GIF in the HTML Browser
  4. Worked example: a pump state display driven by tag values 0, 1 and 2
  5. The browser rectangle cannot be overlaid
  6. Verify before the screen goes live
  7. Two habits that cause the callbacks
  8. Questions asked

WinCC Flexible PC runtime has no native animated-GIF object. A standard graphic object draws a single still image; it never executes the frames stored inside a GIF file, which is why an imported GIF sits frozen on the screen. You have two working paths. For animation that must follow the machine, build a graphics list, place a Graphic I/O field, and let the state tag pick the picture. For a finished GIF that must play its own frame sequence, place the HTML Browser object, point it at a local HTML page that hosts the GIF, and keep every button and text object outside the browser rectangle, because that surface cannot be overlaid.

Choose the method before you open the screen #

"Animation" means two different things here, and the screen you build depends on which one you need. In a graphics list, the HMI application controls the timing: a numeric tag value selects one image from a defined set, and the picture changes only when the value changes. In the HTML Browser, the browser controls the timing: it renders the page and plays the GIF's embedded frames on its own. Both look like motion to an operator; only the first is tied to process data.

Requirement Method What it costs
The picture must follow the machine state graphics list with a Graphic I/O field You draw one image for each state and wire the state tag
A finished GIF must play its own frames HTML Browser on a local HTML page Nothing placed on the browser rectangle stays operable
Buttons or alarm text share that screen area graphics list The browser keeps its whole rectangle to itself
The operator must trust the animation as status graphics list A GIF plays on no matter what the machine is doing

Pick one method for each indicator and stay with it. The gap is not unique to this tool: FactoryTalk View Machine Edition also lacks a native GIF player, and the guide to animated graphics without GIF support in FactoryTalk View ME works through the same image-sequence approach.

Build the state animation with a graphics list #

The Graphic I/O field is made for this job: it displays an image selected from a configured list of graphic files, and the selection follows a value.

  1. Draw or export one image for every state the machine has — for example stopped, running and faulted — and make each one unmistakably different from the others.
  2. Create the graphics list, add those images, and assign each image to the numeric value that represents its state.
  3. Place a Graphic I/O field on the screen and connect it to the list.
  4. Point the field's selection at the PLC or internal tag that carries the state, so the process, not the picture, decides what is shown.
  5. Account for every value the tag can take: map each valid state to an image, and decide before startup what an out-of-range value is allowed to display.

For a continuous indicator rather than a set of states — a level or a position — the walkthrough on animating a tank level graphic on an HMI screen uses the same tag-driven selection idea.

Play a real GIF in the HTML Browser #

When the deliverable is the GIF itself — a prepared animation that must run its own frames — let a browser render it. The HTML Browser object is designed for the display of simple HTML pages, and a page that hosts one GIF is exactly that. Check the file before the screen: open the GIF in a desktop browser and confirm frames, order and loop, because nothing you configure on the HMI screen repairs a bad file. The page needs nothing more than the image:

<!DOCTYPE html>
<html>
<body style="margin:0">
<img src="pump-cycle.gif" alt="Pump cycle">
</body>
</html>
  1. Store the page and the GIF in one folder on the runtime PC and reference the image by its file name, so the pair moves and is backed up together.
  2. Place the HTML Browser object on the WinCC Flexible screen and point it at the page file.
  3. Size the browser rectangle to the picture, start PC runtime, and confirm the GIF animates instead of sitting on one frame.

For a fuller walk-through of this page-and-object setup, the guide to configuring browser-based GIF playback for HMIs covers the same configuration in depth.

Worked example: a pump state display driven by tag values 0, 1 and 2 #

Inputs, all of them example values for this case: the selector tag Pump_State, an integer tag read from the PLC (state codes are dimensionless, so no engineering units appear); three state codes, 0 for stopped, 1 for running and 2 for faulted, matching a typical pump program — use the codes your own PLC already defines; and one image per state, named pump-stopped.png, pump-running.png and pump-fault.png.

Rule in words: a graphics list maps one numeric value to one image, and the Graphic I/O field shows the image whose entry value equals the tag.

Arithmetic: 3 documented states give 3 images and 3 list entries, one for each value — entry 0 maps to pump-stopped.png, entry 1 maps to pump-running.png, entry 2 maps to pump-fault.png. When the PLC writes 1, the field resolves the value 1 against the list and displays exactly the running image.

Result: the display shows a designed picture for each process state and changes only when the tag changes.

Decision, with its threshold: a value with no entry leaves the field with no designed picture, so before the screen goes live, every value the PLC program can write has an image and the program bounds the tag to those values — a longer list cannot cover an unrestricted integer. The day the program grows a fourth state, the list grows to four entries and nothing else on the screen changes.

Test that proves it: on a bench, force the tag to each of the three values and confirm the matching image appears and no other; then run the real operating sequence, stop included, and confirm the picture follows the machine instead of continuing to move.

The browser rectangle cannot be overlaid #

In PC runtime the browser keeps the surface inside its rectangle: a button placed on top does not respond, text placed there disappears, and changing visibility or stacking order does not win the area back. Treat the rectangle as browser-only territory. Put every touchable and readable object — buttons, lamps, alarm lines, acknowledgement keys — outside it, and size the browser to the GIF so it surrenders as little screen as possible.

If the layout cannot give up that area, that is the decision point: switch the indicator to the graphics-list method, because a Graphic I/O field is an ordinary object that layers and animates normally. Visibility tricks remain a real tool elsewhere — see how WinCC visibility animations hide and show objects at runtime — but they do not lift an object over a browser.

Verify before the screen goes live #

  1. File: the GIF plays in a desktop browser with the intended frames, order and loop.
  2. Runtime: the GIF animates inside the HTML Browser rectangle instead of freezing on its first picture.
  3. State mapping: each valid tag value shows its own image, and no value shows a picture assigned to another state.
  4. Sequence: run the real operating cycle, stops and faults included; the picture follows the state and never keeps cycling after the machine has stopped.
  5. Operator surface: every button, lamp and text around the browser works; treat anything inside the rectangle as unavailable to the operator.
  6. Failure case: rename the GIF file on the runtime PC and confirm the alarms and status outside the browser are still complete — the process indication must survive a missing picture.

Two habits that cause the callbacks #

Never let GIF motion stand in for a running status: the browser plays the file's embedded frames regardless of the machine, and an operator who reads motion as feedback is reading the file, not the plant. Every status an operator acts on comes from the state tag, through the graphics list or ordinary objects.

Keep the runtime's job operator-sized as well. A screen that accumulates decorative sequences, long trend lists and heavy scripts starts doing a supervisory system's work; move those jobs up to the SCADA layer and leave the operator station what it is good at — showing state and taking input.

Questions asked

Why does my animated GIF show only its first frame in WinCC Flexible?

A standard graphic object renders one still image and has no GIF frame engine, so a GIF placed there freezes on its first picture. Test the file in a desktop browser first: if it animates there but freezes on the screen, the screen object is the limit, not the file. Move the display into the HTML Browser with a hosting page, or rebuild the sequence as a graphics list.

Can a script pause, restart or retime the GIF inside the browser?

No. WinCC Flexible documents no function that reaches into the frames of a GIF; once the browser opens the page, the browser alone decides playback. If the sequence has to follow logic, meaning start, stop or change speed, build it as a graphics list instead, where the selection tag gives your program direct control of which picture shows.

Does the HTML Browser need internet access to play the GIF?

No. The page and the image sit in one folder on the runtime PC, and the browser loads them from local disk. Reference the image by file name so the reference stays relative, and the whole pair can be copied or backed up as a folder without breaking the display. Network paths only matter if you deliberately point the browser at a web server.

The browser rectangle stays blank in runtime. What do I check first?

Check the chain outside WinCC Flexible before touching the screen: open the HTML page directly in a desktop browser on the runtime PC and confirm the GIF plays there. If it does not, the browser object is pointing at the wrong file or folder, or the image reference in the page does not match the file name. Fix the page and path first; the browser object only shows what the page loads.

Keep reading

  • How-to

    How to Display a Changing Image File in WinCC Flexible

    No ActiveX control is needed. A picture that never changes imports straight into the project; a disk file that changes every few minutes must be displayed by a runtime component that re-reads it — a browser-hosted view with atomic file replacement, a deliberate reload and a visible generation time, accepted only after the two-revision test passes on the runtime station.

    HMI and touchscreens

  • Troubleshooting

    Animating Four Images With a Graphic List in WinCC RT

    SimulateTag is not missing from WinCC RT. The function is documented for Basic Panels, Panels, Comfort Panels and RT Advanced targets and simulates Integer tags from a function list, while RT Professional uses the WinCC Runtime Professional Tag Simulator. Verify the configured runtime target, then animate four images with a graphic list on a dedicated Integer tag at a short cycle.

    HMI and touchscreens

  • Troubleshooting

    Why a WinCC flexible Runtime device type is not valid for this version

    The message means the WinCC flexible Runtime component on that PC is missing or sits at a different update level than the Engineering System, not that Windows is wrong. Compare the Installed Software lists on both stations, then re-run setup in modify mode and re-apply the updates so both entries match.

    HMI and touchscreens

Showing Thousand Separators in WinCC TIA Portal Output Fields