Tag Archives: plc troubleshooting

ACC Automation 2017 Review

ACC Automation


We would like to take a few minutes and reflect on the past, current and future of ACC Automation. 2017 has been our best year yet thanks to you. Your questions, comments and suggestions have helped us to build the site that you see today.
Thank you. Continue Reading!

Three Free PLC Programming Software Tools

Every manufacturer has there own software to program the programmable logic controller (PLC) or the human machine interface (HMI). However there are a few tools that are free which will help in the development of your PLC programs. We will look at three of these software tools and show how beneficial they can be to you.

Synergy

When programming, I usually will have my laptop for the ladder logic and my desktop for the screen software. Connecting the two together and using one mouse and keyboard saves me the aggravation of switching back and forth between the keyboards.
Synergy Splash

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems each with its own display without special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s). Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. It works on Windows, Mac OS X and Linux.

Synergy Website
http://synergy-project.org/
Downloads:
Synergy for Windows:
http://download.cnet.com/Synergy/3000-2072_4-10714570.html
Synergy for Mac
http://download.cnet.com/Synergy/3000-2094_4-75362427.html

Windows Calculator

That’s right. The windows calculator can be a very helpful tool when it comes to programming PLCs. When you need to convert, hexadecimal to binary, BCD to hexadecimal, or any other combination the windows calculator can do it for you.

What everybody ought to know about PLC numbering systems.

Start the calculator. Start – All Programs – Accessories – Calculator
Calculator 01

View the programmer calculator. View – Programmer (Alt + 3)
Calculator 02 Programmer

We can then choose Hex for our numbering system. Then Word for our length of address. You will notice that the display will show the Bin equivalent along with the marking of bit 0 to bit 15.
Calculator 03 Programmer

7ABC base 16 = 0111 1010 1011 1100 base 2 = 31420 BCD
Calculator 04 Programmer

Note: I am using Windows 7, but all of the versions of window calculator have similar functionality.

Windows HyperTerminal

Serial communication can be difficult using the PLC. HyperTerminal can be used to monitor the communication being sent from or to the programmable logic controller. Just hook up to the serial port and program HyperTerminal to monitor the port. Set the correct Data Bits, Baud Rate, Parity, Stop Bits etc. Viewing the information on the monitor will assist you in seeing the exact data being sent to, or received by the PLC.
HyperTerminal

HOW TO IMPLEMENT THE OMRON PLC HOST LINK PROTOCOL

Hype Terminal – Windows 7 and 8

HyperTerminal was no longer sent with windows when Windows 7 was introduced.

Hype Terminal is fully functional replacement of HyperTerminal, perfect for GSM and GPS debugging, works with AT Commands. You can use Hype Terminal to help debug source code from a remote terminal. You can also use Hype Terminal to communicate with older character-based computers. Hype Terminal is designed to be an easy-to-use tool and is not meant to replace other full-feature tools available on the market.
HypeTerminal

Download Hype Terminal:
http://download.cnet.com/Hype-Terminal/3000-2086_4-76158601.html

Watch on YouTube : Three Free PLC Programming Software Tools
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.




PLC Programming Example – Process Mixer

We will apply the five steps to PLC Program development to our next programming example of a process mixer.

1 – Define the task:

PLC Prgramming Example - Process Mixer
A normally open start and normally closed stop pushbuttons are used to start and stop the process. When the start button is pressed, solenoid A engergizes to start filling the tank. As the tank fills, the empty level sensor switch closes. When the tank is full, the full level sensor switch closes. Solenoid A is de-energized. Mixer motor starts and runs for 3 minutes to mix the liquid.  When the agitate motor stops, solenoid B is engergized to empty the tank. When the tank is completely empty, the empty sensor switch opens to de-engergize solenoid B. The start button is pressed to repeat the sequence.

2 – Define the Inputs and Outputs:

Inputs:
Start Pushbutton – Normally Open – On/Off
Stop Pushbutton – Normally Closed – On/Off
Empty Sensor Switch – On/Off
Full Sensor Switch – On/Off
Timer 3 minutes done bit – On/Off (Internal)

Outputs:
Mixer Motor – On/Off
Solenoid A – Fill – On/Off
Solenoid B – Empty – On/Off
Timer 3 minutes – (Internal)

3 – Develop a logical sequence of operation:

A flow chart or sequence table is used to fully understand the process.  It will also prompt questions like the following.

What happens when electrical power and/or pneumatic air is lost? What happens when the input / output devices fail? Do we need redundancy?

This is the step where you can save yourself allot of work by understanding everything about the operation. It will help prevent you from continuously re-writing the PLC logic. Knowing all of these answers upfront is vital in the development of the PLC program.

Process Mixer - Sequence Table

4 – Develop the PLC program

Since we need to continue the sequence when the power goes off then memory retentive locations in the PLC must be used. In our example we will use the ‘V Memory’ locations.

The first thing in our program is to control the start and stop functions. This is done through a latching circuit. From the sequence table we know that to reset the sequence we need to have the timer done and the empty sensor off.Process Mixer Program 1

The filling of the tank is done through Solenoid A. It is turned on by the start signal and off by the full sensor switch. (Sequence Table) You will notice that we have a memory retentive output and the actual output to active the solenoid.Process Mixer Program 2

The memory retentive timer will start timing when we have the start sequence signal and when the empty and fill sensors are on. The timer will reset when the empty and fill sensors are off. Mixing motor will be on when the timer is timing and when the timer is not done.Process Mixer Program 3

Solenoid B turns on to empty the tank when the timer is done and the full and empty sensors are on. It will reset when the empty sensor switch goes off.Process Mixer Program 4

5- Test the program

PLC Programming Example - Process Mixer

Test the program under many conditions. Check to see what happens when power is removed.

Using this five step to program development technique will shorten your programming time. The result will be a better defined logic and easier to understand program, because it has within the documentation the logic flow chart or sequence table.

Watch on YouTube : PLC Programming Example – Process Mixer

Factory IO provides a 3D simulation of the process. Testing of the program is important and should be done in a variety of ways. Factory IO provides a straight forward method of seeing your program in action before you wire your application.

We will be using the BRX PLC Modbus TCP Server (Slave). Factory IO will be the Modbus TCP Client (Master). When the tank fills up we will start a dwell time instead of the mixer time for the simulation.
Here is the mapping of the inputs and outputs using Factory IO.

Factory IO Website is at the following URL:
https://factoryio.com/
Documentation is well done. Start at the ‘Getting Started’ at the following URL:
https://factoryio.com/docs/

You can download the PLC program and Factory IO scene here.

Watch the following video to see this simulation in action.

Watch on YouTube : Process Mixer Test Simulation
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.




How PLC Outputs Work

This post is a further follow up from my original ‘Here’s a Quick Way to Understand PLC Inputs and Outputs’. There are basically two different kinds of PLC outputs, Discrete and analog. Discrete outputs are either ‘ON’ or ‘OFF’; 1 or 0. You can think of them as a single light bulb. Analog outputs have a range to them. They are outputs that usually will control proportional valves, drive speeds, etc. They usually have one of the following signals that are outputted from the PLC: 4-20mA, 0-10VDC, 1-5VDC.

Discrete Outputs
PLC Outputs

The above diagram has three outputs. A coil, light and motor. The Ladder outputs Y0, Y1 and Y2 control the outputs respectfully. You will notice that when the Ladder output turns on, the corresponding output card bit LED turns on. This then will energise the output hardwired to the device.

The outputs are turned on or off at the end of every PLC Scan. The PLC logic is solved left to right, top to bottom in most PLCs. Physical outputs are not set / reset until an I/O refresh is performed at the end of every scan. This means that if I have a scan of 1msec, then the maximum time it will take to turn on/off the output is 1msec.

