1537157780LOGO_functions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 125

LOGO!

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!.

4.1 Constants and connectors


Constants and connectors represent inputs, outputs, flags, constants, and network digital
and analog inputs/outputs.

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.

Backlight flags M25, M26, M28 to M31


The following flags control the backlight colors of the LOGO! onboard display or the LOGO!
TDE:

Backlight display Flag Remarks


White M25 The color white means LOGO!
is in RUN mode.
M26 The color white means LOGO!
TDE is in RUN mode.
Amber M28 The color amber means LOGO!
is in programming mode or
parameter assignment mode.
M30 The color amber means LOGO!
TDE is in programming mode,
parameter assignment mode or
TDE setting mode.
Red M29 The color red means LOGO!
has a diagnosis error.
M31 The color red means LOGO!
TDE has a diagnostics error.

Note: The backlight lifetime of the LOGO! TDE is 20,000 hours.

Message text character set flag M27


The M27 flag selects between the two character sets that LOGO! uses to display message
texts. State 0 corresponds to Character Set 1, and state 1 corresponds to Character Set 2. If
M27=0 (low), LOGO! only displays message texts configured for Character Set 1; If M27=1
(high), LOGO! only displays message texts configured for Character Set 2. If you do not
include M27 in the circuit program, message texts display in the character set that you
selected from either LOGO!Soft Comfort or a LOGO! device.

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

Shift register bits


LOGO! provides read-only shift register bits S1.1 to S4.8. Only the "Shift register"
(Page 211) special function can modify shift register bit values.

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.

LOGO! TDE function keys


The LOGO! TDE has four function keys, F1, F2, F3, and F4, which you can use in your
circuit program. You program these keys in the same way as other inputs. Like the cursor
keys, you can press these keys when LOGO! is in RUN mode to affect the behavior of the
circuit program, and to save switches and inputs.

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.

Network inputs/outputs (available only if configured from LOGO!Soft Comfort)


You can configure the following network inputs/outputs only from LOGO!Soft Comfort. If the
circuit program in LOGO! contains a network digital/analog I/O, you can not edit any of the
rest of the circuit program except for the Par parameter. To edit the rest of the program, you
must upload the program to LOGO!Soft Comfort and then edit from LOGO!Soft Comfort.

1) Network digital inputs


The letters NI identify a network digital input. There are 64 digital network digital inputs NI1
to NI64 available for configuration in the circuit program from LOGO!Soft Comfort.

2) Network analog inputs


The letters NAI identify a network analog input. There are 32 network analog inputs NAI1 to
NAI32 available for configuration in the circuit program from LOGO!Soft Comfort.

LOGO!
Manual, 06/2014, A5E33039675 119
LOGO! functions
4.2 Basic functions list - GF

3) Network digital outputs


The letters NQ identify a network digital output . There are 64 network digital outputs NQ1 to
NQ64 available for configuration in the circuit program from LOGO!Soft Comfort.

4) Network analog outputs


The letters NAQ identify a network analog output. There are 16 network analog outputs
NAQ1 to NAQ16 available for configuration in the circuit program from LOGO!Soft Comfort.

4.2 Basic functions list - GF


Basic functions represent simple logical elements of Boolean algebra.
You can invert the inputs of individual basic functions, that is, the circuit program inverts a
logical "1" at a relevant input to a logical "0"; if "0" is the value at the input, the program sets
a logical "1". See the programming example at Circuit program input (Page 69).
The GF list contains the basic function blocks you can use for your circuit program. The
following basic functions are available:

View in the circuit diagram View in LOGO! Name of the basic function
AND (Page 121)

AND with edge evaluation


(Page 122)

NAND (Page 123)


(not AND)

NAND with edge evaluation


(Page 123)

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)

NOR (Page 125)


(not OR)

XOR (Page 126)


(exclusive OR)

NOT (Page 126)


(negation, inverter)

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.

AND function logic table

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

4.2.2 AND with edge evaluation

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.

Timing diagram for the AND with edge evaluation

LOGO!
122 Manual, 06/2014, A5E33039675
LOGO! functions
4.2 Basic functions list - GF

4.2.3 NAND (not AND)

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.

NAND function logic table

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

4.2.4 NAND with edge evaluation

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.

Timing diagram for the NAND with edge evaluation

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.

OR function logic table

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

4.2.6 NOR (not OR)

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.

NOR function logic table

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

4.2.7 XOR (exclusive OR)

The output status of the XOR is 1 if the inputs are not equivalent.
At an unused block input (x): x = 0.

XOR function logic table

1 2 Q
0 0 0
0 1 1
1 0 1
1 1 0

4.2.8 NOT (Negation, Inverter)

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.

NOT function logic table

1 Q
0 1
1 0

LOGO!
126 Manual, 06/2014, A5E33039675
LOGO! functions
4.3 Special functions

4.3 Special functions


Because of their different input designation, you can see right away that there is a difference
between the special functions and basic functions. Special functions (SFs) contain timer
functions, retentive functions and various parameter assignment options, which allow you to
adapt the circuit program to suit your own requirements.
This section provides you with a brief overview of input designations and with some
particular background information on SFs (Page 131).

4.3.1 Designation of the inputs

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.

4.3.2 Time response

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).

Accuracy of the timer (weekly/yearly timer)


To prevent timing inaccuracy of the real-time clock in C versions (LOGO! devices with an
integrated real-time clock) caused by this deviation, LOGO! continuously compares the timer

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.3 Backup of the real-time clock


Because LOGO! backs up the internal real-time clock, it continues operation after a power
failure. The surrounding temperature influences the backup time. At a surrounding
temperature of 25°C, the typical backup time of a LOGO! 0BA8 is 20 days.
If there is a power outage of a LOGO! for more than 20 days, on restarting, the internal clock
is back in the status that it was in before the power outage.

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.

4.3.5 Parameter protection


In the parameter protection settings, you can determine whether or not you display and edit
the parameters in LOGO! parameter assignment mode. Two options are available:
+: The parameter attribute permits read/write access in parameter assignment mode
(default).
-: The parameter settings are read–/write–protected in parameter assignment mode, and you
can only edit them in programming mode. See the parameter protection mode example in
the Second circuit program (Page 82).

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

4.3.6 Calculating the gain and offset of analog values


A sensor is connected to the analog input and converts a process variable into an electrical
signal. This value of signal lies within the typical range of this sensor.
LOGO! always converts the electrical signals at the analog input into digital values from 0 to
1000.
LOGO! internally transforms a voltage of 0 V to 10 V at input AI to a range of values from 0
to 1000. LOGO! interprets an input voltage exceeding 10 V as internal value 1000.
Because you cannot always process the range of values from 0 to 1000 as predetermined by
LOGO!, you can multiply the digital values by a gain factor and then shift the zero of the
range of values (offset). This allows you to output an analog value to the LOGO! onboard
display that is proportional to the actual process variable.

Parameter Minimum Maximum


Input voltage (in V) 0 ≥ 10
Internal value 0 1000
Gain -10.00 +10.00
Offset -10000 +10000

Mathematical rule
Actual value Ax =
(internal value at input Ax • gain) + offset

Gain and offset calculation


LOGO! calculates the gain and offset based on the relevant high and low values of the
function.
Example 1:
The available thermocouples have the following technical data: -30 °C to +70 °C, 0 to 10
VDC (that is, 0 to 1000 in LOGO!).
Actual value = (internal value • gain) + offset, thus
-30 = (0 • A) + B, that is, offset B = -30
+70 = (1000 • A) -30, that is, gain A = 0.1
Example 2:
A pressure sensor converts a pressure of 1000 mbar into a voltage of 0 V, and a pressure of
5000 mbar into a voltage of 10 V.
Actual value = (internal value • gain) + offset, thus
1000 = (0 • A) + B, that is, offset B = 1000
5000 = (1000 • A) +1000, that is, gain A = 4

