Technical#

  • Max size of compiled individual program is 65000 bytes

1300 lines as below produces that much code

x := x + y; x := x + y; x := x + y; x := x + y; x := x + y;

Size of program may be checked by creating ‘dummy’ Fx2020 into project and adding only one program into it

  • Size of whole project max 500000 bytes

Compiling project produces following output:

Code size in bytes: 2200.
Number of segments: 8.
0 error(s), 0 warning(s) - S:\LAITOS\DEMO\SOFTPLC\$GEN$\FX2020\FX2020.PCD.
  • Optimize for speed if necessary

Using ‘size’ optimizing Fx2020 uses one second for program

VAR
    i, j : dint;
END_VAR

FOR i:=1 TO 50000 DO
    j := j + 1 ;
END_FOR;

Using ‘speed’ optimizing improves performance a lot, one second is used for program

VAR
    i, j : dint;
END_VAR

FOR i:=1 TO 2000000 DO
    j := j + 1;
END_FOR;

However there are couple of limitations with ‘speed’ optimizing

  • Selection must be done to whole Fx2020

  • Compiled size is ten times bigger than ‘size’ optimized code

  • Step by step debugging does not work

  • Because of bigger size, download is slower

Recommendation: ‘size’ optimizing is usually fast enough, so use ‘speed’ optimizing only when you really need it.