Xml Reporting Configuration Steps
Once installed the XML reporting configuration file can be found in the installation directory normally by default;
"C:\Program Files (x86) \ACL\Apps\PlcData.LoggingService\Files"
The XML Reporting file is where the controllers (Plcs) and their associated tags to report on, are configured. Also, in this file two reporting modes can be set up; one automatic reporting (trigger based on day and time and the number of previous data days ) or Plc control reporting on demand.
Some notes on XML files in general have been covered in the XM Logging section.
The configuration in this help illustrates the syntax and structure of the XML reporting file and is human readable.
Reporting Configuration steps
Although there are similarities PlcData is two apps in one; A logging and reporting app. they are totally independent applications linked only by data parameters i.e. the controllers and tag configurations have to be the same.
The configuration is best understood when read in conjunction with the XML Reporting file.
The generated reports are of CSV type that can be opened by Excel and several other third party software.
Note: Controller and Plc are used interchangeably to refer to the programmable logic controller
Step 1: Configure the controller
The followings are the supported controller types:
Controller Type
|
Description
|
Default Port used by PlcData
|
Logix
|
Rockwell: Control Logix,
Compact Logix, and Soft Logix series
|
44818
|
Slc
|
Rockwell: SLC500 Ethernet
|
222
|
S1500
|
Siemens
|
102
|
S1200
|
Siemens
|
102
|
S200
|
Siemens
|
102
|
S200Smart
|
Siemens
|
102
|
S300
|
Siemens
|
102
|
S400
|
Siemens
|
102
|
Controller Type
|
Data Type
|
Logix
|
Bool, Sint, Int, Dint, Real, String, Lint
|
Slc
|
Boolean, Integer, Long,Float
|
S7 Siemens
|
Bool, Byte, Int, Word, Dint, DWord, Real, Lint, ULInt, LReal, LWord, String
|
|
Examples of controller configuration where the IP address; rack, slot, port, connection time out and controller type are set.
|
Step 2: Understanding reports
There are two possible modes for generating the CSV reports : Day of the week and time trigger and/or Plc trigger. The modes work hand in hand together and they are mutually exclusive and independent of each other.
The CSV reports are generated in the configured directory path.
The selection of these two modes is discussed in the next step.
Plc Control Reporting
The controller element has nested elements called Reports.
When reporting under PLC control is configured; reports are generated on demand.
A controller can have several reports configured. Each report in turns has an associated
number of organisational sections and each section has a block of data to be reported on. Each piece of data is also called a 'Tag’.
Reports are especially useful when triggered from the PLC , i.e., the PLC issues a signal for PlcData to generate reports immediately without having to wait for the day time trigger.
PlcData scans the PLC for report creation signals. The scan is based on the configured 'CheckInterval'. which is part of the manual trigger.
Day and Time Reporting
Report generation can be based on day of the week and time or time only. The number of previous days worth of data to report on is also configurable.
To get a daily report we only set the time attribute and the number of previous days to 1.
To get a weekly report we set the day of the week, time and number of previous days to 7.
The generated CSV file headers are derived from the tags description so they are mandatory
|
|
Step 3 Report generation modes configuration
Each report has 4 elements: Day and time trigger, CreateReport, ReportCreatedAck, Sections with associated tags
Day and Time Trigger
The day and time trigger purpose is to schedule report generations
As an example mentioned previously daily and weekly reports can be generated. In fact the number of previous days worth of data is configurable giving a lot of flexibility on the type of reports that can be generated
CreateReport & ReportCreatedAck
The CreateReport tag Plc Address is what PlcData listens for. When it goes from OFF-To-ON, PlcData generates the requested report by querying the SQL server database.
The CreateReport is optional if the PlcAddress is left blank i.e., PlcAddress=””, then reports will be generated according to the day and time trigger settings
If CreateReport tag has a plc address filled, then the reporting is deemed to be also PLC controlled.
PlcData uses the configured ‘CheckInterval’ to listen for report requests from the PLC.
When PlcData has generated a requested report, it turns OFF the ‘CreateReport’ flag and sends back a signal to the PLC to indicate the requested report has been generated, by turning the ‘ReportCreatedAck’ ON.
Sections and Tags
Each Report has a number of sections to help organise the report.
Each section has a block of tags associated with it.
The Tags element within a section has within it several tags elements.
The tags value are used to generate reports.
The tags description is mandatory and is used for the report headers
PLC - PlcData Handshake
1. Plc sends signal to create a report by turning the CreateReport flag to ON.
2. PlcData turns the ReportCreatedAck to OFF.
3. PlcData generates the report, turns the CreateReport flag to OFF and the ReportCreatedAck to ON
4. PlcData checks the CreateReport flag every CheckInterval time. And the cycle repeats from 1.
|
|
Report Example
-
The name of the reporting file structure: Report Name_Ip Address_Date Time.CSV
-
The report title and plc ip address are in row 1.
-
The section name is on row 2
-
The report headers are in row 4
-
Tags are organised under their configured section.
-
Section 1 and section 2 tags data have been logged under different events hence they have been registered in the data base at different times. Explaining the reason for the no-data indications. So users can configure their reports sections to be under one event. Events are asynchronous
NOTE: Format the excel date column to show the seconds part of the time.
|