Omron Program

rbbalaji

Guest
R
Dear Readers,
I am currently working in a plant that builds latch assembly fixtures. I have to program an OMRON PLC and we use pneumatic cylinders in our fixtures. I did the whole programming quite successfully and everything was fine with the fixture until today. My boss realized that the cylinder used to attach the two bumpers to the latch wasn't doing a good job and he wanted me to make it run twice.
Actually I have 7 cylinders performing various operations in this fixture and I have used TIMERS between them.

And this cylinder that is used to attach two bumpers to the latch is being run by this instruction.

LD TIM 8
AND NOT TIM 9
OUT 1003

In order to make it run twice I decided to add another two timers 10 and 11. The time delay between TIMER 9 and TIMER 10 I kept as 0.5 seconds.

LD TIM 10
AND NOT TIM 11
OUT 1003.

I wrote this line after the precious line. But I came to know that it doesnt work that way. My cylinder operated only once and not twice. Does anybody have better ideas.

Looking forward for your valuable suggestions.
 
I dont know Omron or IL/STL code so I am not sure about what I am going to say, maybe someone with more experience on Omron will clarify

Seems to me that you violated the double coil concept, maybe the timing between the end of one and start of other is not acceptable.

Is there any way you can use the timers to trigger an internal bit then use an OR bit to trigger the OUT.

I was going to attempt some code but I am sure I would botch it. I am also confused on the need for 2 timers for 1 action. Can you state why? Are there magnetic switches involved in the travel of the cylinders? Seems the use of reed switches and a timer would be more effiecient in placing a cylinder in postition for x amount of time.

I replied not so much on the fact that I may be able to help but to put this thread high again so others that are experienced with Omron may see and reply.
 
Seems to me that you violated the double coil concept....Is there any way you can use the timers to trigger an internal bit then use an OR bit to trigger the OUT?
Rsdoran is too modest (or too kind). It matters not what PLC that you code, double coils are an absolute no-no in simple ladder logic in any brand of PLC. He is correct in suggesting to OR two internal bits to control the final output.

Try this code out:

LD TIM 8
AND NOT TIM 9
OUT 20000

LD TIM 10
AND NOT TIM 11
OUT 20001

LD 20000
OR 20001
OUT 1003

:nodi:
 
We don't know which PLC rbbalaji is using, so he might not have the 20000 and 20001 addresses.

If that's the case, he can just OR the timers on one rung.

LD TIM 8
AND NOT TIM 9
LD TIM 10
AND NOT TIM 11
OR LD
OUT 1003

In other words:

