[Beremiz-devel] array in function bug

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Beremiz-devel] array in function bug

Александр Аксенов
Maybe I found a bug. If you create a function and add an array as an input variable, then the project will not compile.
Here's some sample code:

FUNCTION function0 : BOOL
  VAR_INPUT
    LocalVar0 : ARRAY [0..8] OF BYTE;
  END_VAR

  FUNCTION0:=0;
END_FUNCTION

PROGRAM program1
  VAR
    dataArr : ARRAY [0..8] OF BYTE;
    out : BOOL;
    _TMP_function010_OUT : BOOL;
  END_VAR

  _TMP_function010_OUT := function0(dataArr);
  out := _TMP_function010_OUT;
END_PROGRAM


CONFIGURATION config

  RESOURCE resource1 ON PLC
    TASK task0(INTERVAL := T#20ms,PRIORITY := 0);
    PROGRAM instance0 WITH task0 : program1;
  END_RESOURCE
END_CONFIGURATION


_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel