Thursday, 28 August 2014

Fundamental concept of PLC - Boolean Algebra

AND, OR and NOT

Life is full of decisions. What is true for us is also true of PLCs. We gather information (input) and based on that we make choices that determine our output. All though I've always found computers to be quite a bit more logical then human beings.

For an example of how we use logic in everyday life consider these statements:

If Tommy OR Bob want to play basketball then I'll play too.
It's 6 o'clock AND I'm NOT hungry therefore I'm going to keep playing.
If Mom comes out AND orders me inside OR it get's dark then I'll stop playing.

Now these are pretty simple decisions especially if you're a ten year old boy.  You'll notice that they all involve three types of comparisions: AND, OR and NOT.  Now we could get more complex but all that we'd be doing is using these simple building blocks.

In the world of automation these types of TRUE or FALSE conditions come down to a device being ON or OFF, CLOSED or OPEN, PRESENT or ABSENT, 24 VOLTS or 0 VOLTS.  In the PLC it all boils down to our now familiar binary system of a 1 or a 0.  Typically having a bit ON represents a TRUE condition while OFF is FALSE.  This is abitrary though as it may make more sense to use what is called failsafe logic and have an ON bit as a FALSE condition.

Let's turn again to some simple statements but this time using automation examples.

When the button is pressed AND the door is closed then turn on the motor.

If the process is done OR the emergency stop button signal is NOT on then turn off the motor.  (This is an example of a failsafe operation as the emergency stop button could be      pressed or the wire has been disconnected.  In either case we want to check this for safety reasons.  Relying on a signal to turn on when a wire has fallen off long ago may cause an awkward moment when we truly have to stop the machine in an emergency.)

If the tank is full OR the button is pressed AND there are no alarms then start the process.
It would be nice to program like this but computers like to be a little bit more structured.  A series of graphical objects have been used for years to represent these logic elements and they can be easily converted to a common ladder logic equivalent.  These functions are also called gates as they act like gate keepers for different logic. 

The simple switching circuits presented further down should be sufficient to understand practical implementation in hardware of Boolean Algebra. For clarity, we have attached the correspondent firmware/software logic equivalent formulas.
   
  


  
 

BOOLEAN EQUIVALENT OF SWITCHING CIRCUITS
 

CIRCUIT
 
DESCRIPTION
Switching logic

 Fig 1 : 
Function LED

 LED = A * B  (in Boolean hardware)
 is equivalent to:
 LED = A AND B (in firmware logic)
 
Switching logic
 Fig 2 : 
Function LED

 LED = A + B  (in Boolean hardware)
 
LED = A OR B (in firmware logic)
Switching logic
 Fig 3 : 
Function LED

 LED = A * B * (C + D)  (in Boolean hardware)
 
LED = A AND B AND (C OR D) (in firmware logic)
Switching logic

 Fig 4 : 
Function LED

 LED = A * D + B * C (in Boolean hardware)
 
LED = (A AND D) OR (B AND C) (in firmware logic)
Switching logic Fig 5 : Function LED

 LED = A * (B + C) (in Boolean hardware)
 
LED = A AND (B OR C) (in firmware logic)
Switching logic

 Fig 6 : 
Function LED
 
 LED = A * B + A * B 
(in Boolean hardware)

 
LED = (A AND B) OR [(NOT A) AND (NOT B)] (in firmware logic)
 


The NOT function

The simplest of all logic functions is the NOT gate. 


It's sole function in life is to invert of flip the logic state.  So an input of 1 will come out as a 0 and visa versa.  Shown below is a truth table (it doesn't lie) showing all possible inputs and the resulting logical output.
   
Input A
Output 
 0
 1
1
 0


The ladder logic equivalent for a NOT function looks like a normal contact but with a slash through it.




The AND function

The AND gate is associated with the following symbol that can have any number of inputs but only one output.  



The truth table below shows that the output is only turned on when all the inputs are true (1).  An easy way to remember this is AND works like multiplication.

Input A
Input B 
 Output
 0
 0
 0
1
 0
 0
 0
 1
 0
 1
 1
 1

