Hi,
It’s not clear to me from the WebViewer widget documentation how I can point to an HTML file hosted locally on the CPU’s local FTP server in the User partition.
I have an example, but it doesn’t seem to work (see image).
(I specified the “Custom” folder as File Device, created the folder via DirCreate and put the html in that folder)
Has anyone ever done this?
Thanks!
Hi @martin.todorov ,
I’m learning mappView so I’m not good reference for that.
I checked on our main mappView Demo but we have configured the widget for different purpose:
so I asked AI an example: “Can I use B&R WebViewer widget with local html on local cpu FTP server? Where can I find one example?”
Below its answer:
Step 1: The Local HTML Structure (Your File)
Create a basic text file named index.html. It is highly recommended to include a simple CSS reset or background style so you can instantly verify if it’s loading.
HTML
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: #f0f0f0;
font-family: Arial, sans-serif;
padding: 20px;
}
h1 { color: #ff5500; } /* B&R Orange */
</style>
</head>
<body>
<h1>Local HTML via CPU Web Server</h1>
<p>If you see this, your WebViewer configuration is working perfectly.</p>
</body>
</html>
Step 2: Placement via FTP
-
Connect to your PLC via your preferred FTP client (e.g., FileZilla).
-
Navigate to the configured web server root. On a standard B&R target, this directory maps to: USER/web/ or F:/web/
-
Upload your index.html file into this folder.
Step 3: WebViewer Configuration
-
Open your mapp View page (.page file) in Automation Studio.
-
Drag a WebViewer widget onto your layout.
-
Select the widget and go to its Properties window.
-
Set the host (or source path) property to explicitly point to the local server via HTTP:
Plaintext
http://192.168.1.10/index.html
(Replace 192.168.1.10 with the actual IP address assigned to your local CPU).
I don’t have time to test it, but I see it give you good direction.
Please update us about your result
Ciao
Valerio