ModCom can be setup to log the data from any of the Screen Objects to a text file automatically and at regular intervals using the Data Logging function as described elsewhere. Being able to view this data over the internet anywhere in the world (on your smart phone for instance) is a very powerful tool, and is made possible with the Web Logging function. To use this function you must first setup ModCom for data logging by going to the Data Logging setup box, choosing the Screen Objects that you wish to include in the web log report, and setting the logging interval. The Web Logging function reads this same log file, converts it to an HTML compatible file, and uploads it to the web site of your choice on a continuous basis. Each time you access the web page, you will see the most recent data entries in the log file.
To setup the Web Logging function such as the web site address, HTML file name, and log report setup, click on "Web Logging" in the <Run-Loop> menu which will bring up the Web Logging Properties dialog box. The following is a summery of the options available in this dialog box:
Properties Dialog Box:
Server Access Setup:
FTP Address: Type in the FTP address which the web log report should be uploaded to. The address can be a domain name such as ftp.example.com, or an IP address such as 188.8.131.52. If you do not know the address, your web hosting provider or system administrator should be able to provide it to you.
Host Folder: Type in the name of the folder/directory located on the host system which the web log report should be uploaded to. If the root folder/directory should be used, leave this box blank.
User Name: Type in the username given to you by your hosting provider.
Password: Type in the password given to you by your hosting provider.
Port: Type in the port number for your FTP connection. In most cases the port number for FTP transfers is 21 which is shown by default. You can change the number if the default is not correct for your site. Contact your service provider for the correct port number.
Test: Click on this button to test the FTP connection. ModCom will try to connect to your server using the information contained in this dialog box. If no connection can be established, an error box will pop up.
Web Page Attributes:
HTML File: Type in the name of the HTML file on your web site which should be used to hold the web log report. ModCom will generate this file using the data log file on your computer and upload it to your server on a regular basis during run-time.
Show every Nth data row: This number can be used to select only certain data rows in the log file to be included in the web log report. For instance, the number 10 will instruct ModCom to retrieve every 10th row of data from the log file on your computer. This is useful if the data log file is too large to display in whole, but you want to show samples of data spanning a larger section of time rather than just the most recent entries.
Total number of data rows: This is the total number of data rows which will be included in the web log report. This will always be the most recent data entries in the log file on your computer.
Titles after this many rows: This will instruct ModCom to reprint the field titles in the web log report after this many rows of data. This makes for easier viewing of the web log report, especially in cases when it is very large.
Web Report Size Limitations:
When reading the data from the log file in order to generate the web log report, a certain amount of time is required. This time depends not only on the number of data rows selected in the "Total number of data rows" box, but also the number of data rows that are being skipped in the "Show every Nth data row" box. The total time required to read this data is proportional to the product of these two numbers. So if you have a value of 10 in the "Show every Nth data row" and a value of 100 in the "Total number of data rows", ModCom will have to read 1000 rows of data from the log file each time it uploads the log report to the web site. A number of 1000 is not all that significant and should not effect any other ongoing operations in ModCom, however if this number is quite large such as 100,000 or so, it may take longer than one second to read the data from the log file. Although the Web Logging function is designed to run concurrently with the other functions in ModCom, only one of these functions can access the log file at any given time. And if you are logging data to the log file every second, and it takes more than one second to read all of the data for web logging, there would be data points that are missed because ModCom can not write to the log file at the same time it is reading from it. With this in mind, it is best to keep the total amount of data being used by the Web Logging function at a realistic number.