The ladder logic equivalent for an AND function looks like two normal contacts side by side.


The OR function

Last but not least the OR gate is associated with the following symbol that also can have any number of inputs but only one output.  



The truth table below shows that the output is turned on (1) when any of the inputs are true (1).  An easy way to remember this is OR works like addition.

Input A
Input B 
 Output
 0
 0
 0
1
 0
 1
 0
 1
 1
 1
 1
 1

The ladder logic equivalent for an OR function looks like two normal contacts on top of each other.


Combining AND or OR with NOT 
The NOT gate might not look like much help if you haven't programmed much but you'll find yourself actually using it frequently.  It's very common to use it in combination with AND and OR.  So the engineering gods decided to make some symbols for these combinations. 

Putting the NOT and AND gates together forms the NAND gate.The truth table below shows that it is simply an inverted output of the AND gate.

Input A
Input B 
 Output
 0
 0
 1
1
 0
 1
 0
 1
 1
 1
 1
 0

A little circle (or if you like, a bubble) at the end of a AND gate is used to signify the NAND function.  Its symbol and corresponding ladder logic are shown below.  Now pay close attention to the ladder logic because the contacts are in parallel and not in series like the AND function.




Putting the NOT and OR gates together forms... you got it... the NOR gate.  The truth table below shows that it is simply an inverted output of the OR gate.

Input A
Input B 
 Output
 0
 0
 1
1
 0
 0
 0
 1
 0
 1
 1
 0


Again a little circle is placed at the end of an OR gate to signify the NOR function.  Its symbol and corresponding ladder logic are shown below.  The ladder logic is very different from the regular OR gate.


But wait!  Don't order yet... the XOR gate.

So far with our logic gates we've covered almost all possible combinations except for one shown by the truth table below.

Input A
Input B 
 Output
 0
 0
 0
1
 0
 1
 0
 1
 1
 1
 1
 0

The logic to produce this output is called an Exclusive OR gate otherwise known as the XOR gate.  It's a specialized form of the OR gate.  So if either one of the inputs are on then the output is true, otherwise you're out of luck.  The symbol for the XOR gate is shown by added a curved line to the OR gate symbol.




The ladder logic to implement an XOR gate is a little more complex than the others. 




How useful is the XOR logic?  You probably use the XOR gate everyday without thinking about it if you have a room with a light that works off two switches.  If both switches are in the same position then the light will be off.  Therefore just flipping one switch will turn the light on.  In the PLC program this can be extremely useful for programming alternating actions or gray codes.

Ok, there is one more logic gate but I promise it is the last one.  It makes sense that there is a XNOR gate which is the combination of the NOT and XOR logic.  It simply inverts the output of the XOR function.


Input A
Input B 
 Output
 0
 0
 1
1
 0
 0
 0
 1
 0
 1
 1
 1


The symbol for the XNOR gate is shown below along with it's ladder logic equivalent.






While these terms and symbols may seem a bit esoteric for the PLC beginner they are important in the long run.  A good grasp of these essentials will make PLC programming easier, simplier and save memory.  


Wednesday, 27 August 2014

Data inside PLC and Maths behind that

Data Inside PLC

Think of PLC memory as a cabinet with drawers called Registers.  Data is held in these Registers.These Registers come in different sizes, and hold different kinds of data.
Bits:Can have values 1 or 0.  1 typically represents On while 0 represents Off.  Bits are the building block for all other types of data.

Integers:Whole numbers (no decimal points).  Called: Characters (char), Integers (int), long Integers (long int) or Words.  Look for the bit size and whether they are signed or unsigned.   Unsigned are positive numbers, while signed are positive or negative.

Floating point numbers: Numbers with decimal points, and can be positive or negative. They are called floating point numbers (Float), with their larger variety called double floats.

Type
# bits
Signed/Unsigned
Min Value
Max Value
Bit
1
0
1
Int
8
Signed
-128
127
Unsigned
0
255
16
Signed
-32,768
32,767
Unsigned
0
65,535
32
Signed
-2,147,483,648
2,147,483,647
Unsigned
0
4,294,967,295
Floating Point
32
1.175 E–38
3.403 E+38
64
2.225 E–308
1.798 E+308

