Sign in to follow this  
Followers 0
Cyanogen281

Siemens s7 300 PLC Questions

16 posts in this topic

Newbie here, So I am getting slightly confused with the M bits (e.g. M27.1, M22.5) Obviously there isn't 95 inputs on the module itself... So are some of these only virtual bits predicated on the PLC telling the HMI what is going on? Does it matter if I just make up a few I/O's to compensate for a pump? (M24.3, M22.7, whatever)

Share this post


Link to post
Share on other sites
'M' bits are not I/O...they are internal memory......and there are probably more than 95.......Input bits are 'I'......output bits are 'Q' you need to read the reference material a bit (yuk) more...... bob
1 person likes this

Share this post


Link to post
Share on other sites
You have a number of different types of data and these have a basic level of a Byte (8 bits). For inputs you have I, IW and PIW. I = digital inputs, example I 10.0 IW = Analogue inputs, such as IW250, although you would usually address an analogue as PIW in a standard PLC. PIW = Periphery IW, this is the actual real time value of an input word. The I/IW Inputs are all an image of the periphery, they are referred to as an image table. At the beginning of a scan the periphery values are transferred to the image table and the image table is used in the program for digital addresses, analogues generally use the periphery data. When you create your hardware profile, you create your racks and cards. WEhen you create your cards you tell it what addresses to use for the cards. For outputs you have Q, QW and PQW, similar to the inputs. M flags are internal memory addresses where you may want to store results of logic that you need the next scan. Within each block you also have Temp memory, where you can assign names to throw away memory, ie store a result which is part way through logic to be used further in the same logic block and will be re assesed from scratch next scan (these can be termed as scratch flags). Its always best to assign names to these in the variable area at the start of the block. There are also data blocks, which is used to group stored data into a common area. Yes you need to do a bit of reading, not just on the data areas but the programming structure.

Share this post


Link to post
Share on other sites
or you could simply get a baseball bat and smash the dang thing (the Siemens PLC) to smithereens..... when is a 16bit word not a 16bit integer? it is EVERYWHERE in the universe.....except......in a SIEMENS!!!!!! (try doing a MOVE from one to the other)......yes it can be done....its just annoying...... When are there other types of numbers not used anywhere else in the known planetary systems? SIEMENS!!!! You learn that when you need a preset for a timer.....a 16bit WORD is not the same as a 16bit INTEGER and neither are the same as a 16bit TIME!!!! and what kind of a modern processor still uses BCD? SIEMENS!!! of course!! Buy a SIEMENS and get 50 year old technology masquerading as something more.......its actually less..... And we developed higher level languages (C, Basic, Pascal, etc.) because working in assembler was, well, crude and cumbersome...... so why does every single Siemens 'programmer' I know tell me how wonderful STL is over ladder? I stopped (for the most part) programming in assembler when I stopped using my Apple 2c (6502) and my Radio Shack (z80)....... bob

Share this post


Link to post
Share on other sites
You really are a piece of work arn't you.

Share this post


Link to post
Share on other sites
Ok guys let's try to keep the goal of our replies to help answer the original posters question. Bob you have already made the point clear that you don't like Siemens.
1 person likes this

Share this post


Link to post
Share on other sites
my apologies........and I did initially answer the question......however in many cases, some of the persons asking questions are neither tied to a specific brand, or are unaware that something else would be a much better learning tool. A Siemens is not a bad system.....rather its something, in my opinion, that has a much steeper learning curve than most other products (including GE which I shun as much if not more than the Siemens).........So if you're trying to learn, or if your experience level is limited, and you have a choice, I would certainly not recommend going this path............... bob

Share this post


Link to post
Share on other sites
Hi, @ rswolff : Wether you like it or not, the low-level abilities of the siemens makes it much more powerful and faster than any other that would be compiler dependent (ie : logix) though, i can't disagree, it can be a pain in the booty sometimes, LIST code is hard to read, to maintain and takes time to be deciphered. But for structured text based code, we depend on the compiler quality that could generate garbage code that slows the UC down with useless / not optimized commands. Same as automatic / manual shift in a car, the first is easy, but the second has control. On the other hand, keeping the 'old way to do it' was a commercial guarantee for siemens that their PLC would be chosen for cheap upgrade of old machinery / factories. ie: changing only the PLC and still be able to manage the ageless bcd coding wheel and others last century's devices. It is particarly good at coordinating many different systems : I've seen an exotic 9 pin communication protocol perfectly treated by an S400 as it was possible to emulate a com kernel. An integer is supposed to be a value, a word is not, type indicates the UC the treatement to perform if so, for the same reason an unsigned integer is not an integer (ie FFFF-1). You can store in a word whatever you want the way you want, it is a way to create your own 16 bits type that many other plc don't allow unless you create an array ie logix: BOOL[16]. ie any other system using a 1_complement negative instead of the usual 2-complement, or floatting nums other than IEE 754, you can get these value from an exotic system and be able to treat them. I don't like working on siemens neither, particularly on hardware configuration, very very complicated compared the AB (almost) plug'n'play. But there's one thing that is sure : it can do many many things others plc just can't and at a faster speed. As for the PO's issue, let us know if you still have any trouble. I can send a few explanations on the basics. Simatic (using Simatic ain't it ?) is not much of a instinctive software (another negative point too ^^ ), it takes practice before you can reach the parameters you need to find. And considering your software configuration I/Os can turn out to be E/A instead if still with the german style (Eingang / Ausgang), just to say. Good luck.

Share this post


Link to post
Share on other sites
I am indeed using simatic manager. I think I am just getting confused with the virtual memory aspect of the whole system. I am trying to convert a 3 pump system to a 4 pump system that pairs with an HMI. I understand the basic I/O's from my programming in school with AB software but its the M bits that are throwing me off. When I open up my symbol library I have M11.0 as my Pump No.1 in the hand position, but yet when I bring up my OB1 block that shows my input map I am presented with I0.0 as my hand position for Pump No.1 Is there something I am simply overlooking in the relationship between these two tags? *Using Siemens s7-300 (Simatic) with a Maple system HMI (EasyBuilder5000) Thanks for the all help guys I really appreciate it.

Share this post


Link to post
Share on other sites
Quite often M flags are used as storage in internal memory of I/O, so an input is conditioned internally with the result stored in a M flag or the logic for an output is created as an M flag before transferring to the actual output. Not sure what you mean by 'OB1 block that shows my input map I am presented with I0.0 as my hand position for Pump No.1'. Do you mean a block is called from OB1? OB1 is Organisation Block 1, this is a system called block, as are all OB's. The best programs generally have nothing but calls to FC's or FB's from OB1. M flags are just internal memory, they have no connection to the real world unless programmed with logic to an Input or Output.

Share this post


Link to post
Share on other sites
Not sure what reading material you have, this link has a lot of PDF downloads and very informative. http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo?=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&objid=10805159&treeLang=en Programming Manuals can be found at Product Information/Automation Technology/Automation Systems/Industrial Automation Systems Simatic/Software for Simatic Controller/Step 7 Programming Software In there you will see two groups of manuals: SIMATIC STEP 7 V5.5 Basic information SIMATIC STEP 7 V5.5 Reference The first will have SIMATIC Programming with STEP 7 V5.5, and the second will have SIMATIC STEP 7 V5.5 Ladder Logic (LAD) for S7-300 and S7-400 Programming, System Software for S7-300/400 System and Standard Functions Volume 1 and Volume 2 and SIMATIC STEP 7 V5.5 Statement List (STL) for S7-300 and S7-400 Programming. These manuals maybe of great help to you.

Share this post


Link to post
Share on other sites
Sorry I should have been more specific. When I bring up my FC200 Block I see for my Pump No.1 hand value (I)0.0 but the output is an M11.0 and when I bring up my symbol library my value for Pump No.1 hand is M11.0 If the pump is in hand I want the HMI to reflect as such. So essentially is the M block only for Internal memory and is predicated on the value assigned to it by the PLC?

Share this post


Link to post
Share on other sites
Hi, I think I get what you mean, but this would be a trick. A lot of programers use to do exactly the same to keep programs from being modified whenever some smart a s s removes/adds/shift or whatever some I/Os. Just copy all physical Is into Ms (called input M), first thing to be done, the very first routine called in OB1, then execute the program using only Ms (no Is, no Os) and then very last thing, copy Ms (called ouput M) to physical Os. Doing so, if you change Is or Os, you just need to modify the links between I/OS an Ms in one routine instead of seeking all over the program to find wherever you use this input. That way a routine is standard and can be reused without having to change the source code. If you have an M tagged as an ouput, cross ref it, you should find some equation with an (A)O x.y=M a.b somewhere, should logically be in the very last routine called by your OB1. An Memento is just not phisical, but you can access it from your HMI all the same, in your case, the M11.0 just reflects the I0.0 status. Hmi usually don't deal directly with I/Os, so that's the way we do it. ie, with AB Logix5K, you would just declare 'foo' as BOOL, tu use it internally, wel,l M11.0 is an internal BOOL all the same. Good luck. Edited by drx

Share this post


Link to post
Share on other sites
i am a new user of the siemens plc programming software V5+sp4 and am very confused in use. is there a difference betwin it and the microwin v4.0.............!!!! when i search for exemple the add a to lad program in the v5 a block of read_rtc i don't found it , wich it exist in the microwin v4 version???

Share this post


Link to post
Share on other sites
For a new topic should start a new thread. MicroWin is for S7-200 PLC's, this is very different from Simatic manager for S7-300 and S7-400 PLC's.

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