New to Siemens S7......and programming

scimdarren

Member
Join Date
Aug 2005
Location
Winnipeg
Posts
30
Hi All

I am new to this site.

I have a background in Electrical maintenance and therefore have a reasonable understanding of PLC software with regard to troubleshooting control faults etc. - I am not a programmer!
I have a new work opportunity where I have been introduced to Siemens S7 and a piece of equipment that needs a program, my peers have no knowledge of it and therefore I am somewhat 'alone'.

I have a good appreciation of Allen Bradley RS Logix but whilst familiarising myself to S7, I am struggling to grasp the concept of S7's relationship of blocks and there hierarchy- I am finding the S7 pdf files a little daunting and am wondering if there are any 'plain English' tutorials on the subject.

The project is not a large one, although it does use a lot of Analog I/O's and communication to Siemens Inverters via Profibus.

Regards

SD
 
The number one advice I can give you is to get a "live" PLC to learn on.
Not one that is used in the production, but one where your goofups have no consequences.

It will be better to work with the bits and bytes than to read the manuals. If you can get a "simulator" input - a bank of switches and maybe an analog 4-20 mA potentiometer or two it will be most helpful too.
 
JesperMP said:
It will be better to work with the bits and bytes than to read the manuals.
I agree, but it is also very true that you need to read the manuals from time to time also. I have seen too many problems which could have been prevented by reading the manuals (and sometimes it was me :oops: who made that mistake 📓 ).

Kind regards,
 
I agree, but it is also very true that you need to read the manuals from time to time also. I have seen too many problems which could have been prevented by reading the manuals (and sometimes it was me :oops: who made that mistake 📓 ).

Very true :ROFLMAO: But in the case of siemens read the manual at least 5 times to get some understanding!

Steve
 
OK, I didnt mean to say "Dont read the manuals at all".
I meant to say that working with a live PLC - in combination with reading the manuals - will be much faster than just reading the manuals.
 
Thanks guys.

I have the Panel next to me so I have the benefit of 'safe experimentation'.
Probably best if I start with some basic questions.

I want to process a level controller 4-20mA input, I have discovered FC105 and I appear to have made a block call to FC2 (which is where I wish to keep this automation task)- I can see a raw value and the real output, now I want this to control a digital output from a compared value (greater than or equal to).

Please can someone talk me through it, I am having big problems getting to grips with S7 addressing.

Cheers
Darren
 
Paste this into a new network with STL turned on:

L MD 100
L 5.000000e+000
>=R
= Q 0.0

If you want to, you can switch to LAD.

Explanation:
The output from the FC105 is a floating point value (REAL). So the comparison block has to be a "compare REAL" (>=R).
There are similar instructions for INTs (>=I)
and DINTs (>=D).

edit:
The example assumes that the analog value is in MD100.
The size has to be two words (a "double") because it is a REAL. Thus it is MD100 and not MW100 or MB100. MD100 spans the bytes MB100, MB101, MB102 and MB103, as well as the words MW100 and MW102.

Hope this helps.
 
Last edited:
Thanks, That is awesome, I was using the wrong type of comparator!

Please could you explain what 5.000000+000 represents?

The 'real' value I have used as the output for my FC105 block is md104- would I put that on IN2?

Darren
 
Sorry to bother you again.
After putting in the recommended code, I now have an error indicated on my raw input:
It was piw288 and the error when trying to save says "There are still invalid addresses or jump labels in the network"?

Also I have entered a comparator variable MD96 (DWORD), do I need to load this into a data file manually?

Thanks for your patience
 
What code exactly ?

The comparator MD96 formatted as a DWORD is not right if you have changed the REAL constant in my example to a variable (MD96). It must be a REAL when comparing with another REAL.
 
.. do I need to load [MD96] into a data file manually?
To make some code quickly, use Merkers like MD96.
To make some kind of "structured" code and data often means using Datablocks. You could have used a DB variable, such as DB10.DBD96 for example. To use such a DB variable you must create the DB, and then format addresses within it (DB10.DBD96 must be a REAL then).
 
Ok, I was getting confused, thinking that a REAL Value had to entered into a data table in the same way as a variable.

Thanks for your advice, I have had some success!

JesperMP said:
What code exactly ?

The comparator MD96 formatted as a DWORD is not right if you have changed the REAL constant in my example to a variable (MD96). It must be a REAL when comparing with another REAL.
 
I think that I have to explain a few things.

In STEP7, Merker variables can be used without symbols. If yo do use symbols (ecommended) then you must also decide what type a variable becomes (MD96 can be a DWORD, a DINT, a REAL, or a TIME for example).

DB addresses MUST be assigned a symbol.
There is a symbol for the entire DB block, and there are symbols for each address within the block.
Thus DB10.DBD96 could be "My_test_DB".My_test_real.
 
I am still continuing with my experimentation, I want to perform a basic analog Output function, I wish to drive a 0-10V output direct from the PLC, so basically the facility where I can manually enter a value and it will get moved and scaled to my desired output (PQW272).

I have the luxury of a test PC and a 0-10V actuator, hopefully this will help me to master moving data around in siemens.

Can someone help me with a logic example to achieve this?

Many Thanks

Darren
 

Similar Topics

Hey everyone, I am looking for a version of siemens software to upload and download programs to an S5. I would like a version that runs off of...
Replies
2
Views
414
Hi, There's a problem I face with upgrading the OS from XP which has the Step 7 Lite installed to windows 10. As I can't use a cracked version of...
Replies
2
Views
540
I have a customer who had a faulty Siemens OP7. They sourced a replacement. They have the original program. I downloaded the program to the...
Replies
10
Views
2,492
Hi there, I have three pumps, I have to start first pump for 8 minute and after that it should be turned off and other one start simultaneously...
Replies
11
Views
1,792
Hello I looking for help in TIA portal programming. In RSLogix I am a hot key wizard and can write code very fast. Is it just me or is it just a...
Replies
5
Views
2,257
Back
Top Bottom