Getting Started


 

To get started using the PL/B Web Server perform the following steps:

PL/B Web Server Startup

1.   Download the 'PlbWebSrv' from the Sunbelt Web Server.

2.   Install, the 'PlbWebSrv' server with a valid Sunbelt authorization number.

3.   Start the 'plbwebsrv' server using a shortcut found in the desktop 'Sunbelt' shortcut under the 'Plb Web Server ?? where ?? is the software release number (i.e., 97).'

4.   In the following directory, the user can start the PWS Client browser device by selecting an appropriate program shortcut:

 

Sunbelt\plbwebsrv.??\code\demo\SampleShortCuts

 

At this point, a PL/B Answer program starts where the user can select sample evaluation programs.

PL/B Web Client Program Startup

1.   The '.plc' extension must be specified in the PL/B Web Client URL because the '.plc' defines the Web mime type that allows the PL/B Web Server to invoke a PL/B program. Otherwise, an appropriate HTTP error occurs.

2.   When the PL/B Web Server detects the '.plc' mime type, a bootstrap HTML page is sent to the PL/B Web Client browser. The bootstrap HTML page can be an existing file named '<progname>.html' that is located in the 'Sunbelt\plbwebsrv.??\http_root' directory. If the '<progname>.html' file does not exist, the default file named 'plbwebstart.html' is sent to the PL/B Web Client browser. The PL/B runtime program execution can ONLY be started by a valid bootstrap HTML page.

3.   A user can create a custom bootstrap HTML page as follows:

  1. Copy the 'plbwebstart.html' to an 'progname.html' file which can be edited. The 'progname.html' file can then be loaded automatically by the PL/B Web Server to provide custom HTML, JavaScript, and CSS support for the user's program(s).

  2. Additions can be made to the original 'progname.html' file. However, all original code as copied from the 'plbwebstart.html' MUST NOT be REMOVED! Otherwise, indeterminate behavior will occur with unexpected results.

  3. The HTML in the 'progname.html' file can be changed to reflect the end-users application requirements. For example the following change could be applied:

  4. <title>PL/B Web Start Window</title>

     

    changed to

     

    <title>Accounting Window</title>

     

    Additional JS and CSS file references can be added to the 'progname.html' file. For example the following could be added:

     

    <link rel="stylesheet" type="text/css" href="/mycustom.css" />

    <script type="text/javascript" src="/mycustom.js"></script>

     

4.   The PWS Server supports multiple mime types which can be used in the client browser URL that starts a PL/B program at the PL/B Web Server and invoke specialized HTML/CSS/JS frameworks. The PWS Server supports the following mime types:

 

Keyword

Used in the URL to invoke ...

plc

normal PL/B operations and behaviors. When this mime type is detected by the PWS Server, the 'plbwebstart.html' script is executed at that client browser.

plcb

the PL/B program while using the 'BootStrap 4' framework. In this case, the 'plbwebboot.html' script is executed at the client browser and the 'BootStrap 4' HTML/CSS/JS files are loaded.

plcm

the PL/B program while using the 'JQuery Mobile Framework'. In this case, the 'plbmobstart.html' script is executed at the client browser and the 'JQuery Mobile' HTML/CSS/JS files are loaded.

 



PL/B Web Server PLBWIN Behavior Differences Running as a Windows Service