rainman Posted July 14, 2011 Report Posted July 14, 2011 (edited) Hi all, I'm totally clueless with the file structure on S5. What is the purpose of OB? I understand that FB is like a "subroutine" and PB is like a main program that call out FB. I have an Old S5, the programs are lost (when uploaded I see zero PB) and the battery LED shown "amber", which I guess its battery fault etc. Very fortunately I have a whole copy of code in papers but I need to understand and probably allows me to convert them to just ladder. Attached are some parts of the programs and I hope someone can me a good pointer on what is the ladder equivalent. My link My link My link My link My link Eg; Under PB3 Segment 6, I have codes like this A T35 O F0.0 AN I2.1 AN I2.2 *** The STL codes represent A and, not, and 2 AND-NOT codes? Why isn't there an output? Rgds. Edited July 14, 2011 by rainman
Groo Posted July 14, 2011 Report Posted July 14, 2011 Most of your links show CSF language code. Most of this would have converted directly to ladder had you still the code (does the original company still exist that sold this machine, they may have a copy of the code) OB blocks are blocks called from the system, OB1 is the block called between updating the IO tables, most of the code would have calls originating here. Other OB's would be first scan OB's or timed interupt OB's etc.
Groo Posted July 14, 2011 Report Posted July 14, 2011 If you write the CSF code as CSF, it should change straight to ladder when you change the view to ladder. In most cases CSF will convert OK, the main problem is usually too many elements to display in ladder.
rainman Posted July 15, 2011 Author Report Posted July 15, 2011 (edited) Thanks for the reply. Can you tell me if Step5 can be used to "draw" CSF? I can't seem to find the CSF option on STEP5. For those CSFs diagrams that I had posted, are they really codes that are being block transfered or are they just purely for documentation purpose? Looking through all the codes, I find some of the codes "illogical"...Eg; some "ANDs" and "ORs" conditions but no output, ON / OFF delay timers with no Q outputs? Or am i misinterpreting? Rgds. Edited July 15, 2011 by rainman
Groo Posted July 15, 2011 Report Posted July 15, 2011 (edited) With Siemens you can toggle between Ladder, CSF and STL, its just the way you view the code. Anything written in Ladder or CSF will always convert to STL Most things written in CSF will convert to Ladder. Most things written in STL will not convert to Ladder or CSF. Normally because in STL you can write code without some of the baggage needed to display graphically in Ladder and CSF. I haven't used S5 for years and have no access to software so I cannot be specific, but there should be a view option which will allow toggling between languages. Regarding the Q's etc, the first 'My Link' you have, segment 17 shows a timed condition to latch a flag called -Alarmsvi, it is reset by -Reset-Al. -Alarmsvi is the flag set in that case, the Q on the S/R is for continuing the logic. Edited July 15, 2011 by Groo
Groo Posted July 15, 2011 Report Posted July 15, 2011 LINK to Siemens data downloads Look there for the programming manuals
rainman Posted July 15, 2011 Author Report Posted July 15, 2011 Thanks again. I had the manuals but without hands-on experience it is quite tough for me to understand. I reckon if I can get more help here I can understand it easier and faster. Just downloaded PG2000 for trying out and it is much easier, as compare to STEP5, with one click to STL-LAD-CSF. I look through some of the doucumentations I had, I had codes like this : PB3 Segment 6 :A T 35 :O F 0.0 :AN I 2.1 :AN I 2.2 :*** and a remark "if new offset, jump to FB1". Is it invalid codings, What got this segment got to do with FB1? I can't even convert it to CSF, whereas the codes that I modified looks more logical and valid. PB3 Segment 6 :A T 35 :O F 0.0 :AN I 2.1 :AN I 2.2 := F 1.1 :*** Can someone bring me some light? The first code looks invalid and yet it's properly documented (which I assumed it's the correct codings) And I have plenty of STL and CSF that doesn't have an output.
Groo Posted July 15, 2011 Report Posted July 15, 2011 What's on segment 7? this code could have continued.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now