Embedding a VI in an Existing HTML Document

National Instruments recommends you use the Web Publishing Tool to create an HTML document and embed VIs so a client computer can view and control the front panel of the VI in a Web browser.

However, if you already have an HTML document, use the following syntax to embed a VI in the HTML document so a client computer can view and control the front panel of the VI in a browser. Store the HTML document in the Web Server root directory. Refer to Web Server Syntax Examples for examples of embedding VIs in HTML documents.

The client and server computers must be running the same version of the remote panel protocol in LabVIEW. If you are using a browser to view and control a remote front panel, you must use a version of the LabVIEW Run-Time Engine compatible with the version of LabVIEW on the server computer.

Note  Different versions of the LabVIEW browser plug-in can run concurrently, but they communicate with different remote front panel servers. Each browser plug-in can display VIs developed in the same version of LabVIEW. The HTML OBJECT/EMBED tag determines which plug-in the browser loads. For the LabVIEW ActiveX control, the CLASSID you specify in the OBJECT tag determines which plug-in to load. The CLASSID for each version of the plug-in is different.

<OBJECT ID="LabVIEWControl" CLASSID="CLSID:A40B0AD4-B50E-4E58-8A1D-8544233807B0"
WIDTH=x HEIGHT=x CODEBASE="ftp://ftp.ni.com/support/labview/runtime/windows/15.0/LVRTE15.0min.exe">
<PARAM name="LVFPPVINAME" value="VI_NAME.vi">
<EMBED SRC=".LV_FrontPanelProtocol.rpvi150" LVFPPVINAME="VI_NAME.vi" TYPE="application/x-labviewrpvi150" WIDTH=x HEIGHT=x PLUGINSPAGE="http://digital.ni.com/express.nsf/bycode/exck2m"></EMBED>
</OBJECT>

Refer to the following table for more information about the syntax used in different versions of LabVIEW. Changes between versions are highlighted in bold in the previous example.

LabVIEW VersionCODE BASEEMBED SRCEMBED TYPE
201515.0rpvi150labviewrpvi150
201414.0rpvi140labviewrpvi140
201313.0rpvi130labviewrpvi130
Note  If clients access the VIs using the LabVIEW ActiveX control you need only to include the <OBJECT> tag information. However, to best support all potential clients with various configurations, you should include both the <OBJECT> and <EMBED> tags. This makes sure all clients can access the VIs remotely using a browser.

The following list describes the parameters you must configure.

ParameterDescription
CODEBASE The location of the LabVIEW Run-Time Engine installer, including the name of the .exe file, for clients who access VIs using the LabVIEW ActiveX Control. The address provided in the previous example includes the location of the current version of the installer.
VI_NAME The name of the VI, such as Example.vi. VI_NAME does not include path or directory names even if the VI is located in a subdirectory or inside a .llb file.
PLUGINSPAGE The URL where clients can download the LabVIEW Run-Time Engine installer, for clients who access VIs using the Netscape plug-in. The address provided in the previous example includes the location of the current version of the installer.
(Optional) WIDTHWidth of the front panel in pixels.
(Optional) HEIGHTHeight of the front panel in pixels.