advice on my first ladder program

HornerPLC

Member
Join Date
Apr 2009
Location
NY
Posts
24
Hello:

Goal

1. record time a sensor is on
2. delay signal for 3 seconds
3. send signal to motor and have it run for as long as the sensor did

I have been attempting to use ondelay timer but it just sends a small signal after the delay. should I use retentative timer?

Thanks
 
Can you post any of your program? If it is a Windows program and can print your work the you may be able to use a PDF printer such as CUTEPDF or PDF995 to 'print' to a PDF file which you can then post here. Just Google those names. I happen to use CUTEPDF Writer (free) for this purpose.

If not describe how you are attempting to solve this problem? Since you seem to be in a learning environment, either a formal school or are attempting to learn yourself, we will adopt a 'help by discovery' type mode. It will help you learn faster than just giving answers.
 
This is my first try (very simple I think). I put a relay on the output end of my PLC and it will delay for 5 seconds and then turn the relay on for a split second and then starts all over again. Im not sure how to have the relay stay on as long as the sensor input did. thanks.

1ST TRY.jpg
 
The details will vary depending on the brand of PLC you're using. Read the manual for a description of what timer functions are available in your model and how they work.

Think of how you might program this if you were doing the timing using a stopwatch. Three seconds after the sensor goes on, start the motor. Three seconds after the sensor goes off, stop the motor.
 
It sounds like you want the motor to run for the same amount of time that the sensor is on, but start three seconds after the sensor turns on.

You will need an on delay timer for the sensor, and also an off delay timer for the motor. The other unknown is what do you want to happen if the sensor is "on" for less than 3 seconds? If your sensor is on for one second and you want the motor to wait 3 seconds after the rising edge of the sensor and then run for one second, then you will need to record the on duration (accumulated value) of the on delay timer and place that value in the preset of the off delay timer.

Hope this helps
Paul
 
It sounds like you want the motor to run for the same amount of time that the sensor is on, but start three seconds after the sensor turns on.

You will need an on delay timer for the sensor, and also an off delay timer for the motor. The other unknown is what do you want to happen if the sensor is "on" for less than 3 seconds? If your sensor is on for one second and you want the motor to wait 3 seconds after the rising edge of the sensor and then run for one second, then you will need to record the on duration (accumulated value) of the on delay timer and place that value in the preset of the off delay timer.

Hope this helps
Paul

This makes sense. (I did successfully run the timer-on in the image below). What function will record the accumulation? Do I use "move" function to copy the time into the off-delay timer? Much appreciated, (I have a Phd but this stuff is killing me)

DELAY.jpg
 
This makes sense. (I did successfully run the timer-on in the image below). What function will record the accumulation? Do I use "move" function to copy the time into the off-delay timer? Much appreciated, (I have a Phd but this stuff is killing me)

The answer will depend on what PLC (make and model) you are using.

You want logic that equates to:

When the sensor goes from true to false, MOV the TON timer accumulated vaule into the preset of the TOF. This logic will need to be placed before the TON is scanned so that the accumulated value is not cleared first.
 
One way to Do it---

Paul,

I was wrong, here is a working method.
 
Last edited:
will need to digest this

I think this will take me a few hours to digest but I appreciate this image. I have my PLC hooked up but it hangs on occasion. Im thinking vista is playing a role. thanks again.
 
Paul,

I think your program is best. It works even if the sensor is on for less than 3 seconds. Here is my revised version that also works if the sensor is on less than 3 seconds.

MOTOR DELAY R1.jpg
 
Last edited:
Hi Lancie!

Only functional difference between yours and mine is that yours will start the motor as soon as the sensor goes off, while mine always waits 3 seconds after the sensor first came on...

Paul
 

Similar Topics

Hi, I have just started learning PLC programming by using TLP LogixPro Simulator. I'm now doing the Door simulation to Open and Close the door...
Replies
15
Views
9,468
Hi folks, I have a piece of code from my first project that I'm looking to improve a bit so am looking for some advice on how to do so. There's...
Replies
11
Views
2,860
Hi All, I was in the design stage of a new stand-alone machine and need some inputs/advice from all you experienced and knowledgeable industry...
Replies
5
Views
3,084
Excuse then punn, but i would appreciate any advice people would have about 'breaking in' to programming PLC's. Following an instrument...
Replies
4
Views
5,270
I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
7
Views
247
Back
Top Bottom