Problem 1:
a) Complete the empty spaces in the following table concerning the five IEC61131-3 standard languages.
Acronym
|
Full name
|
Type of language
|
|
Ladder Diagram
|
Graphical
|
IL
|
|
|
|
Sequential Function Chart
|
|
FBD
|
|
Graphical
|
ST
|
|
|
b) Describe in your own words what a scan cycle is.
Problem 2:
a) Describe in your words how a current sourcing input module should be wired.
b) Describe in your own words what a wet relay output is.
c) Describe in your own words what happens in practice when the behaviour of a PLC is termed to be real-time.
d) Prepare LD code that uses two digital inputs A and B and calculate the NAND function thereof to an instantaneous output C.
e) Now add a second line of LD code that allocates the OR function of inputs A and B, to reset memory element D if the result is true.
Problem 3:
Two digital outputs (OUT1 and OUT2) are controlled by three internal relays (IR0, IR1 and IR2). The three internal relays are instantaneously calculated as follows:
i. IR0 is energised if either or both input IN0 and IN1 are energised.
ii. IR1 is energised only if both the inputs IN2 and IN3 are energised.
iii. IR2 is energised when either one, but not both, IN4 and IN5 are energised.
Create an LD program that
a) reset OUT1 if any one or more internal relays are active.
b) make OUT2 inactive for this scan cycle, only if all three internal relays are active simultaneously.
Problem 4:
a) Draw up a truth table containing IR0, IR1 and IR3 and show when OUT1 and OUT2 will be high or low.
IR0
|
IR1
|
IR2
|
OUT1
|
OUT2
|
0
|
0
|
0
|
|
|
0
|
0
|
1
|
|
|
0
|
1
|
0
|
|
|
0
|
1
|
1
|
|
|
1
|
0
|
0
|
|
|
1
|
0
|
1
|
|
|
1
|
1
|
0
|
|
|
1
|
1
|
1
|
|
|
b) Re-write the program in question 3 in Structure Text
Problem 5: Write a LD program that can serve as an elementary fire alarm system.
Three (3) fire sensors with N.C. outputs provide inputs to SET-RESET functionality.
The output is set and remains set when any one or more of the sensors are activated. The alarm is cleared by a Reset pushbutton, but active sensor(s) take precedence over Reset.
a) Create a PLC Ladder Diagram to implement the fire alarm system.
b) Simulate your solution in the Visual Simulation environment of Codesys and show that results of your code are correct.
Problem 6:
Scenario:
An LD program calculates the output Z, from two INT variables, x and y. The calculation takes place in a function block that you must create yourself. The function block is programmed in ST and the formula is given below:
z = 5 + xy+2
a) Create the program described above, to calculate the output z. Be sure to show the contents of both the
i. LD program and
ii. The ST function block.
b) Test your program in the Visual Simulator environment and proof that the answer is calculated correctly by your function block, for two different sets of x and y values.
Problem 7:
a) What events transpire when an input on a PLC are "forced" during debugging?
b) Why do many modern PLC's have a coin battery?
c) Describe the circumstances under which you will rather use an Event-triggered scan on a PLC, than any other type of scan. Include in your reasoning why this will be the best choice.
Problem 8:
a) Indicate the correct hierarchy level next to each Item as established in the IEC61131-3 language implementation.
Item
|
Hierarchy level (start with 1 as uppermost level)
|
Configuration
|
|
Task
|
|
Resource
|
|
POU
|
|
Access paths
|
|
Variables
|
|
b) Identify which of the IEC61131-3 language implementations the following constructs belong to.
Construct
|
IEC61131-3 Language it belongs to ...
|
IF (LimitSwitch1 AND WorkpiecePresent) THEN Gate1 :- Open;
|
|
|
Gate2 :- Close;
|
|
ELSE
|
|
Gate1 :- Close; Gate2 :- Open;
|
|
End_IF;
|