LOGO!
130 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Example of analog values

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.

4.4 Special functions list - SF


When you create your circuit program in LOGO!, you find the special function blocks in the
SF list.
You can invert the inputs of SFs individually, that is, the circuit program converts a logical "1"
at the input into a logical "0"; a logical "0" it converts into a logical "1". See the programming
example in topic "Circuit program input (Page 69)".
The table also specifies whether the relevant function can be set retentive (Rem). The
following SFs are available:

LOGO!
Manual, 06/2014, A5E33039675 131
LOGO! functions
4.4 Special functions list - SF

View in LOGO! Name of the special function Rem


Timers
On-delay (Page 136) REM

Off-delay (Page 140) REM

On-/off-delay (Page 142) REM

Retentive on-delay (Page 144) REM

Wiping relay (pulse output) (Page 146) REM

Edge-triggered wiping relay (Page 148) REM

Asynchronous pulse generator (Page 150) REM

Random generator (Page 152)

LOGO!
132 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

View in LOGO! Name of the special function Rem


Stairway lighting switch (Page 154) REM

Multiple function switch (Page 156) REM

Weekly timer (Page 159)

Yearly timer (Page 162)

Astronomical clock (Page 168)

Stopwatch (Page 171)

Counter
Up/down counter (Page 173) REM

Hours counter (Page 176) REM

LOGO!
Manual, 06/2014, A5E33039675 133
LOGO! functions
4.4 Special functions list - SF

View in LOGO! Name of the special function Rem


Threshold trigger (Page 180)

Analog
Analog threshold trigger (Page 183)

Analog differential trigger (Page 186)

Analog comparator (Page 188)

Analog watchdog (Page 192)

Analog amplifier (Page 195)

Analog multiplexer (Page 213)

Pulse width modulator (PWM) (Page 224)

Mathematic instruction (Page 227)

LOGO!
134 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

View in LOGO! Name of the special function Rem


Analog ramp (Page 216)

PI controller (Page 220) REM

Analog filter (Page 232)

Max/Min (Page 234) REM

Average value (Page 237) REM

Miscellaneous
Latching relay (Page 197) REM

Pulse relay (Page 198) REM

Message texts (Page 200)

LOGO!
Manual, 06/2014, A5E33039675 135
LOGO! functions
4.4 Special functions list - SF

View in LOGO! Name of the special function Rem


Softkey (Page 209) REM

Shift register (Page 211) REM

Mathematic instruction error detection


(Page 230)

4.4.1 On-delay

Short description
The output is only set after a configurable on-delay time expires.

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) triggers the on-delay
timer.
Parameter T represents the time after which the output is on (0
to 1 transition of the output signal).
Retentivity:
/ = no retentivity
R = the status is retentive.
Output Q Q is on when the set time T expires, provided Trg is
still set.

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

● 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 (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)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. The timebase is configurable.

Valid ranges of the timebase, if T = parameter


Note the following characteristics of timebase values.

Timebase max. value min. resolution Accuracy


s (seconds) 99:99 10 ms + 10 ms
m (minutes) 99:59 1s +1s
h (hours) 99:59 1 min + 1 min

The parameter T initially appears as follows in programming mode, for example:

LOGO!
Manual, 06/2014, A5E33039675 137
LOGO! functions
4.4 Special functions list - SF

Valid ranges of the timebase


If an already-programmed function provides the value of T, the valid ranges of the timebase
are as follows:

Timebase max. value Meaning Accuracy


ms 99990 Number of ms + 10 ms
s 5999 Number of s +1s
m 5999 Number of min + 1 min

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.

Parameter preset = Actual value of an already-programmed function


To include the actual value of an already-programmed function for parameter T, follow these
steps:
1. Press to move the cursor to the equal sign of parameter T.

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.

The view in parameter assignment mode appears as follows, for example:

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.

Symbol in LOGO! Wiring Description


Input Trg The off-delay timer starts with a negative edge (1 to 0
transition) at input Trg (Trigger)
Input R A signal at input R resets the on-delay time and the
output.
Parameter The output switches off (transitions from1 to 0) when
the delay time T expires.
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q A signal at input Trg sets Q. Q holds this state until T
expires.

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

● 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)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. The timebase is configurable. For
information on valid timebase ranges and parameter preset, refer to Section "On-delay
(Page 136)".

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.

Symbol in LOGO! Wiring Description


Input Trg A positive edge (0 to 1 transition) at input Trg
(Trigger) triggers the on-delay time TH.
A negative edge (1 to 0 transition) at input Trg
(Trigger) triggers the off-delay time TL.
Parameter TH is the time after which the output is set hi (output
signal transition 0 to 1).
TL is the time after which the output is reset ( output
signal transition 1 to 0).
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q LOGO! sets Q when the configured time TH expires
and Trg is still set. LOGO! resets Q when TL expires,
if the trigger Trg has not been set.

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

● On-/off-delay (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)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. The timebase is configurable. For
information on valid timebase ranges and parameter preset, refer to Section "On-delay
(Page 136)".

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

4.4.4 Retentive on-delay

Short description
A one-shot at the input triggers a configurable on-delay time. The output is set when this
time has expired.

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) triggers the on-delay
timer.
Input R A signal at input R resets the on-delay time and the
output.
Parameter T represents the on-delay time for the output (output
status transition 0 to 1).
Retentivity:
/ = no retentivity
R = The status is retentive.
Output Q LOGO! sets output Q after the time T expires.

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

● 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)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. The timebase is configurable. For
information on valid ranges and parameter defaults, refer to Section "On-delay (Page 136)".

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

4.4.5 Wiping relay (pulse output)

Short description
An input signal generates a signal with a configurable period at the output.

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) triggers the time for the
wiping relay function.
Parameter The output is switched off after the time T has expired
(output signal transition 1 to 0).
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q A signal at input Trg sets Q. If the input signal = 1,
output Q remains set for the time Ta.

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

● Stairway lighting switch (Page 154)(current time Ta)


● Multiple function switch (Page 156)(current time Ta)
● Stopwatch (Page 171)(actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number. The timebase is configurable. For
information on valid ranges and parameter defaults, refer to Section "On-delay (Page 136)".

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

4.4.6 Edge-triggered wiping relay

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.

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) triggers the times for
the edge triggered wiping relay.
Input R A signal at input R resets the current time (Ta) and the
output.
Parameter The interpulse width TL and the pulse width TH are
configurable.
N determines the number of pulse/pause cycles
TL/TH:
Range of values: 1...9
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q Q is set after TL expires, and reset after TH expires.

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

● Retentive on-delay (Page 144) (current time Ta)


● Wiping relay(pulse output) (Page 146) (current time Ta)
● Edge triggered wiping relay (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) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)

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

Setting the Par parameter


View in programming mode (example):

View in parameter assignment mode (example):

4.4.7 Asynchronous pulse generator

Short description
You can asynchronously output pulses with this function.

Symbol in LOGO! Wiring Description


Input En You can use input EN to set and reset the
asynchronous pulse generator.
Input Inv You can use input Inv to invert the output signal of the
active asynchronous pulse generator.
Parameter You can configure the pulse width TH and the
interpulse width TL.
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q The pulse and pause values cyclically set and reset
Q.

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

● 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)
● Aysnchronous pulse generator (current time Ta)
● Stairway light switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
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

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

4.4.8 Random generator

Short description
The random generator function sets an output randomly within a configured time.

Symbol in LOGO! Wiring Description


