PLC Programming in RLL State Diagrams
For PLC brand that support RLL(Relay Ladder Logic) PLC programming are Allen Bradley,ABB,Mitsubishi,Siemens,Direcsoft.
The main disadvantage of these devices is the steep learning curve, and their inherent difficulties with the maintenance of the programs with their traditional RLL (Relay Ladder Logic) is a programming language.
Through the use of state machine programming techniques, but PLC can create programs very easy to use, and are easy to maintain and modify.

As PLC (Programmable Logic Controller) are a very useful instrument solution for a variety of exhibits and interactive applications. These general-purpose controller can accept input from a range of facilities such as push buttons, motion sensors, joysticks, etc. You can have multiple relay, analog and serial outputs for lighting, motors, sound effects, etc. between the control - establishment and outputs is a control program that determines which outputs are activated when certain combinations of inputs are received. Free programming resources are variables, timers and counters.
A state machine programming can be found on any PLC through clever use of SET and RESET instructions and be done with internal contacts to flow. It is much easier, but if PLC directly supports this type of programming. The good news is that now many do. The bad news is that they rarely make it as a “state machine programming,” not even from different manufacturers use the same term. You’ll see it referred to as “Stage Programming, STL Programming”, “SFC programming” and various other conditions.
A state machine model is a programming paradigm, where the “machine” (can) say the control only in one (from a number of different countries conditions) at a particular time. Although this approach may at first seem, is complex, it can actually result in greater simplification - as we shall see.
All have one thing in common: a special internal “contact” directly connected to the power rail control flow in each state. This contact is almost always a “name S” (for State). The key concept is that one (and only) state at any one time can be active, and all the logic in the other (inactive) states that apart from the track.
Four Easy Steps
1.illustrate a function of your program that much detail as possible - from the perspective of the outside world.
2.specify and name all inputs and outputs from X0 to Sensor_Up ,Y0 to Cylinder Down.
For this exemple : X0 = Motion_detector_input , X1 Message_playing_input
Output : Y0 Bit0_rly ,Y1 Bit1_rly ,Y2 Bit2_rly ,Y3 Bit3_rly ,Y4 Bit4_rly and Y5 Message_strobe_relay
3.List of all the different machine states, and enter the transition .
4.Write the program.
The next steps are analyze a functional description .
S0 : Initialization State
This is initial state which is always entered upon power up ,you should be create every your program.
As The state is used primarily to initialise all data variables and state M/C and reset motor Home,reset cylinder home etc,.
S1 : Waitting for Trigger State
Watch input signal of Sensor or detector ,Wait Upon receiving a trigger, transition to S2
S2 : Set Message Bits State
Transfer the current message number from the look-up table to the first five output relays as a five bit binary value.

S3 : Strobe Message State
Wait for the message bit relays to settle then pulse the message Strobe relay to tell the DMR to play the new message.

S4 : Wait for Message State
Wait to ensure message has started,them monitor the DMR output relay unit the message finishes playing.

S5 : Get Next Message Number State
Increment the look-up table pointer to point to next “rendom” message.
if it is already at the last entry,reset it to thebeginning.

S6 : Wait State
Wait a pre-set delay before allowing a re-trigger by the same visitor.
The delay time is read from a variable set up by the “Initialisation”
State(i.e : S0)

Finally,i hope this page will be helpful with you to understand RLL for PLC.
Tags: industrial, ladder logic, plc, PLC programming, plc programming tutorial, Relay Ladder Logic, RLL, SFC programming, Stage Programming, state diagram