Visualizations

Group:
Visu_CPU_Diag Visualization of the CPU diagnosis
Visu_CPU_Load Visualization of the CPU load
Visu_CS31_Diag Visualization of the CS31 diagnosis
Visu_FBP_Diag Visualization of the FBP slave interface diagnosis

Proceed as follows to integrate the visualization into a project:

  • Create a new visualization using Visualizations / Insert Object (e.g. visuCPUDiag).
  • Insert a visualization using e9c99e7e1dd7b1c60a317d314d5a06af_74373f6be389f2dd0a33139000eba54e
  • In the appearing dialog, select the corresponding visualization for the Function Block: e. g. Visu_CPU_Diag
../_images/0478c841e389fa9a0a33139000eba54e
  • Then, the visualization integrated just now has to be configured. Highlight the visualization with a left mouse click. Then click the right mouse button and select the function “Configure…” from the context menu.
  • The configuration of the visualization is done in the appearing dialog. It is recommended to set the frame to “Fixed”. This way, the original width-to-height ratio and font size are kept.
../_images/9ccd008be389f5ba0a33139000eba54e
  • By clicking on <OK> the dialogs are closed. After this, the inserted visualization has to be adapted to the correct size.

In the visualization of the Function Block CPU_DIAG, the diagnosis messages shall be output as language-dependent plain text. Proceed as follows to include the corresponding text file “Errors.xml”:

  • Switch to the visualization editor.
  • Select the menu item “Extras”/”Settings”. In the appearing dialog, select the category “Language”, check “Dynamic texts” and enter “ERRORS.XML” as file name. Now, the desired language can be selected in the field “Language”.
../_images/df106a03e389f55c0a33139000eba54e
  • Then, the path has to be entered in order to find the language file “ERRORS.XML”. Select “Project”/”Options”/”Directories”, go to “General”/”Visualization files” and enter the path CoDeSys.exe. In case of a default installation, this is:

    C:\Program Files\3S Software\CoDeSys V2.3 or C:\Programme\3S Software\CoDeSys V2.3.

    During installation of Automation_Builder, the file ERRORS.XML is copied to this directory.

../_images/7bb570aee389f9710a33139000eba54e

The following little example illustrates how to integrate diagnosis Function Blocks into a project and how to operate them via a central visualization.

In the same way as described for the Function Block CPU_DIAG, the visualizations for the Function Blocks CPU_LOAD (visuCPULoad), CS31_DIAG (visuCS31Diag) and FBP_DIAG (visuFBPDiag) have to be created.

By means of the visualization PLC_VISU, the individual visualizations can be launched and enabled or disabled. For that purpose, the program “PLC_Diagnosis()” is included into the AC500 project:

The program contains the following declarations and calls:

PROGRAM PLC_Diagnosis


VAR


bCPUEnable : BOOL := TRUE;
bCS31Enable : BOOL := FALSE;
bFBPEnable : BOOL := FALSE;
bCPUDiagEnable : BOOL := TRUE;


END_VAR


(* Call AC500 diagnosis *)
CPU(EN := bCPUEnable);
diagCPU(EN := bCPUDiagEnable);
diagCS31(EN := bCS31Enable, COM := 1);
diagFBP(EN := bFBPEnable);

In offline mode, the related visualization PLC_VISU looks as follows:

../_images/80dcd8a0e389f4c00a33139000eba54e

After enabling the CPU diagnosis and CPU load, PLC_VISU is displayed as follows in online mode:

../_images/4c9e217de389f50e0a33139000eba54e

Using the buttons on the left side, the corresponding visualization is called. Clicking the “Enable” buttons enables the processing of the related Function Blocks.

The program “PLC_Diagnosis()” and the visualization PLC_VISU are contained in the export file AC500_PLC_Diagnosis.exp and can be inserted into an AC500 project via Project/Import.