Input En A positive edge ( 0 to 1 transition) at input En
(Enable) triggers the on-delay time of the random
generator.
A negative edge ( 1 to 0 transition) at input En
(Enable) triggers the off-delay time of the random
generator.
Parameter LOGO! sets the on-delay at random to a value
between 0 s and TH.
The off-delay is set at random to a value between 0 s
and TL.
Output Q LOGO! sets output Q when the on-delay expires and
if En is still set. LOGO! resets Q when the off-delay
expires, provided LOGO! has not set En again
meanwhile.

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

● 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) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
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

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

4.4.9 Stairway lighting switch

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.

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) triggers the off-delay
time for the stairway lighting switch.
Parameter T represents the off-delay time of the output (output
signal transition 1 to 0).
T! determines the triggering time for the pre-warning.
T!L determines the length of the pre-warning signal.
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q LOGO! resets Q after the time T expires. LOGO!
outputs a warning signal before this time expires.

Parameter T, T! and T!L


Note the defaults of the T parameters listed in topic Time response (Page 128).
The actual value of another already-programmed function can provide the off-delay time T,
the pre-warning time T! and the pre-warning period T!L. 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!
154 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

● 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 lightswitch (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
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

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.

Setting the Par parameter


Note the defaults specified in topic Time response (Page 128).

Note
All times must have the same timebase.

View in programming mode (example):

LOGO!
Manual, 06/2014, A5E33039675 155
LOGO! functions
4.4 Special functions list - SF

View in parameter assignment mode (example):

4.4.10 Multiple function switch

Short description
The multiple function switch provides two different functions:
● Pulse switch with off-delay
● Switch (permanent lighting)

Symbol in LOGO! Wiring Description


Input Trg A signal at input Trg (Trigger) sets output Q
(permanent light) or resets Q with an off-delay. When
active, output Q can be reset with a signal at input
Trg.
Input R A signal at input R resets the current time Ta and
resets the output.
Parameter T represents the off-delay time. LOGO! resets the
output (1 to 0 transition) when time T expires.
TL represents the time during which the output must
be set to enable the permanent light function.
T! represents the on-delay for the prewarning time.
T!L represents the length of the prewarning time
period.
Retentivity:
/ = No retentivity
R = The status is retentive.
Output Q A signal at Trg switches on output Q. Depending on
the length of the input at Trg, the output is off again or
on permanently, or it is reset with a further signal at
Trg.

LOGO!
156 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Parameters T, TL,T! and T!L


Note the defaults of the T parameters listed in topic Time response (Page 128).
The actual value of another already-programmed function can provide the off-delay time T,
the permanent light time TL, the on-delay prewarning time T! and the prewarning time period
T!L. 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 (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
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

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.

Setting the Par parameter


Note the defaults specified in the topic "Time response (Page 128)".

Note
T, T! and T!L must all have the same timebase.

View in programming mode (example):

View in parameter assignment mode (example):

LOGO!
158 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.11 Weekly timer

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.

Symbol in LOGO! Wiring Description


Cam parameters At the Cam parameters, you set the on- and off-times of the
1, 2 and 3 weekly timer for each Cam switch. Here you also configure
the days and the time-of-day.
You can also specify whether the timer pulses on for one
cycle when activated and then reset. The pulse setting
applies to all three cams.
Output Q LOGO! sets Q when actuating the configured cam.

Timing diagram (three examples)

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:

Cam On-time Off-time


1 1:00h 2:00h

LOGO!
Manual, 06/2014, A5E33039675 159
LOGO! functions
4.4 Special functions list - SF

2 1:10h 1:50h
3 1:20h 1:40h

In this example, the work time is 1:00h to 1:40h.


The status of all three cams determines the switching state of the weekly timer.

Parameter assignment screen form


View of the parameter assignment screen form, for example for Cam1 and the Pulse setting:

Days of the week


The prefix "D=" (Day) has the following meaning:
● M: Monday
● T: Tuesday
● W: Wednesday
● T: Thursday
● F: Friday
● S: Saturday
● S: Sunday
Uppercase letters indicate a specific day of the week. A "-" indicates no selection for the day
of the week.

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

the output is reset.


- -:- - means: No on-/off-times set.

Setting the weekly timer


To set the on-/off-times:
1. Move the cursor to one of the Cam parameters of the timer (for example, No1).
2. Press OK. The cursor is positioned on the day of the week.
3. Press and to select one or several days of the week.
4. Press to move the cursor to the first position of the on-time.
5. Set the on-time.
Modify the value at the respective position, using the keys and . Move to the cursor to
the various positions, using the keys and . At the first position, you can only select the
value - -:- -
(- -:- - means: No on-/off-times set).
6. Press to move the cursor to the first position of the off-time.
7. Set the off-time (in same way as in Step 5).
8. Confirm your entries with OK.
To configure Cam2, press . The cursor is now positioned on the No2 parameter (Cam2)
and you can continue with Steps 1 to 8.

Note
For information on timer accuracy, refer to the technical data and to the topic "Time
response (Page 128)".

Weekly timer: Example


The output of the weekly timer switch is to be set daily from 06:30 h to 08:00 h. The output
should also be set every Tuesday from 03:10 h to 04:15 h, and on the weekends from 16:30
h to 23:10 h.
This requires three cams.
Here are the parameter assignment screen forms of the cams No 1, 2 and 3, based on the
timing diagram shown earlier.
● Cam No1 must set the output of the weekly timer daily from 06:30 h to 08:00 h.
● Cam No2 must set the output of the weekly timer every Tuesday from 03:10 h to 04:15 h.
● Cam No3 must set the output of the weekly timer switch every Saturday and Sunday from
16:30 h to 23:10 h.
Views in LOGO!:

LOGO!
Manual, 06/2014, A5E33039675 161
LOGO! functions
4.4 Special functions list - SF

Result

4.4.12 Yearly timer

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

Symbol in LOGO! Wiring Description


Cam parameter At the Cam parameter, you configure the timer mode,
the on-/off-times for the timer, and whether the output
is a pulse output.
Output Q LOGO! sets Q when the configured cam is on.

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.

Backup of the real-time clock


The internal real-time clock of LOGO! is buffered against power failure. The buffering time is
influenced by the surrounding temperature, and is typically 80 hours at a surrounding
temperature of 25°C.

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

4.4.13 Astronomical clock

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.

Symbol in LOGO! Wiring Description


Parameter You specify the longitude, altitude, time zone, sunrise
time offset and sunset time offset:
Longitude:
Direction settings:
EAST or WEST
Range of values:
0 ° to 180 ° (degrees)
0 ' to 59 ' (minutes)
0 " to 59 " (seconds)
Latitude:
Direction settings:
NORTH or SOUTH
Range of values:
0 ° to 90 ° (degrees)
0 ' to 59 ' (minutes)
0 " to 59 "(seconds)
Zone:
Range of values:
-11 to 12
TR Offset (sunrise time offset):
Range of values:
-59 minutes to 59 minutes
TS Offset (sunset time offset):
Range of values:
-59 minutes to 59 minutes
Output Q LOGO! sets Q to "1" when the current time of your
LOGO! Base Module is between the sunrise time
(TR) and the sunset time (TS).

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.

Setting the Par parameter


View in programming mode (example):

Press

Press

View in parameter assignment mode (example):

LOGO!
Manual, 06/2014, A5E33039675 169
LOGO! functions
4.4 Special functions list - SF

Press

If automatic summertime/wintertime conversion is disabled, press and LOGO! shows the


following view in parameter assignment mode (example):

If automatic summertime/wintertime conversion is enabled and set to "EU" (for example),


press and LOGO! shows the following view in parameter assignment mode (example):

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.

Symbol in LOGO! Wiring Description


En A signal at input En begins counting elapsed time at
analog output AQ.
Lap A positive edge (0 to 1 transition) at input Lap pauses
the stopwatch.
A negative edge (1 to 0 transition) at input Lap
resumes the stopwatch.
R A signal at input R resets the elapsed time.
Parameter You can set a timebase TB for the stopwatch.
Possible timebase settings:
10 ms, s, m, and h
Retentivity:
/ = No retentivity
R = The status is retentive
Output AQ A signal at input Lap holds the value of AQ until Lap
is reset to 0. A signal at input R resets the value of
AQ to 0.

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.

Setting the Par parameter


View in programming mode (example):

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

4.4.15 Up/down counter

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.

Symbol in LOGO! Wiring Description


Input R A signal at input R resets the internal count value to
zero.
Input Cnt The function counts the 0 to 1 transitions at input Cnt.
1 to 0 transitions are not counted.
You can use the following as the input:
• inputs I3, I4, I5, and I6 for fast counting (only
LOGO! 12/24RCE/RCEo and LOGO!
24CE/24CEo): max. 5 kHz, if the fast input is
directly connected to the up/down counter
function block
• any other input or circuit component for counting
low frequency signals (typically 4 Hz)
Input Dir You set the direction of count at input Dir:
Dir = 0: Count up
Dir = 1: Count down
Parameter On: on threshold
Range of values:
0...999999
Off: off threshold
Range of values:
0...999999
StartVal: initial value from which to begin counting
either down or up.
Retentivity for internal counter value Cnt:
/ = No retentivity
R = The status is retentive.
Output Q Q is set or reset, depending on the current value at
Cnt and the set thresholds.

Parameters On and Off


The actual value of another already-programmed function can provide the on threshold On
and the off threshold Off. 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 173
LOGO! functions
4.4 Special functions list - SF

● Analog ramp (Page 216) (actual value AQ)


● Mathematic instruction (Page 227) (actual value AQ)
● PI controller (Page 220) (actual value AQ)
● Up/down counter (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) (actual value AQ)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number.

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).

View in programming mode (example):

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

4.4.16 Hours counter

Short description
A configured time is triggered with a signal at the monitoring input. The output is set when
this time has expired.

Symbol in LOGO! Wiring Description


Input R A positive edge (0 to 1 transition) at input R resets
output Q and sets a configured value MI at the
counter for the duration of the time-to-go (MN).
Input En En is the monitoring input. LOGO! scans the on-time
of this input.
Input Ral A positive edge at input Ral (Reset all) resets the
hours counter (OT) and the output, and sets the time-
to-go value (MN) to the maintenance interval MI:
• Output Q = 0
• Measured operating time OT = 0
• Time-to-go of the maintenance interval MN = MI.
Parameter MI: Maintenance interval to be preset in units of hours
and minutes
Range of values:
0000 h to 9999 h, 0 m to 59 m
OT: the accumulated total operating time (you can
specify an offset in hours and minute)
Range of values:
00000 h to 99999 h, 0 m to 59 m
Q → 0 occurs depending on the following conditions:
• When "R" is selected:
Q = 1, if MN = 0;
Q = 0, if R = 1 or Ral = 1
• When "R+En" is selected:
Q = 1, if MN = 0;
Q = 0, if R = 1 or Ral = 1 or En = 0.
Output Q The output is set when the time-to-go MN = 0 (see
timing diagram).
The output is reset under the following conditions:
• When "Q→0:R+En", if
R = 1 or Ral = 1 or En = 0
• When "Q→0:R", if R = 1 or Ral = 1.

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").

Viewing the MI, MN and OT values


● LOGO! Basic: You can open the parameter assignment mode when the system is in RUN
to view the actual values of MI, MN and OT.
● LOGO! Pure: In LOGO!Soft Comfort, you can use the Online Test to read these values.
For further information, see chapter "LOGO! software (Page 283)".
● In LOGO!Soft Comfort you can get the hours counter via the "Tools -> Transfer: Hours
counter" menu command.

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.

Setting the Par parameter


View in programming mode:

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

4.4.17 Threshold trigger

Short description
The output is set and reset with two configurable threshold triggers.

Symbol in LOGO! Wiring Description


Input Fre The function counts the 0 to 1 transitions at input Fre.
1 to 0 transitions are not counted.
Use the following as the input:
• inputs I3, I4, I5, I6 for fast counting (only LOGO!
12/24RCE/RCEo and LOGO! 24CE/24CEo): max.
5 kHz, if the fast input is directly connected to the
threshold trigger function block
• any other input or circuit component for counting
low frequency signals (typically 4 Hz)
Parameter On: on threshold
Range of values:
0000...9999
Off: off threshold
Range of values:
0000...9999
G_T: time interval or gate time during which the input
pulses are measured
Range of values:
00:00 s...99:99 s
Output Q Q is set and reset at the thresholds.

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

● 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) (actual value AQ)
● Threshold trigger (actual value Fre)
Select the required function by the block number.

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.

