Sleepy Wombat Posted May 8, 2007 Report Posted May 8, 2007 Please clarify the op code as per below.... STL 20 if initially fired by a SET further up in the program... ----[ STL 20 ]-+--------[M0]-------------------------[SET S21] | | +--------[X015]------[X0016]-----[SET S22] ---[STL 21]----+-----------------------------------------( Y004) | | +-----[X015]----[X0016]-------------(S22) | | +-----[Y004]---[ / M0]---------------(S20) ---[STL 22]---+------------------------------------------(Y005) | | +-----[X007]--------------------------[SET S23] The way I read it is as soon as S21 or S22 conditions are true then S20 is turned off.... For 21 to SET M0 need to be ON Then since S21 was true then Y04 is on.... Then say M0 is turned off, I understand that S20 will be energised but does the S21 state then become deenergised ? The only other way I can see S21 be turned off in the program is via a ZRST. Some clarifciation required since I don;t have the hardware to test this with me.. Thanks Quote
Gambit Posted May 8, 2007 Report Posted May 8, 2007 STL programming is like SFC. S22 and STL 22 are basically the same Bit. When your in a STL step and you energize a new Sbit the Current STL will be deenergized automatically. Quote
Goody Posted May 8, 2007 Report Posted May 8, 2007 When using 'SET' between states then the last state is auto reset When using 'OUT' as you have then 2 or more states can be on at once. Quote
Sleepy Wombat Posted May 8, 2007 Author Report Posted May 8, 2007 So by energising with an out instead of a set also will deenergise the last state.. It would make sense to me if it does.... The one complaint that I have about this sort of SFC is that in a ladder print out it shows numerous duplication of coils... yeh yeh i know you program it so that you can trace the states... but i goes against what i consider good programming practices... one coil one vote... I suppose that i could liken it to programming with "assembly" against higher level languages etc... that is programmers get lazy and the code becomes very inefficient. Thanks guys for the feed back.. Quote
Goody Posted May 9, 2007 Report Posted May 9, 2007 STL is actually a very nice compact and structured way to program. But there are pitfalls and a lot of undocumented features - and some documented wrongly. I practiced a lot with it before I ever used it on a real program. The first good point is that you can write your automated sequence on paper then name each state after each sequence. You are then only programming a small part per state. ie state 1 Home position State 2 open grabs state 3 go down to pick-up state 4 close grabs state 5 go up etc etc Each one of those states is a seperate little program. Tips; even though you are allowed to 'double coil' in different states, I never ever do. I use a M coil inside the state and a bit from it, outside the STL to operate the output. This makes auto/manual switching a doddle too. Use many small steps with even just a single action in it. Leave a gap of 10 S points between states (for additions later on) Remember, some fx models make all states retentive some dont and some let you chose which ones to be retentive. I always use (unless otherwise needed) a zone reset on power cycle. It is quite possible to know which state was active when power was lost - but thats another issue. I would recommend practicing and trying things before commiting to a real world program. I use it a lot and love it. Fault finding is so easy too - the state that is active is where the problem is. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.