PLCs will sometimes have the ability to update the I/O in the middle of a scan. Please refer to your PLC manufacturers manual for this instruction. This can be used for updating the I/O quickly or controlling stepper drives for motors by giving them a pulse train output from the discrete PLC output. A pulse train is just a quick series of on/off states of the output.

Analog Outputs
PLC Analog Output to Motor Speed

An analog output converts a digital value to a voltage or current level that can be used to control (vary) physical outputs. In the example above we are controlling the speed of the motor. Words in the PLC will control the analog value.
Example:
4 – 20 mA current Output – 8 bit resolution
4 mA = 00000000 base 2 = 00 base 16
20 mA = 11111111 base 2 = FF base 16
For a review of numbering systems, follow the link below:
What Everybody Ought to Know About PLC (Programmable Logic Controller) Numbering Systems

In the industrial environment noise from variable frequency drives, improper grounding, etc. can interfere with your analog input. The following post will show a quick method to reduce this noise.
The Secret Of Getting Rid Of Noise On Your Analog Signal

Previous Post:
How PLC Inputs Work

Watch on YouTube : How PLC Outputs Work

If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.




How to Troubleshoot a PLC

Your control system does not work. Where do you start? Lets walk through a series of questions in order to determine where the problem lies.

footprints

Is this a new installation or previous installation that was running fine? Determine if system has been running well in the past and has currently stop working correctly. This is the indication that the problem relies inside the system.

Is there anything that has happened outside of the system? Has there been a lightening strike, blown drives on other systems, etc.  This can point to the original cause of the malfunction.

build-2Bgear-2Btower

What is the system doing now and what should it be doing? Gather all of the information you can from every resource you can.

  • Supervisors  – machine, location, time of error, other happenings in the plant, etc
  • Operators – What is it currently doing? What should it be doing? What do you think is wrong?
Operators of the equipment are your key resource in finding, correcting and ensuring the error does not happen again. They know the equipment from an operational point of view which can assist you greatly in troubleshooting.

PLC fatal and non-fatal errors:
If the machine is still running partially then this is an indication of a non-fatal error. Cannot run at all is usually a fatal error.

Do_More CPU Units

Take a look at the PLC indicator lights on the CPU. Refer to the operation manual for the PLC for troubleshooting specific lights on the CPU. The following are general tips:

If no lights are on then the possible cause is a power supply. This is usually the most common of errors on a PLC system. Mean time before failure (MTBF) is rated on the lowest rating of components which is usually the power supply.

If the run light is on and an error light flashing this usually indicates internal errors such as batteries, scan time, etc. It is usually not the reason for the lack of operation.

If the run light is on and no other errors are seen on the CPU we can put the PLC program on the bottom of the list of items that could be the cause.

Check the input cards of the PLC. You should see the individual sensors lighting up the inputs. If not then check the power supply to the input card / cards.

Ask the operator what is happening and what is suppose to happen. Try to follow the sequence of events in the PLC to determine either and input or output device not working.
Some items to watch:

If this is a new PLC program that you are doing start with a logic flow diagram. This will determine the procedure to start programming.
Every program can be done in several ways. The best method is the most documented one.

Documentation is the mark of a good program.

PLC-2BScan

Some trouble with new programs can be racing conditions. This is usually a case of not understanding how the PLC scans logic. In general the PLC will scan from left to right, top to bottom. The output bits / words are available to the inputs of the next rung of logic. (Modicon PLC’s will scan differently.) Actual outputs and inputs are not read until the end of the scan of the PLC. Racing conditions happen when the output is set on multiple rungs, but will not get actually set until the end of the scan. Think of it as the last action will always win. So if this happens move the logic to the end of the program and see if it works. Then go back and see where the output was also set.  Cross reference guides are ideal for this purpose. (Refer to your programming software on how to get cross references.)

start stop 011

We have discussed just a few troubleshooting techniques. Hopefully now you know how to start looking for the errors on your  system. Let me know how you make  out.

Watch on YouTube : How to Troubleshoot a PLC

Do you know of additional tips or methods to share?

If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.