Setting the Par parameter

Note
The system scans the counter limit value once per interval G_T.

View in programming mode (example):

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.

View in parameter assignment mode (example):

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

4.4.18 Analog threshold trigger

Short description
The output is set and reset at two configurable thresholds.

Symbol in LOGO! Wiring Description


Input Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter A: gain
Range of values: -10.00 to 10.00
B: zero offset
Range of values: -10,000 to 10,000
On: on threshold
Range of values: -20,000 to 20,000
Off: off threshold
Range of values: -20,000 to 20,000
p: number of decimals
Range of values: 0, 1, 2, 3
Output Q Q is set or reset by the threshold triggers.
* AI1...AI8: 0...10 V corresponds with 0...1000 (internal value).

Gain and offset parameters


Please note the information on gain and offset parameters in topic "Calculating the gain and
offset of analog values (Page 130)".

Parameters On and Off


The actual value of another already-programmed function can provide the On and Off
parameters. You can use the actual values of the following functions:
● Analog comparator (Page 188) (actual value Ax – Ay)
● 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)

LOGO!
Manual, 06/2014, A5E33039675 183
LOGO! functions
4.4 Special functions list - SF

● 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)
● Analog threshold trigger (actual value Ax)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number.

Parameter p (number of decimals)


Applies only to the display of On, Off and Ax values in a message text.
Does not apply to the comparison of On and Off values. (The compare function ignores the
decimal point.)

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.

Setting the Par parameter


The gain and offset parameters are used to adapt the sensors to the relevant application.
View in programming mode (example):

View in parameter assignment mode (example):

View in the message text (example):

LOGO!
Manual, 06/2014, A5E33039675 185
LOGO! functions
4.4 Special functions list - SF

4.4.19 Analog differential trigger

Short description
The output is set and reset depending on a configurable threshold and a differential value.

Symbol in LOGO! Wiring Description


Input Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter A: gain
Range of values: -10.00 to 10.00
B: zero offset
Range of values: -10,000 to 10,000
On: On/Off threshold
Range of values: -20,000 to 20,000
Δ: differential value for calculating the off parameter
Range of values: -20,000 to 20,000
p: Number of decimals
Range of values: 0, 1, 2, 3
Output Q Q is set or reset, depending on the threshold and
difference values.
* AI1...AI8: 0...10 V corresponds with 0...1000 (internal value).

Gain and offset parameters


Please note the information on gain and offset parameters in topic "Calculating the gain and
offset of analog values (Page 130)".

Parameter p (number of decimals)


Applies only to the display of On, Off and Ax values in a message text.

Timing diagram A: Function with negative difference Δ

LOGO!
186 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Timing diagram B: Function with positive difference Δ

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.

Setting the Par parameter


The gain and offset parameters are used to adapt the sensors to the relevant application.
View in programming mode (example):

View in parameter assignment mode (example):

LOGO!
Manual, 06/2014, A5E33039675 187
LOGO! functions
4.4 Special functions list - SF

4.4.20 Analog comparator

