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
- In the appearing dialog, select the corresponding visualization for the Function Block: e. g. Visu_CPU_Diag
- 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.
- 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”.
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.
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:
After enabling the CPU diagnosis and CPU load, PLC_VISU is displayed as follows in online mode:
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.