plcopen/definitions.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 14 Aug 2017 23:27:15 +0300
changeset 1736 7e61baa047f0
parent 1680 6db967480b7d
child 1739 ec153828ded2
permissions -rw-r--r--
clean-up: fix PEP8 E302 expected 2 blank lines, found 1
1511
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     1
#!/usr/bin/env python
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     2
# -*- coding: utf-8 -*-
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     3
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     4
# This file is part of Beremiz, a Integrated Development Environment for
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     5
# programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     6
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     7
# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
1680
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1625
diff changeset
     8
# Copyright (C) 2017: Andrey Skvortsov
1511
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
     9
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    10
# See COPYING file for copyrights details.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    11
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    12
# This program is free software; you can redistribute it and/or
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    13
# modify it under the terms of the GNU General Public License
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    14
# as published by the Free Software Foundation; either version 2
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    15
# of the License, or (at your option) any later version.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    16
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    17
# This program is distributed in the hope that it will be useful,
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    20
# GNU General Public License for more details.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    21
#
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    22
# You should have received a copy of the GNU General Public License
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    23
# along with this program; if not, write to the Free Software
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    24
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    25
91538d0c242c add copyright notices to python files where there were missing, that
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1412
diff changeset
    26
1390
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    27
from os.path import join, split, realpath
1680
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1625
diff changeset
    28
import util.paths as paths
6db967480b7d make run Beremiz and PLCOpen Editor, if full path contain non-lating
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1625
diff changeset
    29
sd = paths.AbsDir(__file__)
1390
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    30
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    31
# Override gettext _ in this module
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    32
# since we just want string to be added to dictionnary
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    33
# but translation should happen here
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    34
_ = lambda x:x
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    35
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    36
LANGUAGES = ["IL","ST","FBD","LD","SFC"]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    37
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    38
LOCATIONDATATYPES = {"X" : ["BOOL"],
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    39
                     "B" : ["SINT", "USINT", "BYTE", "STRING"],
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    40
                     "W" : ["INT", "UINT", "WORD", "WSTRING"],
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    41
                     "D" : ["DINT", "UDINT", "REAL", "DWORD"],
1411
805d13d216c0 Fixed POU paste exception
Edouard Tisserant
parents: 1390
diff changeset
    42
                     "L" : ["LINT", "ULINT", "LREAL", "LWORD"]}