Short description
The output is set and reset depending on the difference Ax - Ay and on two configurable
thresholds.

Symbol in LOGO! Wiring Description


Inputs Ax and Ay Inputs Ax and Ay are one of the following analog
signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter A: gain
Range of values: -10.00 to 10.00
B: ero offset
Range of values: -10,000 to 10,000
On: on threshold
Range of values: -20,000 to 20,000
Off: off threshold
Range of values: -20,000 to 20,000
p: number of decimals
Range of values: 0, 1, 2, 3
Output Q Q is set or reset, depending on the difference Ax - Ay
and the set thresholds..
* AI1...AI8: 0...10 V corresponds with 0...1000 (internal value).

Gain and offset parameters


For more information on the gain and offset parameters, refer to topic "Calculating the gain
and offset of analog values (Page 130)".

Parameters On and Off


The actual value of another already-programmed function the on threshold On and the off
threshold Off. You can use the actual values of the following functions:
● 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)

LOGO!
188 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

● 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 lighting switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Analog comparator (actual value Ax - Ay)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number.

Parameter p (number of decimals)


Applies only to Ax, Ay, On, Off and Δ values displayed in a message text.
Does not apply to the comparison of on and off values! (The compare function ignores the
decimal point.)

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.

Setting the Par parameter


The gain and offset parameters are used to adapt the sensors to the relevant application.
View in programming mode:

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.

Application Internal mapping


-30 °C to 70 °C = 0 VDC to 10 VDC 0 to 1000
0 °C 300
→ Offset = -30

LOGO!
190 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Application Internal mapping


Range of values: 1000
-30 °C to 70 °C = 100 → Gain = 100/1000 = 0.1
On threshold = 15 °C Threshold = 15
Off threshold = 5 °C Threshold = 5
See also topic "Calculating the gain and offset of analog values (Page 130) ".

Configuration (example):

View in parameter assignment mode (example):

View in the message text (example):

Reducing the input response of the analog comparator


You can selectively delay the output of an analog comparator by means of the "On-delay"
and "Off-delay" special functions. With on-delay, output Q is only set if the pulse width of the
triggering signal at input Trg (=analog comparator output) is longer than the on-delay time.
Using this method, you will obtain a virtual hysteresis and reduce the input response to short
signals.

Function block diagram

LOGO!
Manual, 06/2014, A5E33039675 191
LOGO! functions
4.4 Special functions list - SF

4.4.21 Analog watchdog

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.

Symbol in LOGO! Wiring Description


Input En A positive edge (0 to 1 transition) at input En saves
the analog value at input Ax ("Aen") to memory and
starts monitoring of the analog range Aen - Δ 2 to
Aen+ Δ 1
Input Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter A: gain
Range of values: -10.00 to 10.00
B: zero offset
Range of values: -10,000 to 10,000
Δ1: difference value above Aen:
on/off threshold
Range of values: 0 to 20,000
Δ2: difference value below Aen:
on/off threshold
Range of values: 0 to 20,000
p: number of decimals
Range of values: 0, 1, 2, 3
Retentivity:
/ = no retentivity
R = the status is retentive in memory
Output Q Q is set/reset, depending on the stored analog value
and the offset.
* AI1...AI8: 0...10 V corresponds with 0...1000 (internal value).

Gain and offset parameters


For more information on gain and offset parameters, refer to topic "Calculating the gain and
offset of analog values (Page 130)".

LOGO!
192 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Parameters Delta1 and Delta2


The actual value of another already-programmed function the Delta1 and Delta2 parameters.
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 (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)
● Threshold trigger (Page 180) (actual value Fre)
Select the required function by the block number.

Parameter p (number of decimals)


Applies only to the Aen, Ax, Δ 1 and Δ 2 values displayed in a message text.

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.

Setting the Par parameter


The gain and offset parameters are used to adapt the used sensors to the respective
application.
View in programming mode:

View in parameter assignment mode (example):

LOGO!
194 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.22 Analog amplifier

Short description
This special function amplifies the value of an analog input and outputs the result at an
analog output.

Symbol in LOGO! Wiring Description


Input Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter A: gain
Range of values: -10.00 to 10.00
B: zero offset
Range of values: -10,000 to 10,000
p: number of decimals
Range of values: 0, 1, 2, 3
Output AQ This special function has an analog output. This
output can only be connected with analog inputs,
analog flags, analog outputs or network analog
outputs.
Range of values for AQ:
-32767 to 32767
* AI1...AI8: 0 V to 10 V corresponds with 0 to 1000 (internal value).

Gain and offset parameters


Please note the information on gain and offset parameters in topic Calculating the gain and
offset of analog values (Page 130).

Parameter p (number of decimals)


Applies only to the AQ value in a message text.

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.

Scaling an analog input value


You can influence the analog input value of a potentiometer by interconnecting an analog
input with an analog amplifier and an analog flag.
● Scale the analog value at the analog amplifier for further use.
● Connect, for example, the time base for parameter T of a time function (e.g. On-/Off-delay
(Page 142)) or the on and/or off limit specification of an up/down counter (Page 173) to
the scaled analog value.
For more information with programming examples refer to the Online Help for LOGO!Soft
Comfort.

Setting the Par parameter


The gain and offset parameters are used to adapt the sensors to the relevant application.
View in programming mode (example):

View in parameter assignment mode (example):

LOGO!
196 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.23 Latching relay

Short description
Input S sets output Q, input R resets output Q again.

Symbol in LOGO! Wiring Description


Input S You set output Q with a signal at input S.
Input R You reset output Q with a signal at input R. If S and R
= 1, the output is reset.
Parameter Retentivity:
/ = no retentivity
R = the status is retentive.
Output Q Q is set with a signal at input S, and reset with a
signal at input R.

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

4.4.24 Pulse relay

Short description
A short pulse at the input sets and resets the output.

Symbol in LOGO! Wiring Description


Input Trg You set and reset output Q with a signal at input Trg
(Trigger).
Input S You set output Q with a signal at input S.
Input R You reset output Q with a signal at input R.
Parameter Selection:
RS (R input priority) or
SR (S input priority)
Retentivity:
/ = no retentivity
R = the status is retentive.
Output Q Q is set with a signal at Trg, and reset with the next
signal at Trg, if S and R = 0.

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

Par Qn-1 S R Trg Qn


* 0 0 0 0 0
* 0 0 0 0 ->1 1**
* 0 0 1 0 0
* 0 0 1 0 ->1 0

LOGO!
198 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Par Qn-1 S R Trg Qn


* 0 1 0 0 1
* 0 1 0 0 ->1 1
RS 0 1 1 0 0
RS 0 1 1 0 ->1 0
SR 0 1 1 0 1
SR 0 1 1 0 ->1 1
* 1 0 0 0 1
* 1 0 0 0 ->1 0**
* 1 0 1 0 0
* 1 0 1 0 ->1 0
* 1 1 0 0 1
* 1 1 0 0 ->1 1
RS 1 1 1 0 0
RS 1 1 1 0 ->1 0
SR 1 1 1 0 1
SR 1 1 1 0 ->1 1

*: 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:

This special function is not available in parameter assignment 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

4.4.25 Message texts

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.

Global message text settings


You configure global parameters that apply to all message texts on the programming menu:
● Analog time: refresh rate in milliseconds that specifies how frequently analog inputs in
message texts are updated
● Tick time: frequency at which message texts scroll on and off the display
There are two ways that a message text can tick on and off the screen: line by line, or
character by character, which are described in more detail below. A line of a text
message, or each character of a text message in turn will tick on and off the
LOGO! onboard display based on the tick time. For a message that ticks line by line, the
actual tick time is ten times the configured tick time. For messages that tick character by
character, the actual tick time is the configured tick time.
● Current character set: which character set is selected for the display of message texts.
Options Set1 and Set2 can be any of the supported character sets forLOGO!:

