Você está na página 1de 19

=================================================== ****** Motion Control Part 4 =================================================== Last time we covered stepper motors and how they are

used with a plc to control motion. We simply send pulses out the plc and into the stepper motor driver. The driver converts those pulses into motion through the motor. 1 pulse = 1 degree of motion, for example. Creating motion with stepper motors is arguably the most popular form of creating motion in a controlled way. The trouble is that there is no verification that the motion actually occurred. Huh? In other words, just because we told the motor to turn 5 times doesn't necessarily mean the motor actually did what we asked it to. How can that be? If we send out enough pulses through the plc to have the motor turn 5 times we should expect the motor to do so. Right? Well, sometimes our expectations aren't always met... What would happen if there was a jam in the motion system? The motor tries to move but can't. Not good. That can (probably will...) cause a problem for our machine. Let's say we're applying labels to various sized boxes. This morning we're making product A which has a large box. Our plc program has the stepper rotate 10 times so we know the box is in the proper position and the label can be applied. Things are going great. The boxes are moving down the conveyor and the labels are being applied as expected. Time for lunch and we change our products. We now use a product that weighs twice as much as the previous one but the box size is the same. So we use the same plc program and we expect things to work out great. Correct? Not so much... the extra weight of the product is causing stalling of the stepper motor and eventually labels are being misapplied and general chaos sets in. A bad day at the office... for sure. The problem here is that the system is an 'open loop' system. There are no checks performed to verify that what we wanted done actually got done. We told the stepper motor to move but we didn't verify that it had actually done so. We have performed a 'one way' type of communication. In many simple applications or those where there are checks via sensors, for example, a one way type of communication would be fine. However, in the example above without any checks it's obviously not a good situation. In that case we need a 'two way' type of communication system. Instead of being an 'open loop' system we need to close the loop by generating some feedback about what events have occurred. But how? The answer is quite simple. We need to do an action and verify the action resulted in whatever it was we wanted. If we tell the stepper motor to turn 5 times we need to verify it did. An easy way to do this is with our old friend... the encoder. (Remember how they worked from a few issues back?) So, let's return to our great 'moving the box' application. We move light weight boxes down the conveyor by sending out 5 pulses to the stepper motor. We previously had no idea if the motor actually moved but we knew we asked it to move. If we now add an encoder to the system we can easily verify if the movement of the motor actually happened. The encoder will give back a pulse to the plc for every x-degrees the motor shaft rotates. So, if we tell the motor shaft to rotate 5 times, and each revolution is 10 pulses from the encoder, the plc can look for 50 pulses. (i.e. 10pulses x 5rotations = 50) If the plc 'sees' 50 pulses come from the encoder it knows the shaft has rotated the proper number of rotations. If it doesn't see that the rotation has actually happened as expected (i.e. less than 50 pulses have come back) it can react accordingly. Of course, that reaction will have to be programmed into the plc program. Now, we have added feedback to the system and closed the control loop. We therefore refer to this type of system as a 'closed loop' system. The control loop is closed because we can do something and then verify that it was actually done. A closed loop system can be created in many ways. The key point is that we need feedback on the action. How we react to the feedback is going to be dependant upon the system. Next time we'll see a motor with 'built-in' feedback to make our closed loop system of motion control 'a pleasure' to use.

=================================================== ****** Motion Control Part 5 =================================================== Servo motors are generally DC motors. They are simple devices but can do incredibly precise movement when used properly. DC motors are used in servo control because they can have their speed varied in a very simple way. Simple is good... How simple is simple, you ask? Well, all we really do is vary the voltage going to the motor and the speed will change. More voltage means faster speed. Less voltage means less speed. See, DC motors are really simple. Controlling them precisely... well that's another story. Remember our story from last time where we talked about open loop vs closed loop control. Closed loop control provides feedback to close the control 'loop'. We tell the motor to move and we use an encoder or another method to actually verify that we have moved to where we said we wanted to go. We 'closed the control loop' by feeding back our actual position to verify we moved. If we didn't move to where we needed to be because maybe there was a heavy weight on the conveyor we're turning, for example, the encoder would let us know. Then we could adjust our position by sending more pulses to the motor. A servo motor is an example of closed loop control. The servo motor typically has an incremental encoder on it's back monitoring the shaft positions. If the shaft turns then the encoder tells us so. If it doesn't turn, even though we told it to, we won't get any pulses out of the encoder. Again, it's a closed loop system. So, the plc tells the servo controller where to move the motor. The controller sends the appropriate voltage pulses to the motor and the motor moves. The encoder on the motor shaft verifies the movement happened. If we tell it to move at 700rpm (revolutions per minute) and the encoder only gives us pulses at 650rpm then we send the motor more voltage to increase the speed to 700rpm. To get some accurate control of the position and speed of the motor is where the fun starts. We can't just send it a voltage and expect high precision in the end. We must constantly monitor and adjust what's going on in the 'system'. Generally we are concerned with two situations... starting/stopping and continuing movement. We refer to the starting/stopping part of the cycle as the transient state because it's in a... transient state. In other words the speed of the motor is transitioning (changing) from stop to movement or movement to stop. Once the motor is moving along we enter the steady state because we are no longer transitioning from stop to movement. Rather, we are moving along at a semi-steady speed. To work in both 'states' we need to 'compensate' the motor. Compensating the motor simply means we need to constantly adjust the motor so it does what we want it to... move correctly. We compensate the gain and bandwidth of the servo system. The gain is the ratio of the output signal to the input signal. It's basically how much the input signal is amplified or increased and effects the accuracy of our movements.

A large gain allows the servo system to make small movements in a very accurate way. This is a large feature of servos. The gain let's us get close to the speed we desire by adjusting the actual speed that we are moving. The bandwidth is a measure of it's frequency. By frequency we mean that it's a measure of how often or fast our system can respond to a change. The wider or larger the bandwidth of our system is the faster we can respond to changes. So, a faster response is a quicker response which, of course will result in more accurate movement in the end. The more accurate movement happens because we are able to react to changes quicker. In this case quicker is better... In general, more gain and bandwidth are good things for our application to use. Of course, different servo systems will allow different gains and bandwidths. They are generally a limitation to the hardware that we are using and each application will have it's own requirement. But we only need to note that the system is tuned by the compensation we provide it.

So, when you're looking for high speed and accuracy in your motion control consider a servo motor over a stepper motor. You will be pleased... =================================================== ****** Move it with a VFD - Part 1 =================================================== A VFD is a Variable Frequency Drive. It works with AC motors and sets them into motion. It does so by varying the frequency of the voltage supplied to them. There you go. That's it. Simple... but now let's see some details.

The VFD controls two factors of the motor... speed and torque. As you may remember from your school days, torque is a rotational force and speed is ... well... speed. Combine the 2 and you get into horse power but that's a topic for another issue. An induction motor (real commonly used by folks in the industrial factories of the world) would rotate at a fixed speed that is determined by the frequency of the voltage supplied to it. Alternating current (i.e. AC)applied to the motor windings in the stator' produces a magnetic field that turns the motor shaft. We vary the speed of the motor shaft by either changing: 1- The frequency of the AC applied to the windings 2- The number of magnetic poles in the windings So, using a little math... and I mean a 'little math'... we can calculate the speed of the motor. Just use the formula: (120 * frequency) / number of poles = speed If we supply a 50Hz voltage to a 4 pole motor and use the formula above we can see that we will be turning the motor shaft: (120 * frequency) / number of poles = speed (120 * 50) / 4 = speed (6000) / 4 = 1500rpm (Revolutions Per Minute) So, if we examine the formula above a little closer, we can see that if we want the motor to go faster we can increase the frequency of the AC voltage applied to the windings. If, for example, we change from 50Hz to 60Hz in the example above we get: (120 * frequency) / number of poles = speed (120 * 60) / 4 = speed (7200) / 4 = 1800rpm (Revolutions Per Minute) So, now instead of turning at 1500rpm we're flying at 1800rpm. How else can we change the speed? Well as we read above we can also change the number of poles our motor has. So, if for example our motor had 8 poles in the original example we'd be moving at: (120 * frequency) / number of poles = speed (120 * 50) / 8 = speed (6000) / 8 = 750rpm (Revolutions Per Minute) So, now instead of turning at 1500rpm we're crawling at 750rpm. Trouble is, however, that the poles are a physical 'fact' of the motors we can't just change them on the fly. We'd have to change the whole motor! What good is that if we just want the speed to vary? No good... So, you can see that the best way for us to change the speed of the motor is to 'vary the frequency' of the voltage being applied to it. Can we do that? Sure we can... with a Variable Frequency Drive (VFD)!

Stay tuned as next time we'll see how the VFD actually works along with its relationship to our powerful friend 'torque'.

=================================================== ****** Move it with a VFD - Part 2 =================================================== As we saw last time, a VFD can often be used in a motion application where some high torque and variable speed is required. If we apply them properly they are one of the best motor controllers in industry. The key statement there is 'if we apply them properly'. To apply one correctly we really need to understand the load requirements. Basically, we need to ensure we can supply enough current for the motor so it can produce as much 'torque' as needed. Torque may be a new term for you in the motor world. Generally, we talk about horsepower in the motor world but it relates to torque and thats what we need to discuss in the VFD world. Torque is a force that produces rotation. It is commonly measured in units of lb-ft (pound-feet). It is the force necessary to cause an object to rotate... Think of a merry-go-round (carousel ride). To get it to rotate by hand you would need to push it with a certain amount of muscle. That 'certain amount of muscle' would be the 'torque'. If you tighten a bolt with a small wrench it will be difficult. Use bigger (i.e. longer) wrench and it will be easier to tighten. For example, to tighten the bolt to 50 lb-ft you would have to apply 50lbsof force to a 1ft long wrench. On the contrary, you would have to only apply 1lb of force to a 50ft long wrench to tighten it the same. Many (most?) machinery loads are constant torque loads. Conveyors, compressors, etc are some good examples. Variable torque loads are generally most pumps and fans. A VFD is usually specified for variable torque loads because they can help save energy but they are used for constant torque loads too. Peak torque efficiency comes at a certain volts per hertz ratio. As long as our VFD stays at this ratio we can develop the rated torque. For example, let's assume we're using a 460 volt source at 60 hertz .The ratio is therefore: volts / hertz 460v / 60hz 7.667 v/hz As long as the ratio stays in the above proportion we can supply the rated torque. So, if the volts fall we'll need to decrease the frequency to maintain the same ratio. Horsepower is torque with the addition of time and distance. So, its the torque generated to move something a given distance in a given period of time. It's related to torque by the formula: HP = (torque * speed) / 5252 For example, if we have 30 lb-ft of torque developed in a motor rotating at 1500rpm we get: HP= (30 * 1500) / 5252 HP= 45,000 / 5252 HP= 8.57 For reference, if we exert 1 hp we can move 550 lbs in 1 second. If we are just holding the 550 lbs still, we are not exerting any horsepower. There MUST be movement... No movement would mean no torque which would mean no horsepower. See? To specify a VFD we need to understand the torque requirements of the load. We need to consider: 1- The torque required to start the motion 2- The torque required to bring the load to speed in a certain period of time 3- The torque required to keep the load moving 4- The torque required when the motor acts like a brake to slow down the load 5- And the peak torque needed by the load

