Set/Reset

Overview

The following commands are part of the submenu Set/Reset:

oNone

oR - Reset

oS - Set

oRef (reference assignment

None

The CFC > Set/Reset > None command removes a Set or Reset from an output element. Select the input pin of the respective output and execute the command. The S or R symbol at the output element will disappear.

See possible cursor position for selection.

R - Reset

The CFC > Set/Reset > R - Reset command assigns a Reset to a boolean output element. This has the effect that the output will be reset by a TRUE of the input and keeps this value even if the input becomes FALSE again.

Select the input pin of the respective output and execute the command.

The reset output will be indicated by R

Example:

G-SE-0030810.1.gif-high.gif

 

 

In this example, VarOut will be set to FALSE if VarIn delivers TRUE. VarOut retains this value, even when VarIn reverts to FALSE.

Alternatively, the S - Set or None commands can be used to define the Set/Reset properties of an output.

S - Set

The CFC > Set/Reset > S - Set command assigns a Set to a boolean output element. This has the effect that the output gets set by a TRUE of the input and keeps this value even if the input becomes FALSE again.

Select the input pin of the respective output and execute the command.

See possible cursor position for selection.

Example:

G-SE-0030803.1.gif-high.gif

 

 

In this example, VarOut will be set to TRUE if VarIn delivers a TRUE. VarOut retains this value even when VarIn changes back to FALSE.

Alternatively, the R - Reset or None commands can be used to define the Set/Reset properties of an output.

REF= (Reference Assignment)

The CFC > Set/Reset > Ref command assigns a reference to an output element.

For general information on the concerned data type REFERENCE TO, which is available in the EcoStruxure Machine Expert programming system in extension to the IEC61131-3 standard, refer to References.

Select the input pin of the respective output (cursor position in CFC) and execute the command. The output then will be displayed with a REF modifier.

Example:

Declaration:

ref_int : REFERENCE TO INT;
a : INT;

CFC: ref_int now points to a

G-SE-0030800.1.gif-high.gif

 

 

This corresponds to the ST code: ref_int REF= a;