Given the numerous differences and restrictions between SCL code and ST, it's impossible to compile a comprehensive list. However, to provide some insight, a few key points are highlighted below:
-
The IECST standard introduces some restrictions that are not present in SCL but are enforced by the SIMATIC AX ST compiler.
-
For instance, variables in the
VAR_INPUTsection cannot be written to, and variables used asFORiterator must be located in theVAR_TEMPsection, among others. -
Legacy constructs like
ATparameter passing will not be supported in AX.
-
-
Names of PLCs, blocks, types and variables must consist of letters, digits and underscore '_' only.
Spaces and other special characters are not supported.Note
Adapt them in the TIA Portal project before starting the
import-sclcommand. -
"Anonymous structures" of functions and function blocks are converted into "named structures".
The name of the structure is build from the variable name plus...Type. An example for an anonymous structure you will find in the picture:
-
In general, instructions of libraries are not converted, with few exceptions:
-
R_TRIGandF_TRIGare converted to instructions from the AX library System.EdgeDetection.
You must add this library to the dependencies:apax add @ax/system-edgedetection -
TON_TIMEand related instructions are converted to instructions from the AX library System.Timer
You must add this library to the dependencies:apax add @ax/system-timer -
For SCL blocks using Motion Control instructions
MC_*the required namespace Siemens.Simatic.S71500.MotionControl.Native is automatically added.
You must add one of the Motion Control libraries to the dependencies, such as:apax add @ax/simatic-1500-motioncontrol-native-v8Note
In Structured Text (ST) technology objects must be assigned via
VAR_IN_OUTparameter (Call-by-Reference). This tool automatically moves TOs from theVAR_INPUTsection to theVAR_IN_OUTsection while transforming the SCL code to ST. -
Some TIA Portal instructions are not available in SIMATIC AX.
If a particular instruction is essential for your workflow, please contact the AX support desk to request it.
-