You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old July 25th, 2006, 09:31 AM   #1
NetMan
Member
United States

NetMan is offline
 
NetMan's Avatar
 
Join Date: Mar 2004
Location: Illinois
Posts: 29
New to S7 and MP270

As the title states, I'm new ... real new ... to the Siemens PLC stuff. I'm a die hard A-B programmer. I've been able to "reverse-engineer" much of the S7 program on a German Machine. All the descriptions & documentation is in German. I've been trying to translate to English. Monitoring the S7 program and poking at the buttons on the MP270, I've been able to document ... in English ... much of the program. I've been able to do a small amount of editing ... ie ... added a stack light for machine status. Nothing safety related or changes to the machine's function. So ... I'm trying ... but I just can't seem to get a grip on the "big picture" of interfacing the MP270 and the S7. I know this is gonna sound stupid, but I have no formal S7 training. I'm not going to start writing S7 code from scratch. I just want to be able to look at, and understand this S7 for maintenance and troubleshooting purposes. Here's an example:
I have Protool to examine the MP270 Application
I have IBH Softec to examine the S7 Program

I'm trying to find the "link" between the F1 key on the MP270 and the address (which I cannot find) in the S7 program.

Protool indicates that the F1 to F6 keys are tag'd "tasteF1_F6"
with Type: WORD, Address: MW230 and Elements: 1, I checked each function key:
F1 uses bit 1
F2 uses bit 0
F3 changes to a different screen
F4 uses bit 3
F5 changes to a different screen
F6 uses bit 5

Now ... in the S7 program I cannot or have not been able to find any relation to address MW230 or even M230, as I've seen this "M" address before in the program, but not "MW".
I guess I'm asking ... just how is this relation made? Shedding a little light on this would ... hopefully ... open up the "ahhhhh, I get it" door, thus making my time spent much more productive. There are still issues like how timer values, numerical values, screen changes and the like are handled, but one small step at a time.
Thanks for your input in advance.
Your humble A-B programmer in a Siemens world,
- Tony
__________________
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
- I happen to be both.
  Reply With Quote
Old July 25th, 2006, 09:50 AM   #2
SimonGoldsworthy
Member
United Kingdom

SimonGoldsworthy is offline
 
SimonGoldsworthy's Avatar
 
Join Date: Mar 2005
Location: England
Posts: 1,079
How have you been looking for any relation to MW320 etc ?
Using the Reference data you can check the Assignment box and you get a list of all I/Q/M/timers/counters with a cross indicating they have been used + indication that a byte/word/double word access is used
  Reply With Quote
Old July 25th, 2006, 09:53 AM   #3
Gambrinus
Member
Latvia

Gambrinus is offline
 
Join Date: Oct 2005
Location: Riga
Posts: 248
Don't worry, I haven't formal S7 training too, but it's not a problem.
It's normal what you described. Siemens use the same memory area for word, byte and bit addresses. M230.0 occupies LSB of MW230.
  Reply With Quote
Old July 25th, 2006, 09:56 AM   #4
Gambrinus
Member
Latvia

Gambrinus is offline
 
Join Date: Oct 2005
Location: Riga
Posts: 248
See Options -> Reference Data -> Assignment. There you can see all types of access - bit, byte, word, dword.
  Reply With Quote
Old July 25th, 2006, 10:03 AM   #5
NetMan
Member
United States

NetMan is offline
 
NetMan's Avatar
 
Join Date: Mar 2004
Location: Illinois
Posts: 29
I've tried searching for M230.1 and get "operand not found". I thought it should be so easy. But it isn't ... or maybe I'm looking in the wrong place.
__________________
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
- I happen to be both.
  Reply With Quote
Old July 25th, 2006, 10:09 AM   #6
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,308
Hi Netman.

I do both AB and S7, so feel free to ask.

I dont know how IBH softec sorts the XREF, but in Siemens own software it is strictly alphabetical.

For example to see all possible accesses to M230.1 (used by F1), you would have to check the following:

M230.1
MB230
MD227 (unlikely, but you never know)
MD228
MD229 (again unlikely)
MD230
MW229 (unlikely)
MW230

In Siemens software, the XREF is NOT sorted nicely to follow the byte number. The "type" comes in and means that first you see all the bit accesses, then the byte accesses, then the Double word accesses and finally the word addresses. It means a lot of scrolling if you want to check just a few addresses.

It is possible that the programmer reserved the bit addresses for future use. That could be the reason why they do not appear in the XREF.
It is also possible (but relatively unlikely) that he accessed the bit addresses indirectly, in which case they do not appear in the XREF.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old July 25th, 2006, 10:09 AM   #7
NetMan
Member
United States