Addresses/Tags: The Registers are all stacked side by side in the PLC’s memory.  Each location has an Address that lets the PLC know what data you’re talking about.  Older PLC software requires the user to refer to data by this Address (example “x1023” could mean the 1023’d register). Some newer software makes the Addresses transparent.  The user gives a piece of data a name (example “Oven2Temperature”), and the PLC keeps track of where the register is located. If the software uses Addresses to refer to data it’s called “Address Based”, if it uses named data it’s called “Tag Based”.  Some programming packages are Address Based, but allow Addresses to have “Nicknames” or something similar. Their benefits over standard Address Based systems tend to be limited.  Advantages to Tag based systems become evident as programs grow, and remembering what’s stored in x1023 becomes difficult.   If your program is going to have any complexity at all using a Tag Based System simplifies the design.

Diving Deeper

Inside the Data Types: As stated earlier, all Data Types are made of Bits (1′s and 0′s). An 8 bit number is written like bbbbbbbb (where “b” can represent a 0 or 1), so you may have 00000000, 11111111 or 01011110…. any combo will do.  What these Bits mean is determined by the Data Type.

Unsigned Integers: The least valuable bit is the rightmost bit and double in value each position you move left.  The right-most bit is 1 it’s worth 1 next bit to the left 2   4   8 16   32  64 128 256  …… (this goes on for as many bits as the Data Type calls for).  Here’s what its looks like for an Unsigned 8-bit Integer:
If all 8 bits are 0 (00000000) then we get 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0
If all 8 bits are 1 (11111111) then we get 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
So the range of an 8 bit unsigned Integer is 0 – 255
An example of something in between (00110101)  0 + 0 +  32 + 16 + 0 + 4 + 0 + 1 = 53

Signed Integers:  They’re a tad more complicated check out wikipedia’s article on 2’s compliment for a good understanding.
Hexadecimal Format (Hex):  Instead of writing every bit out, it is common to group sets of 4 bits together. Each group can have a value of 0 – 15, which causes a problem since our number system goes from 0 – 9, so we also use A, B, C, D, E and F to get a total of 16 values. (0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , A, B, C, D, E, F)
Example 1001 0011 1111 0010 in Hex would be 93F2
To be clear that we’re using Hex format we tack on a ‘0x’ the the start of the number so our last example would be written 0x93F2

Characters: (typically 8 bit unsigned integers) are often used to represent letter or symbols.   Example: you may use them to display text on an operator panel. Use an ASCII table to see how values are mapped to symbols.
What about the bits in Floating Point numbers, how do they break out? It is somewhat complicated, I don’t really want to get into that in this Post.   It is unlikely as a PLC user that you will ever need to know how their bits translate to values, so don’t worry about it.

The Basics - Maths
AdditionSubtractionMultiplication and Division are what you’d expect.  If you haven’t done math in a programming language before, there are a couple of things you should be aware of.
·         Overflow:  Integers and Floating Point Numbers have size limits.  When you go beyond their size you’ll cause yourself problems.
Example: 8 bit Unsigned Int with value 255 in bits looks like 11111111. If we add 1 to it we get 100000000. There isn’t storage for a 9′th bit, so we’re left with 00000000 or 0. So in this case 255 + 1 = 0
Another Example: 8 bit Unsigned Int with value 0 in bits looks like 00000000. If we subtract 1 to it we get 11111111. So, we can get the opposite problem 0 – 1 = 255
·         Rounding:  Floating Point numbers aren’t perfect.  For this reason, you shouldn’t check to see if Floating point numbers are equal to a value, you should check to see if it’s within a range of numbers.
Example: 2 * 3 performed with Floating Point numbers may not result in exactly 6.
It could be 5.9999999999998 or something similar. So instead of asking is Example = 6, ask is Example greater than 5.9 and less than 6.1. Don’t worry about how to ask these questions, we’ll talk about that later in the tutorial
Boolean Math
Some programming packages allow bit manipulation by using Boolean Math.  The main operations are:
OR (symbol ‘|’ ):  A = B | C.  If either B is 1 or C is 1, then A is 1.  If both B and C are 0, then A is 0.
AND (symbol ‘&’): A = B & C.  If both B and C are 1, then A is 1.  If either B of C are 0, then A is 0.
Exclusive OR (symbol ‘’):  A = B  C.  If either B is 1 or C is 1, but not both, then A is 1.  If both B and C are 1, or both B and C are 0 then A is 0.

Tuesday, 26 August 2014

Other way around to understand and difference between Sink and source

Other way around to understand

There is another way we can understand the Source and sink concept which is as follows:


What are Sinking and Sourcing Circuits?

Look at this issue in simple terms. A basic circuit to show as an example is the circuit used to turn on a light. Why is there a light switch in a kitchen? Obviously so the light turns on and off. A switch is used to control the power going to the light so it is not on all the time. If a switch was not needed, you would simply place 120 VAC to one side of the light and attach the other side to neutral (or ground) to complete the circuit. A switch between either the line power (120 VAC) and the light or ground and the light controls the circuit, enabling it to turn on and off. If the switch is between the power and the light, voltage is sourced to the light, completing the circuit. The light is always attached to the neutral (ground) line, so when the switch turns on, power is supplied (Sourced) to the light, turning it on. If the switch is between neutral (ground) and the light, the light sinks to neutral (ground), completing the circuit. The light in this case is always attached to the power line, so when the switch is turned on, the neutral (ground) is connected (sinked) to the light, turning it on.





Sinking and Sourcing in Industrial Control Circuits

The kitchen light example simplifies the difference between sinking and sourcing circuits. Now look at today's industrial control circuits using the same concept.

Control circuits need switches to provide automatic feedback on the status of a process. In the past, the feedback may have been as simple as an annunciator (light indicator) that would indicate the status of a process (i.e., a red light turning on to indicate a bad part, or that a tank needs filled). As processes have become more automated, switch feedback was integrated into Programmable Logic Controller (PLCs) programs. PLCs use switch feedback to automatically control circuits, i.e., if a liquid level switch turns on indicating a low level, automatically dispense liquid by turning a fill valve on, or if a cylinder switch turns on indicating end of stroke, automatically proceed with the next step which may drill a hole in a part. The control circuit uses the switch signal to turn on the next process.

Before PLCs, switch outputs would typically turn a control relay on or off to control the next phase of the process. If the switch attaches between the power supply and the control relay, the circuit is a sourcing circuit. If the switch attaches between the control relay and ground, the circuit is a sinking circuit. The decision regarding which circuit to use may have been made for safety concerns (to reduce chance of electrical shock). Or perhaps a standard was adopted at a factory specifying that all circuits would be wired the same way, whether it be sinking or sourcing.

PLCs work a little differently than your kitchen light or a simple control relay, however. PLCs were developed to automate and simplify control relay circuits, eliminating much of the wiring and adding greater flexibility. PLCs can manipulate control systems programmatically rather than by hard wired control relays. PLCs use input cards to read the feedback of the control circuits. Input cards connect internally to power or ground. To turn an input card "on", connect power or ground to the input dependent upon which input card is in use. PLC programs use this "on" state signal to determine when to proceed with the next step of the process. To control the "on" state, place a switch between the power or ground and the input card. An input card wired internally to ground is typically regarded as a sinking input card. 


A sinking input card requires power to be sourced to the input to turn it "on". If the input card connects internally to power, it is typically regarded as a sourcing card. A sourcing card input requires a ground connection to turn it "on". Think of the input card as the kitchen light, except in this case the light comes pre-wired to power or ground.


Solid State Switches with Sinking and Sourcing Circuits


