Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Embedding a VI in an Existing HTML Document

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

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. For the Netscape browser plug-in, the MIME type you specify in the EMBED tag determines which plug-in to load. Refer to the LabVIEW Help in the previous versions of LabVIEW for more information about the syntax used in those versions. Changes between versions are highlighted in bold in the following example.

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

Note  If clients access the VIs using the LabVIEW ActiveX control you need only to include the <OBJECT> tag information. If they access the VIs using the Netscape plug-in, you need only to include the <EMBED> 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.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit