Pico Programming Question

HemiHalo

Member
Join Date
Jan 2014
Location
Sioux Center
Posts
4
Hello all,
I've never programmed PLC before, but all of a sudden I have to program some lights with an AB PicoController. Need help figuring it out.

There is a vehicle sensor as an input and 10 lights as outputs.

Basically when the sensor will send a pulse when it sees a vehicle underneath it, then light 1 should light up for 0.3 seconds, then light 2 for 0.3 seconds, etc. until light 10. This light cycle must go through three times. If another car is sensed during one of the light cycles, then the count must reset and another 3 cycles must take place.

Right now I have each light on a on/off-delay timer relay. Light 1 on at 0.0s, light 2 on at 0.3s, etc.. all off after 0.3s. But I don't know where to go from here. Can someone point me in the right direction?
 
Ok, see the attached screen. I have I01 as the sensor. Since it pulses I have Rising Edge relay M02 on that input. M02 powers an Impulse Relay M01. M01 activates the 10 timing relays which are set to turn on at 0.3*(X-1) where X is the number of the timing relay, they each turn off after 0.3s.

screen.jpg
 
The attached image is a little too small for me to see. Can you print it to a .pdf file and also zip the ladder file?
 
If another car is sensed during one of the light cycles, then the count must reset and another 3 cycles must take place.
Because of the above requirement (that the input pulse must perform TWO functions: Start the cycle, then on the next pulse reset the cycle) then you must create an "alternator" or flip-flop logic so that when the pulse happens the first time your cycle is started, but if it happens again before completion, your cycle is reset. You can search this site and find many examples of alternator logic.

Here is a file with 13 different methods to create an alternator. Methods 1, 2, 5, 6, or 11 would work for your Pico program. I suggest making the 1 or 2 rungs of the new alternator the first rungs in your program. Once you get that out of the way, you will have a major problem solved on how to reset the counter and timer(s) in the program.

After some testing, the good news is that the Pico has a built-in alternator relay called an "Impulse Relay". So you only need one rung with your Pulse Input on the left and the M0 Impulse Relay on the right!
 
Last edited:
Here is a Pico program that sort of works. The Pico is very limited and the Timers and Counters running in the Simulator are very sensitive to the program scan time. I had to add a T11 110 mSec delay timer at the end to allow more than the 100 mSec default scan time, before the timers would reset properly.
 
Last edited:

Similar Topics

I'm not sure if I can perform this function or not, but what I'm trying to accomplish is having the same input perform an on and off function. The...
Replies
6
Views
1,746
Where can one safely download the AB Pico software? What cable is needed to connect to PC?
Replies
7
Views
1,894
Hi im trying to connect my pico to my laptop but I cant configure the com port for usb. it works okay on a different laptop with the serial cable...
Replies
7
Views
2,038
Hello, I am having trouble getting online with an old AB Pico module. I am currently using the 1760-CBL-PM02 cable, and cannot autoconfig via...
Replies
1
Views
1,364
So I’m trying to write a program for a small stand alone press. We had some pico controllers in stock and figured it would take care of what i...
Replies
10
Views
2,717
Back
Top Bottom