AnalyzeExpression

AnalyzeExpression 1:

The function block can be used in PLC projects that use the SFC flags. No instances are generated. The corresponding PLC library must be integrated in the project. Further configuration requirements can be found in the following explanatory notes.

The AnalyzeExpression and AnalyzeExpressionTable function blocks can be used to analyze transitions and step-enabling conditions. If a transition is not triggered after a set time, the transition can be analyzed using these function blocks.

AnalyzeExpression 2:

The function blocks can only be used to analyze expressions or transitions that are implemented in the ST programming language.

Configuration requirements

The following settings are required to enable AnalyzeExpression or AnalyzeExpressionTable for SFC:

Sample

The configurations mentioned above have been implemented in the following sample. For "Step1", the maximum active time was set to 1 s. If the associated outgoing transition "Trans_ST" has not triggered after 1 s, this transition is analyzed by the function blocks AnalyzeExpression and AnalyzeExpressionTable. The variable SFCError is set to TRUE and the variable SFCErrorStep is given the value 'Step 1'.

The analysis results "SFCErrorAnalyzation" or "SFCErrorAnalyzationTable" indicate which (partial) expression has not yet been triggered, so that "Step1" can be exited.

The transition "Trans_ST" consists of the expression

b1 AND (b2 OR b3);

 

Figure 1:

AnalyzeExpression 3:

Figure 2:

AnalyzeExpression 4:

Requirements

Development environment

Target system type

PLC libraries to include (Category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System)