Upon the occurrence of an event at the
REQ
input of an instance of this simple
function block type, the values of the
IN1
and
IN2
variables are added together to produce the value of the
OUT
variable, and an event is produced at the
CNF
output.
The operation of an instance of this FB type is illustrated below, using the Run option of the FBDK:
- The initial situation before clicking the REQ button.
- The situation after clicking the REQ button. The
empty string is not a valid value for the
FREQdata type, so the initial value of50.0is used for both theIN1andIN2inputs, giving anOUTvalue of100.0. - The situation after entering a value of
25for theIN1input and clicking the REQ button. The initial value of50.0continues to be used for theIN2input, giving anOUTvalue of75.0. - The situation after entering a value of
35for theIN2input and clicking the REQ button, giving anOUTvalue of60.0. - The situation after entering a value of
XXXfor theIN2input and clicking the REQ button. SinceXXXis not a valid value for theFREQdata type, the previous value (35) is used for this input, giving anOUTvalue of60.0.