Character set in Common Supported Internet reference


LOGO! name languages
ISO8859-1 Latin-1 English, German, http://en.wikipedia.org/wiki/ISO/IEC_8859-1
Italian, Spanish
(partly), Dutch
(partly)
ISO8859-5 Cyrillic Russian http://en.wikipedia.org/wiki/ISO/IEC_8859-5
ISO8859-9 Latin-5 Turkish http://en.wikipedia.org/wiki/ISO/IEC_8859-9
ISO8859-16 Latin-10 French http://en.wikipedia.org/wiki/ISO/IEC_8859-16
GB-2312 Chinese Chinese http://en.wikipedia.org/wiki/GB2312
Shift-JIS Japanese Japanese http://en.wikipedia.org/wiki/Shift-jis

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.

Chinese character set


LOGO! Basic and the LOGO! TDE support the Chinese character set (GB-2312) for the
People's Republic of China. The devices use Microsoft Windows encoding for this character
set. The Windows encoding allows the devices to display the same characters as shown in
the LOGO!Soft Comfort message text editor when you are using a Chinese emulator or a
Chinese version of Microsoft Windows.
The Chinese character set requires a Chinese version of Windows or a Chinese emulator to
properly display Chinese characters in the LOGO!Soft Comfort message text editor. You
must start the Chinese emulator before you open the the message text function block in
LOGO!Soft Comfort.

Programming global message text parameters

LOGO!
Manual, 06/2014, A5E33039675 201
LOGO! functions
4.4 Special functions list - SF

Message text function block

Symbol in LOGO! Wiring Description


Input En A 0 to 1 transition at input En (Enable) starts the
output of the message text.
Parameter Ack: acknowledgment of the message text
Msg Text: input of the message text
Priority: priority of the message text
Range of values: 0 to 127
Tick Type:
• C-C: tick message character by character
• L-L: tick message line by line
Msg. Dst: message destination (BM, TDE or Both)
Web Show: show LOGO! Basic on Web server
Line tick settings (to define whether a line ticks):
• Line1 Tick
• Line2 Tick
• Line3 Tick
• Line4 Tick
• Line5 Tick
• Line6 Tick
Note: You can only edit the Text parameter of the
message from LOGO! Basic. ISO8859-1 is the only
available character set for editing text. You can edit
all other parameters, and other languages for the
Text parameter from LOGO!Soft Comfort. For
configuration details, refer to the Online Help for
LOGO!Soft Comfort.
Output Q Q remains set as long as the message text is set.

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.

Example: tick message character by character


The following illustration shows a one-line, 24-character message text:

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:

Example: tick message line by line


The following example uses the same message configuration as the previous example:

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.

Setting the Par parameter


From the input P, you configure the following characteristics of the message text:
● Priority
● Acknowledgement
● Message destination
● Tick type, and tick setting for each line
View in programming mode:

1. Press to position the cursor on the "ACK" line.


2. Press OK. Enable "Ack": Press or
3. Position the cursor on the "Msg Text" line by pressing . Press OK twice. To select a line
for the message text, press and . LOGO! shows as follows:

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.

5. Confirm your entries with OK.


6. Press to position the cursor on the "Priority" line.

LOGO!
Manual, 06/2014, A5E33039675 205
LOGO! functions
4.4 Special functions list - SF

7. Increase the priority by pressing .


8. Press to position the cursor on the "Msg. Dst" line.

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.

11.Press or to select either "C-C" or "L-L" for the "Tick Type".


12.Enable or disable ticking for each line of the message text by pressing . LOGO!
displays as follows:

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.

Visible parameters or process variables


The following parameters or process variables can be displayed in a message text, as either
numerical values or bar-graph representations of values:

Special function Parameter or process variable visible in a


message text
Timers
On-delay T, Ta
Off-delay T, Ta

LOGO!
206 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Special function Parameter or process variable visible in a


message text
On-/Off-delay Ta, TH, TL
Retentive on-delay T, Ta
Wiping relay T, Ta
(pulse output)
Edge triggered Ta, TH, TL
wiping relay
Asynchronous pulse generator Ta, TH, TL
Random generator TH, TL
Stairway lighting switch Ta, T, T!, T!L
Multiple function switch Ta, T, TL, T!, T!L
Weekly timer 3*on/off/day
Yearly timer On, Off
Astronomical clock Longitude, latitude, zone, TS, TR
Stopwatch TB, Ta, Lap, AQ
Counter
Up/down counter Cnt, On, Off
Hours counter MI, Q, OT
Threshold trigger fa, On, Off, G_T
Analog
Analog threshold trigger On, Off, A, B, Ax
Analog differential trigger On, n, A, B, Ax, Off
Analog comparator On, Off, A, B, Ax, Ay, nA
Analog watchdog n, A, B, Ax, Aen
Analog amplifier A, B, Ax
Analog multiplexer V1, V2, V3, V4, AQ
Analog ramp L1, L2, MaxL, StSp, Rate, A, B, AQ
PI controller SP, Mq, KC, TI, Min, Max, A, B, PV, AQ
Mathematic instruction V1, V2, V3, V4, AQ
PWM (Pulse Width Modulator) A, B, T, Ax amplified
Miscellaneous
Latching relay -
Pulse relay -
Message texts -
Softkey On/Off
Shift register -
Analog filter Sn, Ax, AQ
Max/Min Mode, Min, Max, Ax, AQ
Average value Ax, St, Sn, AQ

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.

Editing message texts


You can only edit simple message texts from LOGO! Basic. You cannot edit message texts
that contain features such as bar graphs, I/O status names, and others from LOGO! Basic.
You can only edit these types of message texts from LOGO!Soft Comfort.
Also, you cannot edit message texts from LOGO! Basic that contain any of the following
parameters:
● Par
● Time
● Date
● EnTime
● EnDate
● Analog input
● Digital I/O status
● Special characters (for example: ±, €)
You can only edit such message texts from LOGO!Soft Comfort.

Changing parameters in the active message text


When the message text is active, press ESC to select the editing mode.

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.

Key input simulation in the active message text


You can enable the four cursor keys C , C , C and C in an active message text by
pressing ESC plus the relevant cursor key.

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.

Symbol in LOGO! Wiring Description


Input En Output Q is set with a 0 to 1 transition of the signal at
input En (Enable), and if "Switch=On" was confirmed
in parameter assignment mode.
Parameter Programming mode:
Selecting the function for pushbutton action for the
duration of one cycle, or for switching action.
Start: on or off state, initialized at the first start of the
program if retentivity is disabled.
Retentivity:
/ = no retentivity
R = the status is retentive.
Parameter assignment mode (RUN mode):
Switch: switches the momentary pushbutton (switch)
on or off.
Output Q Switches on if En=1 and Switch=On was confirmed
with OK.

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.

Setting the Par parameter


View in programming mode (example):
1. Position the cursor on "Par". Press OK.
2. Press to position the cursor on the "On" line.

3. Press OK. Select "Momentary pushbutton" or "Switch": Press or .

4. Press to move the cursor to "Start" line.


5. To change the "Start" state: Press or .

6. Confirm your entries with OK.


View in parameter assignment mode (example):
Here, you can set or reset the "Switch" parameter (On/Off). When in RUN, LOGO! shows the
following display:

Let us assume you want to set "Switch" (On).


1. Press OK (the cursor is now positioned on "Off").
2. To change from "Off" to "On": Press or .
3. Confirm your entries with OK.

LOGO!
210 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.27 Shift register

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.

Symbol in LOGO! Wiring Description


