Basics

The Scalable Vector Graphics (SVG) support in Codesys is platform dependent.
Typically, SVGs are

  • partially supported on Linux - only the TinySVG vector image format is correctly usable,
  • fully supported on Windows,
  • and not supported at all on Windows CE.

Also, if the device does not support SVG, we implicitly convert SVG images to a supported format when downloading them to the controller.

Default File path for Images within a project, on the PLC/controller: $PlcLogic$/$visu$/

Scaling Issues

There are some cases where e.g. in the target at least SVG images are displayed, but behave strangely (e.g. when scaling).
Then SVGs are used that do not comply with the TinySVG format, but are required by the platform to work correctly.

This can result in subsequent restrictions:

  • The images are rendered and saved as .png (this would be seen in the controller file system).
  • The size of the rendered image results from the largest static usage created in the project.
  • Therefore, the created .png images might have received an unwanted scaling.
  • These images may be displayed blurred in the Target Visu - depending on the relative size in contrast to the projected usage (largest static usage).

Known handling problems, using SVG Images

If you encounter a rendering problem with SVGs, you have a few ways to work around it, or check why they can't be rendered:

Use the latest versions

Please check if you are using the latest version of the Codesys Visualization Profile or CODESYS Visualization (Add-on, package), corresponding supported by your runtime version.
Depending on the version of your Codesys installation, you can check this via the Package Manager or the Codesys Installer.

PLC Error message: SVG Imageformat disabled by build option

The error message may look like this:

**** ERROR: SVG Imageformat disabled by build option
!!!! Warning: Image=<image>$PlcLogic$/$visu$/xxxxxx.svg</image> not loaded

This log message in the PLC/controller usually occurs when the SVG feature is not active in the build of the RTV (Remote Target Visu) element of the Runtime, and therefore cannot no rendering SVGs at all.
With other words, the PLC/controller basically does not support the feature - it was not built in.

In this case, you can:

  • Redesign your project and do not use SVGs
  • contact the PLC/controller manufacturer and ask for a possible update,
  • Try to work around with the 'Transfer both svg images and converted images' Option

Visualization Manager, Tab: Advanced Settings

Use of the 'Transfer both svg images and converted images' Option in the Visualization Manager - Advanced Settings:

  • The option is visible only if both a WebVisu and a TargetVisu exist.
  • The option handles only images in SVG format.
  • The option is also available if the device description of the TargetVisu controller does not support the SVG (full) format.
  • If the device supports SVG (full), the option is grayed out. No need for conversion.

The main use case for this option is using a PLC with both,

  • TargetVisualization, with no SVG or only TinySVG support
  • WebVisualization
  • A PLC, that does have enough memory to hold both types of images.

For such PLCs, the optimal and best display/look when using SVK images would not be possible in the Webvisu so. The option makes this possible.

Windows RTE

In the Codesys RTE, it can happen that SVG are not displayed there in the TargetVisu, if the folder "SVGRenderer32" with the SVGRenderer.dll are not in the RTE folder on the target system.

RemoteTargetvisu

In this case, the following error is usually displayed:

"Loading the DLL SVGRenderer failed. SVG Graphics  cannot be displayed"

This behavior occurs when f.e.g. only the RemoteTargetvisu.exe is copied out of the GatewayPLC folder and then used.
The corresponding SVGRenderer.dll is not found. This DLL is expected, parallel to the EXE file, in the same folder.


  • No labels