tests/syntax/configuration/configuration.txt
author mjsousa
Fri, 26 Dec 2014 08:09:34 +0000
changeset 969 706a152731ab
parent 109 3af0b849b9c6
permissions -rwxr-xr-x
Do constant propagation inside Configurations and Resources (required for support of extension: array [1..max] OF int); (Resources is still buggy)
109
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     1
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     2
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     3
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     4
PROGRAM foo
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     5
VAR_INPUT
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     6
  single, interval, priority : BOOL;
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     7
END_VAR
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     8
  LD single
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
     9
  LD interval
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    10
  LD priority
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    11
END_PROGRAM
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    12
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    13
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    14
PROGRAM priority
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    15
VAR_INPUT
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    16
  bar : BOOL;
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    17
END_VAR
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    18
  LD bar
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    19
END_PROGRAM
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    20
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    21
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    22
PROGRAM single
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    23
VAR_INPUT
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    24
  bar : BOOL;
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    25
END_VAR
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    26
  LD bar
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    27
END_PROGRAM
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    28
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    29
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    30
PROGRAM interval
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    31
VAR_INPUT
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    32
  bar : BOOL;
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    33
END_VAR
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    34
  LD bar
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    35
END_PROGRAM
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    36
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    37
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    38
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    39
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    40
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    41
CONFIGURATION config1
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    42
 TASK fast(PRIORITY := 4);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    43
 PROGRAM P1 WITH fast:
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    44
       FOO(single := TRUE, interval := TRUE, priority := TRUE);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    45
END_CONFIGURATION
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    46
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    47
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    48
CONFIGURATION config2
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    49
 TASK fast(SINGLE := 3, PRIORITY := 4);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    50
 PROGRAM P1 WITH fast:
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    51
       FOO(single := TRUE, interval := TRUE, priority := TRUE);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    52
END_CONFIGURATION
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    53
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    54
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    55
CONFIGURATION config3
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    56
 TASK fast(INTERVAL := T#1s, PRIORITY := 4);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    57
 PROGRAM P1 WITH fast:
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    58
       FOO(single := TRUE, interval := TRUE, priority := TRUE);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    59
END_CONFIGURATION
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    60
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    61
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    62
CONFIGURATION config4
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    63
 TASK fast(SINGLE := 3, INTERVAL := T#1s, PRIORITY := 4);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    64
 PROGRAM P1 WITH fast:
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    65
       FOO(single := TRUE, interval := TRUE, priority := TRUE);
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    66
END_CONFIGURATION
3af0b849b9c6 Regression tests. Not yet finished...
mario
parents:
diff changeset
    67