1537157780LOGO_functions
1537157780LOGO_functions
1537157780LOGO_functions
functions 4
LOGO! provides you with various elements in programming mode, and organizes them in the
following lists:
● Connector list (Connector) (Page 115)
● ↓GF: List of the basic functions AND, OR, ... (Page 120)
● ↓SF: List of the special functions (Page 131)
● List of reusable blocks configured in the circuit program
LOGO! 0BA8 can additionally provide you with the following elements in programming mode,
if you have previously configured them in your circuit program using LOGO!Soft Comfort:
● UDF: List of user-defined function blocks configured in the circuit program
● L: A Data Log function block configured in the circuit program
List contents
All lists show the elements available in LOGO!. Usually, this includes all connectors, basic
functions, and special functions.
LOGO! does not show all elements if:
● You cannot add additional blocks.
This occurs wthen the memory space is insufficient or when you have reached the
maximum number of blocks.
● A specific block's memory space requirement (Page 109) would exceed the space
available in LOGO!.
● You have created program elements in LOGO!Soft Comfort but have not downloaded the
program to LOGO!.
LOGO!
Manual, 06/2014, A5E33039675 115
LOGO! functions
4.1 Constants and connectors
Inputs
● Digital inputs
Digital inputs begin with the letter I. The number of the digital inputs (I1, I2, ...)
corresponds to the number of the input connectors of the LOGO! Base Module and of the
connected digital modules, in the order of their installation. You can use the fast digital
inputs I3, I4, I5, and I6 of the LOGO! versions LOGO! 12/24 RCE, LOGO! 12/24 RCEo,
LOGO! 24 CE and LOGO! 24 CEo as fast counters.
Note
To avoid that the LOGO! Base Module fails to read input signals because its built-in MCU
(Microcontroller Unit) is too sensitive and runs much faster than those in previous LOGO!
devices, an on-/off-delay function is designed for LOGO!:
• For LOGO! 230RCE and LOGO! 230RCEo, a 25 ms on-delay time and a 20 ms off-
delay time are defined for digital inputs I1 to I8.
• For all the other LOGO! versions, a 5 ms on-delay time and a 5 ms off-delay time are
defined for all the digital inputs.
Besides, when the LOGO! Base Module is in slave mode, a 5 ms on-delay time and a
100 ms signal-retentive-time are defined for all the digital inputs.
● Analog inputs
The LOGO! versions LOGO! 24 CE, LOGO! 24 CEo, LOGO! 12/24 RCE and LOGO
12/24 RCEo have the inputs I1, I2, I7 and I8, which you can also program for use as AI3,
AI4, AI1 and AI2 inputs. As described in topic "Setting the number of AIs in LOGO!
(Page 266)", you can configure these modules to use either two analog inputs (AI1 and
AI2), or all four. LOGO! interprets signals at the I1, I2, I7 and I8 inputs as digital values,
and those at the AI3, AI4, AI1 and AI2 inputs as analog values. Note that AI3
corresponds to I1 and AI4 corresponds to I2. This numbering preserves the previous
correspondence of AI1 to I7 and AI2 to I8 that was available with the 0BA5 series. LOGO!
numbers the inputs of a connected analog module according to the already existing
analog inputs. See topic "Maximum setup with expansion modules (Page 29)" for
example setups. In programming mode, when you select the input signal of a special
function that takes an analog input, LOGO! offers the analog inputs AI1 to AI8, analog
flags AM1 to AM64, analog outputs AQ1 to AQ8, and the block numbers of functions with
analog outputs.
LOGO!
116 Manual, 06/2014, A5E33039675
LOGO! functions
4.1 Constants and connectors
Outputs
● Digital outputs
Digital outputs begin with the letter Q. The output numbers (Q1, Q2, ... Q20) correspond
with the numbers of the output connectors at the LOGO! Base Module and with those of
the expansion modules, in their order of installation.
LOGO! 0BA8 also provides 64 blank outputs and identifies them with the letter x. You
cannot reuse the blank outputs in a circuit program. The blank outputs differ from flags,
for example, which you can reuse. A blank output, for example, is useful for the special
function "Message texts" (Page 200), if only the message text is of significance to a circuit
program.
● Analog outputs
Analog outputs begin with the letters AQ. Eight analog outputs are available, namely
AQ1, AQ2,... AQ8. You can only connect an analog output with the analog input of a
function, an analog flag AM or an analog output connector.
The following figure shows an example LOGO! configuration and the numbering of the
inputs and outputs for the circuit program.
Note
LOGO! 0BA8 supports the graphical display of the analog value changes in the form of a
trend curve on the onboard display. You can easily monitor each analog I/O in use by means
of the trend curves when LOGO! is in RUN mode. For more information on how to view the
trend curve, refer to "Viewing the analog changes (Page 78)".
Flag blocks
The letters M or AM identify flag blocks. These are virtual outputs, which output the value of
their inputs. LOGO! 0BA8 provides 64 digital flags M1 to M64 and 64 analog flags AM1 to
AM64.
LOGO!
Manual, 06/2014, A5E33039675 117
LOGO! functions
4.1 Constants and connectors
Startup flag M8
LOGO! sets flag M8 in the first cycle of the circuit program. You can thus use it as a startup
flag in your circuit program. LOGO! resets M8 at the end of the first cycle.
You can use the M8 flag in all further cycles for setting, deletion and evaluation procedures
in the same way as other flags.
Note
• The output of the flag always carries the signal of the previous program cycle. This value
does not change within the same program cycle.
• You can read or write flags from the network. If you have not added any special flags in
the diagram, but written them from the network, they can still work except M27. So if you
want to control character sets by M27, you must add it in the diagram first, and you can
connect M27 to NI blocks to control it from the network.
LOGO!
118 Manual, 06/2014, A5E33039675
LOGO! functions
4.1 Constants and connectors
Cursor keys
Up to four cursor keys are available to you, namely C , C , C and C ("C" = "Cursor").
Cursor keys are programmed for the circuit program in the same way as other inputs. You
can program cursor keys in the corresponding display while the system is in RUN
(Page 78) , and in an active message text (ESC + Key). Cursor keys can save switches and
inputs, and allow operator control of the circuit program. Cursor key inputs from the
LOGO! TDE are identical to cursor key inputs from the LOGO! Base Module.
Levels
Voltage levels are designated hi and lo. A constant "1" = hi or "0" = lo status at the block can
be set by means of a permanent voltage level or constant value hi or lo.
Open connectors
LOGO! uses the letter x to indicate unused block connectors.
LOGO!
Manual, 06/2014, A5E33039675 119
LOGO! functions
4.2 Basic functions list - GF
View in the circuit diagram View in LOGO! Name of the basic function
AND (Page 121)
LOGO!
120 Manual, 06/2014, A5E33039675
LOGO! functions
4.2 Basic functions list - GF
View in the circuit diagram View in LOGO! Name of the basic function
OR (Page 124)
4.2.1 AND
The output of the AND is only 1 if all inputs are 1, that is, all contacts are closed.
At an unused block input (x): x = 1.
1 2 3 4 Q
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
LOGO!
Manual, 06/2014, A5E33039675 121
LOGO! functions
4.2 Basic functions list - GF
1 2 3 4 Q
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
The output of an edge-triggered AND is only 1 if all inputs are 1 and if at least one input was
low in the previous cycle.
At an unused block input (x): x = 1.
LOGO!
122 Manual, 06/2014, A5E33039675
LOGO! functions
4.2 Basic functions list - GF
The output of the NAND is only 0 if the status at all inputs is 1, that is, the contacts are
closed.
At an unused block input (x): x = 1.
1 2 3 4 Q
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0
LOGO!
Manual, 06/2014, A5E33039675 123
LOGO! functions
4.2 Basic functions list - GF
The output status of the NAND with edge evaluation is only 1 if at least one input is 0 and if
all inputs were 1 in the previous cycle.
At an unused block input (x): x = 1.
4.2.5 OR
The output status of the OR element is only 1 if at least one input is 1, that is, at least one of
the contacts is closed.
At an unused block input (x): x = 0.
1 2 3 4 Q
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
LOGO!
124 Manual, 06/2014, A5E33039675
LOGO! functions
4.2 Basic functions list - GF
1 2 3 4 Q
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
The output status of the NOR is only 1 if all inputs are 0, that is, off. The NOR output is set to
0 when one of the inputs is on (logical 1 status).
At an unused block input (x): x = 0.
1 2 3 4 Q
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
LOGO!
Manual, 06/2014, A5E33039675 125
LOGO! functions
4.2 Basic functions list - GF
The output status of the XOR is 1 if the inputs are not equivalent.
At an unused block input (x): x = 0.
1 2 Q
0 0 0
0 1 1
1 0 1
1 1 0
The output status is 1 if the input is 0. The NOT block inverts the input status.
An advantage of the NOT block, for example, is that you do not have to use break contacts.
You simply use a make contact and the NOT block to convert these into a break contact.
1 Q
0 1
1 0
LOGO!
126 Manual, 06/2014, A5E33039675
LOGO! functions
4.3 Special functions
Logical inputs
The following connectors enable you to create a logical link to other blocks or to the inputs of
the LOGO! unit:
● S (Set):
A signal at input S sets the output to logical "1".
● R (Reset):
The reset input R takes priority over all other inputs and resets the outputs.
● Trg (Trigger):
This input triggers the start of a function.
● Cnt (Count):
This input counts pulses.
● Fre (Frequency):
LOGO! applies frequency signals to be evaluated to this input.
● Dir (Direction):
This input determines the direction, + or -.
● En (Enable):
This input enables a block function. When this input is "0", the block ignores all other
signals.
● Inv (Invert):
A signal at this input inverts the output signal of the block.
● Ral (Reset all):
A signal at this input resets all internal values.
● Lap (for the stopwatch function)
A signal at this input pauses the stopwatch.
Note
Unused logical inputs of special functions default to logical "0".
LOGO!
Manual, 06/2014, A5E33039675 127
LOGO! functions
4.3 Special functions
Connector X at SF inputs
The connector "x" input for any SF input is low. That is, the input carries a "lo" signal.
Parameter inputs
At some of the inputs you do not apply any signals. You configure the relevant block values
instead. Examples:
● Par (Parameter):
You do no connect the Par parameter. Instead, you set the relevant blcok parameters
(times, on/off thresholds etc.).
● Priority:
This is an open input. Here, you define priorities and specify whether a message is to be
acknowledged in RUN.
Parameter T
You can configure a time value T for some of the SF blocks. When you preset this time, note
that your input values are based on the timebase set:
Timebase __:__
s (seconds) seconds : 1/100 seconds
m (minutes) minutes : seconds
h (hours) hours : minutes
The LOGO! 0BA8-specific stopwatch (Page 171) function provides an additional timebase -
10 ms.
Accuracy of T
Because of slight tolerances in the characteristics of electronic components, the set time T
can deviate. You can find a detailed description of such deviations in the "On-delay" topic
(Page 136).
LOGO!
128 Manual, 06/2014, A5E33039675
LOGO! functions
4.3 Special functions
value to a high-precision timebase and makes continual corrections. The resultant maximum
timing inaccuracy is ±2 s/day.
4.3.4 Retentivity
You can set the switching states, counter and time values of many SF blocks (Page 131) to
be retentive. This means that LOGO! retains current data values after a power failure, and
that the block resumes operation at the break point. The timer is not reset, but resumes
operation until the time-to-go has expired.
To enable this response, however, the relevant functions must be set retentive. Two options
are available:
R: The data is retentive.
/: Current data is not retentive (default). See the section in topic "Second circuit program
(Page 82)" on enabling and disabling retentivity.
The hours counter, weekly timer, yearly timer and PI controller are always retentive.
Note
Parameter protection covers only the "Set Parameter" window. If you embed variables of
protected special functions in a message text, the variables are still editable from the
message text. To protect these variables, you must also activate the protection of the
message text.
LOGO!
Manual, 06/2014, A5E33039675 129
LOGO! functions
4.3 Special functions
Mathematical rule
Actual value Ax =
(internal value at input Ax • gain) + offset
LOGO!
130 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Process variable Voltage (V) Internal value Gain Offset Value shown (Ax)
-30 °C 0 0 0.1 -30 -30
0 °C 3 300 0.1 -30 0
+70 °C 10 1000 0.1 -30 70
1000 mbar 0 0 4 1000 1000
3700 mbar 6.75 675 4 1000 3700
5000 mbar 10 1000 4 1000 5000
0 0 0.01 0 0
5 500 0.01 0 5
10 1000 0.01 0 10
0 0 1 0 0
5 500 1 0 500
10 1000 1 0 1000
0 0 10 0 0
5 500 10 0 5000
10 1000 10 0 10000
0 0 0.01 5 5
5 500 0.01 5 10
10 1000 0.01 5 15
0 0 1 500 500
5 500 1 500 1000
10 1000 1 500 1500
0 0 1 -200 -200
5 500 1 -200 300
10 1000 1 -200 800
0 0 10 -10000 -10000
10 1000 10 -10000 0
0.02 2 0.01 0 0
0.02 2 0.1 0 0
0.02 2 1 0 2
0.02 2 10 0 20
For further information on a sample application, refer to the "Analog comparator (Page 188)"
topic.
For further information on analog inputs, refer to the Constants and connectors (Page 115)
topic.
LOGO!
Manual, 06/2014, A5E33039675 131
LOGO! functions
4.4 Special functions list - SF
LOGO!
132 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Counter
Up/down counter (Page 173) REM
LOGO!
Manual, 06/2014, A5E33039675 133
LOGO! functions
4.4 Special functions list - SF
Analog
Analog threshold trigger (Page 183)
LOGO!
134 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Miscellaneous
Latching relay (Page 197) REM
LOGO!
Manual, 06/2014, A5E33039675 135
LOGO! functions
4.4 Special functions list - SF
4.4.1 On-delay
Short description
The output is only set after a configurable on-delay time expires.
Parameter T
Note the defaults for parameter T in topic Time response (Page 128).
The actual value of another already-configured functions can provide the time for parameter
T. You can use the actual values of the following functions for the value of T:
● Analog comparator (Page 188)(actual value Ax - Ay)
● Analog threshold trigger (Page 183)(actual value Ax)
● Analog amplifier (Page 195)(actual value Ax)
● Analog multiplexer (Page 213)(actual value AQ)
LOGO!
136 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
LOGO!
Manual, 06/2014, A5E33039675 137
LOGO! functions
4.4 Special functions list - SF
The LOGO! display appears as follows in programming mode, if you have, for example, set
the actual value of B6 in seconds to parameter T of B12:
If the referenced block (B6, in the example) returns a value that lies out of the valid range,
LOGO! rounds the value up or down to the next valid value.
2. Press to change the equal sign into an arrow. LOGO! displays the last referenced block
if it exists.
LOGO!
138 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
3. Press to move the cursor to the "B" of the shown block, and then press to select the
required block number.
4. Press to move the cursor to the block's timebase and press to select the required
timebase.
Timing diagram
Functional description
A 0 to 1 transition triggers the time Ta at input Trg (Ta is the current LOGO! time).
If the status of input Trg is 1 at least for the duration of the configured time T, LOGO! sets
the output to 1 on expiration of this time (the output follows the input with on-delay).
LOGO! resets the time when the status at input Trg returns to 0 before the time T expires.
LOGO! resets the output to 0 when the signal at input Trg is 0.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 139
LOGO! functions
4.4 Special functions list - SF
4.4.2 Off-delay
Short description
When an on-delay (Page 136) is set, the output is reset when the configured time has
expired.
Parameter T
Note the parameter T defaults specified in topic Time response (Page 128).
The actual value of another already-configured functions can provide the time for parameter
T. You can use the actual value of the following functions:
● Analog comparator (Page 188) (actual value Ax - Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
● Retentive on-delay (Page 144) (current time Ta)
● Wiping relay (pulse output) (Page 146) (current time Ta)
LOGO!
140 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
LOGO! sets Output Q to hi immediately when the input Trg changes to hi.
LOGO! retriggers the actual time Ta at the 1 to 0 transition of Trg. The output remains set.
LOGO! resets Output Q to 0 with off-delay when Ta reaches the value configured at T (Ta=T).
LOGO! retriggers he time Ta with a one-shot at input Trg.
You can set input R (Reset) to reset the time Ta and the output before Ta expires.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 141
LOGO! functions
4.4 Special functions list - SF
4.4.3 On-/off-delay
Short description
The on-/off-delay function sets the output after the set on-delay time has expired, and resets
it upon expiration of the off-delay time.
Parameters TH and TL
Note the preset values for the parameters TH and TL in topic Time response (Page 128).
The actual value of another, already-configured function can provide the on-delay and off-
delay times for parameters TH and TL . You can use the actual values of the following
functions:
● Analog comparator (Page 188)(actual value Ax - Ay)
● Analog threshold trigger (Page 183)(actual value Ax)
● Analog amplifier (Page 195)(actual value Ax)
● Analog multiplexer (Page 213)(actual value AQ)
● Analog ramp (Page 216)(actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220)(actual value AQ)
● Up/down counter (Page 173)(actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136)(current time Ta)
● Off-delay (Page 140)(current time Ta)
LOGO!
142 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The time TH is triggered with a 0 to 1 transition at input Trg.
If the status at input Trg is 1 at least for the duration of the time TH, LOGO! sets the output to
1 on expiration of the time TH (the output follows the input with on-delay).
LOGO! resets the time when LOGO! resets the signal at input Trg to 0 before the time TH
expires.
A 1 to 0 transition at input Trg triggers the time TL.
If the status at input Trg is 0 at least for the duration of the signal TL, LOGO! sets the output
to 0 on expiration of the time TL (the output follows the input with off-delay).
LOGO! resets the time when the signal at input Trg changes to 1 again before the time TL
expires.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 143
LOGO! functions
4.4 Special functions list - SF
Short description
A one-shot at the input triggers a configurable on-delay time. The output is set when this
time has expired.
Parameter T
Note the defaults specified in topic Time response (Page 128).
The actual value of another already-programmed function can provide the time for parameter
T. You can use the actual values of the following functions:
● Analog comparator (Page 188)(actual value Ax – Ay)
● Analog threshold trigger (Page 183)(actual value Ax)
● Analog amplifier (Page 195)(actual value Ax)
● Analog multiplexer (Page 213)(actual value AQ)
● Analog ramp (Page 216)(actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220)(actual value AQ)
● Up/down counter (Page 173)(actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136)(current time Ta)
● Off-delay (Page 140)(current time Ta)
● On-/off-delay (Page 142)(current time Ta)
● Retentive on-delay (current time Ta)
● Wiping relay (pulse output) (Page 146)(current time Ta)
LOGO!
144 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The 0 to 1 signal transition at input Trg triggers the current time Ta. LOGO! sets output Q
when Ta = T. A further signal at input Trg does not influence the time Ta.
LOGO! resets the output and the time Ta with the next 1 signal at input R.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 145
LOGO! functions
4.4 Special functions list - SF
Short description
An input signal generates a signal with a configurable period at the output.
Parameter T
Note the information on parameter T in topic Time response (Page 128).
The actual value of another already-programmed function can provide the time for parameter
T. You can use the actual values of the following functions:
● Analog comparator (Page 188)(actual value Ax – Ay)
● Analog threshold trigger (Page 183)(actual value Ax)
● Analog amplifier (Page 195)(actual value Ax)
● Analog multiplexer (Page 213)(actual value AQ)
● Analog ramp (Page 216)(actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220)(actual value AQ)
● Up/down counter (Page 173)(actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136)(current time Ta)
● Off-delay (Page 140)(current time Ta)
● On-/off-delay (Page 142)(current time Ta)
● Retentive on-delay (Page 144)(current time Ta)
● Wiping relay (pulse output) (current time Ta)
● Edge-triggered wiping relay (Page 148)(current time Ta)
● Asynchronous pulse generator (Page 150)(current time Ta)
LOGO!
146 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
A 0 to 1 transition at input Trg sets the output, and triggers a time Ta during which the output
remains set.
LOGO! resets output Q to lo (pulse output) when Ta reaches the value preset at T (Ta = T).
LOGO! sets the output immediately if there is a 1 to 0 transition at input Trg before the
specified time expires.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 147
LOGO! functions
4.4 Special functions list - SF
Short description
An input pulse generates a preset number of output pulses with a defined pulse/pause ratio
(retriggerable), after a configured delay time has expired.
Parameters TH and TL
Note the information on parameter T in topic Time response (Page 128).
The actual value of another already-programmed function can provide the pulse width TH
and the interpulse width TL. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (Page 140) (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
LOGO!
148 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Select the required function by the block number. The timebase is configurable. For
information on valid ranges and parameter defaults, refer to the On-delay (Page 136) topic.
Timing diagram A
Timing diagram B
Functional description
A 0 to 1 transition at input Trg triggers the time TL (Time Low). After the time TL has expired,
output Q is set for the duration of TH (Time High).
If there is a further 0 to 1 transition (retriggering pulse) at input Trg before the preset time (TL
+ TH) has expired, Ta is reset and the pulse/pause cycle is restarted.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 149
LOGO! functions
4.4 Special functions list - SF
Short description
You can asynchronously output pulses with this function.
Parameters TH and TL
Note the information on parameter T in topic Time response (Page 128)
The actual value of another already-programmed function can provide the pulse width TH
and the interpulse width TL. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
LOGO!
150 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
You can configure the pulse/interpulse width at the TH (Time High) and TL (Time Low)
parameters.
Input Inv can be used to invert the output signal, provided the block is enabled with a signal
at input EN.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 151
LOGO! functions
4.4 Special functions list - SF
Short description
The random generator function sets an output randomly within a configured time.
Parameter TH and TL
Note the defaults of the TH and TL parameters listed in topic Time response (Page 128).
The actual value of another already-programmed function can provide the on-delay time TH
and the off-delay time TL. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (Page 140) (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
● Retentive on-delay (Page 144) (current time Ta)
LOGO!
152 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The 0 to 1 transition at input En triggers a random on-delay time between 0 s and TH. The
output is set when the on-delay time expires and if the signal at input En remains hi at least
for the duration of this time.
The time is reset if input En is reset before the on-delay time has expired.
A 1 to 0 transition at input EN triggers a random off-delay time between 0 s and TL.
LOGO! resets the output after the off-delay time expires, provided input En remains lo at
least for the duration of this time.
LOGO! resets the time if the signal at input En changes to 1 again before the off-delay time
expires.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
LOGO!
Manual, 06/2014, A5E33039675 153
LOGO! functions
4.4 Special functions list - SF
Short description
An input edge triggers a configurable and retriggerable time. LOGO! resets the output after
this time expires. LOGO! can optionally output a warning signal to warn of the impending
time expiration.
LOGO!
154 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
A 0 to 1 signal transition at input Trg sets output Q. The next 1 to 0 transition at Trg
retriggers the current time Ta, and output Q remains set.
LOGO! resets output Q when Ta = T. You can output a warning signal before the off-delay
time (T - T!) expires to reset Q for the time of the pre-warning period T!L.
A further one-shot at input Trg during Ta retriggers the time Ta .
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
Note
All times must have the same timebase.
LOGO!
Manual, 06/2014, A5E33039675 155
LOGO! functions
4.4 Special functions list - SF
Short description
The multiple function switch provides two different functions:
● Pulse switch with off-delay
● Switch (permanent lighting)
LOGO!
156 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
LOGO!
Manual, 06/2014, A5E33039675 157
LOGO! functions
4.4 Special functions list - SF
Functional description
A 0 to 1 transition at input Trg sets output Q.
If output Q = 0, and input Trg is set hi at least for the duration of TL, LOGO! enables the
permanent lighting function and sets output Q accordingly.
LOGO! triggers the off-delay T when input Trg returns to 0 before TL has expired.
Output Q is reset when Ta = T.
You can output an off-warning signal prior to the expiration of the off-delay time (T - T!) that
resets Q for the duration of the prewarning time period T!L. A subsequent signal at Trg
always resets T and the output Q.
If the block is retentive, LOGO! resets output Q and the expired time to the values before a
power failure; if the block is not retentive, LOGO! resets output Q and the expired time to
defaults after a power failure.
Note
T, T! and T!L must all have the same timebase.
LOGO!
158 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
The weekly timer controls an output by means of a configurable on/off date. The function
supports any combination of weekdays. You select the active weekdays by hiding the
inactive days.
Note
Because LOGO! 24/24o does not have a real-time clock, the weekly timer function is not
available.
Functional description
Each weekly timer has three cams for you to configure a time hysteresis. You specify the on-
and off-times at the Cam parameters. The weekly timer sets the output at a certain on-time;
if you have not set it, the weekly timer resets the output at a certain off-time if you configure
an off-time, or at the end of the cycle if you specify a pulse output.
You will cause a conflict if you set overlapping on- and off-times; the earliest on- and off-
times take priority. Here is an example:
LOGO!
Manual, 06/2014, A5E33039675 159
LOGO! functions
4.4 Special functions list - SF
2 1:10h 1:50h
3 1:20h 1:40h
On-/Off-times
Any time between 00:00 h and 23:59 h is possible. You can also configure the on time to be
a pulse signal. The timer block will be activated at the specified time for one cycle and then
LOGO!
160 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Note
For information on timer accuracy, refer to the technical data and to the topic "Time
response (Page 128)".
LOGO!
Manual, 06/2014, A5E33039675 161
LOGO! functions
4.4 Special functions list - SF
Result
Short description
The output is controlled by means of a configurable on/off date. You can configure the timer
to activate on a yearly, monthly, or user-defined time basis. With any mode, you can also
configure the timer to pulse the output during the defined time period. The time period is
configurable within the date range of January 1, 2000 to December 31, 2099.
Note
Because LOGO! 24/24o does not have a real-time clock, the yearly timer is not available for
both versions.
LOGO!
162 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagrams
Example 1: Yearly mode on, Monthly mode off, Pulse Off, On Time = 2000-06-01, Off Time =
2099-08-31: every year on June 1 the timer output switches on and remains on until August
31.
Example 2: Yearly mode on, Monthly mode off, Pulse on, On Time = 2000-03-15, Off Time =
2099-**-**: every year on March 15, the timer switches on for one cycle.
Example 3: Yearly mode on, Monthly mode off, Pulse off, On Time = 2008-06-01, Off Time =
2010-08-31: on June 1 of 2008, 2009, and 2010 the timer output switches on and remains on
until August 31.
LOGO!
Manual, 06/2014, A5E33039675 163
LOGO! functions
4.4 Special functions list - SF
Example 4: Yearly mode on, Monthly mode off, Pulse on, On Time = 2008-03-15, Off Time =
2010-**-**: on March 15 of 2008, 2009, and 2010, the timer output switches on for one cycle.
Example 5: Yearly mode off, Monthly mode off, Pulse off, On Time = 2008-06-01, Off Time =
2010-08-31: on June 1, 2008 the timer output switches on and remains on until August 31,
2010.
LOGO!
164 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Example 6: Yearly mode off, Monthly mode off, Pulse selected, On Time = 2008-03-15, Off
Time = ****-**-**: on March 15, 2008 the timer output switches on for one cycle. Because the
timer does not have a monthly action or yearly action, the timer output pulses only one time
at the specified On Time.
Example 7: Yearly mode on, Monthly mode off, Pulse off, On Time = 2008-12-15, Off Time =
2010-01-07: on December 15 of 2008 and 2009, the timer output switches on and remains
on until January 7 of the following year. When the timer output turns off on January 7, 2010 it
does NOT turn on again the following December 15.
Example 8: Yearly mode on, Monthly mode on, On Time = 2008-**-01, Off Time = 2010-**-
05: starting in 2008, on the first day of each month the timer output switches on and switches
off on the fifth day of the month. The timer continues in this pattern through the last month of
2010.
LOGO!
Manual, 06/2014, A5E33039675 165
LOGO! functions
4.4 Special functions list - SF
Functional description
The yearly timer sets and resets the output at specific on and off dates. Sets and resets are
executed at 00:00. If your application requires a different time, use a weekly timer together
with a yearly timer in your circuit program.
The on time specifies when the timer is activated. The off time specifies when the output is
reset again. For the on and off times, note the order of the fields: The first field defines the
year, the second the month and the third the day.
If you set the Monthly mode on, the timer output switches on each month at the specified day
of the on time and remains on until the specified day of the off time. The on time specifies
the initial year in which the timer is activated. The off time defines the last year in which the
timer turns off. The maximum year is 2099.
If you set the Yearly mode on, the timer output switches on each year at the specified month
and day of the on time and remains on until the specified month and day of the off time. The
on time specifies the initial year in which the timer is activated. The off time defines the last
year in which the timer turns off. The maximum year is 2099.
If you set Pulse output, the timer output switches on at the specified on time for one cycle
and then the timer output is reset. You can choose to pulse a timer on a monthly or yearly
basis, or just a single time.
If you set none of the Monthly, Yearly, or Pulse modes on, you can define a specific time
period with the on time and off time. It can span any time period that you choose.
For a process action that is to be switched on and off at multiple but irregular times during
the year, you can define multiple yearly timers with the outputs connected by an OR function
block.
LOGO!
166 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Sample configuration
The output of a LOGO! is to be set annually on March 1, reset on April 4, set again on July 7,
and reset again on November 19. You need to configure two yearly timers with
corresponding on-times, then logically link the outputs by means of an OR block.
Result
LOGO!
Manual, 06/2014, A5E33039675 167
LOGO! functions
4.4 Special functions list - SF
Short description
The astronomical clock function is used to set an output high when the current time of your
LOGO! Base Module is between the time of sunrise (TR) and the time of sunset (TS).
LOGO! automatically calculates these times based on the geographical location, the settings
for automatic summertime/wintertime conversion, and the current time of the module.
Note
From LOGO!Soft Comfort V8.0, you can choose from several pre-defined time zone
locations. If you select one of these locations, LOGO!Soft Comfort uses the latitude,
longitude, and the time zone of your selection. This location pre-configuration capability is
only possible from LOGO!Soft Comfort.
LOGO!
168 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
The following illustration is an example of the timing diagram where Ta refers to the current
time of the LOGO! Base Module:
Functional description
The function calculates the TR and TS values at the input and sets Q when Ta (Ta is the
current LOGO! Time) is between TR and TS; otherwise, the function resets Q.
If automatic summertime/wintertime conversion (see the topic Summertime/wintertime
conversion (Page 93) for details) is enabled, the function takes the configured time
difference into consideration when calculating the TR and TS values.
Press
Press
LOGO!
Manual, 06/2014, A5E33039675 169
LOGO! functions
4.4 Special functions list - SF
Press
LOGO!
170 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
4.4.14 Stopwatch
Short description
The stopwatch function counts the elapsed time between a start stopwatch signal and a stop
stopwatch signal.
Parameters TB
You can set a timebase from the following timebase set:
● 10 ms (10 milliseconds)
● s (seconds)
● m (minutes)
● h (hours)
LOGO!
Manual, 06/2014, A5E33039675 171
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
En = 1 and Lap = 0: Using the selected timebase, the stopwatch outputs the current time
(CurT) to AQ.
En = 1 and Lap = 1: The stopwatch leaves AQ at its last value when Lap = 0. This value is
recorded as LapT for stopwatch pause time.
En = 0 and Lap = 1: The stopwatch pauses counting time. It outputs LapT to AQ.
En = 0 and Lap = 0: The stopwatch outputs the current time (CurT) to AQ.
A signal at R sets the AQ value to 0.
To change the timebase, press to move the cursor to "10ms". Press OK and now the
timebase can be selected. Press or to select another timebase. To confirm your
selection, press OK.
View in parameter assignment mode (example):
LOGO!
172 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
An input pulse increments or decrements an internal value, depending on the parameter
setting. The output is set or reset when a configured threshold is reached. The direction of
count can be changed with a signal at input Dir.
LOGO!
Manual, 06/2014, A5E33039675 173
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The internal counter increments (Dir = 0) or decrements (Dir = 1) by one count with every
positive edge at input Cnt.
You can use input R to reset the internal count value to the start value. As long as R = 1, the
output is also 0 and the pulses at input Cnt are not counted.
If retentivity is not set, output Q and the expired time are reset after a power failure.
Q is set or reset depending on the current value at Cnt and the set thresholds. See the
calculation rule below.
LOGO!
174 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Calculation rule
● If the On threshold ≥ Off threshold, then:
Q = 1, if Cnt ≥ On
Q = 0, if Cnt < Off
● If the On threshold < Off threshold, then Q = 1, if On ≤ Cnt < Off.
Note
The system scans the counter limit value cyclically.
Thus, if the pulse frequency at the fast digital inputs I3, I4, I5 or I6 is faster than the cycle
time, the special function might not switch until after the specified limit value is exceeded.
Example: Up to 100 pulses per cycle can be counted; 900 pulses have been counted so
far. On = 950; Off = 10000. The output is set in the next cycle, after the value has
reached 1000. (The output would not be set at all if the value Off = 980).
If the referenced block (B021, in the example) returns a value that lies out of the valid range,
the value is rounded to the next valid value.
The view in parameter assignment mode (example):
LOGO!
Manual, 06/2014, A5E33039675 175
LOGO! functions
4.4 Special functions list - SF
Short description
A configured time is triggered with a signal at the monitoring input. The output is set when
this time has expired.
Note
MI, MN and OT are always retentive.
LOGO!
176 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Parameter MI
The maintenance interval MI can be provided by the actual value of another already-
programmed function. The timebase of the referenced value is "h" (for hours) only. You can
use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (Page 140) (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
● Retentive on-delay (Page 144) (current time Ta)
● Wiping relay(pulse output) (Page 146) (current time Ta)
● Edge triggered wiping relay (Page 148) (current time Ta)
● Asynchronous pulse generator (Page 150) (current time Ta)
● Stairway light switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (current time Ta)
Select the required function by the block number.
LOGO!
Manual, 06/2014, A5E33039675 177
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The hours counter monitors input En. When En = 1, LOGO! computes the time expired and
the time-to-go MN. LOGO! shows these times in parameter assignment mode. Output Q is
set when the time-to-go MN = 0.
A signal at reset input R resets output Q and sets the preset value of MI at the counter for
the duration of MN. The hours counter OT is not affected.
With a signal at the reset input Ral, you reset output Q and set the preset value of MI at the
counter for the duration of MN. The hours counter OT is reset to zero.
Depending on your configuration of parameter Q, the output is either reset with a signal at
input R or Ral ("Q→0:R"), or when a reset signal is set hi, or the En signal is set lo
("Q→0:R+En").
Limit value of OT
The value of the operating hours in OT is retained when you reset the hours counter with a
signal at input R. The hours counter OT will be reset to zero with a transition from 0 to 1 at
LOGO!
178 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Ral. It continues the count as long as En = 1, irrespective of the status at the reset input R.
The counter limit of OT is 99999 h. The hours counter stops when it reaches this value.
In programming mode, you can set the initial value of OT. MN is calculated according to the
following formula when reset input R is never enabled: MN = MI - (OT % MI). The % operator
provides an integer division remainder.
Example:
MI = 30h, OT = 100h
MN = 30 - (100 % 30)
MN = 30 -10
MN = 20h
In runtime mode, the value OT can not be preset. If the value for MI is changed, there would
be no calculation for the MN. MN would take on the value of MI.
MI is the configurable time interval. The permissible range of values is 0 to 9999 hours.
For information on how to assign the actual value of another already-programmed function to
a parameter, see the On-delay (Page 136) topic.
View in parameter assignment mode:
LOGO!
Manual, 06/2014, A5E33039675 179
LOGO! functions
4.4 Special functions list - SF
Short description
The output is set and reset with two configurable threshold triggers.
Parameter G_T
The gate time G_T can be provided by the actual value of another already-programmed
function. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
LOGO!
180 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The threshold trigger measures the signals at input Fre. The pulses are recorded across a
configurable time G_T.
Output Q is set and reset in accordance with the set thresholds. See the calculation rule
below.
Calculation rule
● If the On threshold ≥ Off threshold, then Q = 1, if fa > On or Q = 0, if fa ≤ Off.
● If the On threshold < Off threshold, then Q = 1 if On ≤ fa < Off.
Note
The system scans the counter limit value once per interval G_T.
LOGO!
Manual, 06/2014, A5E33039675 181
LOGO! functions
4.4 Special functions list - SF
Note
The "seconds" timebase is here set as permanent default.
When you preset a time G_T of 1 s, LOGO! returns the current frequency in parameter fa in
Hz.
Note
fa always represents the total pulses measured per time unit G_T.
LOGO!
182 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
The output is set and reset at two configurable thresholds.
LOGO!
Manual, 06/2014, A5E33039675 183
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
The function fetches the analog signal at input Ax.
Ax is multiplied by the value of the A (gain) parameter, and the value at parameter B (offset)
is added to product, i.e. (Ax • gain) + offset = actual value of Ax.
Output Q is set or reset, depending on the set thresholds. See the calculation rule below.
LOGO!
184 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Calculation rule
● If the On threshold ≥ Off threshold, then Q = 1, if the actual value Ax > On or Q = 0, if the
actual value Ax ≤ Off.
● If the On threshold < Off threshold, then Q = 1 if On ≤ actual value Ax < Off.
LOGO!
Manual, 06/2014, A5E33039675 185
LOGO! functions
4.4 Special functions list - SF
Short description
The output is set and reset depending on a configurable threshold and a differential value.
LOGO!
186 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Functional description
The function fetches the analog signal at input Ax.
Ax is multiplied by the value of the A (gain) parameter, and the value at parameter B (offset)
is added to product, i.e. (Ax • gain) + offset = actual value of Ax.
Output Q is set or reset, depending on the set (On) threshold and difference value (Δ). The
function automatically calculates the Off parameter: Off = On + Δ, whereby Δ may be
positive or negative. See the calculation rule below.
Calculation rule
● When you set a negative differential value Δ, the On threshold ≥ Off threshold, and Q =
1if the actual value Ax > On or Q = 0 if the actual value Ax ≤ Off.
See the timing diagram A.
● When you set a positive differential value Δ, the On threshold < the Off threshold, and Q
= 1, if On ≤ actual value Ax < Off.
See the timing diagram B.
LOGO!
Manual, 06/2014, A5E33039675 187
LOGO! functions
4.4 Special functions list - SF
Short description
The output is set and reset depending on the difference Ax - Ay and on two configurable
thresholds.
LOGO!
188 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Timing diagram
LOGO!
Manual, 06/2014, A5E33039675 189
LOGO! functions
4.4 Special functions list - SF
Functional description
The function fetches the analog values from the inputs Ax and Ay.
Ax and Ay are each multiplied by the value of the A (gain) parameter, and the value at
parameter B (offset) is then added to the relevant product, i.e.
(Ax • gain) + offset = actual value Ax or
(Ay • gain) + offset = actual value Ay.
The function forms the difference ("Δ") between the actual values Ax - Ay.
Output Q is set or reset, depending on difference of the actual values Ax - Ay and the set
thresholds. See the calculation rule below.
Calculation rule
● If the On threshold ≥ Off threshold, then Q = if (actual value Ax - actual value Ay) > On or
Q = 0 if (actual value Ax - actual value Ay) ≤ Off.
● If the On threshold < Off threshold, then Q = 1, if On ≤ (actual value Ax - actual value Ay)
< Off.
Example
In a heating control system, the supply Tv and return line temperatures Tr are to be
compared, for example with a sensor at AI2.
A control signal is to be triggered (for example "heater On") when the difference between the
supply and return line temperatures is greater than 15 °C. The control signal is reset when
the difference is less than 5 °C.
The process variable of the temperature is to be shown in parameter assignment mode.
The thermocouples available have the following technical data: -30 °C to +70 °C, 0 VDC to
10 VDC.
LOGO!
190 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Configuration (example):
LOGO!
Manual, 06/2014, A5E33039675 191
LOGO! functions
4.4 Special functions list - SF
Short description
This special function saves the process variable of an analog input to memory, and sets the
output when the output variable exceeds or drops below this stored value plus a configurable
offset.
LOGO!
192 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
LOGO!
Manual, 06/2014, A5E33039675 193
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
A 0 to 1 transition at input En saves the value of the signal at the analog input Ax. This saved
process variable is referred to as "Aen".
Both the analog actual values Ax and Aen are multiplied by the value at parameter A (gain),
and parameter B (offset) is then added to the product:
(Ax • gain) + offset = Actual value Aen, when input En changes from 0 to 1, or
(Ax • gain) + offset = Actual value Ax.
Output Q is set when the signal at input En = 1 and if the actual value at input Ax is out of
range of Aen - Δ 2 to Aen + Δ 1 .
Output Q is reset, when the actual value at input Ax lies within the range of Aen - Δ 2 to Aen+
Δ 1, or when the signal at input En changes to lo.
LOGO!
194 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
This special function amplifies the value of an analog input and outputs the result at an
analog output.
Functional description
The function fetches the analog signal of input Ax.
This value is multiplied by the value of the A (gain) parameter, and parameter B (offset) is
then added to the product: (Ax • gain) + offset = actual value Ax.
The actual value Ax is output at AQ.
LOGO!
Manual, 06/2014, A5E33039675 195
LOGO! functions
4.4 Special functions list - SF
Analog output
If you interconnect this special function with a real analog output, note that the analog output
can only process values between 0 and 1000. To do this, you may need to connect an
additional amplifier between the analog output of the special function and the real analog
output. Using this amplifier, you standardize the output range of the special function to a
value range of 0 to 1000.
LOGO!
196 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
Input S sets output Q, input R resets output Q again.
Timing diagram
Switching response
A latching relay represents a simple binary element. The output value depends on the status
at the inputs and on the previous output status. The following table shows the logic once
again:
Sn Rn Q Comment
0 0 x The status is retentive
0 1 0 Reset
1 0 1 Set
1 1 0 Reset (takes priority over Set)
When retentivity is enabled, the current status of the output signal is retained after a power
failure.
LOGO!
Manual, 06/2014, A5E33039675 197
LOGO! functions
4.4 Special functions list - SF
Short description
A short pulse at the input sets and resets the output.
Timing diagram
Functional description
Output Q changes its status; that is, the output is set or reset with each 0 to 1 transition at
input Trg and if the inputs S and R = 0.
The signal at input Trg does not influence the special function when S or R = 1.
You set the pulse relay with a signal at input S. The output is set hi.
You reset the pulse relay with a signal at input R. The output is set lo.
Status diagram
LOGO!
198 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
*: RS or SR
**: Triggering signal is effective, because S and R = 0.
Depending on your configuration, either input R takes priority over input S (input S is not
effective when R = 1), or vice versa (input R is not effective when S = 1).
After a power failure, the pulse relay and output Q are reset if you have not enabled
retentivity.
View in programming mode:
Note
If Trg = 0 and Par = RS, the special function "Pulse relay" corresponds with the special
function "Latching relay (Page 197)".
LOGO!
Manual, 06/2014, A5E33039675 199
LOGO! functions
4.4 Special functions list - SF
Short description
With the message text function block, you can configure a message that includes text and
other parameters for LOGO! to display in RUN mode.
You can configure simple message texts from the LOGO! onboard display. LOGO!Soft
Comfort provides an extended set of features for message texts: bar graph representation of
data, names for digital I/O states and more. Refer to the LOGO!Soft Comfort documentation
for information on these features.
Of the 50 possible message texts that you can configure, you can select any number of them
to be from the first language and any number from the second language. For example, you
could configure 50 message text function blocks that have a single message text for
Character Set 1. Alternatively, you could configure twenty-five message text function blocks,
each of which has two message texts: one for Character Set 1 and one for Character Set 2.
Any combination is valid such that the total does not exceed 50.
Within a single message text, the text must be from one character set. You can edit
message texts in any of the supported character sets from LOGO!Soft Comfort. From
LOGO! Basic, you can only edit text using characters from the ISO8859-1 character set.
LOGO!
200 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
The language and therefore character set of a message text is independent of the language
setting for menus on the LOGO! onboard display. They can be different.
LOGO!
Manual, 06/2014, A5E33039675 201
LOGO! functions
4.4 Special functions list - SF
Restriction
A maximum of 50 message text blocks are available.
Functional description
When LOGO! is in RUN mode, LOGO! displays the message text that you have configured
along with its parameter values upon a 0 to 1 transition of the signal at input En.
Based on your setting for the message destination, the message text displays on the
LOGO! onboard display, the LOGO! TDE, or both.
If you use flag M27 in your circuit program, then if M27=0 (low) then LOGO! displays the
message text only if it is from the primary character set (Character Set 1). If M27=1 (high),
then LOGO! displays the message text only if it is from the secondary character set
(Character Set 2). (See the M27 flag description in topic Constants and connectors
(Page 115)).
LOGO!
202 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
If you have configured message ticking, the message will tick on and off the display
according to your specifications, either a character at a time, or a line at a time.
If acknowledgment is disabled (Ack = No), the message text is hidden when the status of the
signal at input En changes from 1 to 0.
If acknowledgment is enabled (Ack = Yes) and the status of the signal at input En changes
from 1 to 0, the message text is output until it is acknowledged with OK. When En = 1, you
cannot acknowledge the message text.
When multiple message text functions are triggered with En=1, LOGO! displays the message
text with the highest priority (0 = lowest, 127 = highest). This also means that LOGO!
displays a newly activated message text only if its priority is higher than that of previously
activated message texts.
After a message text is disabled or acknowledged, the function automatically shows the
previously active message text that takes the highest priority.
You can press the and keys to step through multiple active message texts.
Example
This is how two message texts could be shown:
Message ticking
You can configure message text lines to tick or not tick. Two types of message ticking exist:
● Character by character
● Line by line
LOGO!
Manual, 06/2014, A5E33039675 203
LOGO! functions
4.4 Special functions list - SF
Messages that tick character by character scroll off the characters of the message line one
character at a time to the left with the additional characters scrolling in one at a time from the
right. The time interval for the tick is specified by the TickTime message text setting.
Messages that tick line by line scroll one half of the message off the display to the left with
the second half of the message scrolling in from the right. The time interval for the tick is ten
times the TickTime parameter. The two halves of the message simply alternate on the
LOGO! onboard display or LOGO! TDE.
If you set this message to tick "character by character" with a tick interval of 0.1 seconds,
then the initial appearance of this message line on the LOGO! onboard display or
LOGO! TDE is as shown in this illustration:
After 0.1 second, one character of the message line ticks. The message appears as follows
on the LOGO! onboard display or LOGO! TDE:
If you set this message to tick "line by line" with a tick interval of 0.1 seconds, then the initial
appearance of this message on the LOGO! onboard display or LOGO! TDE is the left half of
the message as shown in this illustration:
After 1 second (10 x 0.1 second), the message ticks to show the right half of the message as
shown in this illustration:
LOGO!
204 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
The screen display alternates between the two message halves every second.
You can configure each individual line of a message text to tick or not tick. The "character by
character" or "line by line" setting applies to all lines that you configure to tick.
4. Press and to select the letter to be displayed in the text. To move the cursor from one
position to another, press and .
Note
The list of available characters is the same as for the circuit program name. The
character set is found in topic Circuit program input (Page 69). When you enter message
text from LOGO! Basic, you can only enter characters from the ISO8859-1 character set.
To enter text from another language, you must enter the text in LOGO!Soft Comfort.
Note that the number of characters per line of message text can be greater than the
number of character positions on the LOGO! onboard display.
LOGO!
Manual, 06/2014, A5E33039675 205
LOGO! functions
4.4 Special functions list - SF
9. Press or to toggle through the three choices for message destination: BM, TDE, or
Both.
10.Press to position the cursor on the "Tick Type" line.
13.To choose between "No" and "Yes" to define whether Line 1 ticks, press or
14.Press to move the cursor to the second line, and press or to choose between "No"
and "Yes" for Line 2. Configure line ticking for lines 3, 4, 5 and 6 in the same way as for
lines 1 and 2.
15.Position the cursor on the "Web Show" line by pressing . Press or to select between
"No" and "Yes" for "Web Show".
16.Press OK to confirm the complete message text configuration.
LOGO!
206 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
For timers, a message text can also display the remaining time. "Remaining time" refers to
how much time of the parameter setting remains.
LOGO!
Manual, 06/2014, A5E33039675 207
LOGO! functions
4.4 Special functions list - SF
Bar graphs can be either horizontal or vertical representations of the current or actual value
scaled between the minimum and maximum value. For more information on configuring and
displaying bar graphs in message texts, refer to the Online Help for LOGO!Soft Comfort.
Note
You must keep the ESC key pressed for at least one second.
Press and to select the relevant parameter. Press OK to change the parameter. Use the
and keys to edit a parameter.
Confirm your changes with OK. You can now edit further parameters in the message text (if
any exist). Press ESC to exit editing mode.
LOGO!
208 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
4.4.26 Softkey
Short description
This special function has the effect of a mechanical pushbutton or switch.
Factory setting
The default parameter setting is switching action.
Timing diagram
Functional description
In parameter assignment mode, the output is set with a signal at input En, if the "Switch"
parameter is set to "On" and confirmed with OK. Whether the function was configured for
pushbutton or switching action is of no concern here.
The output is reset to "0" in the following three cases:
● After a 1 to 0 transition at input En
● When the function was configured for momentary pushbutton action, and one cycle has
expired since it was switched on
● When the position "Off" was selected at the "Switch" parameter and confirmed with OK in
parameter assignment mode
LOGO!
Manual, 06/2014, A5E33039675 209
LOGO! functions
4.4 Special functions list - SF
If retentivity is not set, output Q is initialized after a power failure according to your
configuration at the "Start" parameter.
LOGO!
210 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
You can use the shift register function to read the value of an input and to shift its bits left or
right. The output value corresponds with the configured shift register bit. The shifting
direction can be changed at a special input.
Functional description
The function reads the value at input In with a positive edge (0 to 1 transition) at input Trg
(Trigger).
This value is applied to shift register bit Sx.1 or Sx.8 depending on the shifting direction,
where "x" refers to the index number of the shift register and the number after the decimal
point refers to the bit number:
● Shift up: the value at input In is set at Sx.1; the previous value at Sx.1 is shifted to Sx.2;
the previous value at Sx.2 is shifted to Sx.3 etc.
● Shift down: the value at input In is set at Sx.8; the previous value at Sx.8 is shifted to
Sx.7; the previous value at Sx.7 is shifted to Sx.6 etc.
Output Q returns the value of the configured shift register bit.
LOGO!
Manual, 06/2014, A5E33039675 211
LOGO! functions
4.4 Special functions list - SF
If retentivity is disabled, the shift function restarts at Sx.1 or Sx.8 after a power failure. When
enabled, retentivity always applies to all shift register bits.
Note
There are a maximum of four shift register function blocks available for use in the circuit
program in LOGO!.
Timing diagram
The timing diagram example for the shift register in LOGO! is shown as follows:
The view above indicates that the configured shift register bit is S4.8.
This special function is not available in parameter assignment mode.
LOGO!
212 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
This special function outputs one of four predefined analog values or 0 at the analog output.
Parameters V1...V4
The analog values for the parameters V1to V4 can be derived from another already-
programmed function. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog multiplexer (actual value AQ)
● Analog filter (Page 232) (actual value AQ)
LOGO!
Manual, 06/2014, A5E33039675 213
LOGO! functions
4.4 Special functions list - SF
Timing diagram
Functional description
If input En is set, then the function issues one of four possible analog values V1 to V4 at the
output AQ, depending on the value of S1 and S2.
If the input En is not set, then the function issues the analog value 0 at output AQ.
LOGO!
214 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Analog output
If you interconnect this special function with a real analog output, note that the analog output
can only process values between 0 and 1000. To do this, you may need to connect an
additional amplifier between the analog output of the special function and the real analog
output. Using this amplifier, you standardize the output range of the special function to a
value range of 0 to 1000.
LOGO!
Manual, 06/2014, A5E33039675 215
LOGO! functions
4.4 Special functions list - SF
Short description
This function allows the output to be changed from the current level to the selected level at a
specified rate.
LOGO!
216 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Parameters L1, L2
The analog values for the parameters L1 and L2 can be derived from another already-
programmed function. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
LOGO!
Manual, 06/2014, A5E33039675 217
LOGO! functions
4.4 Special functions list - SF
LOGO!
218 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Functional description
If the input En is set, then the function sets the current level to StSp + Offset "B" for 100 ms.
Then, depending on the connection of Sel, the function runs from the level StSp + Offset "B"
to either level 1 or level 2 at the acceleration set in Rate.
If the input St is set, the function runs to a level of StSp + Offset "B" at the acceleration set in
Rate. Then the function holds the level at StSp + Offset "B" for 100 ms. After 100 ms, the
level is set to Offset "B". The scaled value (output AQ) is 0.
If the input St is set, the function can only be restarted after the inputs St and En have been
reset.
If input Sel has been changed, depending on the connection of Sel, the function runs from
the current target level to the new target level at the rate that is specified.
If the input En is reset, the function immediately sets the current level to Offset "B".
The current level is updated every 100 ms. Note the following relationship between output
AQ and the current level:
Output AQ = (current level - Offset "B" ) / Gain "A"
Note
For further information on analog value processing, please refer to the Online Help for
LOGO!Soft Comfort.
LOGO!
Manual, 06/2014, A5E33039675 219
LOGO! functions
4.4 Special functions list - SF
4.4.30 PI controller
Short description
Proportional-action and integral-action controllers. You can use both types of controller
individually or combined.
LOGO!
220 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Parameters SP and Mq
The set-value SP and the value for Mq can be provided by another already-programmed
function. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● Max/Min (Page 234) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (Page 140) (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
● Retentive on-delay (Page 144) (current time Ta)
● Wiping relay (pulse output) (Page 146) (current time Ta)
● Edge-triggered wiping relay (Page 148) (current time Ta)
● Asynchronous pulse generator (Page 150) (current time Ta)
● Stairway lighting switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● PI controller (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. For information on parameter defaults,
refer to the On-delay (Page 136) topic.
Parameters KC, TI
Please note the following circumstances:
● If parameter KC has value 0, the "P" function (proportional control) will not be executed.
● If parameter TI has value 99:59 m, the "I" function (integral-action control) will not be
executed.
LOGO!
Manual, 06/2014, A5E33039675 221
LOGO! functions
4.4 Special functions list - SF
Timing diagram
The nature, manner and speed with which the AQ changes depend on the parameters KC
and TI. Thus, the course of AQ in the diagram is merely an example. A control action is
continuous; therefore the diagram portrays just an extract.
Functional description
If the input A/M is set to 0, then the special function issues output AQ with the value that you
set with parameter Mq.
If the input A/M is set to 1, then automatic mode commences. As an integral sum the value
Mq is adopted, the controller function begins the calculations.
Note
For further information on the controller basics, please refer to the Online Help for
LOGO!Soft Comfort.
LOGO!
222 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
● If the updated value PV = SP, then the special function does not change the value of AQ.
● Dir = upwards (+) (timing diagram numbers 1. and 3.)
– If the updated value PV > SP, then the special function reduces the value of AQ.
– If the updated value PV < SP, then the special function increases the value of AQ.
● Dir = downwards (-) (timing diagram number 2.)
– If the updated value PV > SP, then the special function increases the value of AQ.
– If the updated value PV < SP, then the special function reduces the value of AQ.
With a disturbance, AQ continues to increase / decrease until the updated value PV again
corresponds to SP. The speed with which AQ changes depends on the parameters KC and
TI.
If the input PV exceeds the parameter Max, then the updated value PV is set to the value of
Max. If the PV falls short of the parameter Min, then the updated value PV is set to the value
of Min.
If the input R is set to 1, then the AQ output is reset. As long as R is set, the input A/M is
disabled.
Sampling time
The sampling time is fixed at 500 ms.
Parameter sets
For more information and application examples with application-related parameter sets for
KC, TI and Dir, refer to the Online Help for LOGO!Soft Comfort.
LOGO!
Manual, 06/2014, A5E33039675 223
LOGO! functions
4.4 Special functions list - SF
Short description
The Pulse Width Modulator (PWM) instruction modulates the analog input value Ax to a
pulsed digital output signal. The pulse width is proportional to the analog value Ax.
Parameter T
Note the defaults of the T parameters listed in topic Time response (Page 128).
The periodic time T can be provided by the actual value of another already-programmed
function. You can use the actual value of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
LOGO!
224 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Functional description
The function reads the value of the signal at the analog input Ax.
This value is multiplied by the value of parameter A (gain). Parameter B (offset) is added to
the product, as follows:
(Ax • Gain) + Offset = Actual value Ax
The function block calculates the proportion of the actual value Ax to the range. The block
sets the digital output Q high for the same proportion of the T (periodic time) parameter, and
sets Q low for the remainder of the time period.
LOGO!
Manual, 06/2014, A5E33039675 225
LOGO! functions
4.4 Special functions list - SF
Example 2
Analog input value: 300 (range 0 to 1,000)
Periodic time T: 10 seconds
The digital output of the PWM function is three seconds high, seven seconds low, three
seconds high, seven seconds low and continues in that pattern as long as parameter "En" =
high.
Calculation rule
Q = 1, for (Ax - Min)/ (Max - Min) of time period T, when Min < Ax < Max.
Q = 0, for PT - [ (Ax - Min) / (Max - Min) ] of periodic time T.
Note: Ax in this calculation refers to the actual value Ax as calculated using the Gain and
Offset.
LOGO!
226 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
The mathematic instruction block calculates the value AQ of an equation formed from the
user-defined operands and operators.
Qen→0:
0: reset value of AQ to 0 when En=0
1: retain last value of AQ when En=0
p: number of decimals
Range of values: 0, 1, 2, 3
Output AQ The output AQ is the result of the equation formed
from the operand values and operators. AQ will be
set to 32767 if a divide by 0 or overflow occurs, and -
32768 if a negative overflow (underflow) occurs.
Parameters V1 to V4
Another already-programmed function can provide the analog values for the parameters V1
to V4. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
LOGO!
Manual, 06/2014, A5E33039675 227
LOGO! functions
4.4 Special functions list - SF
Note
If the analog value for parameter V1, V2, V3 or V4 is derived from another already-
programmed function whose actual value exceeds the value range for V1 to V4, LOGO! will
display the limit value -32768 if the value is less than the lower range or 32767 if the value is
greater than the upper range.
Functional description
The mathematic instruction function combines the four operations and three operators to
form an equation. The operator can be any one of the four standard operators: +, -, *, or /.
The priority of operators is determined by "( )" and "[ ]", in which "( )" has a higher priority.
The operand values can reference another previously-defined function to provide the value.
The mathematic instruction function rounds the result to the nearest integer value.
LOGO!
228 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
The number of operand values is fixed at four and the number of operators is fixed at 3. If
you need to use fewer operands, use constructions such as + 0 or * 1 to fill the remaining
parameters.
You can also configure the behavior of the function when the Enable parameter En=0. The
function block can either retain its last value, or be set to 0. If the parameter Qen → 0 = 0,
then the function sets AQ to 0 when En=0. If the parameter Qen → 0 = 1, then the function
leaves AQ at its last value when En=0.
Examples
The following tables show some simple example mathematic instruction block parameters,
and the resulting equations and output values:
Equation: 2 + [3 * (1 + 4)]
Result: 17
LOGO!
Manual, 06/2014, A5E33039675 229
LOGO! functions
4.4 Special functions list - SF
Short description
The mathematic instruction error detection block sets an output if an error has occurred in
the referenced Mathematic instruction (Page 227) function block.
Parameter MathBN
The value for the MathBN parameter references the block number of an already-
programmed mathematic instruction function block.
LOGO!
230 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Functional description
The mathematic instruction error detection block sets the output when the referenced
mathematic instruction function block has an error. You can program the function to set the
output on a zero division error, an overflow error, or when either type of error occurs.
If AutoRst is set, the output is reset prior to the next execution of the function block. If
AutoRst is not set, then whenever the output is set it remains set until the mathematic
instruction error detection block is reset with the R parameter. In this way, even if the error
subsequently clears, the circuit program still has knowledge that an error did occur at some
point.
In any scan cycle, if the referenced mathematic instruction function block executes before
the mathematic instruction error detection function block, the error is detected in the same
scan cycle. If the referenced mathematic instruction function block executes after the
mathematic instruction error detection function block, the error is detected in the next scan
cycle.
Err ZD OF Q
ZD 1 x 1
ZD 0 x 0
OF x 1 1
OF x 0 0
ZD/OF 1 0 1
ZD/OF 0 1 1
ZD/OF 1 1 1
ZD/OF 0 0 0
LOGO!
Manual, 06/2014, A5E33039675 231
LOGO! functions
4.4 Special functions list - SF
Short description
The analog filter function smooths the analog input signal.
LOGO!
232 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Functional description
The function fetches the analog signal at input Ax based on the set number of samples (Sn)
and outputs the average value.
Note
There are a maximum of eight analog filter function blocks available for use in the circuit
program in LOGO!.
LOGO!
Manual, 06/2014, A5E33039675 233
LOGO! functions
4.4 Special functions list - SF
4.4.35 Max/Min
Short description
The Max/Min function records the maximum or minimum value of Ax.
Parameter Mode
LOGO!
234 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
The actual value of another already-programmed function can provide the value for
parameter Mode. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● Analog threshold trigger (Page 183) (actual value Ax)
● Analog amplifier (Page 195) (actual value Ax)
● Analog multiplexer (Page 213) (actual value AQ)
● Analog ramp (Page 216) (actual value AQ)
● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (Page 173) (actual value Cnt)
● Analog filter (Page 232) (actual value AQ)
● Average value (Page 237) (actual value AQ)
● On-delay (Page 136) (current time Ta)
● Off-delay (Page 140) (current time Ta)
● On-/off-delay (Page 142) (current time Ta)
● Retentive on-delay (Page 144) (current time Ta)
● Wiping relay (pulse output) (Page 146) (current time Ta)
● Edge-triggered wiping relay (Page 148) (current time Ta)
● Asynchronous pulse generator (Page 150) (current time Ta)
● Stairway lighting switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Max/Min (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number.
LOGO!
Manual, 06/2014, A5E33039675 235
LOGO! functions
4.4 Special functions list - SF
Functional description
ERst = 1 and En = 0: the function sets the AQ value to 0.
ERst = 1 and En = 1: the function outputs a value at AQ, depending on the settings of Mode
and S1.
ERst = 0 and En = 0: the function holds the value of AQ at the current value.
ERst = 0 and En = 1: the function outputs a value at AQ, depending on the settings of Mode
and S1.
Mode = 0: the function sets AQ to the minimum value
Mode = 1: the function sets AQ to the maximum value
Mode = 2 and S1 = 0: the function sets AQ to the minimum value
Mode = 2 and S1 = 1: the function sets AQ to the maximum value
Mode = 3: the function outputs current analog input value.
LOGO!
236 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF
Short description
The average value function calculates the average value of an analog input over a
configured time period.
LOGO!
Manual, 06/2014, A5E33039675 237
LOGO! functions
4.4 Special functions list - SF
Functional description
This function fetches the analog input signal according to both the set sampling time St and
the number of samples Sn and outputs the average value. A signal at R sets AQ to 0.
LOGO!
238 Manual, 06/2014, A5E33039675
Web server 5
LOGO! 0BA8 has a built-in Web server which enables you to operate the LOGO! Base
Module or the LOGO! TDE from a traditional PC or a mobile device.
In this approach, you can access the LOGO! Base Module or the LOGO! TDE using a
connected device (conventional PC, tablet or smart phone with Web browsing capabilities)
through its IP address.
The Web server allows you to use the mouse pointer or the touch screen, depending on the
device you are using, to perform fast and easy operations on the virtualized LOGO! Base
Module and LOGO! TDE.
LOGO! 0BA8 also provides access security control over the Web server. For more
information, see section Network access security (Page 279).
Note
Make sure you do not disable cookies on your browser.
Supported devices
The LOGO! Web server supports the following communications devices when you use one
of the above explorers:
● Conventional PC
● Apple iPhone series
LOGO!
Manual, 06/2014, A5E33039675 239