Requirements for a fill station
A box shall be filled with two different items, up to a specified total for each item. When all items are in the box, it will be transported to the packaging station. A conveyor belt transports the items of both types to the box. (This example does not show the filling conveyor belt.) This circuit program for this example uses two up/down counters to count the items of each type, an analog math instruction to sum the total number of items, and message texts to be displayed on the LOGO! Display and LOGO! TD (Text Display) that show the number of items of each type and the total number counted so far.
This process is described below:
To fill the box, each item is transported by a conveyor belt to the box (not part of this example).
The sequence in which the items fall into the box is random.
Each item that falls into the box is counted by a sensor.
The connected LOGO! TD as well as the LOGO! Display must display how many items of each kind have been counted, how many total items are in the box.
The circuit program in LOGO!Soft Comfort
Light barriers are connected to the two digital inputs I1 and I2 sensors that detect when an item falls into the box. The two counters (B001 and B002) count each item for the two specific types of items as they fall into the box. The on-threshold of each counter specifies the maximum number possible for each item type. When the box is full, a conveyor belt activates for ten seconds to transport the filled box to the packaging station and to transport an empty box to the fill station.
The circuit program uses a message text function block to display on the LOGO! TD and LOGO! Display how many total items and how many of each type have been counted. The message text uses the “ticking” feature to alternate between displaying bar graphs of the counted items and displaying a text summary of the counts. In addition, the text part of the message text will be shown in either English or German, depending on the current character set configuration for message texts.
Parameters of the functions blocks
Note the following parameter usage:
The on-thresholds of counters B001 and B002 define the maximum number of items of each item type to be put in the box.
The pulse width (TH) of the edge-triggered wiping relay defines the duration of the movement of the conveyor belt.
The Analog Math function block B007 that calculates the total is programmed as follows:
Value 1 is a reference parameter to the current value of counter B001.
Value 2 is a reference parameter to the current value of counter B002.
Operator 1 is "+" to sum the two counters.
Priority 1 is high. (This is the only operation in the function block, so the priority in this case is irrelevant).
The remaining operands and operators are set to "+ 0" and do not affect the output of the equation.
Message texts
Message text block B010 displays a message text whose four lines all tick “line by line”, such that two screen forms display in alternation. The first shows bar graph representations of the counted items (B001 and B002 current values) and a bar graph for the summed total items as calculated by B007. The second screen form shows the same values numerically and with text descriptions.
The message text function block is configured with two character sets enabled. The message text for character set 1 is configured with English text and the message text for character set 2 is configured with German text. You use the File -> Message Text Settings to select the two character sets. In this case you would select the same character set for both English and German characters. When LOGO! is in run mode, the current character set selection for message texts determines which message will display.