Skip to main content

Handling of EVC/EVL

Using EVC/EVL in a Compound Safety PLC

EVC (Exchange Variable Connection) can be used within one or more nonsafe subdevices in order to access (safe and nonsafe) variables of the safety subdevice.

Figure 5. Example: Device tree of a project using a Compound Safety PLC with EVC/EVL
Example: Device tree of a project using a Compound Safety PLC with EVC/EVL


Adding EVC to a nonsafe subdevice

You can add EVC (Exchange Variable Connection) to an application like other "POU" objects: Use the Add Object command and dialog and select EVC.

Tip

The name of an EVC object cannot be changed. There can only be one EVC object within an application.

EVC editor

When you open the EVC object, you get the EVC editor. There you configure which variables of the application of the safe subdevice should be available within the application, to which the EVC object belongs.

Figure 6. Example of an EVC
Example of an EVC


If the application of the safe subdevice is not up-to-date (if the application was changed after the last successful code generation), then the EVC editor displays a warning similar to the following: Safe application has changed or is not up to date. Execute "Build" command to be able to select variables.

If you want to generate code for the safe application directly, then you can use the Build button. Afterwards, the warning should disappear.

All variables found within the safety application of the safety subdevice are displayed in the EVC editor in a structured way. If you want to access any of these variables individually, then click the corresponding check box. Selected variables are accessible. To remove access privileges to a variable, you clear the corresponding check box.

You can access all accessible variables within the application (where the EVC is located) by means of the namespace "EVC".

Example 5. Example of code that uses variables published by an EVC object
IF NOT EVC.GUIDS.xError AND EVC.GUIDS.xGuidValid THEN
  EVC.EVL.nonsafeVAr := 1;
  iVar := EVC.PLC_PRG.iVar;
END_IF


To check the status of EVC, you should use the implicit member GUIDS of the EVC Namespace in your application. The implicit GVL EVC.GUIDS provides two status variables. As a result, you can monitor the consistency of the EVC variables used.

There are currently two members that you should check to make sure that the mechanism is working correctly:

  • EVC.GUIDS.xError

    TRUE when an error has occurred within the EVC mechanism

    In this case, stop accessing the variables which are provided/published by the EVC mechanism. You could crash the safety application.

    FALSE when the mechanism is working correctly and no error has occurred

    You can access the variables which are published within the EVC namespace.

  • \\ EVC.GUIDS.xGuidValid

    Shows whether or not the safe application, to which the EVC is connected, is exactly the same one as configured in the project (matching GUIDs)

    If this variable is FALSE, then stop accessing the variables which are provided/published by the EVC mechanism. You could crash the safety application.

Important

You should access variables within the EVC namespace only when xError = FALSE and xGuidValid = TRUE. Otherwise, the safety function of the safety application in the safe subdevice could be affected.