Professional Documents
Culture Documents
Experiment No3 HMI - 2
Experiment No3 HMI - 2
Fourth Year
Experiment no.3
Word Switch
(ADD, SUB, Digit ADD, Digit SUB, and Script)
Prepared by:
Prof. Dr. Mofeed T. Rashid
Prof. Dr. Ammar A. Aldair
Dr. Abdul-Basset A. Al-Hussein
Introduction
The previous experiment dealt with a word switch, which includes the implementation
of set mode experiments. In this experiment, the other modes in the word switch will be
implementing. These are ADD, SUB, Digit ADD, Digit SUB, and Script.
ADD mode:
Pressing the word switch add the direct or indirect set value to the PLC relevant address. With direct set
value, each time the switch is pressed, the relevant PLC address's value is increased by constant
increment whereas with indirect one the increase amount is function of the indirect address value at the
pressing time.
SUB mode:
Pressing the word switch subtract the direct or indirect set value from the PLC relevant address. With
direct set value, each time the switch is pressed, the relevant, PLC address's value is decreased by
constant decrement whereas with indirect one the decrement amount is function of the indirect address
value at the pressing time.
Example: In this example, we will design a Timer value adjustment panel, which is used to increment
and decrement the value of the PLC timer manually by the HMI panel. There are two buttons in the HMI
panel, the first one employs a word switch in add mode to increase timer value while another one is
employed the word switch in sub-mode to decrease the time value; further lamp has been used for
observing the changing in the value of PLC timing.
Solution:
%MW2
Digit SUB:
Pressing the word switch decrements the PLC relevant address value. The decrement amount is function
of the selected number system (HEX or BCD) and the position of the digit to be decremented by 1. For
example selecting BCD as the number system and 2 as the digit position, each press increments the tenth
position by one until reaching 9 after which the tenth position returns to zero and new increment cycle
start again.
Example: Design HMI page such that the operator can set the PLC memory word %MW4 in thumb wheel
like manner.
Script:
Pressing the Word switch executes the assigned C language program segment like script.
Example: Give HMI Utility that inverts the state of %MW1.0 each time the word switch ¾MW4 is Pressed.
Solution:
Q2) Design an electronic lock for the big money treasury by HMI and PLC as shown in
the figure. Use Digit ADD, Digit SUB mode.
Open Lock