Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for our Automation Newsletter
Online Catalog
Request a Quote
Repair Information
Contact Us
Sell Your PLCs
Automation Blog
Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for our Email Newsletter

PLC Articles


For Email Marketing you can trust


IEEE Industrial Electronics Society

Copyright © 2017
Tek-Supply inc



Programming Application - Functional Alarms with GE Fanuc

At some point in your PLC career you probably have been exposed to writing alarms for a machine. There are several alarms that I normally include when I write logic for a machine from scratch. Some of those alarms might be "cycle time out" alarms, or "part not detected" alarms. I think the most important alarm to me is what I call the "functional" alarm.

When designing a machine's electrical package, typically I use a prox switch for each motion of an air cylinder. This would generally include an extended and a retracted PLC input from each cylinder that causes motion in either direction of the cylinder. A lot of times prox switches fail, or even during your normal machine cycle you could have part jam that would cause a prox switch not to be made or create a valid input condition. So in essence, I created a "functional" alarm.

Functional alarms defined by me are generally two conditions:

  1. Neither prox switches extended or retracted is made while the machine is in a normal air on state.
  2. Both prox switches extended and retracted are made while the machine is in a normal air on state.

Condition number one above is generally caused by four scenarios:

  1. A prox switch failed.
  2. A prox wire is cut.
  3. A prox position has loosened and no longer can sense the direction of the cylinder.
  4. During a normal cycle, a cylinder moved but could not complete the move because of a jam.

More often enough, scenario number three is the most common, but stops your machine if a prox switch has been moved to the wrong place and can no longer sense the direction of the cylinder. These kinds of problems can earn yourself a phone call at 2 AM to come look at a machine if your maintenance guy can't figure out why the machine won't start.

Condition number two above is generally caused by two scenarios: 

  1. A bad prox switch that is stuck "ON".
  2. A prox wire is cut and grounded "ON" (NPN) or shorted "ON" to positive voltage (PNP)

Any of the two scenarios above are not good because now you're not sure if the switch is made because of motion or if you have a true failure.

So generally to write a simple one rung alarm in GE Fanuc would look something like this:


If the machine AIR SWITCH is ok, indicating that the cylinder should be fired one way or another because air is on and theoretically the cylinder should be pushed to one end of the stroke or the other and not either prox switch nor both prox switches are on at the same time, you can then time these conditions with a timer. The timer should be just longer than the time it takes your cylinder to fire and change directions from one end of the stroke to the other. If the cylinder takes too long, then this alarm will set a bit which you can then send an alarm to your HMI to alert your operator or maintenance personal of the problem on your machine. Obviously if a prox switch has moved out of adjustment, you can direct your maintenance personal with an alarm to the exact prox switches or at least exact cylinder that caused the alarm. Hopefully then allowing you to sleep better at night knowing your staff can handle any easy prox adjustment problems. Just remember our motto, "The Program Never Fails".

Download a whole machine example with alarms here.

Article courtesy of



PH: 815-334-1688


935 C Dieckman St. Woodstock, IL 60098

Live chat by Boldchat
Live chat by Boldchat