NetMan is offline
 
NetMan's Avatar
 
Join Date: Mar 2004
Location: Illinois
Posts: 29
Same with the K1 thru K16 keys on the MP270. I find the tag "tasteK1_K8" is MW236 and find the respective bits for each. When in the S7 program and I search for ... say ... M236.0 I get operand not found. There is a function associated with this key on the machine ... but I'm having trouble finding it.
- Tony
__________________
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
- I happen to be both.
  Reply With Quote
Old July 25th, 2006, 10:10 AM   #8
PeterW
Member
Canada

PeterW is offline
 
Join Date: Jun 2006
Location: Edmonton
Posts: 2,515
Gambrinus was a little off there, M 230.0 is the Least significant bit of the Most significant BYTE of MW230.

MW230 is made up of two bytes, MB230 and MB231.

If the HMI is looking at MW230, then its looking at 16 bits and bit 0 will be M 231.0 and bit 1 will be M 231.1 etc.

EDIT: BIT 8 = M 230.0
  Reply With Quote
Old July 25th, 2006, 10:12 AM   #9
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,308
Quote:
Originally Posted by NetMan
I've tried searching for M230.1 and get "operand not found". I thought it should be so easy. But it isn't ... or maybe I'm looking in the wrong place.
When you press the F1 key, does it "do" something ?
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old July 25th, 2006, 10:14 AM   #10
PeterW
Member
Canada

PeterW is offline
 
Join Date: Jun 2006
Location: Edmonton
Posts: 2,515
Also if your really unlucky its done indirectly.


You did say it was engineered in Germany...


Try puting MW230 in a VAT table and watch it as the buttons pressed, it may be quick enough to confirm M 231.0 or M 230.0.


EDIT: If its to quick (1 scan only) then try using a spare flag to capture the press. Even this may not work mind if it turns it off in the program before your capture point.

You could write

L Spare flag
L 0
>I
Jc over

L MW230
T Spare flag

over: nop 0

and put in a number of places to try and catch it

Last edited by PeterW; July 25th, 2006 at 10:17 AM.
  Reply With Quote
Old July 25th, 2006, 10:17 AM   #11
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,308
Quote:
Originally Posted by NetMan
I get operand not found.
Again, IBH may be different from the Siemens software in this respect, but when you search for addresses, only the one block from which you have selected the function is scanned, not all blocks.
There is also a "goto address" function in STEP7, which covers all blocks. Maybe there ís a similar function in IBH.
Try to look in the XREF rather than using the search function.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old July 25th, 2006, 10:17 AM   #12
NetMan
Member
United States

NetMan is offline
 
NetMan's Avatar
 
Join Date: Mar 2004
Location: Illinois
Posts: 29
Ahhhh ... now looking at the tag list ... I noticed MW230 is for F1 thru F6 and MW232 is for F7 thru F12. I typo'd a search for M231.0 and found it is located in the machine loader FC as a bit that seems to handle the Auto/Man load operation. This is also the description of the F2 key which has the tag "tasteF1_F6" using bit 0. Does this make sense?
- Tony
__________________
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
- I happen to be both.
  Reply With Quote
Old July 25th, 2006, 10:18 AM   #13
PeterW
Member
Canada

PeterW is offline
 
Join Date: Jun 2006
Location: Edmonton
Posts: 2,515
Yes?? IBH Softec ?? what is that??
  Reply With Quote
Old July 25th, 2006, 10:20 AM   #14
NetMan
Member
United States

NetMan is offline
 
NetMan's Avatar
 
Join Date: Mar 2004
Location: Illinois
Posts: 29
IBH Softec is the S7 programming software the company has. I do not have access to Step7.
__________________
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
- I happen to be both.
  Reply With Quote
Old July 25th, 2006, 10:20 AM   #15
Gambrinus
Member
Latvia

Gambrinus is offline
 
Join Date: Oct 2005
Location: Riga
Posts: 248
Quote:
Originally Posted by PeterW
Gambrinus was a little off there, M 230.0 is the Least significant bit of the Most significant BYTE of MW230.
Yes, LSB of MB230.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Simatic MP270 Fault Message urlauber1 LIVE PLC Questions And Answers 14 April 12th, 2006 04:31 AM
One panel for 3 PLC's (Siemens S7) Combo LIVE PLC Questions And Answers 13 September 15th, 2005 10:35 AM
MP270 connecting to more then one CPU (PLC S7) Combo LIVE PLC Questions And Answers 1 September 13th, 2005 11:23 AM


All times are GMT -5. The time now is 04:23 AM.


.