Complete the following steps to create an HTML document and embed static or animated images of a VI front panel. You also can embed images of a VI front panel in an existing HTML document.
- Open the VI whose front panel you want clients to view.
- Select Tools»Web Publishing Tool to display the Web Publishing Tool dialog box.
- Select a VI name in the VI Name field or select Browse from the VI Name pull-down menu and navigate to a VI.
Note The Web Publishing Tool creates an HTML file in the application instance from which you open the VI. If you close the VI and then reopen the VI in a different application instance, clients cannot view the VI.|
- Configure how the front panel appears in the Web browser.
- In the Viewing Mode section, select if you want to embed, take a snapshot, or monitor a front panel.
- Place a checkmark in the Show border checkbox if you want a border around the embedded panel image.
- Place a checkmark in the Request control when connection is established checkbox if you want the embedded front panel to request control immediately.
- Click the Next button to display HTML output options. Enter text in the Document title, Header, and Footer text boxes.
- If you want to preview the document in the default browser, click the Start Web Server button and then click the Preview in Browser button. If the Start Web Server button is dimmed, the Web Server is already running.
- Click the Next button to display options for saving the file. Verify or edit the path to the directory where you want to save the HTML file and the HTML filename. If you want to view the document from a remote computer, save the HTML document in the Web Server root directory, usually labview\www.
- Click the Save to Disk button to save the title, text, and VI front panel image in an HTML document.
The Document URL dialog box displays the URL for the Web page if you saved the document in the Web Server root directory.
- Click the Connect button to view the HTML document, or click the OK button to return to the Web Publishing Tool dialog box.
- Click the Done button to exit the Web Publishing Tool.
- If you selected Embedded in the Viewing Mode section, make sure the VI whose front panel you want clients to view is in memory on the server computer.
Complete the following steps if you started the Web Server in the Web Publishing Tool and need to turn off the Web Server.
- Select Tools»Options to display the Options dialog box.
- Select Web Server: Configuration from the Category list of the Options dialog box.
- Remove the checkmark from the Enable Web Server checkbox.
- Click the OK button to close the Options dialog box and save the changes.
If you want clients who do not have LabVIEW installed to view and control a front panel remotely, they must install the LabVIEW Run-Time Engine, then view the front panel remotely.
You can open the HTML file created by the Web Publishing Tool in any HTML editor and customize the HTML. Find the section of the code that embeds the front panel image to specify attributes for the image.