Skip to main content

Run as TargetVisu

You can run a visualization as CODESYS TargetVisu.

The requirement for this is that the runtime has the CODESYS TargetVisu component on the target system. Then the controller and the visualization are together on one device, whereby the visualization can be displayed and used on an integrated or connected display. When the application is downloaded, additional visualization code is downloaded to the target system.

You can start a visualization as TargetVisu on the target system without the development system running. This reduces memory usage on the target system considerably. That can be useful for smaller target systems. If the development system is also running, then the visualization is also displayed there in the visualization editor while it is running. Both display variants are the same in this case.

Supported image formats

  • TIF

    Requirement: CODESYS Control Win supports SysGraphicGDIPlus (standard on Windows platforms)

  • BMP

  • JPG

  • EMF

  • GIF

  • PNG

Tip

In version 3.5.1.0 and higher, the size of JPG graphics of the TargetVisu can be configured in the PLC.

Before that, the size for Windows devices was limited to 1024 * 768 * 3 bytes (approx. 2.3 MB).

CODESYS TargetVisu Embedded

The runtime on the target system is extended by the component CODESYS TargetVisu Embedded. It does not contain any graphical libraries and therefore is useful for smaller systems.

Configuring and starting a display variant

An executable visualization visMain exists in the project.

  1. Select the Visualization Manager object and click Add Object.

  2. Select the TargetVisu object and specify the name TargetVisu_A.

    A new object is in the device tree below the Visualization Manager object. The corresponding editor opens.

    The VISU_TASK visualization task is added automatically below the task configuration.

  3. Select the visMain visualization in the Start visualization.

  4. Click Show Used Visualizations and check that the selected visualization is activated for a download to the associated device.

    The visualization is configured. The settings in Scaling Options determine the window size and the scaling.

  5. Start a suitable runtime system with the runtime component CODESYS TargetVisu.

    Configure the communication settings for your system.

    The runtime system is running.

  6. Compile, download, and start the application.

    The application runs. The visualization starts automatically as CODESYS TargetVisu. It displays the visualization data and allows user input.

Starting or stopping the TargetVisu from the Windows command line

An executable visualization visMain exists in the project below the application appTest.

  1. Compile, download, and start the application.

    The application appTest starts. In addition, the visualization starts as CODESYS TargetVisu. It displays the visualization data and allows user input.

  2. Run the command-line command VisualClientController.exe --application=appTest --flags=2 on the development system. It is located in the installation directory of CODESYS in ..\GatewayPLC\.

    The visualization stops. The application is still in run mode.

  3. Run the command-line command VisualClientController.exe --application=appTest --flags=1.

    The visualization restarts.