Import Guidelines from other third party IDEs: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 7: Line 7:


The aim of this page is to help the software developer to write a PLC sorce code and do the proper manual substitutions, in case the PLCOpenXML features could not translate correctly from an IDE to the other.
The aim of this page is to help the software developer to write a PLC sorce code and do the proper manual substitutions, in case the PLCOpenXML features could not translate correctly from an IDE to the other.
You can also find at [https://www.axelsw.it/pwiki/index.php/IEC61131-3_Topics_Not_Supported_By_LogicLab this page] the table of all IEC-61131-3 topics currently not supported by LogicLab.


__TOC__
__TOC__


== Non-conformities of other third party IDEs to the standard IEC-61131-3 ==
== IEC-61131-3 non-conformities of other third party IDEs ==


{| border=2
{| border=2
! Codesys behavior !! Comments and post-import procedures in LogicLab
!#!!style="background-color:yellow"|Codesys !!style="background-color:Aquamarine"|Comments and LogicLab behavior
|-
|1a||Possibility to omit a succeeding semicolon “''';'''” to the following constructs: <ul><li>END_IF</li><li>END_FOR</li><li>END_WHILE</li><li>END_CASE</li><li>END_REPEAT</li></ul> || ⚪ The standard IEC-61131-3 says that the succeeding semicolon “''';'''” is mandatory.<br>✅ LogicLab automatically adds all the succeeding semicolons “''';'''” to the listed constructs, when the source code is imported.
|-
|1b||Usage of a point “'''.'''” character as separator for enum values.<br>For instance: ''enumVar.enumField'' || ⚪ The standard IEC-61131-3 says that only a sharp “'''#'''” character can be used as separator for enum values (for instance: ''enumVar#enumField'').<br>❌ LogicLab does NOT support the point as separator for enum values.
|-
|-
| Possibility to omit a succeeding semicolon “''';'''” to the following constructs: <ul><li>END_IF</li><li>END_FOR</li><li>END_WHILE</li><li>END_CASE</li><li>END_REPEAT</li></ul> || ⚪ The standard IEC-61131-3 says that the succeeding semicolon “''';'''” is mandatory.<br>✅ LogicLab automatically adds all the succeeding semicolons “''';'''” to the listed constructs, when the source code is imported.
|1c||Enum values cannot be written alone, without the leading enumerative type name.<br> For example:<ul><li>''enumType.enumValue''</li><li>''enumType#enumValue''</li></ul> || ⚪ The standard IEC-61131-3 allows to write enum values in both the following ways:<br><ul><li>''enumType#enumValue''</li><li>''enumValue''</li></ul>✅ LogicLab supports both the syntaxes, when the source code is imported.
|-
|-
| Usage of a point “'''.'''” character as separator for enum values.<br>For instance: ''enumVar.enumField'' || ⚪ The standard IEC-61131-3 says that only a sharp “'''#'''” character can be used as separator for enum values (for instance: ''enumVar#enumField'').<br>❌ LogicLab does NOT support the point as separator for enum values.
|1d||Possibility to define nested arrays:<br>''nestArr : ARRAY[0..N] OF ARRAY[0..M]…OF INT;'' || ⚪ The standard IEC-61131-3 does not allow nested arrays. Only multidimensional arrays are allowed.<br>❌ LogicLab does NOT support nested arrays.
|-
|-
| Enum values cannot be written alone, without the leading enumerative type name.<br> For example:<ul><li>''enumType.enumValue''</li><li>''enumType#enumValue''</li></ul> || ⚪ The standard IEC-61131-3 allows to write enum values in both the following ways:<br><ul><li>''enumType#enumValue''</li><li>''enumValue''</li></ul>✅ LogicLab supports both the syntaxes, when the source code is imported.
|1e||Nested arrays are accessed with the following syntax:<br>''nestArr[3][4]…[1];'' || ⚪ The standard IEC-61131-3 does not allow nested arrays.<br>LogicLab does NOT support nested arrays.
|-
|-
| Possibility to define nested arrays:<br>''nestArr : ARRAY[0..N] OF ARRAY[0..M]…OF INT;'' || ⚪ The standard IEC-61131-3 does not allow nested arrays. Only multidimensional arrays are allowed.<br>LogicLab does NOT support nested arrays.
|1f||Reference declaration is possible only by using a '''REFERENCE TO''' keyword. For instance:<br>''ref1 : REFERENCE TO INT;'' || ⚪ The standard IEC-61131-3 says that references shall be declared with the keyword '''REF_TO'''. For instance:<br>''ref1 := REF_TO INT;''<br>LogicLab automatically substitutes all the "REFERENCE TO" occurrences with "REF_TO", when the source code is imported.
|-
|-
| Nested arrays are accessed with the following syntax:<br>''nestArr[3][4]…[1];'' || ⚪ The standard IEC-61131-3 does not allow nested arrays.<br>LogicLab does NOT support nested arrays.
|1g||Reference initialization is possible only by using a '''REF=''' construct. For instance:<br>''ref1 REF= int1'' means that ''ref1'' is a reference to ''int1'' || ⚪ The standard IEC-61131-3 says that references shall be initialized with the operator '''REF'''. For instance:<br>''ref1 := REF(int1);''<br>✅ LogicLab automatically substitutes all the "REF=" occurrences with the "REF" operator, when the source code is imported.
|-
|-
| Reference declaration is possible only by using a '''REFERENCE TO''' keyword. For instance:<br>''ref1 : REFERENCE TO INT;'' || ⚪ The standard IEC-61131-3 says that references shall be declared with the keyword '''REF_TO'''. For instance:<br>''ref1 := REF_TO INT;''<br>LogicLab automatically substitutes all the "REFERENCE TO" occurrences with "REF_TO", when the source code is imported.
|1h||Dereferencing a reference is possible '''without a succeeding ^''' character. For instance:<br> ''x := ref1;'' means that the value contained into the variable referenced by ''ref1'' is assigned to ''x''. || ⚪ The standard IEC-61131-3 says that references shall be dereferenced only by using a succeeding '''^''' character. For instance:<br>''x := ref1^;''<br>LogicLab does NOT support dereferentiation without a succeeding '''^''' character. This means that all dereferentiations must be modified manually when the source code is imported.
|-
|-
| Reference initialization is possible only by using a '''REF=''' construct. For instance:<br>''ref1 REF= int1'' means that ''ref1'' is a reference to ''int1'' || ⚪ The standard IEC-61131-3 says that references shall be initialized with the operator '''REF'''. For instance:<br>''ref1 := REF(int1);''<br>✅ LogicLab automatically substitutes all the "REF=" occurrences with the "REF" operator, when the source code is imported.
|1i||Strings may be declared with a size enclosed by round brackets. For instance<br>''str : STRING(32);'' || ⚪ The standard IEC-61131-3 says that strings shall be declared with square brackets. For instance:<br>''str : STRING[32];''<br>✅ LogicLab automatically substitutes round brackets with square brackets for all strings, when the source code is imported.
|-
|-
| Dereferencing a reference is possible '''without a succeeding ^''' character. For instance:<br> ''x := ref1;'' means that the value contained into the variable referenced by ''ref1'' is assigned to ''x''. || ⚪ The standard IEC-61131-3 says that references shall be dereferenced only by using a succeeding '''^''' character. For instance:<br>''x := ref1^;''<br>❌ LogicLab does NOT support dereferentiation without a succeeding '''^''' character. This means that all dereferentiations must be modified manually when the source code is imported.
|1l||Methods can be called without a '''THIS''' specifier within the owning function block || ⚪ The standard IEC-61131-3 says that the '''THIS''' specifier is mandatory. ❌ LogicLab does NOT support a method call inside the owning function block without a preceding '''THIS'''.
|}
|}


 
== IEC-61131-3 extensions of other third party IDEs ==
== Extensions to the standard IEC-61131-3 made by other third party IDEs ==


{| border=2
{| border=2
! Codesys !! Comments
!#!!style="background-color:yellow"|Codesys !!style="background-color:Aquamarine"|Comments and LogicLab behavior
|-
|-
| Pointers to arrays || ⏳ LogicLab will support this feature
|2a||Pointers to arrays || ⏳ Soon in LogicLab
|-
|-
| Pointers are implemented using the character '''^''' || ✅ LogicLab implements pointers using the character '''@'''. When a source code is imported, LogicLab automatically do the proper substitutions.
|2b||Pointers are implemented using the character '''^''' || ✅ LogicLab implements pointers by using the character '''@'''. When a source code is imported, LogicLab automatically do the proper substitutions.
|-
|-
| Generic types '''__XWORD''', '''__UXINT''' depending on the architecture (32/64 bits) || ✅ A possible workaround is to declare typedefs in LogicLab. '''PVOID''' type is also available.
|2c||Generic types '''__XWORD''', '''__UXINT''' depending on the architecture (32/64 bits)||✅ A possible workaround is to declare typedefs in LogicLab. '''PVOID''' type is also available.
|}
|}
[[category:LogicLab]]
[[category:LogicLab]]

Latest revision as of 10:25, 8 August 2023

As part of the PLCOpen organization, Axel provides PLCOpenXML features to import/export PLC source codes from/to other third party IDEs.

However, since there are 3 different levels of certification to the standard IEC-61131-3 (see all Logic certified products), there are also different levels of compliance to the standard itself.

For this reason, in some cases things are made differently among different environments and the PLCOpenXML features cannot solve these gaps.

The aim of this page is to help the software developer to write a PLC sorce code and do the proper manual substitutions, in case the PLCOpenXML features could not translate correctly from an IDE to the other.

You can also find at this page the table of all IEC-61131-3 topics currently not supported by LogicLab.

IEC-61131-3 non-conformities of other third party IDEs

# Codesys Comments and LogicLab behavior
1a Possibility to omit a succeeding semicolon “;” to the following constructs:
  • END_IF
  • END_FOR
  • END_WHILE
  • END_CASE
  • END_REPEAT
⚪ The standard IEC-61131-3 says that the succeeding semicolon “;” is mandatory.
✅ LogicLab automatically adds all the succeeding semicolons “;” to the listed constructs, when the source code is imported.
1b Usage of a point “.” character as separator for enum values.
For instance: enumVar.enumField
⚪ The standard IEC-61131-3 says that only a sharp “#” character can be used as separator for enum values (for instance: enumVar#enumField).
❌ LogicLab does NOT support the point as separator for enum values.
1c Enum values cannot be written alone, without the leading enumerative type name.
For example:
  • enumType.enumValue
  • enumType#enumValue
⚪ The standard IEC-61131-3 allows to write enum values in both the following ways:
  • enumType#enumValue
  • enumValue
✅ LogicLab supports both the syntaxes, when the source code is imported.
1d Possibility to define nested arrays:
nestArr : ARRAY[0..N] OF ARRAY[0..M]…OF INT;
⚪ The standard IEC-61131-3 does not allow nested arrays. Only multidimensional arrays are allowed.
❌ LogicLab does NOT support nested arrays.
1e Nested arrays are accessed with the following syntax:
nestArr[3][4]…[1];
⚪ The standard IEC-61131-3 does not allow nested arrays.
❌ LogicLab does NOT support nested arrays.
1f Reference declaration is possible only by using a REFERENCE TO keyword. For instance:
ref1 : REFERENCE TO INT;
⚪ The standard IEC-61131-3 says that references shall be declared with the keyword REF_TO. For instance:
ref1 := REF_TO INT;
✅ LogicLab automatically substitutes all the "REFERENCE TO" occurrences with "REF_TO", when the source code is imported.
1g Reference initialization is possible only by using a REF= construct. For instance:
ref1 REF= int1 means that ref1 is a reference to int1
⚪ The standard IEC-61131-3 says that references shall be initialized with the operator REF. For instance:
ref1 := REF(int1);
✅ LogicLab automatically substitutes all the "REF=" occurrences with the "REF" operator, when the source code is imported.
1h Dereferencing a reference is possible without a succeeding ^ character. For instance:
x := ref1; means that the value contained into the variable referenced by ref1 is assigned to x.
⚪ The standard IEC-61131-3 says that references shall be dereferenced only by using a succeeding ^ character. For instance:
x := ref1^;
❌ LogicLab does NOT support dereferentiation without a succeeding ^ character. This means that all dereferentiations must be modified manually when the source code is imported.
1i Strings may be declared with a size enclosed by round brackets. For instance
str : STRING(32);
⚪ The standard IEC-61131-3 says that strings shall be declared with square brackets. For instance:
str : STRING[32];
✅ LogicLab automatically substitutes round brackets with square brackets for all strings, when the source code is imported.
1l Methods can be called without a THIS specifier within the owning function block ⚪ The standard IEC-61131-3 says that the THIS specifier is mandatory. ❌ LogicLab does NOT support a method call inside the owning function block without a preceding THIS.

IEC-61131-3 extensions of other third party IDEs

# Codesys Comments and LogicLab behavior
2a Pointers to arrays ⏳ Soon in LogicLab
2b Pointers are implemented using the character ^ ✅ LogicLab implements pointers by using the character @. When a source code is imported, LogicLab automatically do the proper substitutions.
2c Generic types __XWORD, __UXINT depending on the architecture (32/64 bits) ✅ A possible workaround is to declare typedefs in LogicLab. PVOID type is also available.