TIM08 TIM09 1003
|---] [----]/[---+---(OUT)
| |
| TIM10 TIM11 |
|---] [----]/[---+

.
This should work fine, no?

x27.gif
hh3.gif


beerchug
-Eric
 
Now y'all have me curious. I was shooting in the dark but Jay A's deal kinda made sense but I am not familiar with Omron. Why the need for 2 timers?

Is Jay's deal the same as yours Eric or does yours allow it to run once per instruction...ie does the OR part initiate and take over?

Jay's made sense to me I guess because it was along the same lines I was thinking, most plc's have internal bits and normally when you want to create a dual action you use those to create an OR situation when one output is involved.

Can y'all give me a brief rundown why the use of the 2 timers and why Eric's post would work?

rbbalaji maybe we both can learn something here.
 
I think the thing that may be causing the confusion is that the logic driving the timers is never discussed. The thread only talks about what to do with the conditions of the timers.

I suspect that the timers are set up in a cascade where the done bit of one timer is the condition driving the next timer. The first timer is conditioned with the not done of the last timer if the sequence is simply time repeating or is driven by some latch that is
reset at the end of the sequence.

So T10 is driven by T9's done bit, T11 is driven by T10's done bit. T10 (and T8) will define the delay between cycles and T11 defines the extend time.

I think if I was designing a system from scratch I would use the suggestion rsdoran made about an end of travel switch and a timer to define how long the cylinder stays extended. That approach is more forgiving to changes in cylinder speed with time and may make time optimization easier. However, you may still need the second timer to space out the sequence steps.

But I digress. rbbalaji, as everyone stated so far, it is typically not possble to drive a standard coil in two different rungs. The last rung scanned is the one that defines the state of the bit. OK, that's a little oversimplified since you could have logic between the two rungs that uses the bit as a condition. In that case the first rungs status defines the state of the bit for the logic after the first output reference up to the second output reference. The second reference wins until the scan gets back to the first rung. I expect what you saw with your original implementation was a one cylinder cycle delay in your production cycle before the cylinder fired. That delay was where the first bit reference tried to drive the cylinder but was overwritten by the second.

Eric shows a very solid implementation that will work very well.

Keith
 
OK Ron, I'll try to clarify why Jay's and my logic accomplish the same end result...

Jay's (in ladder):


TIM08 TIM09 20000
|---] [-----]/[------(OUT)
|
| TIM10 TIM11 20001
|---] [-----]/[------(OUT)
|
| 20000 1003
|---] [---+----------(OUT)
| |
| 20001 |
|---] [---+


.
And mine again (in green to keep with the holiday theme!):

TIM08 TIM09 1003
|---] [----]/[---+---(OUT)
| |
| TIM10 TIM11 |
|---] [----]/[---+


.
All I did was eliminate the use of internal coils (20000 and 20001), as I thought rbbalaji might not have these addresses in his PLC.

As kamenges said, the logic enabling the timers was not explained, but that shouldn't be necessary (in this case). We know that whatever is enabling TIM 8 and TIM 9 works, since the machine was functional before the program change. All rbbalaji did was add two timers that are initiated by the expiration on TIM 9.

The new logic he wrote to enable TIM 10 and TIM 11 may very well be wrong, but the first thing to clear up is the double coil usage, so we'll have to wait and hear if rbbalaji had any luck with our suggestions. That is, if he bothers to let us know... :rolleyes:

sg.gif
tree2a.gif


beerchug

-Eric
 
The 2 timer thing had me a little thrown off BUT guess what

I am as my daughter or son would say PROUD AT MYSELF for understanding what needed to be done even if I wasnt sure the proper way to do it.

Actually I am more thankful that I could express that even though I didnt know the plc involved.

What do ya know, this ol boy may learn one of these days

YEEEEEEHAAAAAAAWWWWWW
 
Thanks

Thanks guys for all your valuable suggestions. I realized my fault after reading your mails. You cannot give the same output in 2 different rungs. It is a strict NO-NO. Thanks guys. I did run the program using Jay's and Eric's new code and it did work well. Thank you all very much. I really appreciate your help.

I have another doubt. I want another output for the same fixture that is connected to a 110V indicator. I want it to keep blinking as long as the cycle is not completed so that the operator knows that it is not done and he may have to press the push buttons after loading the other components.I beleive there is a function in OMRON PLC which keeps toggling. I remember having seen it in one of our other fixtures. It was 502 or 25502 I am not sure. So I just add this code.

LD 1000
AND 502
OUT 1007

Please tell me what is this register that keeps toggling.
Thanks in advance.
Bye,
Balaji


I
 
Hi Balaji,
The bit numbers that you require may be:-
255.00 = .1 second pulse
255.01 = .2 second
255.02 = 1 second
254.00 = 1 minute

These addresses should work if the PLC is
one of the smaller CPM1A or CPM2A models.

Regards David
 
And once again (since we still don't know), if it's one of the older Omron PLCs, you may need these addresses instead...

1900 - 0.1 second clock
1901 - 0.2 second clock
1902 - 1.0 second clock

Sorry, I'm from the older generation... :rolleyes:

sleigh01.gif


beerchug

-Eric
 
Thanks again guys. You guys are really good with omron. We shall keep in touch if you dont mind.
bye now,
Balaji
 
Hello again Guys,
I am sorry if I am boring some of you. I come up with a new question this time. I am using a six input plc for an application that has 7 sensors and so I have decided to put two sensors in series and give the outut to the plc. But I have led indicators connected to these sensors and when I connect two sensors in series then the second one turns on only when the first sensor is sensing a signal cos this is given as the positive supply for the second sensor
My friend came up with a idea to use a relay and then use the output of the relay as the plc input. I am really not sure how this works. Can anyone of you explain in detail I will be very thankful. He said he will give the two inputs to the relay and take the output.
Bye ,
Balaji
 
Have one of the sensors turn on the relay and connect the output of the second sensor through the NO relay contact to the input of the PLC.

Here's a lame attempt at a diagram... :rolleyes:

RELAY
+------------+
| |
(SENSOR 1 OUTPUT)---|--] N.O. [--|------> PLC INPUT
| |
| |

(SENSOR 2 OUTPUT)---|--( COIL )--|------(P.S. COMMON)
| |
+------------+



.
Get it?

beerchug

-Eric
 
Last edited:
Balaji
If you must have both sensors active before some action, then placing the sensors in series will work... (It's just not the prefered method).
However if you are looking for either of the sensors to trigger an action, maybe connecting them both to the same input via a pair of diodes. You will just never be sure what sensor is on????

If the sensors are monitoring pneumatic cylinders you can test to see if the sensor at the other end has gone off this can help if both cylinders dont work at the same time ...

regards David
 

Similar Topics

Hello everyone. I am new when it comes to Omron PLCs. Currently I'm uploading program from CJ1M PLC using CS1W-CIF31 cable only. I connected the...
Replies
2
Views
161
Hi Everyone, I have a customer that needs a CQM1H (CPU51) replaced. They purchased the processor new-old-stock from a source they found online...
Replies
3
Views
348
Hello everyone, We have a PLC Omron CJ2m CPU12, it contains an old program and it is UM read protected by password. Now we have a new program...
Replies
0
Views
532
Hi, i need to make: 1- A PLC Program on Omron PLC CP2E-N using high speed counter E6C3-AG5B 360P/R 2M(Absolute) ,to Reject bottles on Conveyor...
Replies
4
Views
879
Hi all, Normally I would try to research this more before asking this, but I am under a tight schedule of changing computers. I have a bunch of...
Replies
3
Views
1,424
Back
Top Bottom