When circuits use a simple two-wire switch, such as a reed switch, to control the PLC input signal, the circuits may implement the two-wire switch in either a sinking or sourcing circuit. However, when the circuit uses existing solid state switch technology (developed to correct some of the problems associated with reed switches, i.e., contact bounce, slow signal response, lower life) to control the PLC input signal, difficulty and confusion quickly emerge. The confusion emerges because, until now, Solid State switches were traditionally three-wire devices that had to be designed to operate specifically in a sinking circuit or a sourcing circuit, but not both. The input wire connects to the power source (typically 24 VDC) and is used to power the switch, the ground wire connects to ground, and the output wire typically connects to the PLC input card, supplying the control signal that will turn the input card "on". Existing solid state switches can only be used in one type of circuit because they use an internal transistor as the switching element. Transistors come in two basic styles, NPN and PNP. Sinking outputs use NPN (Negative-Positive-Negative) transistors, and sourcing outputs use PNP (Positive-Negative-Positive) transistors. This fact requires switches and PLC input cards to match. If the wrong switch is used, the PLC will not read the switch output. 


This requires designers to be careful when specifying the type of switch to use for their control circuits and automation systems. Specifying the wrong switch may result in project delays, return charges, and changes to purchase orders which can all be costly. Likewise, when a switch fails there may be confusion as to which type of switch is needed. Maintenance personnel may order the wrong type of switch, causing increased down time and cost. To further exacerbate the problem, not all PLC manufacturers label their input cards the same. Some manufacturers label their input cards that are internally wired to power "sinking cards", and label their input cards that are internally connected to ground "sourcing cards", causing even more chances for error. Now you can see why there is much confusion in the market regarding the sinking and sourcing issue.

Difference between source and sink

Sinking and sourcing are terms used to describe how an associated load (the device being turned on or off by the sensor) is powered in relation to the sensor. Sinking, the more widely used of the two, involves the switching of load current (power) supplied by a power source external to the sensor. In a sinking configuration, current passes through the load first, through the output switch of the sensor second and lastly to ground. A sensor with a sinking output switches the ground, or negative, leg of the circuit. In contrast, sourcing refers to a configuration in which the sensor is the source of the current required to power the load. In a sourcing situation, current supplied by the sensor passes through the load second and then to ground. A sensor with a sourcing output switches the positive leg of the circuit.


Monday, 25 August 2014

PLC Sink and Source I/O concept

Sinking and sourcing circuits are often a source of confusion for people newly introduced to the concept, especially people not familiar with the field of electronics. Once the concept is understood new questions emerge such as: Which circuit is required for their application? How do they determine which circuit would work best?




Suppose that you have a SOURCING-TYPE PLC input module (for example type 1746-IV16) ... that module would play the part of the “LOAD” in Figure A above ... the solid state sensor that you’d need to connect would be a SINKING-TYPE sensor – also known as an NPN-type sensor ...

notice that the description above gives us ONE “sourcing-type” device and ONE “sinking-type” device to use in our circuit ... the “sourcing device” goes on the PLUS/POSITIVE side ... the “sinking device” goes on the MINUS/NEGATIVE side ...

now then ...

suppose that you have a SINKING-TYPE PLC input module (for example type 1746-IB16) ... that module would play the part of the “LOAD” in Figure B above ... the solid-state sensor that you’d need to connect would be a SOURCING-TYPE sensor - also known as a PNP-type sensor ...

notice that (just like before) the description above gives us ONE “sourcing-type” device and ONE “sinking-type” device to use in our circuit ... and (once again) the “sourcing device” goes on the PLUS/POSITIVE side ... the “sinking device” goes on the MINUS/NEGATIVE side ...

going one step further ...

now instead of input modules suppose that we talk about the PLC output modules instead ...

suppose that you have a SINKING-TYPE PLC output module (for example type 1746-OV16) ... that module would play the part of the “SWITCH” in Figure A above ... the “LOAD” that you’d need to connect would be a SOURCING-TYPE field device ...

notice that (as before) the description above gives us ONE “sourcing-type” device and ONE “sinking-type” device to use in our circuit ... and (once again) the “sourcing device” goes on the PLUS/POSITIVE side ... the “sinking device” goes on the MINUS/NEGATIVE side ...

now then ...

suppose that you have a SOURCING-TYPE PLC output module (for example type 1746-OB16) ... that module would play the part of the “SWITCH” in Figure B above ... the “LOAD” that you’d need to connect would be a SINKING-TYPE field device ...

