PLC Reports User Manual

9. PLCs

In section PLCs, the PLCs to communicate with can be defined and the necessary settings can be made. In addition, the communication connection can be tested.

PLCs must be connected via Ethernet (TCP/IP). Connections to the following device types are supported:

  • CPUs with an integrated Ethernet or PROFINET interface
  • CPUs with a separate communication processor
  • NetLink modules (Converters from PROFIBUS / MPI to Ethernet)
  • CPUs of the series S7-300, S7-400, S7-1200 and IM151-8

PLCs

WarningCaution!
PLC Reports always requires one free communication connection of each PLC, independent of the number of reports reading data. Make sure that sufficient communication connections are available by setting the appropriate parameters in the PLCs hardware configuration.

WarningCaution!
Make sure to provide sufficient communication resources in the PLC settings. Check the parameters “cycle time” as well as “cycle load through communication” in the PLCs hardware configuration.

9.1. Opening the PLC Definition File for Editing

To open the PLC definition file for editing, select section “1. PLCs” and click the button “Open PLC Definitions File” Open PLC Definition File. The name and the path of the file are defined in section Application Settings. The PLC definition file is a Microsoft Excel workbook containing a worksheet named “PLCs”. The sheet name “PLCs” is set by PLC Reports and cannot be changed. However, it is possible to add additional worksheets, e.g. for documentation purposes.

9.1.1. Walk-Through: How to Open the PLC Definition File for Editing

  1. Make sure a valid PLC definition file is selected in section “Global Settings”
  2. Navigate to section “1. PLCs”
  3. Click the button “Open PLC Definitions File”
  4. The PLC definition file will be opened in Excel and can now be edited.

WarningNote!
By clicking the button Pin on the window frame, the application window of PLC Reports can be kept on top. This can help working simultaneously with the PLC Reports and the Excel application window.

WarningNote!
The PLC definition file can also be opened by means of the Windows Explorer or through the Excel File-Open menu. It is also possible to create or edit the file on another computer and after finishing copying it to the destination system. The difference is that validation of the definitions can only be made if the file was opened through PLC Reports.

9.2. Structure of the PLC Definition File

The PLC definition file has a fixed structure that cannot be modified. To define PLCs, the worksheet “PLCs” is used. The name of the worksheet is set by the system. If no worksheet “PLCs” is found while opening the definition file, a corresponding error message will be displayed.

PLC definitions can be entered starting from row 6. Row 5 is reserved for the column headers. The header area (row 1-4) is not being interpreted.

9.2.1. Columns of the Worksheet “PLCs”

The worksheet “PLCs” contains the following columns:

9.2.1.1. Column A: Index

This column is used for defining a unique identification number (index) for each PLC. The index is used e.g. in worksheet “Variables” to assign a variable to a PLC.

WarningNote!
Records will only be interpreted if column “Index” contains a valid numeric value.  If the index cell is blank, all entries in the following columns of the same row will not be considered. This way, any comments can be added for documentation or description purposes. Empty rows will also not be considered.

9.2.1.2. Column B: Name

This column is used to define a clear text name for the PLC. The name has no function and is used only for clarity.

9.2.1.3. Column C: PLC Type

This column defines the type of the connected PLC. Valid types are:
-          S7-300
-          S7-400
-          S7-1200
To communicate with controllers of type IM, please use S7-300.

9.2.1.4. Column D: IP Address

This column is used to define the IP Address of the PLC.

9.2.1.5. Column E: Rack

This column defines the number of the rack into which the CPU is plugged (Normally 0).

9.2.1.6. Column F: Slot

This column defines the number of the slot into which the CPU is plugged (with S7-300/400 normally 2, with S7-1200 normally 1)

9.2.1.7. Column G: Connect-Timeout (ms)

This column defines the maximum time within which a connection to a PLC must be established. The time is specified in milliseconds and valid values are between 500ms and 10,000ms. If the column is empty, the default value of 2,000ms is used.

The necessary time to connect to a PLC varies depending on the network structure. For example, if a PLC is connected through the Internet, the connection process will take longer compared to a directly connected PLC.

9.2.1.8. Column H: Read-Timeout (ms)

This column defines the maximum time within which a response to a read-request is expected from the PLC.

The time is specified in milliseconds and valid values are between 500ms and 1,0000ms. If the column is empty, the default value of 1,000ms is used.

The necessary time to read values from a PLC varies depending on the network structure. For example, if a PLC is connected through the Internet, the connection process will take longer compared to a directly connected PLC.

WarningCaution!
Timeout parameters should not be set too short. Depending on the cycle load of the PLC and the network load, it is likely that some read requests will be delayed. If, for instance a TCP/IP data package gets lost, it needs to be recommitted. In this case, the read request will take some time longer. Furthermore, the response time to communication requests is dependent on the cycle-load and the configuration of the PLC. Make sure that sufficient resources for communication are provided by PLC hardware configuration. Adjust the parameters “number of connections” and “cycle load through communication” appropriately.

9.3. Checking PLC Definitions

The PLC definitions can be checked by clicking the button “Load and Check PLCs” .

9.3.1. Walk-Through: How to Check PLC Definitions

  1. Make sure a valid PLC definition file is selected in section “Global Settings”
  2. Navigate to section “1. PLCs”
  3. Open the PLC definition file by clicking the button “Open PLC Definitions File”Open PLC Definition File
  4. The PLC definition file will now be opened in Excel
  5. Click the button “Load and Check PLCs”Load and Check PLCs
  6. All PLCs defined on worksheet “PLCs” will now be checked by PLC Reports.
  7. If the validation is error-free, the following dialog will appear:
    Load and Check PLCs OK
  8. If errors occur while validating the PLC definitions, the following dialog will appear:
    Load and Check PLCs Error
  9. In addition, each error will be listed in section “Messages”:
    PLC Message
  10. By double-clicking the error message, you can directly jump to the error-prone cell in the Excel sheet as long as the PLC definition file is open.
  11. Column “Def” displays an icon indicating the result of the validation for each defined PLC:

Icon QuestionMark Yellow  The PLC definition has not been checked yet
Icon OKThe PLC definition has been checked and is error free
WarningThe PLC definition contains errors

9.4. Checking Communication with a Defined PLC

After successfully loading and checking the PLC definitions, the list “PLCs” shows all defined PLCs:
PLCs
As in Excel, each row represents one PLC. You can now test the communication with each defined PLC by clicking the button “Test” in the corresponding row.

9.4.1. Walk-Through: How to Check Communication to a PLC

  1. Make sure that at least one PLC is defined correctly and is shown in table “PLCs”.
  2. Connect the Ethernet interface of your computer with the network to which the PLC is connected.
  3. Check the network card settings of your computer and make sure that a valid IP address is assigned to it.
  4. Click the button “Test” of the desired PLC definition.
  5. If the connection test is successful, the following dialog will appear:
    PLC Communication OK
  6. If no connection to the PLC can be established, the following error message will appear:
    PLC Communication Error
  7. In addition, each error will be listed in section “Messages”:
    PLC Communication Error Message
  8. After checking the communication the result will be indicated by an icon in column “Com”:

Icon QuestionMark Yellow  The communication with the PLC has not been checked yet
Icon OKThe communication with the PLC has been checked and is error free
WarningError while communicating with the PLC