Most folks will use an ammeter to measure the current under all the load conditions listed above and find the peak current drawn. The VFD is then sized to the motor based on the maximum current draw at the peak torque levels plus an extra margin. Notice that the VFD is not specified based on the horsepower ratings of the motor. It's a torque thing... =================================================== ****** Move it with a VFD - Part 3 =================================================== Now that we know how and why VFD's work they way they do, let's take a quick look at the different kinds on the market along with the pros and cons of each. They all serve the same purpose in the end... motor control... but how they go about doing it is different. The three most common types you're likely to come across when looking around are: PWM - Pulse Width Modulated CC - Constant Current CV - Constant Voltage Let's check out the details of each to understand the pros/cons. PWM- This is arguably, the most popular type of VFD available, and for good reason... they're reliable and low cost. That alone is enough to sell me :) Without getting 'too techie' on you... but still getting techie... we can examine how they work. We basically take an AC voltage and connect it to the VFD input section. We bring it into a diode bridge and create steady DC voltage out of it. That voltage passes into an inverter area and out comes an imitation sine wave. We can regulate the voltage and frequency of that sine wave (remember that AC voltage is a sine wave by its nature... cool huh). So, we take in AC voltage, clean it up and output a fake that we can control. The key is in the 'fake voltage' that we output. It is 'pulse width modulated'. Remember from science class that a sine wave is a curve that goes above and below a zero voltage line. So, in a perfect sine wave, half the time it's above zero and the other half it's below zero. Each transition of the voltage above/below the line is actually a group of short pulses of varying widths. By changing the width of these pulses in every half-cycle of the wave, the result is an output signal that looks like a sine wave. I like to say it's a 'fake sine wave because we made it. The number of transitions above/below zero in the sine wave every second determines the frequency of the voltage sent to the motor. And thats how a PWM VFD works... in 'not too techie' detail. What are the pros/cons? Well it's reliable and low cost. Definite advantages in my world. They are also very efficient, typically in the low to mid 90% area. They are also commonly compatible with multi-motor applications. They also don't cause motor cogging. On the negative end of the spectrum, they can cause motor heating and may generate power 'noise' on the line side of your connection. CC- The constant current type of VFD starts out the same way as any other VFD. We input an AC voltage. We take the AC and feed it to an SCR (silicon controlled rectifier) section which converts it to DC and regulates it as a variable DC voltage. What are the pros/cons? Well it's real reliable since it limits current by its nature. It's also real simple. On the negative end of the spectrum, they will generate lots of power noise' on the line side of your connection. They will cog the motor at low frequency and need to use an expensive inductor to operate. Forget about using them for multi-motor applications too.CV- The constant voltage type of VFD is quite similar to the CC type of VFD. It also uses SCRs for regulation of the DC output but its inverter produces a multi step output. The output regulates the voltage and sends out a varying frequency output. It's pretty much a square wave instead of the PWM sine wave too... What are the pros/cons? Well, it's pretty darn simple. It's not load dependant and it can be used for multi-motor applications. On the negative end of the spectrum, they will generate lots of power noise' on the line side of your connection and they will cog the motor at low frequency.

So, what's the best type of VFD for your application? Well, that's up to you, of course. But consult with the manufacturer. At least now you have the basic knowledge to understand what's going on...

=================================================== ****** Move it with a VFD - Part 4 =================================================== Now that we know all about VFDs, let's take a look at some of the points we need to be careful about when we specify our VFD system. I like to be conservative when I specify things to be sure I don't end up with an expensive paperweight, hopefully you feel the same way when you specify expensive items too. So, let's look at some of the potential 'gotchas'...

1- Hard to start loads. These are one of my favorite gotcha points because we don't often find out until it's too late. In other words, what's the proper definition for 'hard to start' load? I use the simple eyes/ears method of looking and listening when the load starts up. If I see the lights dim or hear the ventilation system hiccup I call it a hard to start load. Again it's all relative and your world is probably different than mine so be your own judge. Or if you're unsure you can always take the safe route (like I do) and oversize the VFD for a higher current load... only my wallet gets a gotcha in this case :) 2- Very time-sensitive stopping or starting times. If you need to stop the load in an emergency situation the drive is going to need some high current. The same goes in the opposite way. Better said, if you need to start the load immediately you're going to need a drive that can take a high current. So, once again, oversize the drive to be sure in these types of applications. 3- Connecting more than one motor. I don't do this too often but maybe you do... if so, make sure to protect each motor individually and specify the VFD size based on the maximum current draw of -both motors-. Of course, maximum load is going to need to be under the worst possible conditions they may ever see. Plan for the worst and youll be fine when (not if...) it happens. 4- Using a service disconnect... or not. Your operation may require you to have a service disconnect between the drive and the motor for maintenance. It's pretty common out there so there's a good chance you may already be doing that. Well, usually removing the load from the drive when everything is going won't harm it. Returning the load, however, with the drive operating already could easily send you to the VFD store to buy another one. Usually... that's not a good thing... unless your second job is being a VFD salesperson! When the motor is started at full voltage there will be a large, a real large, current draw. That's not good. It's often easier to just add a set of aux contacts and create an interlock with the drives safe run circuit. This should restart the drive at a low frequency/voltage when the contacts close. Simple. 5- Needing to sync the motor on start-up. Sometimes when you reusing the drive to run a pump or a fan or even conveyors, the load continues to move after being told to stop. This is probably normal for your application and no big deal... so you may think.

Trouble is, however, that the drive wants to start at a very low frequency/voltage and gradually ramp up to a higher frequency/voltage. But, if the load is already moving from the beginning then it will be out of synchronization with the drive. The drive will obviously try to pull the motor back down to a start which is going to require a higher current almost immediately. This higher current load is most likely going to turn on your protection circuit... which will likely disable the system.

So, if you have the potential for that situation make sure to verify that your drive system has a synchronization function. In this case, you will be able to have the drive ramp at a different frequency and all should be well... in theory... hopefully reality for you! Well, that's my top 5 'gotchas' for you. I'm sure there are some more out there. Not surprisingly , I find new gotchas most everyday, and you probably do too. The important thing is to learn from the gotchasand pass along your learning experiences to the people you meet. Then everyone benefits from the experience! =================================================== ****** The HMI- Who's Controlling Who? =================================================== Is it an HMI, MMI, OIT, xyz or...? As we're all gradually becoming more experts in the base systems, why not dive into the peripheral systems. The most obvious peripheral device to start with has to be the HMI (another acronym...). The obvious question is then... what in the world is an HMI? Another3 letter acronym to remember. HMI stand for 'Human Machine Interface. You may also hear it called MMI (i.e. 'Man Machine Interface') or even OIT (i.e. 'Operator Interface Terminal'). I'm sure there are other acronyms as well, but these days HMI is the acronym winner. So, back to the question... what in the world is an HMI? The answer is not surprisingly' simple. It's a device that lets us (the 'human') interface (communicate) directly with the machine we're operating.Huh? Well think back to the 'old days'. If you don't qualify as 'old' then watch some old movies or TV shows. In them they often show machines of the era with tons of lights and switches. The science fiction onesare the best oldies because they include lots of goofy sound effects and lightning bolts :) . They also had a lot of switches. Well, that's the HMI of the old days. Your basic light bulbs to signify something is on/off and your simple switch to turn on/off whatever on the machine. It was very basic and simple... and admittedly effective. But technology improves (well hopefully it improves) and today we have all kinds of different ways to interface with our machine. The most basic HMI is just a simple few lines of text on a display. The text tells us the current condition of the machine or even guides the operator on what the next step is in the operation of the machine. Its a simple interface between the operator of the actual machine and the machine itself. A higher end HMI might include a touch screen panel and shows fancy graphics of the machine operation with actual data (like product count or the operation status of different events). It might also include actual video of the operation or even an interactive instruction manual for the machine. The imagination of the builder is typically the biggest obstacle to what many HMI systems can achieve. A nice feature of today's HMI is also the ability to allow different levels of access to different screens on the display. For example, the actual machine operator might have access to only a very basic screen that just shows the person any alarm conditions and run status of the operation. The maintenance folks might have access to that screen plus a diagnosis screen where they can see sensor status and product failure counts. The actual builders would have that plus control over the communication with the machine.

So, as you may be able to see, a single HMI panel can be more like a bunch of displays combined into one. What more could you ask for? Well we could ask for lots more, actually. How about the ability to communicate with different brands and types of PLC and motion controllers? How about both at the same time? How about the ability to log data and send it to the chief sitting up in the penthouse office controlling the company? All of that is possible these days. A far cry from the science fiction interfaces of the old days, isn't it?

=================================================== ****** The HMI- Who's Controlling Who? Part 2 =================================================== How do we go about specifying which HMI is best for our particular application? A real common question... I guess we all have it! Answer, not so simple. But let's try to make it simple by looking at the things we need to consider. I put together this 'consideration list' in hopes it may help you. 1- Vendor choice. This is a large one for me and hopefully you too. How long has the vendor been in business? Do they have someone local to you? Do they actually answer the phone? Is their tech support good and available? How is their late night support if needed? And one of the key considerations, will it work with your PLC? If it's the PLC maker you're getting the HMI from it should talk to the PLC(hopefully) as they're in the same family. Do they have application examples? I like to ask the salesperson to show me a demonstration of a simple on/off button setup. You can then see in a minute how easy it is going to be to work with. They're all different in 'ease of use'. 2- Will it 'play nice' with your other machine components? This is critical and kinda covered in 1 above. The HMI needs to be able to connect and talk to whatever devices you need it to. Make sure you verify this in advance or you WILL have a large headache and aspirin isn't going to help. Ask me how I know... yes, live and learn. Make sure you think of all the devices it will need to talk to. Itmight be just a single PLC. Or maybe it's going on a system with a few different PLCs. Regardless, consider how it will communicate with all the devices it will need to, especially if they are from different vendors. Will they talk via Ethernet? Or USB? Or xyz BUS? Or... I like to check out the manuals in advance too. This way I can see what I'm getting myself into because communication issues can be a real nightmare to troubleshoot. 3- What is the actual application? This is also very important in making sure you are specifying the correct HMI. There are all different kinds of HMIs available today. From the basic system to the full blown all out HMI of kings. (We'll save this topic for our next article as this will take an article in itself to go over sufficiently) 4- What is the environment like where we will use the HMI? Don't forget about where the HMI will be used! Is it going to be used for an application that's exposed to the local weather extremes? If so, is it rated to handle outdoor use? Is it in a wash down environment where it will need to stand up to water and cleansing? Is it rated to do so? Is it going to be near some high voltage lines or big motors? If so, you need to be sure it's adequately shielded. If it can't be shielded, do you have a better place on the machine to put it? 5- How easy is it to maintain/service? Rarely do we think about this in the design stage (sadly). But we should consider this as a factor because downtime costs money. Some systems let us put video on them. Super easy when maintenance time comes. Others let us store manuals (pdf or whatever) on them. A benefit when your hard copy documentation ends up in the wrong file... Smart programming might also allow us to record the last five product failures, for example. We can then go back and review the data to find out what happened. Can we monitor the HMI remotely? Oh, how that helps when you're not on site currently. Can you make changes remotely? Can you update the system remotely? Well, those are my own top 5 things to think about when I'm specifying an HMI. I hope they will help you too, or at

least make you think more about the process so you don't have too much of a headache later. Next time we'll see what the best types are for the most commonapplications you're likely to come across. See you next issue! Learn, enjoy and PLEASE tell a friend or 2 or... about the site and updates. They will appreciate you for it!

=================================================== ****** The HMI- Who's Controlling Who? Part 3 =================================================== In my view, there are three likely types of applications you will come across to use an HMI with. Let's simply call them small, medium and (you guessed it...) large. The HMI system you use for each is different, so we need to understand each. 1- Small. Just like the name implies, this application is small and simple, although the simple applications always seem to turn out to be more complicated than expected. Like we previously discussed, 'in the old days' when we walked to elementary school in the blizzard, uphill both ways, machines had only switches and lights on them. The switches acted as operator input to the machine and lights on the machine told the operator that 'stuff' had happened. These are today considered small applications even though there may be many switches/lights to be replaced. I guess simple may be a better word but I use small since the functionality needed to solve the application is 'small'. An HMI for this type of application (arguably the most common application...) would generally use the most basic of systems. The buttons are often emulated on the screen or even built-in to the display if there are few of them. Often times, a monochrome screen is fine too. Even a general purpose 4 or fewer line text display may be good enough for the application. Just having a few lines of text is often better than a simple light to show status. 2- Medium. This group of HMI applications encompasses a large portion of the applications out there. When you need more functionality than a basic HMI system will provide you'll step into this world. Here your probably doing some data logging or moderate recipe control. You're switching between screens and most likely will be investing in a color screen. You probably have a larger machine controlling a more sophisticated application and therefore need more functionality from your HMI system. You also need to consider how much data you will be logging, if your application calls for data logging. Maybe you're logging when there is a product failure, or a machine error, or... In this case memory is going to be important for your application. Perhaps an SD card will be needed so you can review the data in the office. Or maybe you will use some communication method to access it (like ethernet). Regardless, try to plan ahead so you know how much memory will be needed to be built-in. If you're logging data on a system that is offline, make sure of the method of communication between the two devices to avoid any surprises. 3- Large. As the name implies, this is the jumbo application. It therefore needs the biggest solution. The application here may include SCADA (i.e. Supervisory Control And Data Acquisition) or other advanced control schemes. You might also be doing some data warehousing or working with large databases. Usually, this type of system involves a full-fledged computer to run by its very nature. The software can get expensive... but again, this is a large application and chances are the value is also large to the company using it. Open your wallet... Regardless of the size of your application, make sure that you are checking for the basics. Can it talk to the device(s) you are connecting to? Is it proprietary to the vendor or does it communicate via one of the numerous standards out there? Can it be upgraded? Can it be secured? And so on...

=================================================== ****** The HMI- Who's Controlling Who? Part 4 =================================================== Good screen design is really, REALLY important. Why? Well, if you have ever worked with a bad screen design (sadly, I have...) it will be very obvious why. If you haven't (consider yourself lucky...) it might still seem obvious to you. If not, consider this. In the 'best case' it will simply cost your company some efficiency (i.e. money). In the 'worst case' it will cause some person to get injured. That's never a good situation... So, what can we do to avoid a poorly designed screen? We can plan ahead. If you're in a rush or not thinking about the worst case scenario of your application you shouldn't be working on the project. Yes, that is how important the design phase is for the HMI screen. A small mistake here will often times create a large problem later. So, let's do our best to avoid it. The first step should ALWAYS be to talk to the operators of the machine it will be used on. They are 'in the trenches' every day doing the actual control of the machine. They will understand all the little things that you might not realize. Most operators will be happy that you included them in the design phase. In the end, it will help them do their job more efficiently. Does your company have some standard screen colors, fonts, images, etc? If so, you need to use them as well. If not, why not? It is sooooo much easier for people to work on different machines when things 'feel' familiar. It will also be easier for you to work off of a basic company 'template'. Why re-invent things for every project? Make life easy and improve your own efficiency, everyone will benefit and you'll be the company hero :) What are some items to include in a HMI design template? Well, below are some that I recommend... and you may have more for your particular design and company 'culture'. Use a standard picture library for your facility. It should be real obvious to the operator what the image is on the screen. If they have to look at the image and actually think about what it is really representing, there is a problem with the image. Redesign. It should be obvious what the image represents. Keep you background simple. It should not be a distraction and take focus away from the actual operation cues going on in the machine process. Rather, it should highlight the operation. A basic solid color that is neutral should be used... not red, green, etc. I like gray myself... but it will vary from company to company. The point is not to use something so bright that becomes a highlight on the screen. The size of your text on the screen is important. When I design I just assume that the operator needs reading glasses to 'read'. I take that approach because it makes me think about making the text large, but not too large that it takes all the focus. It should be able to be read without actually needing reading glasses. So, if you assume the operator needs reading glasses to read a newspaper (or whatever) and you design for that in the beginning, your text will be large enough to be readable by most anyone... without needing reading glasses. That text also needs to be readable at the distance your operator will be from the screen. Just because you're programming it on your desk doesn't mean the operator will be the same distance away as you are. Investigate now or you'll be redesigning and dealing with concerns later. Don't write a book onscreen. If you need to display a lot of text you should rethink what you're doing... Is it really necessary to display so much text? A picture is worth a thousand words (as the saying goes... ). If you need to really display so much text then you might consider having it appear in a popup tip. Otherwise, you might end up with a screen that is not at all user friendly which defeats the purpose of the HMI. Make sure to use the standard alarm condition colors. Most everyone across cultures understands green, yellow, red as condition indicators. OK, warning

and alarm as green, yellow and red are usually standard in companies. However, many folks are color blind so NEVER rely on colors as the sole source for indicating dangerous situations. There could be some confusion for these people between red and green color perception which could lead to a problem. Text or sound are also accepted alarm condition indicators in many situations. It may also be for your application too. In the end, alarm conditions must be obvious and clearly recognizedfor the condition they represent. If the operator doesn't know there is an alarm condition present, how can we as designers expect them to react to the situation? =================================================== ****** The HMI- Who's Controlling Who? Part 6 =================================================== Now that we know all the 'golden rules' of solid HMI screen design and we know how to specify the right model for our needs/application, let's progress on with how to go about designing/planning the actual screens themselves. Use a template. Does your company have a standard that they use for screens? If so, life is good for you. If not, be a hero to the company and start the process of creating a standard template for your machines. When you have a template it is sooooooo much easier for the machine operators and you the designer. The reasons are because the operators will appreciate the same look and feel from machine to machine. The learning curve for them will be much shorter because they know where things are on the screen and it's just a different process for them. If your company rotates the operators it will help the overall efficiency of getting them used to the machine. Even if you decide not to use a template... for whatever reason... at least maintain consistency from screen to screen. Ideally, maintain consistency from HMI to HMI on all machines as well. Of course, it's not always easy or even possible to maintain 100% consistency but try your best and everyone will benefit from the extra effort. So, after figuring out if there is a standard template to use or not we need to start the actual design. Interview the machine operators if the machine already exists and you're upgrading it with an HMI. This is a real important step. So important that I need to repeat that. This is a real important step. Done. The machine operators know the machine. It's their job all day long so they know it inside and out. Ask them questions! Their input is invaluable to you as you go through the design. Skip this step and you will end up making changes after you release the HMI upgrade on the machine. If it's not an upgrade but rather a new machine design it still won't hurt a new designer to ask the operators what machines they like to run and why. Ideally you can implement the good screen features of them into your design. After the interviews, create a first draft. Keep in mind that it is a first draft. There will be many more drafts so don't worry about the fine details. Keep it 'big picture' focused. There are many ways to create the draft and everyone is different in what their preference is. I prefer paper and pencil, actually. I make a quick sketch, erase some things, crumple up the paper and start again. And again. And again. Eventually, I get things situated on the paper as to where they should be and I move on from there. I like to use colored pencils too. I prefer pencils instead of markers because I can erase my many 'iterations' as I go through the process. Many people prefer to use CAD as a starting point instead of my colored pencils. I just find pencils/paper to be fastest for me. Use what's best for you, of course. Make sure related items are positioned together in obvious groupings. There is nothing worse than a disorganized screen that appears cluttered with 'stuff'. The screen items should be obvious and grouped accordingly. They should ideally be distributed evenly across the screen. Attention should be drawn to the most important items on the screen. Size items accordingly. Just because something is physically bigger than something else is no reason that it needs to be bigger on the screen. Once you get a few drafts done, proceed to adding everything to the HMI screen itself. If you've done some good research about what is best from a users view this step should come sooner rather than later. If you get the design on the screen and all looks well to you, start to proceed with the actual programming. Once the programming is done there is nothing left besides test, test, test. And when you finish doing the testing.... test again.

