lib/standard_functions.txt
author Mario de Sousa <msousa@fe.up.pt>
Tue, 05 Apr 2011 14:24:07 +0100
changeset 281 686fa44e3832
parent 280 69a307407f7b
permissions -rw-r--r--
fixing exit_statement_c: produce 'break' instead of 'exit(0); (Thanks to Manuele)
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     1
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     2
{disable code generation}
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     3
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     4
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     5
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
     6
FUNCTION BOOL_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
     7
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
     8
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
     9
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    10
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    11
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    12
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    13
FUNCTION BOOL_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    14
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    15
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    16
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    17
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    18
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    19
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    20
FUNCTION BOOL_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    21
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    22
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    23
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    24
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    25
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    26
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    27
FUNCTION BOOL_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    28
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    29
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    30
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    31
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    32
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    33
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    34
FUNCTION BOOL_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    35
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    36
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    37
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    38
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    39
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    40
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    41
FUNCTION BOOL_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    42
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    43
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    44
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    45
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    46
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    47
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    48
FUNCTION BOOL_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    49
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    50
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    51
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    52
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    53
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    54
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    55
FUNCTION BOOL_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    56
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    57
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    58
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    59
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    60
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    61
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    62
FUNCTION BOOL_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    63
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    64
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    65
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    66
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    67
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    68
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    69
FUNCTION BOOL_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    70
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    71
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    72
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    73
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    74
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    75
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    76
FUNCTION BOOL_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    77
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    78
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    79
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    80
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    81
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    82
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    83
FUNCTION BOOL_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    84
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    85
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    86
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    87
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    88
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    89
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    90
FUNCTION BOOL_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    91
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    92
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    93
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    94
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    95
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    96
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    97
FUNCTION BOOL_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    98
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
    99
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   100
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   101
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   102
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   103
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   104
FUNCTION BYTE_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   105
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   106
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   107
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   108
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   109
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   110
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   111
FUNCTION BYTE_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   112
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   113
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   114
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   115
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   116
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   117
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   118
FUNCTION BYTE_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   119
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   120
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   121
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   122
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   123
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   124
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   125
FUNCTION BYTE_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   126
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   127
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   128
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   129
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   130
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   131
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   132
FUNCTION BYTE_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   133
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   134
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   135
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   136
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   137
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   138
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   139
FUNCTION BYTE_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   140
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   141
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   142
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   143
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   144
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   145
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   146
FUNCTION BYTE_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   147
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   148
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   149
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   150
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   151
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   152
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   153
FUNCTION BYTE_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   154
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   155
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   156
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   157
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   158
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   159
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   160
FUNCTION BYTE_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   161
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   162
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   163
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   164
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   165
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   166
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   167
FUNCTION BYTE_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   168
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   169
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   170
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   171
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   172
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   173
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   174
FUNCTION BYTE_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   175
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   176
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   177
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   178
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   179
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   180
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   181
FUNCTION BYTE_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   182
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   183
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   184
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   185
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   186
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   187
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   188
FUNCTION BYTE_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   189
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   190
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   191
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   192
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   193
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   194
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   195
FUNCTION BYTE_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   196
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   197
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   198
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   199
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   200
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   201
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   202
FUNCTION DINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   203
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   204
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   205
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   206
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   207
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   208
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   209
FUNCTION DINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   210
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   211
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   212
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   213
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   214
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   215
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   216
FUNCTION DINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   217
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   218
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   219
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   220
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   221
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   222
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   223
FUNCTION DINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   224
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   225
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   226
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   227
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   228
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   229
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   230
FUNCTION DINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   231
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   232
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   233
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   234
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   235
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   236
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   237
FUNCTION DINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   238
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   239
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   240
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   241
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   242
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   243
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   244
FUNCTION DINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   245
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   246
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   247
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   248
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   249
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   250
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   251
FUNCTION DINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   252
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   253
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   254
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   255
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   256
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   257
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   258
FUNCTION DINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   259
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   260
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   261
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   262
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   263
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   264
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   265
FUNCTION DINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   266
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   267
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   268
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   269
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   270
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   271
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   272
FUNCTION DINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   273
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   274
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   275
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   276
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   277
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   278
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   279
FUNCTION DINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   280
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   281
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   282
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   283
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   284
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   285
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   286
FUNCTION DINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   287
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   288
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   289
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   290
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   291
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   292
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   293
FUNCTION DINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   294
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   295
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   296
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   297
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   298
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   299
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   300
FUNCTION DWORD_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   301
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   302
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   303
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   304
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   305
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   306
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   307
FUNCTION DWORD_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   308
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   309
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   310
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   311
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   312
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   313
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   314
FUNCTION DWORD_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   315
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   316
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   317
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   318
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   319
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   320
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   321
FUNCTION DWORD_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   322
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   323
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   324
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   325
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   326
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   327
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   328
FUNCTION DWORD_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   329
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   330
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   331
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   332
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   333
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   334
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   335
FUNCTION DWORD_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   336
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   337
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   338
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   339
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   340
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   341
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   342
FUNCTION DWORD_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   343
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   344
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   345
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   346
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   347
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   348
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   349
FUNCTION DWORD_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   350
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   351
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   352
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   353
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   354
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   355
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   356
FUNCTION DWORD_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   357
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   358
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   359
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   360
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   361
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   362
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   363
FUNCTION DWORD_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   364
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   365
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   366
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   367
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   368
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   369
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   370
FUNCTION DWORD_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   371
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   372
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   373
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   374
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   375
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   376
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   377
FUNCTION DWORD_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   378
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   379
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   380
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   381
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   382
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   383
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   384
FUNCTION DWORD_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   385
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   386
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   387
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   388
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   389
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   390
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   391
FUNCTION DWORD_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   392
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   393
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   394
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   395
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   396
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   397
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   398
FUNCTION INT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   399
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   400
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   401
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   402
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   403
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   404
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   405
FUNCTION INT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   406
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   407
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   408
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   409
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   410
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   411
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   412
FUNCTION INT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   413
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   414
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   415
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   416
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   417
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   418
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   419
FUNCTION INT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   420
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   421
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   422
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   423
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   424
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   425
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   426
FUNCTION INT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   427
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   428
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   429
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   430
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   431
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   432
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   433
FUNCTION INT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   434
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   435
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   436
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   437
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   438
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   439
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   440
FUNCTION INT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   441
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   442
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   443
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   444
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   445
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   446
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   447
FUNCTION INT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   448
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   449
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   450
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   451
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   452
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   453
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   454
FUNCTION INT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   455
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   456
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   457
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   458
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   459
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   460
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   461
FUNCTION INT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   462
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   463
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   464
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   465
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   466
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   467
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   468
FUNCTION INT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   469
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   470
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   471
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   472
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   473
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   474
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   475
FUNCTION INT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   476
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   477
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   478
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   479
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   480
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   481
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   482
FUNCTION INT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   483
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   484
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   485
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   486
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   487
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   488
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   489
FUNCTION INT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   490
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   491
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   492
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   493
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   494
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   495
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   496
FUNCTION LINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   497
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   498
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   499
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   500
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   501
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   502
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   503
FUNCTION LINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   504
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   505
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   506
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   507
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   508
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   509
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   510
FUNCTION LINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   511
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   512
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   513
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   514
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   515
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   516
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   517
FUNCTION LINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   518
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   519
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   520
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   521
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   522
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   523
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   524
FUNCTION LINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   525
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   526
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   527
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   528
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   529
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   530
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   531
FUNCTION LINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   532
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   533
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   534
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   535
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   536
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   537
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   538
FUNCTION LINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   539
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   540
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   541
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   542
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   543
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   544
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   545
FUNCTION LINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   546
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   547
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   548
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   549
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   550
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   551
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   552
FUNCTION LINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   553
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   554
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   555
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   556
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   557
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   558
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   559
FUNCTION LINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   560
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   561
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   562
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   563
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   564
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   565
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   566
FUNCTION LINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   567
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   568
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   569
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   570
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   571
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   572
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   573
FUNCTION LINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   574
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   575
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   576
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   577
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   578
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   579
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   580
FUNCTION LINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   581
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   582
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   583
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   584
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   585
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   586
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   587
FUNCTION LINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   588
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   589
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   590
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   591
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   592
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   593
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   594
FUNCTION LREAL_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   595
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   596
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   597
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   598
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   599
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   600
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   601
FUNCTION LREAL_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   602
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   603
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   604
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   605
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   606
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   607
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   608
FUNCTION LREAL_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   609
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   610
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   611
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   612
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   613
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   614
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   615
FUNCTION LREAL_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   616
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   617
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   618
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   619
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   620
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   621
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   622
FUNCTION LREAL_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   623
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   624
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   625
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   626
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   627
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   628
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   629
FUNCTION LREAL_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   630
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   631
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   632
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   633
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   634
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   635
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   636
FUNCTION LREAL_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   637
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   638
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   639
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   640
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   641
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   642
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   643
FUNCTION LREAL_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   644
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   645
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   646
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   647
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   648
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   649
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   650
FUNCTION LREAL_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   651
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   652
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   653
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   654
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   655
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   656
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   657
FUNCTION LREAL_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   658
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   659
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   660
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   661
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   662
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   663
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   664
FUNCTION LREAL_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   665
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   666
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   667
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   668
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   669
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   670
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   671
FUNCTION LREAL_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   672
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   673
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   674
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   675
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   676
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   677
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   678
FUNCTION LREAL_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   679
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   680
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   681
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   682
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   683
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   684
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   685
FUNCTION LREAL_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   686
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   687
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   688
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   689
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   690
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   691
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   692
FUNCTION LWORD_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   693
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   694
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   695
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   696
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   697
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   698
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   699
FUNCTION LWORD_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   700
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   701
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   702
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   703
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   704
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   705
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   706
FUNCTION LWORD_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   707
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   708
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   709
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   710
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   711
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   712
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   713
FUNCTION LWORD_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   714
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   715
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   716
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   717
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   718
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   719
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   720
FUNCTION LWORD_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   721
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   722
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   723
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   724
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   725
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   726
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   727
FUNCTION LWORD_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   728
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   729
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   730
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   731
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   732
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   733
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   734
FUNCTION LWORD_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   735
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   736
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   737
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   738
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   739
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   740
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   741
FUNCTION LWORD_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   742
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   743
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   744
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   745
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   746
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   747
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   748
FUNCTION LWORD_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   749
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   750
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   751
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   752
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   753
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   754
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   755
FUNCTION LWORD_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   756
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   757
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   758
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   759
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   760
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   761
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   762
FUNCTION LWORD_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   763
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   764
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   765
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   766
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   767
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   768
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   769
FUNCTION LWORD_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   770
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   771
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   772
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   773
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   774
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   775
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   776
FUNCTION LWORD_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   777
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   778
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   779
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   780
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   781
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   782
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   783
FUNCTION LWORD_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   784
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   785
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   786
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   787
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   788
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   789
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   790
FUNCTION REAL_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   791
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   792
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   793
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   794
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   795
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   796
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   797
FUNCTION REAL_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   798
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   799
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   800
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   801
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   802
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   803
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   804
FUNCTION REAL_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   805
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   806
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   807
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   808
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   809
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   810
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   811
FUNCTION REAL_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   812
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   813
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   814
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   815
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   816
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   817
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   818
FUNCTION REAL_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   819
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   820
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   821
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   822
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   823
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   824
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   825
FUNCTION REAL_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   826
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   827
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   828
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   829
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   830
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   831
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   832
FUNCTION REAL_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   833
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   834
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   835
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   836
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   837
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   838
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   839
FUNCTION REAL_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   840
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   841
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   842
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   843
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   844
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   845
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   846
FUNCTION REAL_TO_SINT : SINT
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   847
  VAR_INPUT IN: REAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   848
  VAR_OUTPUT OUT: SINT; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   849
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   850
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   851
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   852
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   853
FUNCTION REAL_TO_UDINT : UDINT
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   854
  VAR_INPUT IN: REAL; END_VAR
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   855
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   856
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   857
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   858
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   859
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   860
FUNCTION REAL_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   861
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   862
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   863
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   864
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   865
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   866
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   867
FUNCTION REAL_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   868
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   869
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   870
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   871
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   872
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   873
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   874
FUNCTION REAL_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   875
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   876
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   877
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   878
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   879
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   880
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   881
FUNCTION REAL_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   882
  VAR_INPUT IN: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   883
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   884
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   885
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   886
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   887
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   888
FUNCTION SINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   889
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   890
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   891
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   892
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   893
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   894
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   895
FUNCTION SINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   896
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   897
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   898
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   899
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   900
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   901
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   902
FUNCTION SINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   903
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   904
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   905
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   906
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   907
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   908
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   909
FUNCTION SINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   910
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   911
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   912
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   913
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   914
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   915
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   916
FUNCTION SINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   917
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   918
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   919
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   920
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   921
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   922
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   923
FUNCTION SINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   924
  VAR_INPUT IN: SINT; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   925
  VAR_OUTPUT OUT: LINT; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   926
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   927
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   928
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   929
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   930
FUNCTION SINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   931
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   932
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   933
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   934
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   935
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   936
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   937
FUNCTION SINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   938
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   939
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   940
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   941
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   942
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   943
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   944
FUNCTION SINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   945
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   946
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   947
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   948
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   949
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   950
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   951
FUNCTION SINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   952
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   953
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   954
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   955
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   956
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   957
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   958
FUNCTION SINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   959
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   960
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   961
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   962
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   963
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   964
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   965
FUNCTION SINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   966
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   967
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   968
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   969
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   970
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   971
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   972
FUNCTION SINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   973
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   974
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   975
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   976
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   977
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   978
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   979
FUNCTION SINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   980
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   981
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   982
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   983
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   984
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   985
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   986
FUNCTION UDINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   987
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   988
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   989
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   990
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   991
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   992
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   993
FUNCTION UDINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   994
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   995
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   996
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   997
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   998
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
   999
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1000
FUNCTION UDINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1001
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1002
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1003
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1004
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1005
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1006
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1007
FUNCTION UDINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1008
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1009
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1010
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1011
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1012
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1013
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1014
FUNCTION UDINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1015
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1016
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1017
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1018
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1019
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1020
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1021
FUNCTION UDINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1022
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1023
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1024
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1025
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1026
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1027
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1028
FUNCTION UDINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1029
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1030
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1031
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1032
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1033
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1034
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1035
FUNCTION UDINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1036
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1037
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1038
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1039
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1040
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1041
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1042
FUNCTION UDINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1043
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1044
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1045
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1046
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1047
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1048
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1049
FUNCTION UDINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1050
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1051
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1052
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1053
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1054
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1055
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1056
FUNCTION UDINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1057
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1058
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1059
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1060
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1061
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1062
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1063
FUNCTION UDINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1064
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1065
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1066
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1067
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1068
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1069
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1070
FUNCTION UDINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1071
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1072
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1073
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1074
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1075
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1076
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1077
FUNCTION UDINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1078
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1079
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1080
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1081
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1082
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1083
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1084
FUNCTION UINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1085
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1086
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1087
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1088
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1089
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1090
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1091
FUNCTION UINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1092
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1093
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1094
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1095
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1096
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1097
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1098
FUNCTION UINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1099
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1100
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1101
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1102
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1103
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1104
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1105
FUNCTION UINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1106
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1107
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1108
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1109
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1110
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1111
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1112
FUNCTION UINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1113
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1114
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1115
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1116
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1117
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1118
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1119
FUNCTION UINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1120
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1121
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1122
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1123
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1124
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1125
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1126
FUNCTION UINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1127
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1128
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1129
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1130
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1131
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1132
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1133
FUNCTION UINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1134
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1135
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1136
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1137
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1138
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1139
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1140
FUNCTION UINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1141
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1142
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1143
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1144
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1145
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1146
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1147
FUNCTION UINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1148
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1149
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1150
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1151
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1152
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1153
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1154
FUNCTION UINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1155
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1156
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1157
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1158
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1159
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1160
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1161
FUNCTION UINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1162
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1163
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1164
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1165
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1166
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1167
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1168
FUNCTION UINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1169
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1170
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1171
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1172
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1173
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1174
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1175
FUNCTION UINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1176
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1177
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1178
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1179
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1180
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1181
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1182
FUNCTION ULINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1183
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1184
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1185
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1186
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1187
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1188
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1189
FUNCTION ULINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1190
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1191
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1192
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1193
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1194
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1195
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1196
FUNCTION ULINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1197
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1198
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1199
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1200
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1201
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1202
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1203
FUNCTION ULINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1204
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1205
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1206
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1207
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1208
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1209
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1210
FUNCTION ULINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1211
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1212
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1213
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1214
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1215
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1216
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1217
FUNCTION ULINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1218
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1219
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1220
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1221
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1222
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1223
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1224
FUNCTION ULINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1225
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1226
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1227
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1228
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1229
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1230
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1231
FUNCTION ULINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1232
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1233
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1234
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1235
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1236
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1237
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1238
FUNCTION ULINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1239
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1240
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1241
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1242
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1243
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1244
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1245
FUNCTION ULINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1246
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1247
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1248
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1249
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1250
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1251
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1252
FUNCTION ULINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1253
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1254
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1255
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1256
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1257
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1258
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1259
FUNCTION ULINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1260
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1261
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1262
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1263
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1264
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1265
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1266
FUNCTION ULINT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1267
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1268
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1269
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1270
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1271
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1272
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1273
FUNCTION ULINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1274
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1275
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1276
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1277
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1278
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1279
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1280
FUNCTION USINT_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1281
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1282
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1283
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1284
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1285
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1286
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1287
FUNCTION USINT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1288
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1289
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1290
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1291
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1292
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1293
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1294
FUNCTION USINT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1295
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1296
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1297
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1298
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1299
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1300
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1301
FUNCTION USINT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1302
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1303
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1304
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1305
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1306
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1307
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1308
FUNCTION USINT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1309
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1310
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1311
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1312
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1313
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1314
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1315
FUNCTION USINT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1316
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1317
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1318
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1319
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1320
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1321
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1322
FUNCTION USINT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1323
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1324
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1325
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1326
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1327
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1328
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1329
FUNCTION USINT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1330
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1331
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1332
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1333
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1334
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1335
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1336
FUNCTION USINT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1337
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1338
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1339
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1340
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1341
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1342
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1343
FUNCTION USINT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1344
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1345
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1346
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1347
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1348
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1349
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1350
FUNCTION USINT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1351
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1352
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1353
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1354
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1355
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1356
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1357
FUNCTION USINT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1358
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1359
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1360
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1361
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1362
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1363
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1364
FUNCTION USINT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1365
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1366
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1367
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1368
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1369
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1370
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1371
FUNCTION USINT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1372
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1373
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1374
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1375
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1376
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1377
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1378
FUNCTION WORD_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1379
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1380
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1381
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1382
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1383
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1384
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1385
FUNCTION WORD_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1386
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1387
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1388
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1389
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1390
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1391
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1392
FUNCTION WORD_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1393
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1394
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1395
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1396
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1397
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1398
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1399
FUNCTION WORD_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1400
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1401
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1402
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1403
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1404
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1405
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1406
FUNCTION WORD_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1407
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1408
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1409
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1410
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1411
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1412
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1413
FUNCTION WORD_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1414
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1415
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1416
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1417
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1418
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1419
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1420
FUNCTION WORD_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1421
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1422
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1423
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1424
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1425
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1426
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1427
FUNCTION WORD_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1428
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1429
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1430
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1431
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1432
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1433
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1434
FUNCTION WORD_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1435
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1436
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1437
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1438
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1439
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1440
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1441
FUNCTION WORD_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1442
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1443
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1444
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1445
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1446
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1447
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1448
FUNCTION WORD_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1449
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1450
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1451
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1452
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1453
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1454
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1455
FUNCTION WORD_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1456
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1457
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1458
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1459
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1460
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1461
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1462
FUNCTION WORD_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1463
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1464
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1465
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1466
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1467
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1468
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1469
FUNCTION WORD_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1470
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1471
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1472
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1473
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1474
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1475
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1476
FUNCTION STRING_TO_BOOL : BOOL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1477
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1478
  VAR_OUTPUT OUT: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1479
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1480
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1481
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1482
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1483
FUNCTION STRING_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1484
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1485
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1486
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1487
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1488
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1489
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1490
FUNCTION STRING_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1491
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1492
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1493
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1494
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1495
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1496
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1497
FUNCTION STRING_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1498
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1499
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1500
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1501
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1502
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1503
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1504
FUNCTION STRING_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1505
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1506
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1507
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1508
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1509
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1510
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1511
FUNCTION STRING_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1512
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1513
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1514
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1515
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1516
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1517
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1518
FUNCTION STRING_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1519
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1520
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1521
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1522
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1523
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1524
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1525
FUNCTION STRING_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1526
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1527
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1528
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1529
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1530
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1531
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1532
FUNCTION STRING_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1533
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1534
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1535
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1536
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1537
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1538
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1539
FUNCTION STRING_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1540
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1541
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1542
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1543
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1544
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1545
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1546
FUNCTION STRING_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1547
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1548
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1549
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1550
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1551
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1552
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1553
FUNCTION STRING_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1554
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1555
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1556
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1557
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1558
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1559
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1560
FUNCTION STRING_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1561
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1562
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1563
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1564
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1565
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1566
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1567
FUNCTION STRING_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1568
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1569
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1570
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1571
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1572
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1573
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1574
FUNCTION STRING_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1575
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1576
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1577
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1578
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1579
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1580
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1581
FUNCTION STRING_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1582
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1583
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1584
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1585
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1586
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1587
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1588
FUNCTION STRING_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1589
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1590
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1591
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1592
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1593
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1594
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1595
FUNCTION STRING_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1596
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1597
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1598
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1599
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1600
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1601
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1602
FUNCTION STRING_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1603
  VAR_INPUT IN: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1604
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1605
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1606
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1607
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1608
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1609
FUNCTION BOOL_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1610
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1611
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1612
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1613
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1614
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1615
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1616
FUNCTION BYTE_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1617
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1618
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1619
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1620
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1621
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1622
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1623
FUNCTION WORD_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1624
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1625
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1626
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1627
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1628
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1629
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1630
FUNCTION DWORD_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1631
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1632
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1633
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1634
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1635
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1636
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1637
FUNCTION LWORD_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1638
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1639
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1640
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1641
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1642
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1643
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1644
FUNCTION INT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1645
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1646
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1647
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1648
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1649
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1650
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1651
FUNCTION LINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1652
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1653
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1654
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1655
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1656
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1657
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1658
FUNCTION DINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1659
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1660
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1661
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1662
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1663
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1664
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1665
FUNCTION SINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1666
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1667
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1668
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1669
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1670
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1671
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1672
FUNCTION USINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1673
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1674
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1675
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1676
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1677
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1678
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1679
FUNCTION UINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1680
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1681
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1682
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1683
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1684
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1685
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1686
FUNCTION UDINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1687
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1688
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1689
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1690
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1691
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1692
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1693
FUNCTION ULINT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1694
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1695
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1696
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1697
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1698
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1699
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1700
FUNCTION REAL_TO_STRING : STRING
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1701
  VAR_INPUT IN: REAL; END_VAR
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1702
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1703
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1704
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1705
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1706
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1707
FUNCTION LREAL_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1708
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1709
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1710
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1711
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1712
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1713
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1714
FUNCTION DATE_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1715
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1716
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1717
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1718
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1719
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1720
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1721
FUNCTION DT_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1722
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1723
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1724
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1725
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1726
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1727
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1728
FUNCTION TIME_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1729
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1730
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1731
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1732
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1733
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1734
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1735
FUNCTION TOD_TO_STRING : STRING
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1736
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1737
  VAR_OUTPUT OUT: STRING; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1738
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1739
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1740
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1741
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1742
FUNCTION BOOL_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1743
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1744
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1745
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1746
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1747
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1748
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1749
FUNCTION BYTE_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1750
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1751
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1752
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1753
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1754
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1755
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1756
FUNCTION WORD_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1757
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1758
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1759
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1760
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1761
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1762
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1763
FUNCTION DWORD_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1764
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1765
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1766
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1767
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1768
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1769
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1770
FUNCTION LWORD_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1771
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1772
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1773
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1774
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1775
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1776
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1777
FUNCTION SINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1778
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1779
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1780
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1781
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1782
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1783
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1784
FUNCTION INT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1785
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1786
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1787
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1788
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1789
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1790
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1791
FUNCTION DINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1792
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1793
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1794
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1795
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1796
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1797
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1798
FUNCTION LINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1799
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1800
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1801
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1802
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1803
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1804
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1805
FUNCTION USINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1806
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1807
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1808
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1809
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1810
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1811
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1812
FUNCTION UINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1813
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1814
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1815
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1816
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1817
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1818
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1819
FUNCTION UDINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1820
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1821
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1822
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1823
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1824
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1825
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1826
FUNCTION ULINT_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1827
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1828
  VAR_OUTPUT OUT: DATE; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1829
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1830
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1831
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1832
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1833
FUNCTION REAL_TO_DATE : DATE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1834
  VAR_INPUT IN: REAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1835
  VAR_OUTPUT OUT: DATE; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1836
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1837
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1838
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  1839
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1840
FUNCTION LREAL_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1841
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1842
  VAR_OUTPUT OUT: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1843
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1844
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1845
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1846
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1847
FUNCTION DATE_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1848
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1849
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1850
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1851
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1852
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1853
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1854
FUNCTION DATE_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1855
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1856
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1857
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1858
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1859
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1860
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1861
FUNCTION DATE_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1862
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1863
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1864
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1865
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1866
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1867
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1868
FUNCTION DATE_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1869
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1870
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1871
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1872
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1873
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1874
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1875
FUNCTION DATE_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1876
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1877
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1878
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1879
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1880
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1881
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1882
FUNCTION DATE_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1883
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1884
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1885
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1886
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1887
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1888
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1889
FUNCTION DATE_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1890
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1891
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1892
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1893
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1894
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1895
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1896
FUNCTION DATE_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1897
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1898
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1899
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1900
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1901
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1902
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1903
FUNCTION DATE_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1904
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1905
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1906
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1907
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1908
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1909
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1910
FUNCTION DATE_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1911
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1912
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1913
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1914
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1915
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1916
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1917
FUNCTION DATE_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1918
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1919
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1920
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1921
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1922
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1923
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1924
FUNCTION DATE_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1925
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1926
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1927
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1928
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1929
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1930
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1931
FUNCTION DATE_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1932
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1933
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1934
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1935
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1936
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1937
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1938
FUNCTION DATE_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1939
  VAR_INPUT IN: DATE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1940
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1941
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1942
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1943
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1944
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1945
FUNCTION BOOL_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1946
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1947
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1948
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1949
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1950
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1951
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1952
FUNCTION BYTE_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1953
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1954
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1955
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1956
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1957
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1958
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1959
FUNCTION WORD_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1960
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1961
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1962
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1963
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1964
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1965
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1966
FUNCTION DWORD_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1967
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1968
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1969
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1970
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1971
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1972
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1973
FUNCTION LWORD_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1974
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1975
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1976
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1977
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1978
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1979
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1980
FUNCTION SINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1981
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1982
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1983
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1984
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1985
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1986
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1987
FUNCTION INT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1988
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1989
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1990
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1991
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1992
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1993
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1994
FUNCTION DINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1995
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1996
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1997
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1998
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  1999
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2000
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2001
FUNCTION LINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2002
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2003
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2004
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2005
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2006
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2007
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2008
FUNCTION USINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2009
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2010
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2011
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2012
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2013
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2014
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2015
FUNCTION UINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2016
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2017
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2018
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2019
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2020
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2021
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2022
FUNCTION UDINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2023
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2024
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2025
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2026
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2027
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2028
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2029
FUNCTION ULINT_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2030
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2031
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2032
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2033
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2034
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2035
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2036
FUNCTION REAL_TO_TIME : TIME
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2037
  VAR_INPUT IN: REAL; END_VAR
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2038
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2039
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2040
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2041
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2042
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2043
FUNCTION LREAL_TO_TIME : TIME
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2044
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2045
  VAR_OUTPUT OUT: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2046
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2047
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2048
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2049
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2050
FUNCTION TIME_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2051
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2052
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2053
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2054
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2055
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2056
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2057
FUNCTION TIME_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2058
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2059
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2060
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2061
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2062
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2063
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2064
FUNCTION TIME_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2065
  VAR_INPUT IN: TIME; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2066
  VAR_OUTPUT OUT: DWORD; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2067
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2068
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2069
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2070
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2071
FUNCTION TIME_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2072
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2073
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2074
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2075
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2076
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2077
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2078
FUNCTION TIME_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2079
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2080
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2081
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2082
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2083
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2084
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2085
FUNCTION TIME_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2086
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2087
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2088
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2089
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2090
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2091
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2092
FUNCTION TIME_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2093
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2094
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2095
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2096
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2097
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2098
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2099
FUNCTION TIME_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2100
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2101
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2102
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2103
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2104
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2105
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2106
FUNCTION TIME_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2107
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2108
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2109
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2110
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2111
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2112
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2113
FUNCTION TIME_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2114
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2115
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2116
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2117
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2118
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2119
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2120
FUNCTION TIME_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2121
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2122
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2123
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2124
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2125
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2126
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2127
FUNCTION TIME_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2128
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2129
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2130
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2131
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2132
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2133
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2134
FUNCTION TIME_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2135
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2136
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2137
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2138
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2139
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2140
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2141
FUNCTION TIME_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2142
  VAR_INPUT IN: TIME; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2143
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2144
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2145
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2146
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2147
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2148
FUNCTION BOOL_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2149
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2150
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2151
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2152
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2153
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2154
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2155
FUNCTION BYTE_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2156
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2157
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2158
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2159
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2160
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2161
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2162
FUNCTION WORD_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2163
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2164
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2165
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2166
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2167
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2168
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2169
FUNCTION DWORD_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2170
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2171
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2172
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2173
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2174
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2175
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2176
FUNCTION LWORD_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2177
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2178
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2179
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2180
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2181
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2182
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2183
FUNCTION SINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2184
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2185
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2186
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2187
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2188
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2189
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2190
FUNCTION INT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2191
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2192
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2193
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2194
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2195
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2196
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2197
FUNCTION DINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2198
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2199
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2200
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2201
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2202
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2203
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2204
FUNCTION LINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2205
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2206
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2207
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2208
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2209
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2210
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2211
FUNCTION USINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2212
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2213
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2214
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2215
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2216
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2217
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2218
FUNCTION UINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2219
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2220
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2221
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2222
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2223
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2224
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2225
FUNCTION UDINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2226
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2227
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2228
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2229
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2230
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2231
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2232
FUNCTION ULINT_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2233
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2234
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2235
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2236
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2237
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2238
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2239
FUNCTION REAL_TO_DT : DT
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2240
  VAR_INPUT IN: REAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2241
  VAR_OUTPUT OUT: DT; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2242
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2243
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2244
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2245
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2246
FUNCTION LREAL_TO_DT : DT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2247
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2248
  VAR_OUTPUT OUT: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2249
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2250
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2251
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2252
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2253
FUNCTION DT_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2254
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2255
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2256
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2257
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2258
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2259
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2260
FUNCTION DT_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2261
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2262
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2263
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2264
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2265
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2266
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2267
FUNCTION DT_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2268
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2269
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2270
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2271
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2272
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2273
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2274
FUNCTION DT_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2275
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2276
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2277
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2278
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2279
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2281
FUNCTION DT_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2282
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2283
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2284
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2285
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2286
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2287
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2288
FUNCTION DT_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2289
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2290
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2291
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2292
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2293
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2294
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2295
FUNCTION DT_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2296
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2297
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2298
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2299
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2300
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2301
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2302
FUNCTION DT_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2303
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2304
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2305
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2306
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2307
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2308
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2309
FUNCTION DT_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2310
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2311
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2312
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2313
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2314
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2315
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2316
FUNCTION DT_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2317
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2318
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2319
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2320
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2321
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2322
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2323
FUNCTION DT_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2324
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2325
  VAR_OUTPUT OUT: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2326
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2327
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2328
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2329
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2330
FUNCTION DT_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2331
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2332
  VAR_OUTPUT OUT: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2333
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2334
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2335
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2336
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2337
FUNCTION DT_TO_REAL : REAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2338
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2339
  VAR_OUTPUT OUT: REAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2340
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2341
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2342
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2343
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2344
FUNCTION DT_TO_LREAL : LREAL
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2345
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2346
  VAR_OUTPUT OUT: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2347
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2348
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2349
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2350
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2351
FUNCTION BOOL_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2352
  VAR_INPUT IN: BOOL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2353
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2354
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2355
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2356
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2357
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2358
FUNCTION BYTE_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2359
  VAR_INPUT IN: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2360
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2361
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2362
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2363
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2364
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2365
FUNCTION WORD_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2366
  VAR_INPUT IN: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2367
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2368
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2369
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2370
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2371
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2372
FUNCTION DWORD_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2373
  VAR_INPUT IN: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2374
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2375
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2376
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2377
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2378
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2379
FUNCTION LWORD_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2380
  VAR_INPUT IN: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2381
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2382
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2383
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2384
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2385
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2386
FUNCTION SINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2387
  VAR_INPUT IN: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2388
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2389
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2390
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2391
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2392
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2393
FUNCTION INT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2394
  VAR_INPUT IN: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2395
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2396
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2397
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2398
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2399
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2400
FUNCTION DINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2401
  VAR_INPUT IN: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2402
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2403
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2404
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2405
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2406
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2407
FUNCTION LINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2408
  VAR_INPUT IN: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2409
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2410
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2411
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2412
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2413
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2414
FUNCTION USINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2415
  VAR_INPUT IN: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2416
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2417
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2418
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2419
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2420
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2421
FUNCTION UINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2422
  VAR_INPUT IN: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2423
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2424
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2425
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2426
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2427
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2428
FUNCTION UDINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2429
  VAR_INPUT IN: UDINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2430
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2431
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2432
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2433
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2434
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2435
FUNCTION ULINT_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2436
  VAR_INPUT IN: ULINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2437
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2438
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2439
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2440
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2441
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2442
FUNCTION REAL_TO_TOD : TOD
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2443
  VAR_INPUT IN: REAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2444
  VAR_OUTPUT OUT: TOD; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2445
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2446
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2447
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2448
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2449
FUNCTION LREAL_TO_TOD : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2450
  VAR_INPUT IN: LREAL; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2451
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2452
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2453
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2454
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2455
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2456
FUNCTION TOD_TO_BYTE : BYTE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2457
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2458
  VAR_OUTPUT OUT: BYTE; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2459
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2460
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2461
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2462
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2463
FUNCTION TOD_TO_WORD : WORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2464
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2465
  VAR_OUTPUT OUT: WORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2466
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2467
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2468
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2469
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2470
FUNCTION TOD_TO_DWORD : DWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2471
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2472
  VAR_OUTPUT OUT: DWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2473
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2474
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2475
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2476
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2477
FUNCTION TOD_TO_LWORD : LWORD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2478
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2479
  VAR_OUTPUT OUT: LWORD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2480
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2481
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2482
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2483
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2484
FUNCTION TOD_TO_SINT : SINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2485
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2486
  VAR_OUTPUT OUT: SINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2487
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2488
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2489
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2490
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2491
FUNCTION TOD_TO_INT : INT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2492
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2493
  VAR_OUTPUT OUT: INT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2494
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2495
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2496
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2497
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2498
FUNCTION TOD_TO_DINT : DINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2499
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2500
  VAR_OUTPUT OUT: DINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2501
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2502
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2503
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2504
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2505
FUNCTION TOD_TO_LINT : LINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2506
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2507
  VAR_OUTPUT OUT: LINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2508
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2509
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2510
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2511
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2512
FUNCTION TOD_TO_USINT : USINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2513
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2514
  VAR_OUTPUT OUT: USINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2515
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2516
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2517
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2518
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2519
FUNCTION TOD_TO_UINT : UINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2520
  VAR_INPUT IN: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2521
  VAR_OUTPUT OUT: UINT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2522
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2523
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2524
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2525
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2526
FUNCTION TOD_TO_UDINT : UDINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2527
  VAR_INPUT IN: TOD; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2528
  VAR_OUTPUT OUT: UDINT; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2529
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2530
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2531
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2532
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2533
FUNCTION TOD_TO_ULINT : ULINT
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2534
  VAR_INPUT IN: TOD; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2535
  VAR_OUTPUT OUT: ULINT; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2536
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2537
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2538
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2539
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2540
FUNCTION TOD_TO_REAL : REAL
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2541
  VAR_INPUT IN: TOD; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2542
  VAR_OUTPUT OUT: REAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2543
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2544
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2545
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2546
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2547
FUNCTION TOD_TO_LREAL : LREAL
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2548
  VAR_INPUT IN: TOD; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2549
  VAR_OUTPUT OUT: LREAL; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2550
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2551
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2552
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2553
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2554
FUNCTION DATE_AND_TIME_TO_TIME_OF_DAY : TOD
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2555
  VAR_INPUT IN: DT; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2556
  VAR_OUTPUT OUT: TOD; END_VAR
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2557
  LD TRUE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2558
END_FUNCTION
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2559
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2560
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2561
FUNCTION DATE_AND_TIME_TO_DATE : DATE
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2562
  VAR_INPUT IN: DT; END_VAR
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2563
  VAR_OUTPUT OUT: DATE; END_VAR
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2564
  LD TRUE
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2565
END_FUNCTION
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
  2566
269
98fc461e1888 Fixing stupid bug (that was disabling code generation).
Mario de Sousa <msousa@fe.up.pt>
parents: 267
diff changeset
  2567
{enable code generation}
280
69a307407f7b Fixing code generation of standard conversion functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 269
diff changeset
  2568