Siemens S7 programming

B

Thread Starter

Bapi

Hello Friends,

I am new to Siemens programming and I am learning a bit of programming using LAD logic.

What I do now is use only the OB1 and do all my little programs there only and check by using the simulation feature. I am using Siemens S/w version 5.2 and mostly the CPU is S7 300: 315 2DP.

I desperately want to know how I can use the FC,SFC,SFB,DB for creating my programs with better flexibility.As of now I am using only the OB1 to write all my program in it.Can I use other Ob's also ?

How do I call the different Functions form my main program and how do they return the values ?

Any help with a small example would be most appreciated.

Is there any way I can get some real programming examples , easy enough for a beginner like me ?

Thanking you all in advance

Bapi.
 
You desperately need to read the manuals first.

Siemens Step7 systems, as all other systems as well, are not suitable for "improvised programming".

regards
Luca Gallina
 
D

Daniel Chartier

Hello Bapi;
Manuals and programming examples have been installed on your computer along with Step 7. Look for manual "First steps with Step 7" and "Working with Step 7" in the Simatic--> Documentation directory (from the Start button).
They will show you the way to use FCs, FBs and DBs. Follow the step-by=step project they use as an example.

Programming examples are refered to in the manuals and used to illustrate different points. Many are available through Step 7 standard installation. When you open a project in Step 7, there is a tab for example project. Commentaries are well-thought and useful (if you have installed Step 7 in a language you can read).

Hope this helps,
Daniel Chartier
 
C

Curt Wuollet

Step 7 would be my last choice for a beginner. I find it less pleasant than using a handheld programmer. It seems like a collection of tools tossed together.

Regards

cww
 
Hello Daniel,

Thank you very much for your e-mail.

I did try to understand the examples provided in siemens. They are nice but difficult to understand especially for a Newbie like me. I think I would be able to touch them only after a while.

Can you help me with a simple example??

Regards,

Bapi
 
Hello Luca,

Thankyou for your e-mail.

Well... I find Siemens as a sea full with information but dificult to find and when you find it it is difficult to comprehend.

So my friend I ask for your help.

Regards

Bapi
 
Dear Daniel,

while appreciating your time and far from wanting to start a flame, I'd like to ask us all whether we should *really* keep on answering these kind of questions... We're talking about automation and engineering, not housewives' how-to-apple-pie and we *do expect* aggressive approach to
problems: who'd hire or rely on an engineer that doesn't even bother to explore the software package he just installed on his PC? The "start button->simatic->documentation" path is primary school stuff, still we have "want-be-engineers" posting such questions!

Again, it's not a matter of negating a help, everybody has been a beginner. But there's much more involved (and dangerous) in growing lazy minds.

regards,
Luca Gallina
 
Dear Luca,

Thankyou for sharing your ideas about various approaches to a problem.I am sure you make your employer very happy

regards

bapi
 
C

Curt Wuollet

Let me gently and politely explain what is being said here. Everyone had to begin someplace and somehow, there's nothing wrong with asking questions. Lately what I, and probably others who consider it politically incorrect to comment are seeing, is people who should probably not be doing controls yet, doing controls.

Programming a PLC is a great convenience compared to other ways of controlling machines and processes. But it is a minor part of those tasks. Understanding how to control what you intend to control is far more important than what tools you use. Much of the documentation has traditionally been targeted at electricians. The reason for this is that they are already familiar with controlling things and can most often interpret a ladder diagram and do things safely. More recently, there has been an increasing trend towards electronic knowledge. math and traditional programming as these people get drawn towards the hardware end of industry. Most people who have these types of knowledge can productively and _safely_ add PLCs to their toolbox.

But simply programming a PLC without this background is unlikely to produce good control solutions and worse, can be extremely hazardous to life and property. That's why, if the problem is that you can't understand the documentation or what is being accomplished with PLCs or don't want to acquire the prerequisite background, the responsible solution is not to do it anyway. And while it is often a judgment call, without knowing what the person asking the question knows, it's often not a good thing to help people do what they might not qualified to do. And that's coming from someone who has tried to help a lot of folks with electronics and instrumentation.

Regards
cww
 
Dear Bapi,

I *am* an employer.

And irony doesn't help much.
Read the manuals first, then post your questions: you'll be welcome.

regards
Luca Gallina
 
Hi Bapi,

Myself also a newface to SIEMENS S7 FAMILY; surfing the books & hubs to learn the system. pls let me know whether you r interested to share ur knowledge with me about SIEMENS S7. if so pls contact me at my mail id, [email protected] . hope i'll get a favourable reply.

thanx & regards...
ramesh.s
 
A simple approach to take is as follows:

