Details of Conditional Breakpoints

TwinCAT C++ provides conditional breakpoints. Details of the formulation of these conditions can be found here.

Details of Conditional Breakpoints 1:

Unlike the Visual Studio C++ conditional breakpoints, the TwinCAT conditions are compiled and subsequently transferred to the target system so that they can be used during short cycle times.

WARNING

Damage to plants and personal injuries due to unexpected behavior of the machine / plant

Breakpoints change the behavior of the machine or plant. Depending on the machine being controlled, the machine or workpieces may be damaged or the health and life of people may be endangered.

Make sure that the changed behavior of the controlled system does not cause any damage and be sure to note the plant documentation.

The option buttons offer two options that are described separately.

Option: Is true

Conditions are defined with the help of logical terms, comparable to conjunctive normal forms.
They are formed from a combination of maxterms connected by "&&".

(Maxterm1 && Maxterm2 && ... && MaxtermN)

wherein each Maxterm represents a combination of || associated conditions:

(condition1 ||condition2 || ... || conditionN )

Possible comparison operators: ==,!=, <=, >=, <, >

Observe the Live Watch window for the determination of the available variables. All listed variables can be used for the formulation of conditions. This includes TMC-defined symbols as well as local member variables.

Samples:

m_counter == 123 && hr !=  0

m_counter == 123 || m_counter2 == 321 && hr == 0

m_counter == 123

Further comments:

Option: Has changed

The option “Has changed“ is simple to understand: By providing variable names, the value will be monitored and execution will be held, if the value has changed from the cycle before.

Samples:

m_counter

m_counter && m_counter2