Sign in to follow this  
Followers 0
Ken Moore

Need to learn S7 programming

15 posts in this topic

Hi folks, I have to learn programming for S7 PLC's, what do you recommend for training courses, books to read, on line references etc.... I have to admit I have heard many bad things about Siemens, and I hope what I heard is wrong. I have also been told that Siemens is extremely flexible, powerful and easy to screw up. Any and all advise / recommendations will be greatly appreciated. Best regards, Ken

Share this post


Link to post
Share on other sites
Do you have access to the programmig language? Professional is the best if possible, if only for the sim package to practice on. What do you know already about the basic structure? Just a little starter.. The basic package allows you to program in STL (Statement List, harder for most to learn and essential for indirect addressing, most anything else can be done in ladder or CSF), Ladder I'm sure you know and CSF I believe is known as FBD in other PLC's (AND OR gates etc in block format). Professional also allows for ST (Structured Text) and Graph7. When programming you have OB's, FC's, FB's and DB's. OB's - Organisation Blocks are called by the system, you only need to have 1, thats OB1, this is the base block where your normal code is called from (like Main Routine), other OB's are optional, OB100 for start-up (pre-first scan) timed interupts, eg OB35 (useful for PID etc, you set the time interval) and others for faukt handling (these ones can stop a PLC falling over in fault if coded) I would normally use OB1 as a base level distribution block and have little or no actual code in it apart from jumping to other blocks. FC's - Functions, are called blocks without memory. When you program them you can optionally create input and output parameters to pass data in and out, beware though IN parameters are not updated on the way out and OUT parameters are not updated on the way in, so if you wanted a retained coil for instance, it would have to be a IN-OUT (these three make up the 3 parameter types you have with a block call). FC's can be further distribution blocks or repeatable code that don't need to remember its last state. Internally there are TEMP parameters, these are used off a stack and do not remember states between block calls, so the golden rule is to ensure you condition the TEMP state prior to using it in the block. TEMP's are useful as they are scratch data that you can name and therefore see what its for. DB's - Data Blocks are data storage blocks, a bit like N: or B: files etc, except these are mixed data types, you specify the format, one thing to beware of is Siemens is Byte addresses, therefore if the first data you store is a word (DW0), then the next available data store will be byte 2 as DW0 wold take up 2 bytes (0 and 1). FB's - Function Blocks, need to be associated with a DB and are referred to as blocks with memory. FB's will know the state of an IN parameter at the end of the block if you changed it internally and the OUT can be used as a retainer, even so there are still IN-OUT parameters. in addition there are STAT data which is internal memory, all the above are stored in the Instance DB you allocate to the FB when you call it. There are also TEMP's available in an FB, these are scratch. The only difference between a IDB and a DB is the fact that you cannot modify the IDB build, this is done automatically when you create the association with the FB, the IDB will be the IN, IN-OUT, OUT and STAT parameters you created with the FB. If you change the FB parameters (with exception to TEMP's) then you have to rebuild the IDB and download it. This can be done by deleting the DB and rebuilding or recompiling the code (for the latter you would need to set programming to Symbolic, which I would highly recommend). You can open an IDB in the rest of the code and read and write data to it, just the same as a normal DB. I would normally change to symbolic programming and create UDT's to structure my code, the UDT's can become STAT areas in FB's. You can embed FB's in other FB's and share the IDB. Setting up the hardware is easy, if you load Step 7 on the machine for the first time, it would be wise to go online and update the hardware libraries. The wizard would help to stat up, or you could manually do it yourself by starting with dragging a rack and then drag the CPU, power supply IO cards etc into it. You can create a single project for multiple PLC's, this allows you to link them together eith Profibus and/or Profinet, select one as Master and then it can link to each other PLC as if it was IO (the Master can become the conduit for other PLC comms, very fast), no comms code needed, its all IO and accessed as that. You can have multiple masters but then you need code to manage it. One thing I find useful, is the fact that you can download blocks created off-line, so you don't need to stop the PLC and do a total download, you can just download the blocks you have changed. care would need to be taken though, especially if you have lengthened a data block. One of the OB's can be created to stop a software fault from crashing the PLC, I wouldn't leave it in there though. Well thats a starter with a bit of the flavour I think :) EDIT: When you open the block editor, go to help, then contents, this is a programming manual (it should also be as a PDF on your machine), as well as a good instruction manual, it also, in the apppendices, disects the data patterns of the data types, especially useful for pointers and ANY instructions. Edited by Groo
1 person likes this

