Ladder
Diagram
to
implement
mathematical
arithmetic
functions
Program Description
Program is very clear to understand.
N7:0 to N7:9 contain Integers of which operation is to be performed.
In the ADD instruction, data of N7:0 and N7:1 are added and sent to destination which is Display with output
address O:6.
Similarly all other operations are performed.
Though, we must know that the answers stored in the destination are in Hexadecimal form, hence we have
to convert this data into BCD form and then send it to display output O:6.
PLC Program to Control Lights in a Sequence (2)
This is a PLC Program to Control Lights in a Sequence (2).
Problem Description
Implement controlling of various lights in PLC using Ladder Diagram programming language using Bit
Shift Registers.
Problem Solution
Define order of lights.
Use Bit Shift Registers to implement any sequence of lights.
Double check if the order of light is made correctly and connections are made properly.
Use latching coil for Master Start and Stop for prevention against malfunctioning.
0.1 Time Base function availability is useful to shift register bits very quickly.
By using this, we can make lights blink.
Check if bit addresses provided to Light output addresses are correctly chosen or not.
Provide 16bit of length to Bit Shift Register, by adding this total 16 number of lights can be controlled.
This limitation can be overcome by using more than one registers or with same length, more than one shift
registers.
PLC Program
Here is PLC program to Control Lights in a Sequence, along with program explanation and run time test
cases.
List of Inputs and Outputs
I:1/0
= Master Start
(Input)
B3:0
= Altering Register
(Output Register)
R6:0
= Control Register
(Storing Register)
R6:0/UL= Used for Wraparound operation
(Unload Bit)
B3:0/0 = Bit input to Output 0
(Input Bit)
O:2/0
= Output 0
(Output)
B3:0/1 = Bit input to Output 1
(Input Bit)
O:2/1
= Output 1
(Output)
B3:0/2 = Bit input to Output 2
(Input Bit)
O:2/2
= Output 2
(Output)
B3:0/3 = Bit input to Output 3
(Input Bit)
O:2/3
= Output 3
(Output)
T4:0
= Timer to shift bits
(Timer)
|