How-to
Sending Unified Comfort Panel screenshots to a PC network drive
Short answer
Add the operator PC's shared folder on the panel's Network Drive tab, then point the screenshot function at the mounted path under /net/mount/ instead of the USB stick. Unified V19 JavaScript cannot reach remote services directly; the mounted share turns the transfer into an ordinary file write. Include the panel's local date and time in each filename so every cycle produces a distinguishable image.

On this page
- Why the script cannot push the file
- What the Network Drive mount gives the runtime
- Connecting the share and pointing the screenshot at it
- Worked example: naming the file for a cycle ending at 07:42:15
- Proving each layer on the bench
- When the image must survive an outage: copy.sh with StartProgram
- When the image is not what the operator needs
- Questions asked
Save the screenshot directly to a folder the operator PC shares, and the transfer needs no script-side networking at all. Add that shared folder on the panel's Network Drive tab, then point the CreateScreenshot system function at the mounted path beneath /net/mount/ instead of the USB stick. The panel writes the image into the share as an ordinary file, and operators open it from their own PCs with read-only accounts. A script cannot make the trip itself: in WinCC Unified V19, JavaScript code has no way to reach a remote service. Put the panel's local date and time into every filename, because the screenshot function overwrites any file already sitting at the same path.
Why the script cannot push the file #
The V19 scripting environment for Unified Comfort panels provides documented system functions, such as tag access, screenshot capture and program start, but no network client: script code cannot open a connection to another device and cannot call a mail service. So pushing the image to the PC from inside the script is not a coding problem. The destination has to become local from the panel's point of view, and the network-drive feature does exactly that: the panel mounts the PC's shared folder into its own file system, and a write to the mounted path is handled by the panel, not by your code.
The CPU plays no part. The file move runs between the panel's file system and the PC share, so nothing changes in the S7-1500 program, and no CPU setting can rescue a failed write. Heavier platform options exist, such as a separate edge application doing the file transport, but for one curve image at the end of a cycle the mounted share is the smallest documented change.
What the Network Drive mount gives the runtime #
Unified Comfort panels configure network drives in the panel's Control Panel, on the Network Drive tab. Pressing Add opens the Network Drive Parameters dialog, where Network Path takes the path to an enabled network share together with the account name and password the panel should use. Once the connection is up, the runtime addresses the share beneath /net/mount/, and a write to that path behaves like a write to panel storage, which is why the screenshot function can use it unchanged.
Set up two permission levels before you connect anything. The panel's account needs permission to create files in the folder; operator accounts need only read access, and they must never receive the panel's credentials. Keep the share narrowed to the one folder and the least permissions that work, because an open share on a plant network is an attack path into that PC. Test the two levels separately: an operator who can open the folder proves only the operator path, and says nothing about whether the account stored on the panel can create a file.
Connecting the share and pointing the screenshot at it #
- On the operator PC, create the destination folder, for example one named cycle-images, and share it. Give the panel's file-transfer account permission to create files in it, and give every operator account read access only.
- On the panel, open the Control Panel and go to the Network Drive tab. Press Add to open the Network Drive Parameters dialog, enter the share under Network Path, for example
\\192.168.1.50\cycle-imageswith 192.168.1.50 standing in for the operator PC's address, and add the account name and password the panel will use. Save and connect. - Confirm the drive connects, and note the exact path beneath /net/mount/ that the panel lists for it, because the screenshot path must follow that structure.
- In the project, build the screenshot filename at the cycle-end event from the panel's local date and time, exactly as the worked example below shows.
- Call the CreateScreenshot system function with the mounted path and that filename; the mounted share simply replaces the USB stick as the destination.
- Trigger one screenshot by hand and check that exactly one new file appears in the shared folder on the PC.
- Run one complete cycle and confirm the end-of-cycle event writes one new, timestamped image with no manual step.
Worked example: naming the file for a cycle ending at 07:42:15 #
The case is the setup this procedure targets: an end-of-cycle screenshot of a curve view on a Unified Comfort panel in the MTP 1200 class, written straight into the mounted share.
Inputs #
- Trigger time for the cycle: 07:42:15 on 2025-06-14, read from the panel's local clock when the end-of-cycle event fires (illustrative values; the real ones come from the panel clock at runtime).
- Previous cycle's trigger: 07:30:15 the same day, so this line turns out one curve image about every 12 minutes.
- Overwrite rule from the function's documentation: if a file already exists at the specified path, CreateScreenshot overwrites it.
- Naming constraint: colons are not valid in filenames on a Windows share, so the time cannot go into the name as the clock writes it.
Rule #
Build the name as a fixed prefix, then the date, then a separator, then the time with the colons replaced by hyphens, then the image extension. The prefix groups the curve images so they can be found and cleaned up later.
Arithmetic #
prefix curve_
+ date 2025-06-14 -> curve_2025-06-14
+ separator _ -> curve_2025-06-14_
+ time 07:42:15 -> 07-42-15 -> curve_2025-06-14_07-42-15
+ extension .png -> curve_2025-06-14_07-42-15.png
The panel-addressed result is /net/mount/curve_2025-06-14_07-42-15.png.
Result and decision #
The previous cycle produced curve_2025-06-14_07-30-15.png; the new name differs from it at the hour and minute, so nothing gets overwritten. Include the seconds from the start: a name without them collides whenever two cycles end in the same minute, and the function then overwrites the earlier image at that path. This line's 12-minute spacing already separates files at minute level, but seconds add nothing to the work and cover the day the cycle shortens or a trigger fires twice. If a single cycle can end more than once in the same second, extend the name with a cycle counter as well.
Proving each layer on the bench #
Work through these checks in order; each isolates a different layer of the path.
- Mount state: the drive shows as connected in the panel's network-drive list, with no authentication error.
- Write proof: one manual screenshot produces exactly one new file in the shared folder. Seeing the folder's existing files is a read test, not a write test.
- Filename: the new file carries the panel's current local date and time and differs from the previous image's name.
- Integrity: the file opens on the operator PC and shows the curve view as it stood at the trigger.
- Operator access: each qualified account retrieves the image with its own read-only login, never with the panel's credentials.
- Outage behavior: stop the share and trigger again, and confirm that no file is written. If every image matters to the operator, that result is the reason to move to the copy pattern in the next section.
When the image must survive an outage: copy.sh with StartProgram #
If the requirement includes keeping a local copy, or no image may be lost while the share is down, use the two-stage pattern. The screenshot is written to panel storage first; then copy.sh, a shell script the vendor publishes among its sample scripts for Unified Comfort panels, copies the file onto the mounted share. Launch it with the StartProgram system function, and take the exact command line and parameters from that sample-script document, not from memory.
The pattern adds a second stage that can fail, so decide in your own logic what a failed copy means: retry at the next cycle, and skip files already present at the destination so a retry cannot create duplicates. One CreateScreenshot call has one destination, so a job that needs both a USB copy and a share copy is exactly the case for this pattern; a job that needs only the share copy is not. When no local copy is required, write straight to the mounted path and leave the copy stage out, because one file-system write is one thing to test.
When the image is not what the operator needs #
If the analysis really needs the numbers behind the curve, the engineering tool offers a reporting route: WinCC Unified can generate an Excel report from recorded data, so one scheduled report can replace a folder of pictures for trend analysis. It is project-side configuration rather than a panel setting, and it suits an operator who reads values instead of studying a captured screen.
Capture itself is platform-specific. CreateScreenshot belongs to Unified Comfort; on mappView-based panels the equivalent is the GetScreenCapture action, covered in implementing operator screenshots in mappView with GetScreenCapture.
Printing is a different capability again: an HMI screenshot normally cannot go straight to a USB printer, and printing HMI screenshots directly to a USB printer explains why and what to set up instead.
Questions asked
What if two cycles can end within the same second?
Add a cycle counter to the filename. Let the PLC increment an integer tag at every cycle end, read it together with the date and time, and append it after the time in the name. Reset the counter only together with the date, so a restart cannot produce yesterday's numbers again, and the combination of date, time and counter stays unique even for a line that finishes several cycles in one second.
What happens to the screenshot when the operator PC is switched off?
The mount is unreachable, the screenshot function cannot access the path, and no file is written, so the image of that cycle is simply lost. If every image matters, use the two-stage design: write each screenshot to panel storage first and copy it to the share with the documented copy.sh script, and decide in your logic whether a failed copy retries at the next cycle. If losing the image during downtime is acceptable, the direct mount stays the simpler design.
Can several panels write into the same shared folder?
Yes. Give each panel its own prefix in the filename, for example the panel's station name, so two panels capturing at the same moment never produce the same name. The share needs write permission for each panel's account, and the account can be the same one on both panels or two separate accounts; separate accounts let you cut off one panel's writes later without touching the other.
How does the panel clock stay correct for the timestamps?
Set time synchronization on the panel so its clock follows your plant time source, and check the time zone the panel uses for its local date and time. A panel clock that drifts puts wrong times into every filename, and the images stop matching the cycle records the operator compares them against, so include the clock check in your periodic maintenance and not just at commissioning.
Do the operator PCs need any HMI software to open the images?
No. The files land in an ordinary shared folder and open with the PC's normal image viewer, so the operator side needs only a read-only account for that share, with no engineering tool and no runtime license. Keep the permission read-only: the operators should be able to retrieve and analyze the images, while only the panel's account creates files in the folder.