Share this post


Link to post
Share on other sites
Great response, that was very informative. I do not have access to the software yet. But your post outlines the basic structure, which is more than I knew before.

Share this post


Link to post
Share on other sites
Hello If you are beginner in S7 300 for start I order you to use books STEP 7 in 7 steps, author C.T Jones. Also good are books Hansa Bergera. I do not give you a titles these books, because in my view everything depend which languages you can chose for programming PLC and then you can decide which book or books are suitable for you. Look also here http://www.automation.siemens.com/fea/html_76/down_module.htm there were a lot example from SIEMENS, if you could not find nothing I give you the use of materials, of course if you want... Good luck Greetings from Poland

Share this post


Link to post
Share on other sites
Hi, Groo wonderful response, rich my knowledge with S7 structure! MasterTomson could you please attach few manuals for Step7 programming, we all be very great full and pleased. Thanks you guys, Best Regards, Greg.

Share this post


Link to post
Share on other sites
Siemens sites can be a bit painful, here though is a link to one of theor sites where you can download manuals, FAQ's, update info etc. Siemens website I forgot to mention, with the 3 main languages STL, CSF and Ladder, unlike most other PLC's where you chose which method and then that is what you will always see. With Siemens there is a view option which will switch the dislay between the three, I put this on another thread but perhaps it should be here too. Ladder and CSF will always switch to STL because STL is the base language. Anything writte in Ladder will always switch to CSF. CSF can usually switch to ladder, but ladder has a rule which dictates the maximum number of columns, CSF can exceed this, so if a CSF rung has too many conditions on the AND gates then it won't change to Ladder, it will display as STL instead. Anything written in STL which is more than basic And and or's will probably not translate as CSF and Lad have additional instructions (usually NOP's) which assist in the graphical build. In STL you will ususlly see more than a single networks worth of code, which is anorther reason it won't translate. Edited by Groo

Share this post


Link to post
Share on other sites
Hi everybody At attachments below you will find educational teaching aids which I download before from the website http://www.automatio...down_module.htm http://www.wrzucaj.com/38017 http://www.wrzucaj.com/323388 Enjoy...:) Edited by MasterTomson

Share this post


Link to post
Share on other sites
Hello I not sure what you are looking for but heres a couple things to keep you busy. Micro/Win Software S7-200 Step 7 software 300/400 Step 7 Basic v10.5 v11 Software S7 1200 Modules for pretty much all siemens software. My link S7 1200 Podcasts My link And a lot of helpful on this site for all. Have A Good Day Tom Edited by Tom

Share this post


Link to post
Share on other sites
Great links, thank you very much.

Share this post


Link to post
Share on other sites
Bear in mind that S7-200 uses one software package (Step 7 Micro/Win), S7-300 and S7-400 use another (Step 7 Professional), and S7-1200 yet another (Step 7 Basic). So before determining what programming software you need to learn, you need to identify which PLC you will be using.

Share this post


Link to post
Share on other sites
I know, sort of like the Rockwell offerings. I will be doing mostly 300's ( I think), the link to the training tutorials are for a 300, so I should be okay. Thanks for the reminder.

Share this post


Link to post
Share on other sites
I'am from the upstate also, why dont you attend a free Wesco Step7 introduction? Call Wesco in Greenville and ask Kim when the next seminar is Edited by jrw

Share this post


Link to post
Share on other sites
Outstanding Idea, got a phone number?

Share this post


Link to post
Share on other sites
Here you go 864-286-1234 So your planning some upgrades? Are you looking for anything special in the S7300?

Share this post


Link to post
Share on other sites
I've been told siemens safety rated PLC offering was cheaper, so need to learn Siemens. Looking at using Siemens PLC's instead of other vendors for SIS systems. Currently using AB and TriConex.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0