Record PLC data
Read recorded data
Import Excel
Remote training
Video training

Record PLC data with ServiceLab

In this example you'll see how to run a long-term data monitoring by ServiceLab and use the file and folder structure for archiving and for later evaluating of the recorded measured data.
The example worksheet  'Example_worksheets_ServiceLab.zip' has all necessary pre-settings included. It is prepared for easy use with your ServiceLab Software Version 12. 
You could download this worksheet on the bottom of this page and you could test it with your full or demo version of ServiceLab
The solution could be solved by ServiceLab 12 and the worksheet „Cyclic data recording by time base separated files and one common file.DSB“. Data from a S7-315 SIEMENS-PLC was read and recorded for more then 53 hours connected by Netlink Pro and a sampling rate of 11 Hz.
Beginning was 23. July 2013 at 09:26:02.23 h, ending was 25.  July 2013 at 14:48:56.89 h.
The measuring time was 53 hours 22 minutes and 54.66 seconds or 192,174.66 seconds.
By the sampling rate of 11 Hz there should be expected 2,113,922 measuring cycles. Actually there are 2,086,199 measuring cycles recorded. 27,723 missing measuring cycles gives the error rate of ~1.31 %.
Overall there are more then 2 million measuring cycles recorded in one common ASCII-file (Data recording 53 hours.ASC) with the size of ~113 MB and also cyclic, hourly in 54 separated single ASCII-files each of them ~2.2 MB of size. The single separated files don’t have a missing or double recorded measuring cycle.


 There are used one SIMATIC Read, one Time Base, one Action, one Chart Recorder and two Write Data modules.

The experiment will be started manually. The data recording of the two Write Data modules also starts with the start of the experiment.
The module PLC-IN S7 SIMATIC Read reads the process variables Output 1 QB 0 (BYTE), Output bit5 (BOOL), Output bit6 (BOOL) and Output bit7 (BOOL) by the S7-Netlink Pro connection from a S7-315 SIEMENS PLC.
The Chart Recorder module displays the actually signals up to the maximum presentable range.
The module Time Base generates a cyclically pulse, in this example always on the full hour, independently from the starting time of the experiment. This pulse is controlling the Action module and this Action module is controlling the data recording of the Write Data 00 module.
The Data Write 00 module should write the data in ASCII-format including the time information date+time. By selecting the file information type “Combi” it is possible, to place system and global strings as well global variables on the path- and file names. For the folder there is used text (C:\ServiceLab\DATA) and the actually system date (${date}) and for the file name text (\Interval no) and an global variable (${VAR_1}). The definitions of this global variable are adjusted with “Show contents in info window” and “Enter value in startup dialog box”. During the start process of the experiment, the user has the possibility to change the value of this global variable and in this way the file name.
The settings of the Action module are controlling the module Write Data 00. The Action channel 0 with the receiver “ServiceLab”, the event “Rising edge”, the Action “Variable + value” and the parameters Number:1 and Value:1.0000 causes, that each rising edge at the input 0 of the Action module the value of the global variable 1 increases by the value of 1.0000. Hereby the variable of the file name also will be incremented and the result will be updated in the info window of the global strings and variables. The Action channel 1 with the receiver “Write00”, the event “Rising edge” and the Action “Close and reopen file” causes, that each rising edge at the input 0 of the Action module the created file of the module Write Data 00 will be closed and reopened. Recently the global variable 1 was changed with the value of 1.0000, a new file will be created with an changed file name. Therefore the readout of data will be recorded in cyclic intervals.

 The module Write Data 01 records the same data like Write Data 00 and it is also used the same file format. The path- and file name details are different and only one file for each experiment will be created.

Using system strings (like date and time) on the path- and file name details, it will be used the actually string information from the starting time respectively from the reopen start point.
The file information of the explorer often shows the modified date and time information when the file was closed. That is the reason why files with newer date and/or time information are stored in “older” folders, compare the files Interval no   14.ASC and Interval no   15.ASC.


Copyright 2017 Servicelab ™ Ltd. - Software for SIMATIC - PLC Analyzer Shop Top Contact Search Sitemap Corporate Information