PicoSoft - programs turn an output on and off every cycle, help!

jonb452

Member
Join Date
Feb 2008
Location
Orlando
Posts
9
Hello all,

I am working on a simple program for an AB Pico PLC. Some info first:

In the image below I01 is a ready signal from a machine. This typically goes on or off every few minutes. I02 is a sensor which blinks ~100 times per minute. T01 is a 5s on-delay timer, T02 (50ms) and T03 (40ms) are off-delay timers.

2lxyosp.jpg


My goal is to energize Q01 when: I01 is made and timers T01 and T02 have expired. Q01 can only be de-energized when T03 has expired and I01 is not made. Q01 should maintain whatever state its in until I01 changes.

The problem I have is that when Q01 is energized then de-energized with I02 made, the program seems to get stuck in a loop where Q01 goes on and off every program cycle. Does anyone see what I am doing wrong? Any advice is appreciated, thanks.
 
I hope this doesn't sound harsh, I'm only trying to help. I might be wrong but the code seems to be chasing itself. Some quick suggestions. I would recommend you make a fresh start from the beginning. Use on-delay timers only. Use timer values of 5 seconds for all for debugging, it slows things down so you can see the logic easier. You can set the proper values later. Micro-define each step. Write a rung to accomplish that step, then move on to the next step.
 
The code is not ideal.

You need to think of it as moving from one step to the next. That is, complete one step, which changes your logic to a stable state, then move on to the next.

What I see in your posted code, and this is a guess since I can't see the entire machine, is this:

When Q01 goes high, during the next scan through the logic I am guessing that T01 or T02 is going false before either of the lower two branches have a chance to latch Q01 high.

You never want to rely on one scan to disable one bit and latch another bit at the same time. This is where intermittent problems come from.
 
Read my other post first then add these hints. To simulate the sensor for testing purposes, add a rung with just a timer (T4) set at 600 ms. Temporarily change I2 to T4 on rung 002 and rung 003. This will allow you to see what effect the sensor has. Also, maybe 50 ms for timers T2 and T3 might be long enough.

If you remove I01 in rung 004 the program loop seems to go away most of the time but not always. There may be more conflicts.
 
Last edited:
I added I01 N.O. (make) to rung 002. This seems to have resolved the conflicts. I did use off-delayed for T02 and T03 and on-delayed for T01 as you stated in the original post.
 
My goal is to energize Q01 when: I01 is made and timers T01 and T02 have expired. Q01 can only be de-energized when T03 has expired and I01 is not made. Q01 should maintain whatever state its in until I01 changes.

When I translate your goal to ladder. I do not have your rung #4. Did I miss something?
 
When I translate your goal to ladder. I do not have your rung #4. Did I miss something?
My latest attempt to solve the original ladder looping problem posted goes like this.
Remove rung 004
Remove branch on line 007
Substitute T03 N.C. (break) for I01 on line 006.

Some of my earlier efforts were not thought out very well. Even these changes could be wrong.
 

Similar Topics

Hello, Im new to plc's and im trying to use picosoft to build a simple timer circuit that is controlled by input 01 , and as long as 01 is on the...
Replies
3
Views
2,026
I'm new to picosoft. I've been working with it for a short time now and have been able to write a simple program that will turn 4 outputs on...
Replies
3
Views
1,546
I have a series of solenoids I need to run on set time amounts as long as an input is closed. The problem I cant seem to nail down, is I only want...
Replies
1
Views
1,274
Does anyone know how to download Picosoft software, I tried the AB site for the free download a dozen times and it gives me an error after I allow...
Replies
4
Views
2,306
I have a Picosoft controler that I am trying to use the counters in the ladder, but no matter what I do, the counter output shows on, even before...
Replies
1
Views
2,051
Back
Top Bottom