notice (again) that the description above gives us ONE “sourcing-type” device and ONE “sinking-type” device to use in our circuit ... the “sourcing device” goes (as always) on the PLUS/POSITIVE side ... the “sinking device” goes on the MINUS/NEGATIVE side ...

nailing down the “big picture” ideas:

your basic DC circuit needs ONE “SOURCING” type device - and ONE “SINKING” type device ... the “SOURCING” device always goes on the PLUS/POSITIVE side ... the “SINKING” device always goes on the MINUS/NEGATIVE side ...

Survival tip: don’t think of the words “source” and “sink” of telling where the “juice” is actually coming from - and where it’s going to ... instead just remember that the “source” thing goes with PLUS/POSITIVE -and that the “sink” thing goes with MINUS/NEGATIVE ...  


another thought that just occurred to me ...

make sure that you understand that SOME (most?) 24VDC devices don’t care at all about whether they’re connected in the SINKING or in the SOURCING side of the circuit ... for specific examples: a regular old-fashioned “incandescent” lamp bulb can be connected on either the sinking or the sourcing side of the circuit ... a regular old-fashioned “contact” switch can also be connected either on the sinking or the sourcing side of the circuit ...

but ...

some devices are specifically designed to work ONLY as a “sinker” - and some others are specifically designed to work ONLY as a “sourcer” ... hooking them up “backwards” usually (notice I did NOT say “never”) won’t damage anything - but the circuit won’t work correctly unless you get it right ...

devices that fit into this “sinking-only” or “sourcing-only” category are usually “solid-state” (electronic/transistor-type) devices ...

in the cases of sensors, the following little “rule of thumb” often comes in handy:

a SOURCING-type switch switches the Positive side of the circuit ... notice that “PNP” starts with the letter P (just like the word “positive”) ...

a SINKING-type switch switches the Negative side of the circuit ... notice that “NPN” starts with the letter N (just like the word “negative”) ...

this comes in handy because some models/brands of sensors aren’t marked as SOURCING or SINKING ... instead they’re marked PNP or NPN ... if you remember the little “rule” above, then you should be able to match the correct component with the circuit that you’re working with - regardless of which method is used to mark the device ...

and one more thing ... the terms “sinking” and “sourcing” apply to DC circuits ... in an AC circuit the current is constantly changing direction - so the same terms don’t come into play ...  



Friday, 22 August 2014

Programmable Automation Controller (PAC)

Programmable Automation Controller (PAC):

Programmable automation controller (PAC) systems consist of PAC modules, each of which performs a specific function. PAC systems are used in motion control, machine control, machine vision, and other industrial control applications. They include the following types of PAC modules: analog I/O modules, digital I/O modules, relay modules, counter modules, serial modules, servo or stepper controller modules, timer modules, and data acquisition modules. PAC systems with analog I/O modules are used to measure and control industrial automation devices such sensors and actuators. They can also be used to condition high or low voltage signals, thermocouples, resistance temperature detectors (RTD) and strain gauges. PAC systems with digital I/O modules are used to measure and control industrial automation devices such sensors and actuators. PAC systems with data acquisition modules digitize and process multiple sensor or signal inputs for monitoring, analyzing and/or controlling systems and processes. PAC systems with serial modules coordinate the flow of data, control signals, and timing information between data terminal equipment (DTE) and data communication equipment (DCE).  




Programmable automation controller (PAC) systems have backplane slots for adding input/output (I/O) modules and differ by backplane bus type. The VersaModule Eurocard bus (VMEbus) is a popular, 32-bit bus used in industrial, commercial and military applications. VME extensions for instrumentation (VXI) is an electrical and mechanical standard used with automatic test equipment (ATE). Peripheral component interconnect (PCI) is a local bus system designed for high-end computer systems. Compact PCI (cPCI) uses the electrical standards of the PCI bus, but is packaged in a Eurocard. PCI extensions for instrumentation (PXI) is a superset of CompactPCI that adds timing and triggering functions. In terms of ports and interfaces, some programmable automation controller (PAC) systems have an Ethernet, universal serial bus (USB), or video graphics array (VGA) port. Others have a keyboard, mouse, or printer port. Serial PAC systems have RS232, RS422 or RS485 ports. IEEE 1394 or FireWire® (Apple Computer, Inc.) ports are also available.

