Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! complex pulse using ladder logic & timers 1

Status
Not open for further replies.

davidmichaelson

Mechanical
Sep 16, 2008
4
I'm trying to create a repeating "complex pulse" using ladder logic timers in an TECO SG2.

I've tried the ladder logic below using an TECO SG2, but pulse output looks nothing like desired.

Any one have a different approach? THX in advance.

PULSE (all times in ms)
ON***OFF**ON***OFF**ON***OFF**ON***OFF***ON****OFF
50***100***50***100***50***100***50***100***300***100


LADDER LOGIC
----| |----------------------------------------------O-- (input to start an Off-delay timer for total duration = number of pulse repetitions)
----I01--------------------------------------------T01

----| |----------------------------------------------O-- (flash timer 600ms on then 400ms off)
----T01-------------------------------------------T02

----| |----------------------------------------------O-- (flash timer 50ms on then 100ms off)
----T02-------------------------------------------T03

----|/|----------------------------------------------O-- (flash timer 300ms on then 100ms off)
----t02-------------------------------------------T04

----| |----------------------------------------------O-- (output relay combined from flash timers)
----T03------------------------------------|------Q01
---------------------------------------------|
---------------------------------------------|
----| |---------------| |--------------------|
----T04-------------T01
 
Replies continue below

Recommended for you

Is this for school?

xnuke
"Live and act within the limit of your knowledge and keep expanding it to the limit of your life." Ayn Rand, Atlas Shrugged.
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
nope... this is a real world application. Our company is evaluating a switch from PIC microcontrollers to an inexpensive PLC (smart relay).
 
From your schedule, you'll need a counter.
After 4 cycles of 50 - 100 ms, you deactivate the 50 and 100 ms timers and activate the 300 and 100 ms for one cycle.

However, the schedule you have on top does not match the software comments... so I'm not sure what you really want.

 
TY for the suggestion about counters. I hadn't thought of combining counters with flash timers. However, I'm unsure where to put counters in the ladder logic to turn flash timers on/off.

About the pulse schedule not matching the ladder logic & what I really want. What I want is the pulse schedule & I tried to implement using flash timers in ladder logic (but failed). So I'm wondering if the "flash timer" approach is invalid for creating a complex pulse like this.

I think that the Boolean (for the ladder logic) looks something like this:

I01 = T01 (off delay timer: for total duration = number of pulse repetitions)
T01 = T02 (flash timer: 600ms on then 400ms off ONLY WHILE off delay timer is ON)
T02 = T03 (flash timer: 50ms on then 100ms off ONLY WHILE 600ms timer is ON)
t02 = T04 (flash timer: 300ms on then 100ms off ONLY WHILE 600ms timer is OFF)
T03*(T04+T01) = Q01 (output on ONLY WHILE designated timers are ON)

 
You'd need a bit to define if it's the first cycle (50 and 100 ms) or the second.

At the end of the rung you'd add another cycle to the counter.

Inc C1 // for example

If the counter1 equals 4, then set the bit, reset the counter.
Use the counter2 to define how many cycles of 100 and 300 ms you'd need.

In the beginning of the rung you use this bit along with the I0.

 
You can use just one counter and then use compare instructions to turn on or off your output. Using this technique you can get some very complex pulses, and changing them is as easy as changing the values in an array.
 
TY everyone for all your responses.

Turns out the logic using nested timers actually does work with the TECO SG2 PLC. It does NOT display the complex pulse using the PC interface software (which is all I was using to validate the concept when I posted originally). Apparently the only way to really validate the software logic is to install it in a physical unit (which I ultimately did) rather than rely on the vendor supplied PC interface to the device for ladder program verification. Maybe a different PLC with a better more refined PC interface would be a an apt development environment instead.

Thanks again
 
I've kinda given up on Teco. Their documentation and execution is simply horrid. They rewrote their manual and, sadly, removed some things that were clearly described in the first revision and added more obfuscation.

Keith Cress
kcress -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor