SPONSORED LINKS
 
 
Google
 
PLC Software Functions

 PLC Software Functions
A PLC has many functions implemented in the software associated with the processor. In this section, some of the common function of PLCs are described. Individual PLC manufacturers will have their own details on actual implementation.

CONTROL RELAY
The software control relay is denoted by a circle (or using parentheses -( )- ) with an identification number. It can have any number of NO or NC contacts, which are identified by the same number as the relay. The relay state can be shown as follows:

Normally Open Contact

The symbol far a NO contact indicates a normally open contact through which current cannot flow unless the contact has been closed. If it is the contact of a relay, then the relay coil must be energized.
When used with a hardwired input, this instruction is off until there is a voltage applied to the Input. The bit address then goes high, or on, and the instruction becomes "true." It works the same way when it has the same address as an internal coil, except that the coil must be turned on by logic in the program.

In a ladder diagram, the symbol for a NO contact indicates that the device should be interpreted as FALSE if the contact is tested and found to be open, and TRUE if it is found to be closed.
Normally Closed Contact

For the NC contact, the idea is that current will flow until the contact has been opened. If it is a push -button switch, then someone must open the contact and stop the current flow by pushing. If it is the contact of a relay, then the relay must be energized to open the contact and stop current flow through the contacts.

This is an inverted normally open contact. When used with a hardwired input, this instruction is "true" until there is a voltage applied to the input. It then goes low, or off, and becomes "false."

Consider the programmed NC symbol. This means if it is tested and found to be closed, then it is FALSE, and if tested and found open, it is ON. This is not like the physical.

COUNTER
A counter is a programmed function that counts (increments/decrements) every time the input changes from false to true. This means that, if in one scan the input is false and in the next scan the input is true, the counter changes. No further counts will occur until the inputs goes false again and then true.

There are also counters that start with some preset value and count down to zero, at which time the counter becomes true. Different PLC manufacturers have their individual ways of addressing and describing the counter function.

The counter function is used to count events. It could be used to keep track of machine cycles, count parts, etc. It can be programmed with a preset value that triggers another event when the count is reached.

Some PLCs also provide a counter that can count either up or down depending upon the state of an input.

TIMERS
The programmed timer function plays an important role in PLC application. It provide delays in some manufacturing sequence and to specify the period of time that some operation is to last. Timers are of two type
. On delay type
. Off delay type
The timer will have an address and the preset number of ticks to count. The amount of time per tick is a function of the type of PLC being used. Typical values are 10ms and 100ms. The timer only counts while it has a true input. If the inputs become false and then true again, the timer will reset to zero and start to count again.

SPECIAL FUNCTION
In this section some other functions are described that normally available in most PLCs. The one-shot is an output that will go true for only one scan when its input path is true. This device is normally used for initialization and other instances when an event is to occur only once, but the conditions that make it true may occur again.

A shift-register is used to remember a certain number of previous states of a rung (ladderdiagram). A two-event shift register could be used to remember that state of a rung for the latest two' scans.

Nowadays PLCs are able to handle multi-digit number as well as single-bit, binary numbers. Thus, it is possible for a PLC to accept input from an 8-bit ADC and store the result in a known memory location or register. These PLCs have the ability to perform a variety of math operations like simple addition, subtraction, multiplication, and division and trigonometric operations etc.

SCAN-TlME/TlMER RELATIONSHIP
Depending upon the size of the program arid the type of PLC, a scan time can range from 5ms to 20ms or more. Care must be taken not to design timer functions with reactions less than a scan time. Suppose a software timer with time base .001 see and PLC scan time of 10ms, than if some one is using 5ms preset value of timer and the output of timer is used to control a process, the result will be inconsistent .For example: If a programmer is programmed to ON a hooter with above value, the hooter should be ON after 5ms but the result will be inconsistent although theoretically it should be alright. In practice due to scanning one should avoid using software timer when the scanning time will comparable or less than PLC scan time, in that case it is advisable to use hardware timer in place of software timer.

BACK

SPONSORED LINKS