Programmable automation controller (PAC) systems use popular communication standards and network protocols. Ethernet is a local area network (LAN) protocol that supports data transfer rates of 10 Mbps. Transmission control protocol/Internet protocol (TCP/IP) is the basis for standard Internet protocols. Controller area network bus (CANbus) is a high-speed, serial data network designed for harsh electrical environments and real-time control applications. DeviceNet uses the CAN network protocol to connect industrial devices to PAC modules. The process fieldbus or PROFIBUS is an open-communication standard used in factory automation, process automation, motion control, and safety applications. The MODBUS® (Modbus-IDA) protocol is an open-standard, vendor-neutral messaging structure for communication between intelligent devices. OPC defines a set of standard interfaces based upon OLE/COM technology and can be re-used by human machine interface (HMI) and supervisory control and data acquisition (SCADA) applications. Java® (Sun Microsystems, Inc.) database connectivity (JDBC) allows PAC modules to access to external structured query language (SQL) databases.  

Selection:

Selecting programmable automation controller (PAC) systems requires an analysis of regulatory requirements and special features. PAC systems for international markets should comply with Restriction of Hazardous Substances (RoHS), a European Union (EU) directive that requires all manufacturers of electronic and electrical equipment sold in Europe to demonstrate that their products contain only minimal levels of hazardous substances such as lead and mercury. The EU’s Waste Electrical and Electronics Equipment Regulations (WEEE Regulations) are designed to encourage the reuse, recycling and recovery of electrical and electronic equipment such as PAC systems.

Features of PAC:

Capable of real time communication
Fast boot speed
Achievable deterministic control
Multi-function
Open communication standards
Integrated development environment
Ability to run PC-based control software such as Visual Basic.NET, Visual C#, Embedded Visual 
C++, SCADA software 
Rich I/O Expansion Ability 
 Ethernet 
 RS-232/422/485 
 CAN Bus 

Key Advantages of a PAC

These defining characteristics also describe the key advantages of using PACs in industrial applications:

A single controller with integrated software handles multiple functions across multiple domains.

Complex and changing requirements can be met with little additional cost.

Modular designs make expansion easier.

Networking and communication capabilities link disparate systems and provide more accurate 
and timely data.

Total system cost is lowered, because integrated hardware and software are less expensive, and because development and integration time is reduced.

Modular design improves cash flow.


In summary, PACs now provide the multi-function, multi-domain, multi-tasking, modular, standards-based and efficient control, networking, and communications processor most suited to today's industrial applications.


Thursday, 21 August 2014

Is there any difference between PLC and PAC?


PLCs (programmable logic controllers) have been around for more than 40 years, recent advances have greatly increased their capabilities, blurring the line between a PLC and PAC (programmable automation controller). What differences remain between these two categories? Is there a performance gap between PLCs and PACs that users should keep in mind when choosing the best solution for a particular application?

PLCs were created in the late 1960s to replace relay-based systems. Conceptually they were similar and used ladder logic that mimicked the appearance of wiring diagrams engineers used to represent physical relays and timers, and the connections among them. Early PLCs required dedicated proprietary terminals for programming, had very limited memory, and lacked remote I/O.
By the 1980s, PC-based software was introduced for programming PLCs, which had become faster and had added more features as years passed. Since then, many new technologies have been applied to PLCs, greatly expanding their capabilities on an almost continuous basis.
PACs are relatively new to the automation market, using the term coined by the market research firm ARC in 2001. Since then, there has been no specific agreement as to what differentiates a PAC from a PLC. Some users feel the term PAC is simply marketing jargon to describe highly advanced PLCs, while others believe there is a definite distinction between a PLC and a PAC. In any case, defining exactly what constitutes a PAC isn’t as important as having users understand the types of applications for which each is best suited.

Defining the needs of users