1)Insert a Function Block into the blocks folder.

2)Treat the FB as if it were a virtual PLC:
2.1)At the top, the declaration area, define inputs at the INPUT section and outputs at the OUTPUT section. Internal variables are defined in the STAT section.
2.2)Write your logic in this FB using only the variables that you defined in the declaration area.
2.3)Save and close the FB

3)Open OB1 and drag your FB from the Instruction Overview browser (the instruction library). It will be in the folder "FB blocks"

4)Allocate a data block (DB) for this instance of the FB call. You can call the FB multiple times with different DB. If you are in LAD then just type in DBx where the red question marks are atop your FB. "x" needs to be a number like 1 or 36 or something.

5)fill in the Inputs (left side of FB) and the outputs (right side of the FB). For example if you have declared an input to your FB like "START_MACHINE" then you might type in "StartPB_1001" or I1.0 at that input.
 
A

Abdullah jan

hi.
this is abdullah jan from pakistan.
i want some information about (PLC S-7)
how can i upgrade the software of them.and complete proccess of reinstalong of the software of that.

its mean i have software copy in my another harrd disk. so i want to reinstaling method of it. when my plc software CURPPTED.
i hope you will give me info about that.

Best Regards.
abdullah jan.
E&I
 
K

KIVANÇ AYDIN

You can image your hard disk to an empty hard disk.

KIVANÇ AYDIN
ELECTRONICS & AUTOMATION ENGINEER
 
F
I would like to respond to Luca. I have recently had email traffic with you in regards to your training sim (Faurecia Interior Systems). I would advise that you be a little easier on persons trying to make it in this field. Every PLC programming language has its problems and in this case my opinion of Siemens S7 is that it is about the most unfriendly software I have ever had to use. I am new to Step 7 and I would rather go to the dentist who is out of novacaine then program in 3 programming languages thrown together in 1 program. I am always willing to help anyone, even with the basics due to the fact we are small community and someday I may need help on something that they know more about.

Respectfully,
Fred D Eckert
 
L
Dear Fred,

Yes, maybe I was a bit too rude. But I think that posting questions (which means "taking others' time and attention") without even bothering to flip the front cover of the manuals is a bad and unrespectful habit (and I snapped, sorry).

About your Siemens S7 opinions, get a pair of boxing gloves and jump on the ring... In the A-list, as in other communities, there are hot positions at both fans and detractors' corners. ;-)))

My hint: If you do not like Simatic S7, drop it and select something else you feel more comfortable to work with. Personally, I dropped Allen-Bradley and others...

Regards,
Luca Gallina
 
Bapi,

You have set out on a quest. Siemens is not the easiest, but in my opinion one of the most powerful. Trick is to understand the tools they give you and their intent. OB1 is your main call. Almost no legal operations should be performed here. Do this in an FB or an FC (I prefer the use of the FB) and call it in OB1. Simple subroutine programming.

SCL is useful for craeting blocks that will be used many times, like Conveyor or Motor. Then you can call the respective block in ob1 and tie your in's and out's to the block.

Good luck and try this book... "Automating with Step 7 in STl and SCL" by Berger. Can be very helpful with programming examples. Also comes with a disk of examples.
 
S
One has to take a Siemens Level 1 programming course before one can even try to understand a written program. So I suggest take a Siemens Level 1 programming course, and start from there just like I did.

Then there is profibus interface, STL, SCL and graph.

Good Luck,
Surjit
 
Dear Curt & Luca

Siemens has a far more complex way of programming than most automation equipment manufacturing companies and while this makes it hard for newbies, it also sets them apart from the rest as far as power and abilities are concerned.

What is however sad is that such a powerfull system has such a poor reputation amongst end users primarily as result of the lack of helpfulness they encounter when seeking assistance from those in the know. I myself have fallen foul of this superiority attitude of Siemens when we still had our own local office/branch and I got the impression they felt that they were doing me a favor by speaking to me at all. Sad to say that the only assistance we get these days is from small systems integrators (at a price).

Needless to say, every PLC I have installed from there on has been an Omron as they are even prepared to provide me with on site support and advice is only but a phone call away no matter how "stupid" the question. They know that they will be the first ones I turn to the next time I have the need of a PLC for a project.

In reality, unless you are intending becoming a systems integrator installing & programming a lot of PLCs, I would not suggest that you bother learning how to program Siemens PLCs as it is just too complicated for occasional use.

If you look at the time wasted pointing fingers at someone asking what was deemed to be a stupid question, it could have been halved by just being helpfull. I'll bet that he would think twice before asking another question for fear of being crucified for not understanding what he read.

Thanks for the opportunity to raise this issue.

Regards,
Gary
 
Top