=================================================== ****** All The World's An Input- Part 1 =================================================== What we connect in to and out of the PLC is often overlooked by the programmer. However, it's good for the programmer to have a full understanding of the project they are working on to make the best possible program and take into account all aspects that could be a problem spot later. If we know how the PLC interacts with the machine and outside world we can make it work so much more efficiently. We can also plan better for problem handling when something on the machine doesn't work as planned. Understanding what 'goes in' is something we'll tackle now. There are all different types of devices we can connect to the inputs of our PLC. One of the most interesting, varied, and least understood is our friend the 'sensor'. So, let's learn about them. A sensor does simply what its name implies... it senses something. Either 'that something' is there or it isn't. There is no in between where it's partially there or not. Nope. It's either there or not. A sensor detects what it's been installed to sense and tells the PLC that the detection item is there or not by turning on or off it's own output. That output is connected to one of the PLC inputs. So, the PLC input will turn on when the sensor sees whatever it was installed to see. Simple, right? Well it is when we think about it in simple terms like that. However, there is more to the story (isn't there always!). We need to use the correct sensor, of course. What makes a correct sensor though? Well it needs to not only sense whatever it is we've installed it to detect but it also needs to be able to 'talk' to the PLC. In other words, the sensor output needs to be compatible with the PLC input. Huh? Sensors come with many output 'flavors'. There are NPN, PNP, AC, relay, etc types of outputs. We need to be sure that the PLC input can handle the sensor output. They must be compatible or we'll have 'electrical issues'. Those issues can lead from a simple rewire type of issue all the way to a fried PLC input issue. In the worst case we could even have a burnt PLC or a more serious safety hazard. So, the first step, assuming we already have a PLC, is making sure of the type of input our PLC wants to see. From there we can ideally find the sensor that detects what we need it to AND has the proper output to work with our PLC input. We get deeper into the electrical aspects in another issue.... for now let's discuss the different types of sensors available in the market that we might use on our machine and to connect to our PLC. Some of the things we can sense are: temperature acceleration chemicals humidity/moisture air/liquid flow vibration metal content position presence/absence / electrical current/voltage / pressure

weight / force ... and so much more. We are only limited by our imagination these days. But how do these sensors actually work and detect whatever it is they are designed to 'see'? We'll tackle that next time and see how they actually interface to the PLC. The technology is actually quite amazing... =================================================== ****** All The World's An Input- Part 2 =================================================== One of the most basic of sensors to use is the famous 'inductive proximity' sensor. It's been around industry for many, many years and has just one simple job... detect metal. If you want to detect plastic... forget about using an inductive type of sensor. How about wood? Nope. Cardboard? No way. Anything non-metal? Not happening. To understand why it only detects metal, let's examine how it actually works. The key to understanding how it works is in part of the sensors name... inductive. An inductor is simply a coil of wire. Yes, you can easily make an inductor, couldn't you? This coil of wire would then allow us to do some nice things... really. If we apply a constantly varying current to the coil of wire it will begin to generate a magnetic field. You might have done this already as a child in science class. Wrap a coil of wire around a nail, apply a low current and you've essentially created an electromagnet... right? If a metallic object enters the magnetic field the varying current will change. The sensor 'brains' monitor this current and look for a change. If it sees a change it knows there is a piece of metal in the magnetic field (i.e. in the detection range of the sensor). It then turns its output on and we have detected the metal. Simple, right? I told you it was a very basic type of sensor... You can certainly see then that the type of metal it can detect is going to be important. So is the size of the metal. But why? Well, let's go back to making our electromagnet in grade school. Use an iron nail and you'll get a great magnet. Use an aluminum nail and you'll have a very poor electromagnet. So, the key is in using a more ferrous (i.e. iron) metal. Based on that, we can detect a same size and shape piece of metal at approximately the below percentage of distance depending on the type of metal it is. Iron 100% Stainless steel 90% Brass 50% Copper 40% Aluminum 40% So, if we detect a 1 inch by 1 inch piece of iron from 1/8 inch away we'll call that 100% of the detection distance. Then, based on the details above we'll be able to detect a 1 inch by 1 inch piece of brass from 1/16 inch away. (i.e. 50% of 1/8 inch is 1/16 inch) Aluminum would be even less of a distance. Stainless steel would be detected from approximately (90%) the same distance as the iron. The size has an effect on the detecting distance as well. If the metal is too small it will hardly effect the magnetic field. Then it will only be detected very close to the sensor. A piece of copper wire, for example, is difficult to detect because it is thin and copper is a '40% of iron' detectable metal.

These types of sensors are also some of the lowest costing sensors too. The reason is because they are very basic to manufacture as they are just a coil of wire and some electronics to detect the change in the magnetic field generated. The important thing to remember is that inductive sensors can only sense metal. No metal = no detection.

=================================================== ****** All The World's An Input- Part 3 =================================================== An interesting type of sensor that's been around for a while is our friend the ultrasonic sensor. They are a good general purpose type of sensor that have a few benefits over some other technologies. But before we get too deep, let's see how they work so we can understand how to apply them best and determine if they are ok to use for our particular application. As the name implies, they operate via ultrasonic waves. What that really means is that they operate by using sound. Yes, sound. We don't use sound that you can hear, however. We use sound that is higher in frequency than a human can hear. In general, people can hear sound if it is within the range of 20Hz to 20kHz. On the low side, 20Hz is the base sound or low notes. The kind of sound you hear thumping from the local annoyances car radios subwoofer as he's driving down the road and you're attempting to enjoy some peace and quiet. On the high side, 20kHz is the high notes. The kind of sound that pierces your ears from a scream. I guess you can say that the high frequency sound is more of a shrill... the sound that puts your radios tweeters to use. So, ultrasonic sound is higher than the 20kHz we can hear. Generally, the ultrasonic sensors are working with frequencies from about 50kHz and higher. Usually the upper end is in the mid-200kHz range but it can vary depending upon the purpose. The typical ultrasonic sensor uses a piezoelectric crystal to generate the high frequency sound as well as receive it. We apply a voltage to the crystal which causes it to vibrate and produce the sound. We apply it in predictable bursts. In between the bursts we wait to receive the sound back after it is reflected back from the target. Depending upon how long it takes to receive the sound back determines how far away the target is from the sensor. The quicker we receive the sound back the closer the target is to the sensor. On the other hand, the longer it takes to receive the reflected sound, the farther away the target is from the sensor. In general, the sensor can be used for two distinct types of application. The type of application we described above is used more for ranging or measuring distances from the sensor to the target. In this case we are dependant on the timing of when the sound is sent out and when it is received. The other type of application is just a general there or not there application. It's a more present or absent type of application and is the simplest. In this application we send out a sound wave and wait. If we get the sound reflected back to the sensor we know there was a target there. If we don't get anything back then we know there is no target present. As you can see they are relatively simple devices. But what are they good for? Quite a few things, actually. For example: Varying target materials are a benefit. They can work on wood, metal, liquids, porous materials, etc.

Varying target colors. As they just work on sound waves it really makes no difference if the color of the target changes. If we were using a sensor that relies on light to be reflected, for example, this would be a concern. Far away targets. They can often detect items that are quite far away... as in 50 feet or more in some instances. That's usually too far for other technologies. Of course, there are a few 'gotchas' we have to worry about with ultrasonic sensors. Everything is not as perfect as it may seem. More on that next time... =================================================== ****** All The World's An Input- Part 4 =================================================== Last time we reviewed all the details regarding ultrasonic sensors. We saw what they were good at detecting as well as how they worked. That was the good 'stuff'. Now, let's take a look at some of the potential 'gotchas' that can take you by surprise if you don't know about their potential existence. Remember last time that we said they were simple to understand sensors. They simply shoot out sound and wait for the sound to bounce off the target and reflect back to the sensor. Simple. The speed of sound is obviously crucial to this sensor. However, the speed that sound travels varies with the atmosphere. To make matters more confusing, the frequency of the sound also plays a part in how it travels through the atmosphere. Getting confused yet? Let's make it simpler by looking at each factor. As the sound travels through the atmosphere (most likely air) it gradually 'attenuates' (gets smaller). Friction losses caused by the air gradually eat away at the sound waves. The higher the frequency of the sound waves the more the loss. The same is true for humidity. Any change in humidity of the air we're shooting through will also have an effect on the speed of the sound waves. The humidity effect is dependant on the frequency of the sound waves as well. At a low frequency of about 40kHz the maximum loss of sound will be at about 50% RH(relative humidity). At a higher frequency of about 120kHz and more we see the maximum loss of sound at higher humidity levels. Actually 100% RH. So, you can see humidity has a large effect on the distance detection capability of the sensor but varies depending upon the frequency of the sound waves. How about temperature? Yes, temperature also plays a factor in our detecting distance and capability. Sound travels slower at low temperatures and faster at high temperatures. So, if the environment we're using the sensor in has a change in temperature we'll need to take that into account. Background noise also has the potential to cause issues. Why? Because it is sound, of course. If it is a noisy environment that we want to put the sensor in we should consider a sensor that operates at a high frequency. The theory is that less high frequency background noise is produced in most environments and remember from the above that high frequency noise is more easily attenuated so it hopefully won't make it to the sensor. Lastly, we have to consider the shape of the target. If it is a large flat surface we're detecting it will be a great target. The reason is that a large percentage of the sound will be reflected back to the sensor. Tilting the target will have an effect. Use a small target and not much of the sound will be reflected. In that case we need to shoot a small cone of sound. So, to summarize everything, we need to consider: Humidity Temperature Background noise potential Shape of the target

Tilt/angle of the target Size of the target Not all of the above may be a concern in your particular application, but it never hurts to be prepared and consider whatever potential 'gotchas' that could exist.

=================================================== ****** All The World's An Input- Part 5 ===================================================

One of my favorite sensors is the color sensor. It does just what its name implies... it detects color. Trust me that it is not always easy to detect the color of an object. But why would you want to detect the color of something in the first place? Well, many times it's not good enough just to know that an object is present or absent. Sometimes we need to differentiate the actual object from others that are the same size and shape. In that case, color can be an important thing to detect. Let's say we want to sort bottles, for examples. If they are the same shape and size but have different labels, we can detect the labels. A regular 'photoelectric' sensor can see if there is a label or not but might not be able to differentiate between different labels. If we use a color sensor to look for a particular color on the one label that isn't present in the same location on the other we can sort between them. Sounds logical, right? Sure. But what is 'color' anyway. Not too easy to define but we all think it's there because we 'see it'... or do we? Color is just an electromagnetic wave like an x-ray or cell phone signal. It just happens to have a different 'wavelength'. The cells in your eyes are sensitive to these wavelengths and convert them into what your brain perceives as 'colored light'. But ultraviolet light and infrared light can't be seen by your eyes. They are not colors then... are they? We define 'visible color' as what the human eye interprets as visible light. These colors are the colors of the rainbow from red to violet and all colors in between. (Did you learn ROY-G-BIV in school to remember the colors?) But how do we know something is blue and not red? Well, that all depends on the light reflected from the object we're looking at. A 'pure blue' object will reflect blue light and absorb the other colors. A 'pure red' object will reflect only red and absorb the other wavelengths (colors). To make a simple color sensor, we need to work with some simple color theory. We look for the 3 'primary' colors. They are Red, Green and Blue and we refer to them as RGB when we speak of them. If we mix them together we get different colors. If we mix red and green we get orange or yellow or brown, depending on how much of each we mix. Mixing red and blue will give us purple. Mix blue with green and it'll give us turquoise. Mix all three of red, green and blue and we'll get white light. Well, now we know what color 'really is'. Next time we'll see how to actually detect it with a sensor. Think you can figure out how our color sensor is going to work based on the above?

=================================================== ****** All The World's An Input- Part 6 =================================================== Now that we understand what color 'really' is, let's focus on a method of detecting it. There are a few different methods and we'll focus on the two most common ways. The method that's been around the longest is the one we'll focus on first. In this system we shoot a white light and detect what comes back. Sounds simple enough... but really it's not. The light received falls on three separate photodiodes(receivers). The photodiodes are basically light meters. More light equals more signal. And of course, less light equals less of a signal. So, the photodiode basically measures the quantity of light. So, we shoot white light onto an object and have the reflected light bounce back and get caught by three separate light receivers. How then do we use the light to make sense of the color of the object we're supposed to be detecting? The answer is to install a color filter on each of the three light receivers. Can you guess the color of the filters we'll install on them? Of course you can... it all goes back to our friend RGB. I hope you recall that RGB means Red, Green and Blue... the 'additive' primary colors. So, one receiver will get a red filter installed on it. It will filter out all 'colors' of light except for the red. The red light will pass through it and will hit the receiver. The receiver will then tell the brain of the sensor that there is some quantity of red light that it sees. One of the other receivers will have a green filter installed on it. As you can probably guess, it will filter out all light colors except for green. Then it will tell the sensor brain that some quantity of green light was seen. Lastly, the third receiver will have a blue filter installed on it. Of course, this receiver will only see blue light as the remaining colors are filtered out. The blue light quantity value is passed along to the sensor brain too. So, now the brain of the sensor has the full RGB data from all of the individual receivers. It has a complete 'color map' of the object and can now process the data. But how does it process the data? Good question. To understand how it processes the data we have to see how the sensor brain works. Having RGB data about an object serves no purpose to us unless we know the RGB data of the 'standard' object we're looking to compare it to so we can see if the object and the 'standard object' are the same. That is the key. Next time we'll see how to do that as well as the other 'newer' method of detection.

=================================================== ****** All The World's An Input- Part 7 =================================================== So, we have learned all about color. We've seen how the white light technology that's been available for a while works. Now, let's learn what calibration does and also a 'better way' of detecting color. As a reminder, the white light color detection sensor sends out white light that hits our target. The light is reflected from the target back into the sensor head. Inside the sensor head are 3 receivers, each having a red, green or blue filter to enable them to see only those colors. The results are fed to the sensors brain and stored as a 3 piece color. The color yellow would be 255, 255, 0 whereby the red and green filtered receivers would each get full reflection and the blue filtered receiver wouldn't get any light. What happens if the color is not a 'perfect' yellow? Well then the receivers won't see 255, 255, 0 but rather they might see 240, 226, 50 for example. This would be a mustard-ly looking yellow. What we need to do is tell the sensor exactly what color we are looking to see. We do that by getting a standard target and having the sensor look at that. We register that color data in the sensor and that is now our 'perfect' colored object. The sensor is now 'calibrated' to that color and all future objects will be compared to that sample. We'll set a tolerance in the sensor and if the new readings fall outside those tolerances we'll consider the object to be a different color than what we're looking for. It's simple enough to do the calibration with a white light sensor. The same calibration method would apply to our other type of color sensor too. This type uses 3 light sources and only one receiver. It's a better method for many applications too... let's see why. We use 3 different colored light sources to shoot light at the object we're trying to determine the color of. Can you guess the colors of light we shoot out? Yes, RGB(red, green , blue)! First we shoot the red light at the object and measure how much of the reflected light is seen by the receiver. Then we shoot the green light and measure how much of the reflected light is seen by the receiver. Lastly we shoot the blue light and measure how much of the reflected light is seen by the receiver. Once again we have a value in the brain of 255, 255, 0 for example. From our previous example we know this is perfect yellow. From here the sensor goes a step further by calculating and comparing a color ratio. The ratio of each color is calculated by taking the sum of all the color values and then dividing each value by the sum to get a ratio of the color compared to the 'whole color'. In our perfect yellow example (255, 255, 0)the ratio would be: 255 + 255 + 0 = 510 red= 255 / 510 = 0.500 green = 255 / 510 = 0.500 blue = 0 / 510 = 0.000 Red and Green are 0.500 of the whole color while Blue is none. So, you math wizards might have stumbled upon a disadvantage of this ratio system... The ratio type sensor cannot tell the difference between shades of gray, white and black or any colors that have the same color ratio. The reason is because the ratios of each is the same... and that's what it detects! White's RGB for example is 255, 255, 255 while blacks RGB is 1, 1, 1. Whites calculation is: 255 + 255 + 255 = 765 red = 255 / 765 = 0.333 green = 255 / 765 = 0.333 blue = 255 / 765 = 0.333 Blacks calculation is: 1+1+1=3

red = 1 / 3 = 0.333 green = 1 / 3 = 0.333 blue = 1 / 3 = 0.333 As you can see, the ratio of each color to the 'whole color' is the same and therefore the sensor cannot tell the difference between them. The same will happen with other colors having the same ratios. How do you then detect shades of gray? Use the white light color sensor.

Você também pode gostar