Generally, PACs and PLCs serve the same purpose. Both are primarily used to perform: automation, process control, data acquisition functions such as digital and analogue control, serial string handling, PID, motion control, and machine vision. Most suppliers carry a wide range of PLCs and PACs, which can make it difficult to choose the right product for a particular application. 

PLCs are often programmed in ladder logic, a graphical programming language resembling the rails and rungs of ladders that is designed to emulate old electrical relay wiring diagrams .Typically they have been best suited for machine control, both simple and high speed. Common characteristics of these PLCs are simple program execution scans, limited memory, and a focus on discrete I/O with on/off control.

On the other hand, PAC control programs are usually developed with more generic software tools that permit the designed program to be shared across several different machines, processors, HMI terminals or other components in the control system architecture.It is geared more toward complex automation system architectures composed of a number of PC-based software applications, including HMI (human machine interface) functions, asset management, historian, advanced process control (APC), and others. A PAC is also generally a better fit for applications with extensive process control requirements, as PACs are better able to handle analog I/O and related control functions. A PAC tends to provide greater flexibility in programming, larger memory capacity, better interoperability, and more features and functions in general.

Unlike PLCs, which constantly scan all the I/O inputs in the control system at very high rates of speed, PACs utilize a single tag name database and a logical address system to identify and map I/O points as needed.

As a result of having an architecture based on ladder logic and a focus on discrete on-off control, expanding a PLC beyond its original capabilities—such as adding extensive analog control capabilities—has often proved difficult. In older or lower-end PLCs, separate hardware cards usually had to be added and programmed to accomplish functions outside the PLC’s core focus. These functions included, but weren’t limited to, networking multiple components, extensive process control, and sophisticated data manipulation.


To answer the demand for more PLC functionality, manufacturers have added features and capabilities. For example, older PLCs could only accommodate a relatively small number of PID loops, typically about 16, while new PLCs can handle thousands of such loops. Newer PLCs often feature multiple communication ports, and greatly increased memory as compared to older models (see Figure 1).
On the other hand, PACs provide a more open architecture and modular design to facilitate communication and interoperability with other devices, networks, and enterprise systems. They can be easily used for communicating, monitoring, and control across various networks and devices because they employ standard protocols and network technologies such as Ethernet, OPC, and SQL.
PACs also offer a single platform that operates in multiple domains such as motion, discrete, and process control. Moreover, the modular design of a PAC simplifies system expansion and makes adding and removing sensors and other devices easy, often eliminating the need to disconnect wiring. Their modular design makes it easy to add and effectively monitor and control thousands of I/O points, a task beyond the reach of most PLCs.
Another key differentiator between a PLC and a PAC is the tag-based programming offered by a PAC. With a PAC, a single tag-name database can be used for development, with one software package capable of programming multiple models. Tags, or descriptive names, can be assigned to functions before tying to specific I/O or memory addresses. This makes PAC programming highly flexible, with easy scalability to larger systems.

Depends on Application:

For simple applications, such as controlling a basic machine, a PLC is a better choice than a PAC. Likewise, for most applications that consist primarily of discrete I/O, a PLC is the best choice—unless there are other extraordinary requirements such as extensive data handling and manipulation.

If the application includes monitoring and control of a large number of analog I/O points, then a PAC is generally the better solution. This is also the case when the application encompasses an entire plant or factory floor, a situation that typically calls for distributed I/O in large numbers, along with extensive loop control—functions better suited to a PAC than to a PLC.
The confusion arises when an application lies somewhere between simple and complex, and in these circumstances a high-end PLC or a low-end PAC platform will work. Ultimately, a choice between the two will be defined strictly by other factors outside of specific application requirements. These factors include, but aren’t limited to, past experience with each platform, price, the level of local support, and anticipated future growth and changes.
Once a decision is made between a PLC or a PAC, users typically have a wide range of products from which to choose, even if only a single vendor is being considered. That’s because PLCs and PACs are typically designed in systems of scale, meaning there is a family of controllers to choose from that range from lower I/O count to larger system capacity, with correspondingly more features and functions as I/O counts and prices increase.