Can I make a rung run only once after startup in RsLogix?

opmal7

Member
Join Date
Dec 2014
Location
Moline
Posts
35
I have a set of binary bits that stores information for indicators. If the program shuts down and restarts, the status of those bits stays the same as they were before shutdown. I want to reset the bits at the start of the program, but only want it to run once, otherwise it will keep resetting the bits throughout the program. Any tips, advice, or resources out there? Thanks!
 
maybe use a oneshot (ONS) for those bits, with the "Power-Up" contact before the oneshot? Once the PLC power's up and the Power Up contact becomes true, the Oneshot will only beam through the one time to activate whatever is after it. The next time it will beam again is when the Power-Up bit goes off and back on (i.e. powering up the machine again)
 
Use the first scan bit S:1/15 for RS500 and S:FS for RS5000
 
Last edited:
I usually do an Initialization routine if enough things need to be reset on startup. At the very beginning of my program, I'll use the First scan bit to activate a TOF Timer. The next rung, I'll use the Timer's DN bit to activate a subroutine jump (JSR) to the Initialization routine, and then branch around that with a Temporary End (TND) instruction so that the PLC doesn't scan anything after that as long as the rung is true. Once the timer times out, the Initialization routine and TND are deactivated, and the program runs as normal. It's a good way to keep all of your initialization stuff together, especially if you have a lot of it.
 
maybe use a oneshot (ONS) for those bits, with the "Power-Up" contact before the oneshot? Once the PLC power's up and the Power Up contact becomes true, the Oneshot will only beam through the one time to activate whatever is after it. The next time it will beam again is when the Power-Up bit goes off and back on (i.e. powering up the machine again)

Won't work....memory is retentive.....the power up bit you created will still be on. Use the S:FS bit.
 
Jnoobs has the right idea although I don't think it was explained properly. And the ONS isn't necessary, but it doesn't hurt. kay_gsr_13 mentions the proper addresses to use. I agree with FTttH about a startup/initialization routine although I don't bother with a timer.

The part no one is mentioning is what to do after that power up bit is used. If the bits are sequential within the same word you can use a CLR or MOV a zero to clear them all. If the bits are not sequential the easiest method is probably unlatching each of them.
 

Similar Topics

Omron CX Programmer Ver6 How do you go to the next line of the comment feild? If you push enter it completes the entry. I always have one...
Replies
3
Views
2,678
First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
560
See picture. I want to add a rung (magenta) into the existing code. Can't figure out how to do this. I select a -||- , right? When I drag/drop...
Replies
21
Views
1,833
Basic question: I don't understand why Network 4 is split over two lines. I want it to appear like for Network 3, i.e. all on one line. Does...
Replies
1
Views
751
Back
Top Bottom