×
Menu
Index
  • Excel Logging Configuration Steps

Excel Logging Configuration Steps

 
Excel Logging Configuration File
Once installed the Excel logging configuration file can be found in the installation directory normally by default.
"C:\Program Files (x86) \ACL\Apps\PlcData.LoggingService\Files"
 
The Excel Logging file is where the controllers (PLCs) and their associated tags to log are configured. Also, one of two logging modes can be set up; continuous logging (frequency based) or PLC control logging.
 
 
Overview
 This guide is best consumed in conjunction with the Excel Logging Configuration file. This section is just a bird’s eye view of the configuration. Details are provided in subsequent sections.
 
The controller configuration structure: Controller -> Events -> Tags  and Remote database
 
Note 1: Controller and PLC are used interchangeably to refer to the programmable logic controller. 
 
Configurations are contained in Excel tables spread over worksheets.
 
Note 2: The excel spreadsheet contains macros and needs to have the extension ‘.xlsm’.
 
 
1.     Controllers: This is where the PLCs or controllers’ parameters are configured.
2.     Controller Events: Each Controllers can trigger logging on demand for instance at the end of a Mixer (or a process) cycle. The Mixer end of cycle is an example of an event. A controller can have one or more events. The controller events parameters are configured in this worksheet.
3.     Event Tags: Each event has a block of tags associated with it. These are the tags that will logged when the event is triggered by the PLC. The tags associated with events are configured in this worksheet. A tag can be associated with one or more events. Note: If continuous (frequency based) logging is required the PLC event trigger does not have to be configured.
4.     Database: If Logging to a remote database is required the connection string is configured in this worksheet. (Bear in mind network failure here)
5.     Controller Type: This worksheet is protected and should not be changed. It contains information on the supported PLCs and their supported datatypes.
 
Controllers
PlcData is capable of handling one or more PLCs of different types. The supported types are detailed in the controller Type Worksheet.
 
 
1.     Ip Address: This is the Ip Address of the PLC on the network. The PC where PlcData is installed needs to be part of the network.
2.     Controller Type: This is the controller type i.e., Siemens S7, Allen Bradley SLC or a Rockwell’s Logix series. Only supported PLC types can be selected (See controller type worksheet for detail).
3.     Rack: Rack where the PLC resides.
4.     Slot: A rack usually has many slots this the slot where the PLC is housed (plugged in).
5.     Port: The controller port number. This is normally fixed by the manufacturer and should not need to be changed from the figures shown in the controller type worksheet.
6.     Timeout: This the connection time out in milliseconds. If PlcData fails to connect with the PLC within the timeout time it will log an error in the event log and the log file.
7.     Expand Table: This doubles the size of the configuration table should more table rows be required for configuration.
8.     Shrink Table: This deletes all fully blank rows.
 
Controller Events
Each Controller can have one or more events. Each event has several tags associated with it. When the Plc triggers an event, the associated tags are logged into the database.
If frequency-based logging is required there is no need to configure the trigger for the event.
 
Events are useful, especially when data is only available for a short time in the PLC. Example; at the end of a mix cycle a new cycle will begin and the end of cycle data may no longer be available.
Events enables logging momentary data.
 
Note: The number of events should not exceed the number of parallel connections of the PLC
 
From now on we will be dealing with Tags or PLC tags to be more precise. The tags’ structure is the same for all supported PLC types as follows.
 
·     Friendly name: This is usually a symbol or a name for the tag i.e., ‘Mixer-Start’, ‘Flour-Weight’ etc... (this is optional)
·     Description: The is a short description to clarify the information the tag holds or what the tag does in some instances. (this is optional for logging but mandatory for reporting)
·     Plc Address: This is the Tag address in the PLC i.e., for Siemens PLC ‘DB2.4’ (this is usually mandatory)
·     Plc Data Type: This is usually the supported data type for a PLC type (See controller type worksheet for details).
·     Units: This refers to Engineering units i.e.  Degree Celsius (Optional)
 
 
 
Settings:
1.     Controller Ip: A controller can have one or more events. This is the Ip Address of the Plc for which events are to be configured. Only configured controllers can be selected.
2.     Event Name: This identifies the event i.e.  ‘End of Mix’, Several PLCs can have same event name. The event name is scoped to a PLC.
3.     Enable: This enables or disables the event. If an event is disabled, NO logging of its associated tags can occur even if the PLC triggers it.
4.     Scan Time: This frequency in milliseconds configures how often does PlcData checks the PLC for event triggers.
5.     Logging Frequency: If NO PLC trigger is configured (See Tags Log enable later) and the event is enabled; logging is deemed frequency based. The frequency is the number in milliseconds set in the Logging frequency.
 
Run Id:
The Run Id can be used to glue together different events data.
The Run Id purpose is to group several events data to indicate the events data is part of the same batch. This is an optional configuration it can be blank.
A batch that has been mixed is then baked, cooled etc. The mixing, baking, and cooling are different events and can have the same Run Id to indicate they are part of the same batch.
6.     Friendly name: This is usually a symbol or a name for the tag (this is optional)
7.     Description: The is a short description to clarify the information the tag holds or what the tag does in some instances. (this is optional for logging)
8.     Plc Address: This is the Tag address in the PLC i.e., for Siemens PLC ‘DB2.4’ (this is mandatory)
9.     Plc Data Type: This can be any supported type.
10.     Units: This is usually not used
T
Tags Log Enable
The Tags Log Enable Plc Address is what PlcData listens for. When it goes from Off-To-ON, PlcData logs the block of tags associated with the event into the SQL server database.
The Tags Log Enable is optional if the Plc Address is left blank i.e., Plc Address=””, then continuous mode is deemed selected, and the logging is based on the logging frequency of the event.
 If Tags Log Enable has a plc address filled, then the logging is deemed to be PLC controlled and PlcData uses the configured ‘Scan Time’ to listen for logging requests from the PLC.
 When PlcData has logged the data, it turns OFF the ‘Tags Log Enable’ flag and sends back a signal to the PLC to indicate the tags have been logged, by turning the ‘Tags Logged Ack’ flag to ON.
11.     Friendly name: This is usually a symbol or a name for the tag (this is optional)
12.     Description: The is a short description to clarify the information the tag holds or what the tag does in some instances. (this is optional for logging)
13.     Plc Address: This is the Tag address in the PLC i.e., for Siemens PLC ‘DB2.0.0’ (this is optional, if left blank frequency-based logging occurs as per the event logging frequency)
14.     Plc Data Type: This is a Boolean type
15.     Units: This is usually not used
 
Tags Logged Acknowledge
Once logging has completed PlcData sends an acknowledge signal back to the Plc. PlcData always turns the acknowledge tag off before logging data.
16.     Friendly name: This is usually a symbol or a name for the tag (this is optional)
17.     Description: The is a short description to clarify the information the tag holds or what the tag does in some instances. (this is optional for logging)
18.     Plc Address: This is the Tag address in the PLC i.e., for Siemens PLC ‘DB2.0.1’ (this is optional but highly recommended)
19.     Plc Data Type: This is a Boolean type
20.     Units: This is not usually used
 
Configuration Tables
 
21.     Expand Table: This doubles the size of the configuration table should more table rows be required for configuration.
22.     Shrink Table: This deletes all fully blank rows.
 
Event Tags
Each event has a block of tags associated with it. The tags are logged either in continuous or Plc control mode.
 
 
1.     Selected Controller Event: Once controllers and their associated events have been configured, the block of tags needs to be configured. Only configured controller-events can be selected.
2.     Friendly name: This is usually a symbol or a name for the tag i.e., ‘Mixer-Start’, ‘Flour-Weight’ etc... (this is optional).
3.     Description: The is a short description to clarify the information the tag holds or what the tag does in some instances. (this is optional for logging but mandatory for reporting)
4.     Plc Address: This is the Tag address in the PLC i.e., for Siemens PLC ‘DB2.4’ (this is usually mandatory)
5.     Plc Data Type: This is usually the supported data type for a PLC type (See controller type worksheet for details).
6.     Units: This refers to Engineering units i.e.  Degree Celsius (Optional)
7.     Expand Table: This doubles the size of the configuration table should more table rows be required for configuration.
8.     Shrink Table: This deletes all fully blank rows.
 
PLC - PlcData Handshake
 
1.     Plc sends signal to Log by turning the Tags Log Enable flag to ON.
2.     PlcData turns the Tags Logged Ack flag to OFF.
3.     PlcData logs the data associated with the event, turns the Tags Log Enable flag to OFF and the Tags Logged Ack flag to ON.
4.     PlcData checks Tags Log Enable every event scan time. And the cycle repeats from 1.
 
Database
This is the connection string of a remote database should remote logging be required.          
Normally the system would use a locally installed database server and hence no connection string is needed. 
 
 
1.     Remote connection string: Remote database connection string. Network failure needs considering her.
2.     Remote Logging Enabled: Remote logging to a remote database is possible when this is selected.
 
Controller Type
This is where supported controllers and their supported data types are documented.
 
 
1.     Controller Selection: This is the list of supported controllers. When configuring controllers’ users must choose from this list.
2.     Plc Model: These are the models that are supported, more models could be supported.
3.     Port Numbers: These are believed to be the PLC vendors port numbers and users should not change them unless they know what they are doing.
4.     Logix Data Type: Logix series supported data type.
5.     Slc Data Type: SLC505 supported data type.
6.     Siemens S7 Data Type: S1500 supported data type.
 
Database Logs
Once the Excel File has been configured start the service and observe a database "PlcDataDb" has been created after few moments.
If frequency logging had been configured logging starts immediately.
if PLC control has been configured then logging is as at the PLC request.
The date and time of a log are in both UTC and local time.
The insert identifier indicates which group of records have been inserted together into the database.
 
 
The date and time of a log are in both UTC and local time.
The insert identifier indicates which group of records have been inserted together into the database.
 
DISCLAIMER
Plc Data has been thoroughly tested with a sample of PLCs types. Users are urged to try the free version before buying to make sure PlcData meets the required needs.