Programming standard boxes with FBD

Một phần của tài liệu Automating with SIMATIC s7 400 inside TIA portal publicis (2013) (Trang 325 - 328)

Standard boxes control binary tags such as outputs or bit memories. Standard boxes exist for assigning, setting, and resetting a binary tag or for controlling a SIMATIC timer or counter function (Fig. 8.13).

8.3.1 Assign box

The assign box directly assigns the result of logic operation to the tag above the box.

For programming, drag the symbol for the assignment with the mouse from the program elements catalog under Basic instructions > Bit logic operation to the work- ing area. Gray boxes indicate the permissible positioning, a green box identifies the position at which the box will be inserted if you release the mouse button.

The assign box can be used within a logic operation, following a T branch, or as the termination of an operation. It can be positioned in series or parallel. The assign box requires a preceding logic operation.

Fig. 8.14 shows the possible arrangements for the assign box. In the logic opera- tion, the assign box is used to control the #Display.nofan, #Display.onefan, and

#Display.twofans tags. Two boxes are connected in parallel at the end of the logic operation. They respond identically.

Fig. 8.13 Overview of standard boxes available with FBD

Binary tag Binary tag Binary tag

SIMATIC timer

SIMATIC counter SIMATIC counter

Standard boxes

= S

xx

CV TV

R

SC xx

Assignment Set box Reset box

Standard box with timer response

Standard box with counter response xx = SP

SE SD SS SF

Start pulse timer

Start extentend pulse timer Start on-delay timer Start retentive on-delay timer Start off-delay timer

xx = CU CD

Count up Count down

8.3.2 Set and reset boxes

A set or reset box is used to assign signal state “1” or “0” to a binary tag in the case of a result of logic operation “1”. A result of logic operation “0” has no effect.

For programming, drag the symbol for the set or reset box with the mouse from the program elements catalog under Basic instructions > Bit logic operation to the work- ing area. Gray boxes indicate the permissible positioning, a green box identifies the position at which the coil will be inserted if you release the mouse button.

Set and reset boxes require a preceding logic operation and terminate a logic oper- ation. The reset box can also be used to reset a SIMATIC timer or -counter function.

In Fig. 8.15, #Fan1.start with signal state “1” sets the #Fan1.drive tag. Signal state

“0” at #Fan1.start has no effect. With signal state “1” at #Fan1.stop, #Fan1.drive is reset. Signal state “0” at #Fan1.stop has no effect. As a result of positioning of the reset coil after the set coil, the memory response is “reset dominant”: If both tags have signal state “1”, #Fan1.drive is reset or remains reset. The enable for starting Fig. 8.14 Example of arrangement of assign box

Fig. 8.15 Example of set and reset boxes

and stopping is not directly connected to the AND functions in this example, but permits the representation of both boxes in one network through the programming prior to a T branch.

8.3.3 Standard boxes with time response

A standard box with time response is a single element of a SIMATIC timer function.

The timer function is usually applied as a complete timer box which contains all elements. The standard box with time response corresponds to the S input of the complete timer box. Attention must be paid to the sequence in the program when using the single elements. The time response of these boxes is described in Chapter 12.3 “SIMATIC timer functions” on page 477.

For programming, drag the symbol for the corresponding standard box with the mouse from the program elements catalog under Basic instructions > Timer opera- tions to the working area.

A standard box with time response requires a preceding logic operation and termi- nates a logic operation. It can be connected parallel to all other boxes. Positioning at the end of a T branch is also possible.

The time tag is positioned above the standard box with a time response. This is an operand from the range of SIMATIC timers (T). The time value is specified in the data format S5TIME at the TV input.

In Fig. 8.16, the timer “Fan4.delay” is started as a switch-on delay by the positive edge of #Fan4.start. Following expiry of the duration (5 s in the example), the fan is switched on by #Fan4.drive. If #Fan4.start has the signal state “0” prior to expiry of the duration, the fan is not even switched on.

8.3.4 Standard boxes with counter response

A standard box with counter response is a single element of a SIMATIC counter func- tion. The counter function is usually applied as a complete counter box which con- tains all elements. The SC box corresponds to the S input of the complete counter box, the CU box to the CU input, and the CD box to the CD input. Attention must be paid to the sequence in the program when using the single elements. The response Fig. 8.16 Example of a standard box with time response

of these boxes is described in Chapter 12.5 “SIMATIC counter functions” on page 495.

For programming, drag the symbol for the corresponding box with the mouse from the program elements catalog under Basic instructions > Counter operations to the working area.

A logic operation is terminated by a standard box with counter response. It can be connected parallel to all other boxes. Positioning at the end of a T branch is also pos- sible.

The counter tag is positioned above the standard box with a counter response. This is an operand from the range of SIMATIC counters (C). The counter value in data format WORD is specified at the CV input, where the numerical range extends from W#16#0000 to W#16#0999 or from C#000 to C#999.

Fig. 8.17 counts the switch-on processes of #Fan1.start with the SIMATIC counter

Fan1.number”. The #Acknowledge signal resets the counter to 0.

Một phần của tài liệu Automating with SIMATIC s7 400 inside TIA portal publicis (2013) (Trang 325 - 328)

Tải bản đầy đủ (PDF)

(747 trang)