For installing and configuring the Open Automation Software Server, please refer to the product documentation. To configure a web page to communicate with the server, you must include:
- jQuery v1.8.3 or later, found at jquery.com and is also distributed with the OAS Web HMI product
- The OAS Web HMI Script Library
- The OAS Web HMI Stylesheet, which is used for styling modal dialogs and can be modified to fit your web design
- A small block of Javascript containing an authentication token and URL location of the Open Automation Software Server – configuration options will be detailed below
The following is an example of a properly configured, minimal HTML page:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<html> <head> <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="js/opc-lib-min.js"></script> <link rel="stylesheet" stype="text/css" href="css/opc-style.css"/> <script type="text/javascript"> OPC_config = { token:'7e61b230-481d-4551-b24b-ba9046e3d8f2', serverURL: 'http://localhost:58725' }; </script> </head> <body> Hello World </body> </html> |
Of course, this example does not contain any bindings to OPC Server Tags, but contains all elements necessary to connect to a server located at http://localhost:58725 using an authentication token of7e61b230-481d-4551-b24b-ba9046e3d8f2.