Input In Input read at the start of the function.
Input Trg A positive edge (0 to 1 transition) at input Trg
(Trigger) starts the special function. 1 to 0 transitions
are irrelevant.
Input Dir The signal at input Dir determines the shifting
direction for the shift register bits Sx.1 to Sx.8. "x"
refers to the configured shift register byte index 1, 2,
3, or 4.
Dir = 0: shift up
(Sx.1>>Sx.8)
Dir = 1: shift down
(Sx.8>>Sx.1)
Parameter Shift register bit that determines the value at output
Q.
Possible settings:
Byte index: 1 to 4
Q: S1 to S8
LOGO! provides a maximum of 32 shift register bits,
with eight bits per shift register.
Retentivity:
/ = no retentivity
R = the status is retentive.
Output Q The output value corresponds with the configured
shift register bit.

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:

Setting the Par parameter


View in programming mode (example):

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

4.4.28 Analog multiplexer

Short description
This special function outputs one of four predefined analog values or 0 at the analog output.

Symbol in LOGO! Wiring Description


Input En A change in status from 0 to 1 at input En (Enable)
switches a parameterized analog value to the output
AQ, depending on the value of S1 and S2.
Inputs S1 and S2 S1 and S2 (selectors) for selecting the analog value
to be issued.
• S1 = 0 and S2 = 0:
value 1 is issued.
• S1 = 0 and S2 = 1:
value 2 is issued.
• S1 = 1 and S2 = 0:
value 3 is issued.
• S1 = 1 and S2 = 1:
value 4 is issued.
Parameter V1 to V4: analog values that will be issued.
Range of values: -32768 to 32767
p: number of decimals
Range of values: 0, 1, 2, 3
Output AQ This special function has an analog output. This
output can only be connected with analog inputs,
analog flags, analog outputs or network analog
outputs.
Range of values for AQ:
-32768 to 32767

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

● 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)
● 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.

Parameter p (number of decimals)


Applies only to the values displayed in a message text.

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.

Setting the Par parameter


View in programming mode (example):

View in parameter assignment mode:

LOGO!
Manual, 06/2014, A5E33039675 215
LOGO! functions
4.4 Special functions list - SF

4.4.29 Analog ramp

Short description
This function allows the output to be changed from the current level to the selected level at a
specified rate.

Symbol in LOGO! Wiring Description


Input En A change in the status from 0 to 1 at input En
(Enable) applies the start/stop level (Offset "B" +
StSp) to the output for 100 ms and starts the ramp
operation to the selected level.
A change in the status from 1 to 0 immediately sets
the current level to Offset "B", which makes output
AQ equal to 0.
Input Sel SeI = 0: level 1 is selected.
SeI = 1: level 2 is selected.
A change in status of Sel causes the current level to
start changing to the selected level at the specified
rate.
Input St A change in the status from 0 to 1 at input St
(Decelerated Stop) causes the current level to
decrease at a constant rate until the start/stop level
(Offset "B" + StSp) is reached. The start/stop level is
maintained for 100 ms and then the current level is
set to Offset "B", which makes output AQ equal to 0.

LOGO!
216 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Symbol in LOGO! Wiring Description


Parameter Level 1 and Level 2:
levels to be reached
Range of values for each level:
-10000 to 20000
MaxL:
maximum value that must not be exceeded under any
circumstances.
Range of values: -10000 to 20000
StSp:
Start/Stop offset: value that is added to Offset "B" to
create the start/stop level. If the Start/Stop offset is 0,
then the start/stop level is Offset "B".
Range of values:
0 to 20000
Rate:
acceleration with which level 1, level 2 or Offset is
reached. Steps/seconds are issued.
Range of values:
1 to 10000
A: gain
Range of values:
0 to 10.00
B: offset
Range of values:
-10000 to 10000
p: number of decimals
Range of values:
0, 1, 2, 3
Output AQ Range of values for AQ:
0 to 32767
(Current Level - Offset "B") / Gain "A"
Range of values:
0 to 32767
Note:
When AQ is displayed in parameter mode or
message mode, it is displayed as a scaled value,
both on the LOGO! Base Module and LOGO!Soft
Comfort (engineering units: current level).

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

● 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 lighting switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Analog ramp (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.

Parameter p (number of decimals)


Applies only to the AQ, L1, L2, MaxL, StSp and Rate values displayed in a message text.

Timing diagram for AQ

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.

Setting the Par parameter


View in programming mode (example):

View in parameter assignment mode:

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.

Symbol in LOGO! Wiring Description


Input A/M Set the mode of the controller:
1: automatic mode
0: manual mode
Input R Use the input R to reset the output AQ. As long as
this input is set, the input A/M is disabled.
Output AQ is set to 0.
Input PV Analog value: process variable, influences the output
Parameter SP: set-value assignment
Range of values:
-10,000 to 20,000
KC: gain
Range of values:
00.00 to 99.99
TI: integral time
Range of values:
00:01m to 99:59 m
Dir: action direction of the controller
Range of values:
+ or -
Mq: value from AQ with manual mode
Range of values:
0 to 1,000
Min: minimum value for PV
Range of values:
-10,000 to 20,000
Max: maximum value for PV
Range of values:
-10,000 to 20,000
A: gain
Range of values:
-10.00 to 10.00
B: offset
Range of values:
-10,000 to 10,000
p: number of decimals
Range of values:
0, 1, 2, 3
Output AQ This special function has an analog output (=
manipulated variable). This output can only be
connected with analog inputs, analog flags, analog
outputs or network analog outputs.
Range of values for AQ:
0 to 1,000

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.

Parameter p (number of decimals)


Applies only to the PV, SP, Min and Max values displayed in a message text.

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.

1. A disturbance causes the PV to drop, as Dir is positioned upwards, AQ increases until PV


corresponds again to SP.
2. A disturbance causes the PV to drop, as Dir is positioned downwards, AQ decreases until
PV corresponds again to SP.
It is not possible to change the direction (Dir) at runtime of the function. The change is
shown here for illustrative purposes only.
3. As AQ is set to 0 by means of the input R, PV changes. This is based on the fact that PV
increases, which on account of Dir = upwards causes AQ to drop.

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.

The updated value PV is used to calculate in the formulas:


Updated value PV = (PV • gain) + offset

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.

Setting the Par parameter


View in programming mode (example):

View in parameter assignment mode:

LOGO!
Manual, 06/2014, A5E33039675 223
LOGO! functions
4.4 Special functions list - SF

4.4.31 Pulse width modulator (PWM)

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.

Symbol in LOGO! Wiring Description


Input En A positive edge (0 to 1 transition) at input En enables
the PWM function block.
Input Ax Analog signal to be modulated to a pulsed digital
output signal.
Parameter A: gain
Range of values: -10.00 to 10.00
B: zero offset
Range of values: 10,000 to 10,000
T: periodic time over which the digital output is
modulated
p: number of decimals
Range of values: 0, 1, 2, 3
Min:
Range of values: -20,000 to 20,000
Max:
Range of values: -20,000 to 20,000
Output Q Q is set or reset for the proportion of each time period
according to the proportion of the standardized value
Ax to the analog value range.

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

● 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)
● Threshold trigger (Page 180) (actual value Fre)
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.

Parameters p (number of decimals)


Parameter p applies only to the display of the Ax value in a message text.

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.

Examples with timing diagrams


The following examples show how the PWM instruction modulates a digital output signal
from the analog input value:
Example 1
Analog input value: 500 (range 0 to 1,000)
Periodic time T: four seconds
The digital output of the PWM function is 2 seconds high, 2 seconds low, 2 seconds high, 2
seconds low and continues in that pattern as long as parameter "En" = high.

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.

Setting the Par Parameter


The following illustration shows the view in programming mode that corresponds to the first
example:

View in parameter assignment mode:

LOGO!
226 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.32 Mathematic instruction