1390
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    43
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    44
#-------------------------------------------------------------------------------
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    45
#                        Function Block Types definitions
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    46
#-------------------------------------------------------------------------------
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    47
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    48
StdTC6Libs = [(_("Standard function blocks"),  join(sd, "Standard_Function_Blocks.xml")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    49
              (_("Additional function blocks"),join(sd, "Additional_Function_Blocks.xml"))]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    50
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    51
StdFuncsCSV = join(sd,"iec_std.csv")
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    52
1736
7e61baa047f0 clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1680
diff changeset
    53
1390
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    54
def GetBlockInfos(pou):
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    55
    infos = pou.getblockInfos()
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    56
    infos["inputs"] = [
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    57
        (var_name, var_type, "rising")
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    58
        if var_name in ["CU", "CD"]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    59
        else (var_name, var_type, var_modifier)
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    60
        for var_name, var_type, var_modifier in infos["inputs"]]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    61
    return infos
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    62
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    63
#-------------------------------------------------------------------------------
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    64
#                           Data Types definitions
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    65
#-------------------------------------------------------------------------------
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    66
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    67
"""
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    68
Ordored list of common data types defined in the IEC 61131-3
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    69
Each type is associated to his direct parent type. It defines then a hierarchy
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    70
between type that permits to make a comparison of two types
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    71
"""
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    72
TypeHierarchy_list = [
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    73
    ("ANY", None),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    74
    ("ANY_DERIVED", "ANY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    75
    ("ANY_ELEMENTARY", "ANY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    76
    ("ANY_MAGNITUDE", "ANY_ELEMENTARY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    77
    ("ANY_BIT", "ANY_ELEMENTARY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    78
    ("ANY_NBIT", "ANY_BIT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    79
    ("ANY_STRING", "ANY_ELEMENTARY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    80
    ("ANY_DATE", "ANY_ELEMENTARY"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    81
    ("ANY_NUM", "ANY_MAGNITUDE"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    82
    ("ANY_REAL", "ANY_NUM"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    83
    ("ANY_INT", "ANY_NUM"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    84
    ("ANY_SINT", "ANY_INT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    85
    ("ANY_UINT", "ANY_INT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    86
    ("BOOL", "ANY_BIT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    87
    ("SINT", "ANY_SINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    88
    ("INT", "ANY_SINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    89
    ("DINT", "ANY_SINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    90
    ("LINT", "ANY_SINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    91
    ("USINT", "ANY_UINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    92
    ("UINT", "ANY_UINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    93
    ("UDINT", "ANY_UINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    94
    ("ULINT", "ANY_UINT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    95
    ("REAL", "ANY_REAL"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    96
    ("LREAL", "ANY_REAL"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    97
    ("TIME", "ANY_MAGNITUDE"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    98
    ("DATE", "ANY_DATE"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
    99
    ("TOD", "ANY_DATE"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   100
    ("DT", "ANY_DATE"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   101
    ("STRING", "ANY_STRING"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   102
    ("BYTE", "ANY_NBIT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   103
    ("WORD", "ANY_NBIT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   104
    ("DWORD", "ANY_NBIT"),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   105
    ("LWORD", "ANY_NBIT")
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   106
    #("WSTRING", "ANY_STRING") # TODO
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   107
]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   108
1412
50192dd2f5ff Added plcopen.definitions.DefaultType, set to INT.
Edouard Tisserant
parents: 1411
diff changeset
   109
DefaultType = "DINT"
50192dd2f5ff Added plcopen.definitions.DefaultType, set to INT.
Edouard Tisserant
parents: 1411
diff changeset
   110
1390
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   111
DataTypeRange_list = [
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   112
    ("SINT", (-2**7, 2**7 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   113
    ("INT", (-2**15, 2**15 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   114
    ("DINT", (-2**31, 2**31 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   115
    ("LINT", (-2**31, 2**31 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   116
    ("USINT", (0, 2**8 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   117
    ("UINT", (0, 2**16 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   118
    ("UDINT", (0, 2**31 - 1)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   119
    ("ULINT", (0, 2**31 - 1))
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   120
]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   121
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   122
ANY_TO_ANY_FILTERS = {
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   123
    "ANY_TO_ANY":[
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   124
        # simple type conv are let as C cast
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   125
        (("ANY_INT","ANY_BIT"),("ANY_NUM","ANY_BIT")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   126
        (("ANY_REAL",),("ANY_REAL",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   127
        # REAL_TO_INT
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   128
        (("ANY_REAL",),("ANY_SINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   129
        (("ANY_REAL",),("ANY_UINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   130
        (("ANY_REAL",),("ANY_BIT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   131
        # TO_TIME
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   132
        (("ANY_INT","ANY_BIT"),("ANY_DATE","TIME")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   133
        (("ANY_REAL",),("ANY_DATE","TIME")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   134
        (("ANY_STRING",), ("ANY_DATE","TIME")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   135
        # FROM_TIME
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   136
        (("ANY_DATE","TIME"), ("ANY_REAL",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   137
        (("ANY_DATE","TIME"), ("ANY_INT","ANY_NBIT")),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   138
        (("TIME",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   139
        (("DATE",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   140
        (("TOD",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   141
        (("DT",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   142
        # TO_STRING
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   143
        (("BOOL",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   144
        (("ANY_BIT",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   145
        (("ANY_REAL",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   146
        (("ANY_SINT",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   147
        (("ANY_UINT",), ("ANY_STRING",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   148
        # FROM_STRING
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   149
        (("ANY_STRING",), ("BOOL",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   150
        (("ANY_STRING",), ("ANY_BIT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   151
        (("ANY_STRING",), ("ANY_SINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   152
        (("ANY_STRING",), ("ANY_UINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   153
        (("ANY_STRING",), ("ANY_REAL",))],
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   154
    "BCD_TO_ANY":[
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   155
        (("BYTE",),("USINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   156
        (("WORD",),("UINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   157
        (("DWORD",),("UDINT",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   158
        (("LWORD",),("ULINT",))],
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   159
    "ANY_TO_BCD":[
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   160
        (("USINT",),("BYTE",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   161
        (("UINT",),("WORD",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   162
        (("UDINT",),("DWORD",)),
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   163
        (("ULINT",),("LWORD",))]
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   164
}
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   165
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   166
# remove gettext override
0f4d32a033e0 Tidy PLCopen definitions
Edouard Tisserant
parents:
diff changeset
   167
del _