Short description
The mathematic instruction block calculates the value AQ of an equation formed from the
user-defined operands and operators.

Symbol in LOGO! Wiring Description


Input En A change in the status from 0 to 1 at input En
(Enable) enables the mathematic instruction function
block.
Parameter V1: first operand value
V2: second operand value
V3: third operand value
V4: fourth operand value

Op1: first operator


Op2: second operator
Op3: third operator

Operator Prio: priority of the operands

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

● Analog ramp (Page 216) (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 lighting switch (Page 154) (current time Ta)
● Multiple function switch (Page 156) (current time Ta)
● Stopwatch (Page 171) (actual value AQ)
● Mathematic instruction (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.

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.

Parameters p (number of decimals)


Parameter p applies only to the display of Value1, Value2, Value3, Value4 and AQ in a
message text.

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.

Possible errors: zero division and overflow


If the mathematic instruction function block execution results in zero division or overflow, it
sets internal bits that indicate the type of error that occurred. You can program a mathematic
instruction error detection function block in your circuit program to detect these errors, and to
control the program behavior as needed. You program one mathematic instruction error
detection function block to reference one specific mathematic instruction function block.

Examples
The following tables show some simple example mathematic instruction block parameters,
and the resulting equations and output values:

V1 Op1 V2 Op2 V3 Op3 V4


(Priority) (Priority) (Priority)
12 [+] 6 (/) 3 - 1

Equation: [12 + (6 / 3)] - 1


Result: 13

V1 Op1 V2 Op2 V3 Op3 V4


(Priority) (Priority) (Priority)
2 (+) 3 [*] 1 + 4

Equation: 2 + [3 * (1 + 4)]
Result: 17

V1 Op1 V2 Op2 V3 Op3 V4


(Priority) (Priority) (Priority)
100 (-) 25 / 2 [+] 1

Equation: (100 - 25) / [2 + 1]


Result: 25

LOGO!
Manual, 06/2014, A5E33039675 229
LOGO! functions
4.4 Special functions list - SF

Setting the Par parameter


The following illustration shows the view in programming mode that corresponds to the first
example [12 + (6 / 3)] - 1:

View in parameter assignment mode:

4.4.33 Mathematic instruction error detection

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.

Symbol in LOGO! Wiring Description


Input En A change in the status from 0 to 1 at input En
(Enable) enables the mathematic instruction error
detection block.
Input R A signal at input R resets the output.
Parameter MathBN: block number of a mathematic instruction
Err: ZD: divide by 0 error
OF: overflow error
ZD/OF: (divide by 0 error) OR
(overflow error)
AutoRst: reset the output before the next execution of
the mathematic instruction error function block. Y =
yes; N = no
Output Q Q is set high if the error to detect occurred in the last
execution referenced mathematic instruction 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.

Mathematic instruction error detection logic table


In the table below, Err represents the parameter of the mathematic instruction error detection
instruction that selects which type of error to detect. ZD represents the zero division bit set
by the mathematic instruction at the end of its execution: 1 if the error occurred, 0 if not. OF
represents the overflow bit set by the mathematic instruction: 1 if the error occurred, 0 if not.
The ZD/OF Err parameter represents the logical OR of the zero division bit and overflow bit
of the referenced mathematic instruction. Q represents the output of the mathematic
instruction error detection function. An "x" indicates that the bit can be either 0 or 1 with no
influence on the output.

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

If the MathBN parameter is null, then the output Q is always 0.

Setting the Par parameter


The parameters MathBN, AutoRst, and Err can be set in programming mode or parameter
assignment mode.
View in programming mode (example):

LOGO!
Manual, 06/2014, A5E33039675 231
LOGO! functions
4.4 Special functions list - SF

View in parameter assignment mode (example):

4.4.34 Analog filter

Short description
The analog filter function smooths the analog input signal.

Symbol in LOGO! Wiring Description


Ax Input Ax is the analog input signal to be smoothed.
Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter Sn (Number of samples) determines how many
analog values are sampled within the program cycles
that are determined by the set number of samples.
LOGO! samples an analog value within every
program cycle. The number of program cycles is
equal to the set number of samples.
Possible settings:
8, 16, 32, 64, 128, 256
Output AQ AQ is the average value of input Ax over the current
number of samples.
* AI1 to AI8: 0 V to 10 V corresponds with 0 to 1000 (internal value).

LOGO!
232 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

Timing diagram (example)

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!.

Setting the Par parameter


View in programming mode (example):

View in parameter assignment mode (example):

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.

Symbol in LOGO! Wiring Description


En A signal at input En (Enable) outputs an analog value
to AQ, depending on the settings of parameters ERst
and Mode.
S1 S1 functions only when the parameter Mode is set to
2.
If Mode is set to 2, a change in status from 0 to 1 at
input S1 (selector) outputs the maximum value to AQ.
If Mode is set to 2, a change in status from 1 to 0 at
S1 outputs the minimum value to AQ.
Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter Mode:
Possible settings:
0, 1, 2, 3
Mode = 0: AQ = Min
Mode = 1: AQ = Max
Mode = 2 and S1= 0 (low): AQ = Min
Mode = 2 and S1= 1 (high): AQ = Max
Mode = 3: AQ = Actual value of Ax
ERst (Enable Reset):
Possible settings:
ERst = 0: disable reset
ERst = 1: enable reset
Retentivity:
/ = no retentivity
R = the status is retentive
Output AQ The function issues a minimum, maximum, or current
value at AQ, depending on your configuration.
* AI1 to AI8: 0 V to 10 V corresponds with 0 to 1000 (internal value).

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

Timing diagram (example)

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.

Setting the Par parameter


View in programming mode (example)

View in parameter assignment mode (example)

LOGO!
236 Manual, 06/2014, A5E33039675
LOGO! functions
4.4 Special functions list - SF

4.4.36 Average value

Short description
The average value function calculates the average value of an analog input over a
configured time period.

Symbol in LOGO! Wiring Description


En A change in status from 0 to 1 transition at input En
starts the average value function.
A change in status from 1 to 0 at input En holds the
analog output value.
R A signal at input R clears the analog output value.
Ax Input Ax is one of the following analog signals:
• AI1 to AI8 (*)
• AM1 to AM64
• NAI1 to NAI32
• AQ1 to AQ8
• NAQ1 to NAQ16
• Block number of a function with analog output
Parameter St (Sampling time): you can set the timebase to s
(seconds), d (days), h (hours), or m (minutes).
Range of values:
St = s: 1 to 59
St = d: 1 to 365
St = h: 1 to 23
St = m: 1 to 59
Sn (Number of samples):
Range of values:
St = s: 1 to St*100
St = d: 1 to 32767
St = h: 1 to 32767
St = m and St ≤ 5 minutes: 1 to St*6000
St = m and St ≥ 6 minutes: 1 to 32767
Retentivity:
/ = no retentivity
R = retentivity
Output AQ Outputs the average value of input Ax over
configured time sampling period.
* AI1 to AI8: 0 V to 10 V corresponds with 0 to 1000 (internal value).

Timing diagram (example)

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.

Setting the Par parameter


View in programming mode (example):

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).

5.1 Enabling the Web server


Make sure you have connected your PC or mobile device to the desired LOGO! Base
Module or LOGO! TDE, and guarantee you have enabled the Web user access in
LOGO!Soft Comfort according to instructions in the user profile settings of the Online Help
for LOGO!Soft Comfort.

Supported network explorers


The LOGO! Web server supports the following Web browsers:
● Microsoft Internet Explorer with minimum version 8.0
● Mozilla Firefox with minimum version 11.0
● Google Chrome with minimum version 16.0
● Apple Safari with minimum version 5.0
● Opera with minimum version 12.0

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy